Add "room" awareness to each device

Posted on
Mon Jun 18, 2018 9:16 pm
jheddings offline
User avatar
Posts: 149
Joined: Dec 01, 2013
Location: Denver, CO

Add "room" awareness to each device

It would be really handy to have an optional "room" field for each device. I find myself naming everything something like "ROOM - DEVICE". If there was some way to have just a free text field for logging purposes or something, that would make organizing things easier. Eventually, I'm sure there are cool things you could do like have "room active" triggers or specific "room" actions.

I searched around a bit and didn't find this idea, so I thought I'd drop it in. Just something to think about!

Posted on
Mon Jun 18, 2018 10:11 pm
Different Computers offline
User avatar
Posts: 2541
Joined: Jan 02, 2016
Location: East Coast

Re: Add "room" awareness to each device

I use folders for this.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Mon Jun 18, 2018 10:17 pm
jheddings offline
User avatar
Posts: 149
Joined: Dec 01, 2013
Location: Denver, CO

Re: Add "room" awareness to each device

It's a good work around... If there were some actions to perform on folders, that could be a help. Then it would just be the logging and display options.

Posted on
Tue Jun 19, 2018 7:53 am
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: Add "room" awareness to each device

I actually do both. I have folders for each room and category of device but then I also prefix each device with the room or category name. The reason for this is that if I want to find a device in Indigo fast I can go to the proper folder, if I want to find it on a list then all my categories are grouped together. It didn't take long after starting to use Indigo that I adopted this plan because it was difficult for me to pinpoint the device I wanted when I had so many that were similar (i.e., a Kitchen Ceiling Light, Sitting Area Ceiling Light, Garage Ceiling Light, Theater Ceiling Light...).

