Some triggers are simple, and others are impossible

Posted on
Tue Dec 13, 2022 11:19 am
Different Computers offline
User avatar
Posts: 2541
Joined: Jan 02, 2016
Location: East Coast

Some triggers are simple, and others are impossible

First, thanks for this plugin. I use it every day and it's quite reliable. I have a very reliable trigger that checks to see if I'm NOT using any channel:

Screen Shot 2022-12-13 at 12.08.55 PM.png
Screen Shot 2022-12-13 at 12.08.55 PM.png (96.75 KiB) Viewed 1526 times


And that works to let Indigo kick off setting the input to my PlayStation using the Yamaha receiver plugin.

But dang, there's one thing I can't figure out. When I'm going the OTHER way, using one of these channels, this equally kludgy trigger does NOT work:

Screen Shot 2022-12-13 at 12.13.46 PM.png
Screen Shot 2022-12-13 at 12.13.46 PM.png (39.95 KiB) Viewed 1526 times


and I can't figure any other way to make this plugin notice that what's happening on the tv has changed in order to use the Yamaha plugin to change the input. To be clear, I need to trigger an action on the Yamaha plugin, not in Roku, but Roku is what would kick it off.

Unfortunately, there's no way to capture input change actions besides "has any change" as far as I know. The plugin can tell Indigo it has changed, but seems to be unable to tell HOW it has changed, even though the plugin is aware of what the input is.

Or am I missing something?

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
Wed Dec 14, 2022 11:12 am
jltnol offline
Posts: 994
Joined: Oct 15, 2013

Re: Some triggers are simple, and others are impossible

so maybe a little more info.. ?

Is your "BigTV" device.... a TV? or your Yamaha connected to your Big TV? So when you select none of this devices on your list at the top, your Yamaha changes to your PlayStation input? But when you select any of the devices in your 2nd list, nothing happens.. ?

I also have a Yamaha receiver and use the inputs to trigger some stuff, so may be able to help, but just need a bit more info on your setup... :) Are all of your input devices connected to your receiver.... or to your TV?

Posted on
Wed Dec 14, 2022 4:14 pm
Different Computers offline
User avatar
Posts: 2541
Joined: Jan 02, 2016
Location: East Coast

Re: Some triggers are simple, and others are impossible

The BigTV is a Roku tv, with the Yamaha amp connected to it. Yes, when I am manually using the roku to set the input, the amp changes to the correct sound input.

When I go the other way, and move away from the HDMI input that attaches to the playstation, it actually switches INCORRECTLY now, and I have that trigger disabled.

There is no way to trigger on "when the input becomes X" as far as I can find. Only on "when the input has any change" and that's why I have to try trapping for which channel, which is a bad hack.

All my inputs are through the amp. I would prefer to capture a change in the TV, as the Roku remote is way less cumbersome than the 200 button Yamaha receiver.

Thanks!

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
Tue Dec 27, 2022 8:47 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Some triggers are simple, and others are impossible

I am about to start conversion of the Roku plugin to Python 3, but honestly haven't been in the code/API in a while (because, as you said, the plugin just works). However, if I recall at least one of my Rokus didn't clear the current values when it went off (or to sleep, one). So turning it back on and going to the same channel did not always trigger a change. Any chance something like that could be happening?

IF so, maybe we can accommodate in another way (like manually clearing the current state when a screensaver or power saver mode kicks in).

Does the trigger EVER work or works unreliably? You can always test by changing the action to trigger a log message instead of activating things on the receiver.

Posted on
Wed Dec 28, 2022 10:04 am
Different Computers offline
User avatar
Posts: 2541
Joined: Jan 02, 2016
Location: East Coast

Re: Some triggers are simple, and others are impossible

The big problem is that there's just no easy way to trigger. I have to watch for "any change" in the trigger screen, then capture go or no with all sorts of conditions.

If it was possible to trigger on input change, that would be ideal. But there's no option for that. These are the options:

Screen Shot 2022-12-28 at 11.02.13 AM.png
Screen Shot 2022-12-28 at 11.02.13 AM.png (17.97 KiB) Viewed 1390 times


Seems weird to me that you can trigger something based on model or serial number!

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
Wed Jan 04, 2023 9:18 am
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Some triggers are simple, and others are impossible

Current App will also reflect whatever name you gave an input.

I have a trigger for HDMI 1, which is "Xbox 360" <- Because I'm old school.

The trigger is: Current App becomes equal to "Xbox 360"

If you have your Roku TV turned to your playstation, when you select the dropdown to "Current App" it will autopopulate with the current app / input you have the TV set to.
Do the same trigger in reverse "Becomes not equal to" to fire when you switch away from the playstation.


I hope that helps.
Attachments
XBox Trigger.png
XBox Trigger.png (21.56 KiB) Viewed 1329 times

Bill
My Plugin: My People

Posted on
Wed Jan 04, 2023 1:10 pm
Different Computers offline
User avatar
Posts: 2541
Joined: Jan 02, 2016
Location: East Coast

Re: Some triggers are simple, and others are impossible

Ahhh, Now I see my problem: My switching takes place on my amp.

And I never noticed that "AV receiver" was in the app list. Never occurred to me to look in the app list for inputs!

Screen Shot 2023-01-04 at 2.08.04 PM.png
Screen Shot 2023-01-04 at 2.08.04 PM.png (12.77 KiB) Viewed 1319 times


I'll think this through. Maybe I have to trigger based on changes on the amp, which is controlled via the Yamaha plugin.

Thanks!

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
Wed Jan 04, 2023 4:20 pm
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Some triggers are simple, and others are impossible

Different Computers wrote:
Thanks!


No problem. If I remember correctly, RogueP wrote the plugin blind as he has a Roku stick, but not a Roku TV. So the plugin for you and I can actually do some different things.

I actually use a ton of triggers for the Roku TVs that are for kid use. Each TV has running timers (Timed Devices Plugin) that track usage (good for seeing how much screen time a kid had today, last week, this year, etc.) And times (Timers and Pesters Plugin) for each kid TV where I can set the timer amount nightly based on school/no school tomorrow for the amount of screen time. I can also set timers for individual apps on the TV to limit certain content, like YouTube.

Whenever a timer pauses or restarts, Alexa makes an announcement in that room and states how much time is remaining on the timer. Then there is a 30 minute, 10 and 3 minute reminder. At Zero minutes, everything powers down and enables a "Stay Off" trigger. If the associated running timer starts up (device and/or channel turns on), Auto- Power off, Notification to kid Alexa that mom & dad have been notified, pushover message to me.

Side note, For every Roku TV, I have a Virtual Device with the same name. This gives me an On/Off switch so I can power on/off the Roku TV. Power on requires two steps. 1st, a python script action to WOL. 2nd, the button press to power on. (I use the same WOL command for the Toggle Action.

Bill
My Plugin: My People

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests