Accessing the room plans.

Python and python framework

Moderator: leecollings

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

Accessing the room plans.

Post 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.
brunonar
Posts: 10
Joined: Monday 23 October 2017 3:22
Target OS: Windows
Domoticz version:
Contact:

Re: Accessing the room plans.

Post 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.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Accessing the room plans.

Post 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 ?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
brunonar
Posts: 10
Joined: Monday 23 October 2017 3:22
Target OS: Windows
Domoticz version:
Contact:

Re: Accessing the room plans.

Post 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?
mvzut
Posts: 443
Joined: Thursday 12 November 2015 10:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Accessing the room plans.

Post 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).
Raspberry Pi 4 - RFXtrx433 - CC2531 Zigbee - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - 6 x Sonos - 4 x IP cameras - Wall mounted tablet + Dashticz - Google Home integration - MANY switches/sensors
brunonar
Posts: 10
Joined: Monday 23 October 2017 3:22
Target OS: Windows
Domoticz version:
Contact:

Re: Accessing the room plans.

Post 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!
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest