12-14-2018 08:12 AM
playing around with the subdevice id's I am not getting it into the correct format....
{"status":"not-found","time":null,"flags":{},"data":{"message":"Subdevice not found"}}
I've found my Id number from the List working and printing all my devices out.
So close....
12-14-2018 08:23 AM
The Curl Example is here:
Fetch Usage Data:
Curl –L –X POST –H "X-Auth-Username:myaccount@hotmail.com" –H "X-Auth-Password:mypassword" –H "Content-Type: application/json" –d ’{"id" :49819, "start_time": "2017-02-16 12:34", "end_time":"2017-02-28", "data_type":"reported_temperature", "resolution":"daily"}’ https://mihome4u.co.uk/api/v1/subdevices/get_data
and the LabVIEW Strings that work are:
https://mihome4u.co.uk/api/v1/devices/list
James
12-17-2018 05:04 AM
The Curl Example is here:
Curl –L –X POST –H "X-Auth-Username:myaccount@hotmail.com" –H "X-Auth-Password:mypassword" –H "Content-Type: application/json" –d ’{"id" :49819, "start_time": "2017-02-16 12:34", "end_time":"2017-02-28", "data_type":"reported_temperature", "resolution":"daily"}’ https://mihome4u.co.uk/api/v1/subdevices/get_data
I understand. So instead of doing a GET request, that API uses a POST request. Your LabVIEW code will mostly stay the same, just change the "http GET" to an "http POST" node, and link the data string (the part between "-d" and the url in the command above) to the node's "buffer" terminal.
As stated before, I unfortunately can't test this in lack of an MiHome account.
12-17-2018 08:30 AM
Hey
I have changed the Password so can allow you to have a test with... I have tried your idea but again something not quite right....
Please email me on jstigwood@hotmail.com...
Many thanks 🙂
James