Page 1 of 1

Everything At A Glance (almost)

PostPosted: Mon Jul 26, 2021 8:44 am
by SearchCz
Been fine-tuning a control page I started maybe a year ago? My main motivation was security, so I was showing status of anything related to things being unlocked or open, or motion being detected where it wasn't expected. I put those "wacth me" toggles above the devices I might want to be notified about. When the "watch me" toggle is on for a particular device, I trigger pushover notifications whenever that device switches on.

This revision gives me visibility to almost all of my other devices that aren't exactly security related. LIghts, switches, interior doors and motion detectors. I like how the devices that are "on" stand out. This is my go-to control page in the evenings, when I maybe want to check on any ilghts that have been left on unintentionally. Speaking of which: I have a max time governors on most of the lights, and when they are nearing their maximum allowed "on" time I begin showin a kind of countdwn indicator above that device. (See "Piano"). Now I can see when a device is about tho shut itself off too!

One problem though ... I would like to trigger an action group any time the device state changes on any device. I'm struggling to get that to work when the state change is initiated at the control page. Any advice?

Re: Everything At A Glance (almost)

PostPosted: Mon Jul 26, 2021 9:33 am
by jay (support)
SearchCz wrote:
One problem though ... I would like to trigger an action group any time the device state changes on any device. I'm struggling to get that to work when the state change is initiated at the control page. Any advice?


To clarify: you have a device state changed trigger that doesn't fire when you control the device from a control page but it does work when it's controlled otherwise?

Re: Everything At A Glance (almost)

PostPosted: Tue Jul 27, 2021 6:11 am
by SearchCz
It looks like the only way I can specify a trigger on “any device”, is if it is based on a command being received rather than a device state changing. So the trigger I was attempting was on any command to any device. I’m seeing the Insteon command in my log file, but my triggered action doesn’t seem to be firing off.

Re: Everything At A Glance (almost)

PostPosted: Tue Jul 27, 2021 7:21 am
by DaveL17
Nice! What are you using to generate your gauges?

Re: Everything At A Glance (almost)

PostPosted: Tue Jul 27, 2021 9:18 am
by jay (support)
SearchCz wrote:
It looks like the only way I can specify a trigger on “any device”, is if it is based on a command being received rather than a device state changing. So the trigger I was attempting was on any command to any device. I’m seeing the Insteon command in my log file, but my triggered action doesn’t seem to be firing off.


That won't work - that trigger only fires when an Insteon device sends out a command. Changing the state of an Insteon device via Indigo won't trigger that.

What is the scenario for needing an action group to fire every time any device changes? Perhaps there's a different approach.

Re: Everything At A Glance (almost)

PostPosted: Tue Jul 27, 2021 12:10 pm
by SearchCz
DaveL17 wrote:
Nice! What are you using to generate your gauges?


Thank you! I drew those in photoshop, but I’m eliminating them because they eat too much real estate. Like 6 PNGs.

Re: Everything At A Glance (almost)

PostPosted: Tue Jul 27, 2021 12:16 pm
by SearchCz
I run a script every minute to see how long every device has been left on, and almost every device has a maximum amount of time in t is “allowed” to remain on. Near the end of that time, display a kind of “time is running out” graphic near that device’s graphic.

When time runs out, the device is switched off AND the countdown graphic is removed.

The problem is, if there is time remaining and somebody switches the device off …. that countdown graphic persists until the next t8me I run that scheduled script that checks on devices that might need to be turned off. But if. Could run that script immediately on any change of state, I would recognize that the device is now off and it no longer needs that countdown indicator.

jay (support) wrote:
SearchCz wrote:
It looks like the only way I can specify a trigger on “any device”, is if it is based on a command being received rather than a device state changing. So the trigger I was attempting was on any command to any device. I’m seeing the Insteon command in my log file, but my triggered action doesn’t seem to be firing off.


That won't work - that trigger only fires when an Insteon device sends out a command. Changing the state of an Insteon device via Indigo won't trigger that.

What is the scenario for needing an action group to fire every time any device changes? Perhaps there's a different approach.

Re: Everything At A Glance (almost)

PostPosted: Tue Jul 27, 2021 12:24 pm
by SearchCz
Check the “piano” device in the upper left, which has that countdown indicator at approximately 55 minutes remaining. When the light goes off, I want that to go away. You could write a trigger every individual device being turned off, but I WANT to write a trigger for ANY device State changing to off. Like, whenever ANY device turns off, run this script.

SearchCz wrote:
I run a script every minute to see how long every device has been left on, and almost every device has a maximum amount of time in t is “allowed” to remain on. Near the end of that time, display a kind of “time is running out” graphic near that device’s graphic.

When time runs out, the device is switched off AND the countdown graphic is removed.

The problem is, if there is time remaining and somebody switches the device off …. that countdown graphic persists until the next t8me I run that scheduled script that checks on devices that might need to be turned off. But if. Could run that script immediately on any change of state, I would recognize that the device is now off and it no longer needs that countdown indicator.

jay (support) wrote:
SearchCz wrote:
It looks like the only way I can specify a trigger on “any device”, is if it is based on a command being received rather than a device state changing. So the trigger I was attempting was on any command to any device. I’m seeing the Insteon command in my log file, but my triggered action doesn’t seem to be firing off.


That won't work - that trigger only fires when an Insteon device sends out a command. Changing the state of an Insteon device via Indigo won't trigger that.

What is the scenario for needing an action group to fire every time any device changes? Perhaps there's a different approach.

Re: Everything At A Glance (almost)

PostPosted: Tue Jul 27, 2021 1:27 pm
by jay (support)
There is no such trigger. Options:

  • Add triggers for each. Time consuming to initially set up, but once it's done then maintenance is probably relatively low
  • Write a simple plugin to do it. You'd need to subscribe to device changes - then every time any device changes, the plugin would get a deviceUpdated() call and you'd do whatever it is you need to do.
  • Run the existing script more often. It's a compromise, but if the script runs quick then you can probably run it every couple of seconds or something
  • I personally have never used it, but maybe the Timed Devices plugin might work better for your auto-off? Then you wouldn't need any scripts (at least I think you wouldn't).

Re: Everything At A Glance (almost)

PostPosted: Tue Jul 27, 2021 3:45 pm
by howartp
There’s also the Group Trigger plugin that may help.


Sent from my iPhone using Tapatalk Pro

Re: Everything At A Glance (almost)

PostPosted: Tue Jul 27, 2021 5:54 pm
by SearchCz
You nailed it ... spot on, and no heavy lifting at all !

howartp wrote:
There’s also the Group Trigger plugin that may help.


Sent from my iPhone using Tapatalk Pro

Re: Everything At A Glance (almost)

PostPosted: Mon Aug 02, 2021 6:53 pm
by mundmc
Great Control Page and great implementation!

Group Trigger and Group Change Listener are great. It seeeems like you might benefit from Timed Devices but I’m not entirely sure you need it given your current script.

Re: Everything At A Glance (almost)

PostPosted: Tue Aug 03, 2021 5:29 pm
by SearchCz
mundmc wrote:
Great Control Page and great implementation!

Group Trigger and Group Change Listener are great. It seeeems like you might benefit from Timed Devices but I’m not entirely sure you need it given your current script.


Thanks! I get the impression with Timed Devices that I would need to add a new "device" for everything that I want to have a countdown/timeout. What I implemented instead is a variable naming convention that coincides with my device names. If there exists a variable called MAX_whatevername, the device called whatevername will be turned off whenever its last_canged times is < MAX_whtevername minutes ago.

Re: Everything At A Glance (almost)

PostPosted: Wed Aug 04, 2021 12:28 am
by mundmc
SearchCz wrote:
mundmc wrote:
Great Control Page and great implementation!

Group Trigger and Group Change Listener are great. It seeeems like you might benefit from Timed Devices but I’m not entirely sure you need it given your current script.


Thanks! I get the impression with Timed Devices that I would need to add a new "device" for everything that I want to have a countdown/timeout. What I implemented instead is a variable naming convention that coincides with my device names. If there exists a variable called MAX_whatevername, the device called whatevername will be turned off whenever its last_canged times is < MAX_whtevername minutes ago.
Clever programming! I have similarly used this approach with calling Dynamic Refreshing Control Pages.

All in all, sounds like you got it covered. I wish more users that used GUI’s (Homekit screens included) shared their implementations!