python JSON interface for changedDevices

Python and python framework

Moderator: leecollings

Post Reply
wile
Posts: 5
Joined: Tuesday 20 December 2016 21:54
Target OS: -
Domoticz version:
Contact:

python JSON interface for changedDevices

Post by wile »

Hi,
in LUA there is the possibility to get only the status of changed devices by using devicechanged['xxx'].

Is there something similar possible with the http/JSON interface and python?

Thanks
wile
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: python JSON interface for changedDevices

Post by Egregius »

The developer console of a good browser reveales a lot...

This json call only shows devices updated since a unixtimestamp:

Code: Select all

http://192.168.2.10:8084/json.htm?type=devices&used=true&lastupdate=1482489967
Another approach could be to use the lua part of my pass2php script at https://github.com/Egregius/LUA-Pass2PH ... ss2php.lua
Then you send the devicechanged table as a argument to a command.
wile
Posts: 5
Joined: Tuesday 20 December 2016 21:54
Target OS: -
Domoticz version:
Contact:

Re: python JSON interface for changedDevices

Post by wile »

Great, thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest