Page 1 of 1

Accessing the room plans.

Posted: Wednesday 12 September 2018 22:39
by brunonar
How do I get the floor plan and room plan associated with my python plugin's Device?
I need it for context commands that I'm trying to create. I'd like to do something like "turn off all lights of Mary's room" or "Turn on John's TV".

Thanks.

Re: Accessing the room plans.

Posted: Monday 08 October 2018 22:56
by brunonar
I tried everything but I think that it's not a feature currently supported.
What I did temporarily to solve the problem was use the device's description field as the device location, so the plugin could access it. But this is very bad.

Re: Accessing the room plans.

Posted: Monday 08 October 2018 23:03
by waaren
brunonar wrote: Monday 08 October 2018 22:56 I tried everything but I think that it's not a feature currently supported.
What I did temporarily to solve the problem was use the device's description field as the device location, so the plugin could access it. But this is very bad.
http://domoticzIP:domoticzPort/json.htm?type=plans&order=name&used=true gives you all the rooms and http://domoticzIP:domoticzPort/json.htm?type=command&param=getplandevices&idx=<planID> gives you all devices in the roomplan <planID>
Does that not help you ?

Re: Accessing the room plans.

Posted: Monday 08 October 2018 23:59
by brunonar
waaren wrote: Monday 08 October 2018 23:03 http://domoticzIP:domoticzPort/json.htm?type=plans&order=name&used=true gives you all the rooms and http://domoticzIP:domoticzPort/json.htm?type=command&param=getplandevices&idx=<planID> gives you all devices in the roomplan <planID>
Does that not help you ?
Thank you for the answer, Waaren!

My plugin would have to ask the user's username and password for that, wouldn't it?

Accessing the room plans.

Posted: Tuesday 09 October 2018 7:34
by mvzut
brunonar wrote:
waaren wrote: Monday 08 October 2018 23:03 http://domoticzIP:domoticzPort/json.htm?type=plans&order=name&used=true gives you all the rooms and http://domoticzIP:domoticzPort/json.htm?type=command&param=getplandevices&idx=<planID> gives you all devices in the roomplan <planID>
Does that not help you ?
Thank you for the answer, Waaren!

My plugin would have to ask the user's username and password for that, wouldn't it?
Not if you use 127.0.0.1 and add this to the Local Networks list (under settings).

Re: Accessing the room plans.

Posted: Tuesday 09 October 2018 8:07
by brunonar
mvzut wrote: Tuesday 09 October 2018 7:34
brunonar wrote:
waaren wrote: Monday 08 October 2018 23:03 http://domoticzIP:domoticzPort/json.htm?type=plans&order=name&used=true gives you all the rooms and http://domoticzIP:domoticzPort/json.htm?type=command&param=getplandevices&idx=<planID> gives you all devices in the roomplan <planID>
Does that not help you ?
Thank you for the answer, Waaren!

My plugin would have to ask the user's username and password for that, wouldn't it?
Not if you use 127.0.0.1 and add this to the Local Networks list (under settings).
Thank you very much! I'll try it!