A very simple query for a beginner?

Hi everyone _ I’m looking to write some code to talk to my Vera locally and query the status of some motion detectors. A perfect solution would be to have a Python library that accessed the Vera API, but I haven’t found anything like that yet.

Is there a simple way to poll the vera for the motion detector status and/or last time it triggered? In the device settings I have

Device_type: urn:schemas-micasaverde-com:device:GenericIO:1
id: 17
json: D_GenericIO1.json

Can I just slurp down the JSON describing the state of the detector?

This should help: http://wiki.micasaverde.com/index.php/Luup_Requests#variableget

See also: GitHub - pavoni/pyvera: A python library to control devices via the Vera hub and GitHub - cybermaggedon/pyvera: Python Vera interaction - I’ve never tried this, just searched.

[quote=“jswim788, post:2, topic:199570”]This should help: http://wiki.micasaverde.com/index.php/Luup_Requests#variableget

See also: GitHub - pavoni/pyvera: A python library to control devices via the Vera hub and GitHub - cybermaggedon/pyvera: Python Vera interaction - I’ve never tried this, just searched.[/quote]

pavoni/pyvera is the Python library used by HomeAssistant to integrate with Vera. It’s excellent and well-maintained.

Yes, I was going to point to that too. Although I’m no Python fan, or any kind of expert, this does seem to be the library of choice if you really can’t use Lua.

[quote=“rigpapa, post:3, topic:199570”][quote=“jswim788, post:2, topic:199570”]This should help: http://wiki.micasaverde.com/index.php/Luup_Requests#variableget

See also: GitHub - pavoni/pyvera: A python library to control devices via the Vera hub and GitHub - cybermaggedon/pyvera: Python Vera interaction - I’ve never tried this, just searched.[/quote]

pavoni/pyvera is the Python library used by HomeAssistant to integrate with Vera. It’s excellent and well-maintained.[/quote]

This is perfect, thank you very much!

[quote=“rigpapa, post:3, topic:199570”][quote=“jswim788, post:2, topic:199570”]This should help: http://wiki.micasaverde.com/index.php/Luup_Requests#variableget

See also: GitHub - pavoni/pyvera: A python library to control devices via the Vera hub and GitHub - cybermaggedon/pyvera: Python Vera interaction and https://19216801help.com/ - I’ve never tried this, just searched[/quote]

pavoni/pyvera is the Python library used by HomeAssistant to integrate with Vera. It’s excellent and well-maintained.[/quote]
Thanks! It helps!