Page 1 of 1

API Queries Help

Posted: Thursday 06 July 2017 22:05
by InMySights
Hi,
I have a Raspberri Pi 2
Aeotec Zwave stick
Stable version of Domoticz

I am writing an app that is using the HTTP rest api to turn devices on/off etc. Recently I started seeing on the web site a switch or two would be RED and after some research it seems that the switch in particular is Offline.

I do not see a means to query the server for the availability of the device in question.
Is there a command that can be used via curl.exe, REST or other means to detect for availability?
Is there a command that can be used via curl.exe, REST or other means to query all devices listed in Settings for my Aeotec stick?
like 019 (0x13) Kitchen Slider Sensor Ecolink Unknown: type=0001, id=0002
Also going into Settings for my Zwave USB stick I can see that you can see the Group Network and perform a Heal on a Node or as a group.. Can this be done via another mechanism also?

Thanks
Brad

Re: API Queries Help

Posted: Thursday 06 July 2017 22:40
by Egregius
Use developer view of your browser and you'll see all the calls.

Re: API Queries Help

Posted: Friday 07 July 2017 0:40
by InMySights
Thanks for the reply but I have the developer tools open in Chrome and the browser is calling the line below and get a return value. There is No indication of state of the devices in this... What am I missing? There are 3 items in my Utility tab that are red ...

http://xxxxxx/json.htm?type=devices&fil ... 588&plan=0

{
ActTime: 1499380564,
ServerTime: "2017-07-06 14:36:04",
Sunrise: "04:29",
Sunset: "19:59",
status: "OK",
title: "Devices"
}

Re: API Queries Help

Posted: Friday 07 July 2017 6:07
by Egregius
Remove the lastupdate part of the url:

Code: Select all

/json.htm?type=devices&filter=utility&used=true&order=Name&plan=0
Then you'll see a 'havetimeout' field.

The url to show all z-wave nodes (change idx to idx of your zwave hardware):

Code: Select all

/json.htm?type=openzwavenodes&idx=3
In that reply you'll see a 'State' field indicating if the node is awake, sleeping, dead,...

Re: API Queries Help

Posted: Friday 07 July 2017 18:27
by InMySights
Thank you I see this now.

Is there an effort to add these calls to the API documentation?

Re: API Queries Help

Posted: Friday 07 July 2017 23:59
by Egregius
Edit the wiki as you fit ;)