Page 1 of 1

Read all enabled devices with JSON in one step

Posted: Wednesday 18 September 2019 14:23
by Schorschi
Hi,

is it possible to read all devices in the device list in one step with JSON?

I know that it is possible to read one after one by selecting the divice by the index.
I am looking for a faster solution to read the states of all divices in a shortest time over JSON.

THX

Re: Read all enabled devices with JSON in one step

Posted: Wednesday 18 September 2019 16:34
by Gravityz
i think this gives you everything
ofcourse you need to do some scripting to filter out the names and the status
http://192.168.1.xx:xxxx/json.htm?type=devices&used=true

Re: Read all enabled devices with JSON in one step

Posted: Wednesday 18 September 2019 20:52
by Schorschi
Hi,

i tested your suggestion. It does not work.
But this work:

http://192.168.xxx.xxx:port/json.htm?type=devices

You get all enabled devices in one json file.

Perfect!!!!

THX

Re: Read all enabled devices with JSON in one step

Posted: Wednesday 18 September 2019 21:06
by waaren
Schorschi wrote: Wednesday 18 September 2019 20:52 http://192.168.xxx.xxx:port/json.htm?type=devices
This command will also show the unused devices. ( "Used" : 0, ). That is if you replace 192.168.xxx.xxx:port with your <domoticz IP>:<domoticz Port>
The command @Gravityz suggested will give you only the used devices. That is if you replace 192.168.1.xx:xxxx with your <domoticz IP>:<domoticz Port>)