The only time this has been problematic has been on control pages (which I really don't use any more) because I had to manually rename the auto-named devices that I added. Otherwise it's been a good system.

For me, what I would rather see is to have an alias name added to devices and the ability to pull device lists using either - this has the added functionality of being able to natively work with the various bridges that allow you to rename the device (Alexa, HomeKit, etc) to instead just refer to an alias name.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Thu Jun 21, 2018 4:56 pm
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Re: Add "room" awareness to each device

I wish I could sort by room, device type, or function. At present, I use folders by device type, and I prefix the name with the device type so I can find it quick.

Ex:
SWITCH_livingroom_sconces
SWITCH_den_ceiling
PIBEACON_green_dan


Sent from my iPhone using Tapatalk

Posted on
Fri Jul 06, 2018 12:15 pm
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Re: Add "room" awareness to each device

This may be crazy- but in my plugin research, I am seriously considering making custom devices for People and Rooms. These could contain states that link to appropriate devices for that room (maybe using Global Property Manager or something), maybe allowing easier access to relevant info. Additionally, the Room device could contain info on adjacentRooms, perhaps facilitating my holy grail of room-to-room occupancy detection.

Just a thought.


Sent from my iPhone using Tapatalk

Posted on
Fri Jul 06, 2018 1:41 pm
jay (support) offline
Site Admin
User avatar
Posts: 18219
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Add

mundmc wrote:
This may be crazy- but in my plugin research, I am seriously considering making custom devices for People and Rooms. These could contain states that link to appropriate devices for that room (maybe using Global Property Manager or something), maybe allowing easier access to relevant info. Additionally, the Room device could contain info on adjacentRooms, perhaps facilitating my holy grail of room-to-room occupancy detection.


Any plugin can add arbitrary plugin properties to any device (that's in fact how the Global Property Manager works) so you don't really need to use it directly (though the source would definitely show you how it's done). So it really depends on how you intend on using that linkage information.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Jul 06, 2018 2:25 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Add

mundmc wrote:
This may be crazy- but in my plugin research, I am seriously considering making custom devices for People and Rooms. These could contain states that link to appropriate devices for that room (maybe using Global Property Manager or something), maybe allowing easier access to relevant info. Additionally, the Room device could contain info on adjacentRooms, perhaps facilitating my holy grail of room-to-room occupancy detection.

Just a thought.

If I get your line of thinking, that could be very interesting. There's more than one way to do it, but I think the concept is a good one.

[Living Room]
...
doorsWindowsOpen: true
humidity: 55
illumination: 100
motion: false
temperature: 72
...

with a device for each room showing the same states. I can't think of a plugin that does this. I like it.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Fri Jul 06, 2018 2:39 pm
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Add "room" awareness to each device

DaveL17 wrote:
with a device for each room showing the same states. I can't think of a plugin that does this. I like it.


Nice!

We’ll see if you like it when my first plugins give your os a kernel panic, possibly a kernel terror. I’ll get cracking on this.

Basic question, but do Indigo devices do something akin to pointers? E.g. changing a variable value changes another variable value automatically (without a trigger)?


Sent from my iPhone using Tapatalk

Posted on
Fri Jul 06, 2018 2:47 pm
FlyingDiver offline
User avatar
Posts: 7214
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Add

mundmc wrote:
Basic question, but do Indigo devices do something akin to pointers? E.g. changing a variable value changes another variable value automatically (without a trigger)?


I think the answer is no, but it could depend on what you're actually trying to do. First, Indigo devices don't really control variables. A plugin might, or a script, but (in general) devices don't do variables. They do states.

Now, a device could be "tracking" another device, so that a change in state of the original device would cause a change in state of the tracking device. Lots of plugins do that, including my Masquerade plugin.

So, what are you really trying to do?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Jul 06, 2018 2:49 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Add

mundmc wrote:
Basic question, but do Indigo devices do something akin to pointers? E.g. changing a variable value changes another variable value automatically (without a trigger)?

I guess I'm not sure I follow. Do you mean -- change the value of the Living Room Device temperature state based on the change of another Indigo device (which is the underlying source of the temperature)?

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Fri Jul 06, 2018 3:18 pm
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Add "room" awareness to each device

DaveL17 wrote:
Do you mean -- change the value of the Living Room Device temperature state based on the change of another Indigo device (which is the underlying source of the temperature)?


Exactly- sorry for my imprecise use of “variable”.

Example in pseudo code (I know the syntax is wrong)
dev = indigo.devices[“ROOM_living_room”]
dev.states[“temperature”] = indigo.devices[“ECOBEE_living_room”].states[“temperature”]
#above copies one device state to another

Can a device state contain something like a pointer in C -or- does it have to utilize a python mechanism to watch for state changes?


Sent from my iPhone using Tapatalk

Posted on
Fri Jul 06, 2018 3:22 pm
FlyingDiver offline
User avatar
Posts: 7214
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Add

mundmc wrote:
Example in pseudo code (I know the syntax is wrong)
dev = indigo.devices[“ROOM_living_room”]
dev.states[“temperature”] = indigo.devices[“ECOBEE_living_room”].states[“temperature”]
#above copies one device state to another

Can a device state contain something like a pointer in C -or- does it have to utilize a python mechanism to watch for state changes?


It has to use an Indigo API mechanism (in Python) to watch for changes and update the local (to the plugin) devices as needed.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Jul 06, 2018 3:27 pm
jay (support) offline
Site Admin
User avatar
Posts: 18219
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Add

mundmc wrote:
Can a device state contain something like a pointer in C -or- does it have to utilize a python mechanism to watch for state changes?


Well, since device instances exist in multiple independent processes, pointers (to memory locations) wouldn't work. We provide ways for a plugin to subscribe to device changes such that your plugin has a method called whenever a device changes. You implement that method call, examine the changed device (to determine if you're interested), then do whatever you need with the updated device data.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Jul 06, 2018 3:43 pm
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Re: Add "room" awareness to each device

jay (support) wrote:
Well, since device instances exist in multiple independent processes, pointers (to memory locations) wouldn't work.


Yeah, that makes sense. I recall, from a long time ago, processes being kinda proprietary about their memory. Thank you- I’ll read up on the built in mechanism and take a stab at it while potty training my 2 year-old this weekend. When life is craziest, I get cravings to code.


Sent from my iPhone using Tapatalk

Who is online

Users browsing this forum: No registered users and 2 guests