Accessing the room plans.

Python and python framework
Post Reply
brunonar
Posts: 12
Joined: Monday 23 October 2017 3:22
Target OS: Windows
Domoticz version:
Contact:

Accessing the room plans.

Post by brunonar » Wednesday 12 September 2018 22:39

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.

brunonar
Posts: 12
Joined: Monday 23 October 2017 3:22
Target OS: Windows
Domoticz version:
Contact:

Re: Accessing the room plans.

Post by brunonar » 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.

User avatar
waaren
Posts: 1226
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Accessing the room plans.

Post by waaren » Monday 08 October 2018 23:03

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 ?
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

brunonar
Posts: 12
Joined: Monday 23 October 2017 3:22
Target OS: Windows
Domoticz version:
Contact:

Re: Accessing the room plans.

Post by brunonar » Monday 08 October 2018 23:59

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?

mvzut
Posts: 427
Joined: Thursday 12 November 2015 11:55
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands
Contact:

Accessing the room plans.

Post by mvzut » 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).
Raspberry Pi 3 - RFXtrx433 - Aeon Z-Stick gen5 - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - Xiaomi Gateway - Sonos - IP cameras - Wall mounted tablet + Imperihome - MANY switches/sensors

brunonar
Posts: 12
Joined: Monday 23 October 2017 3:22
Target OS: Windows
Domoticz version:
Contact:

Re: Accessing the room plans.

Post by brunonar » Tuesday 09 October 2018 8:07

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!

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests