Timed Devices plugin

kmarkley
Posts: 185
Joined: Tue Nov 15, 2016 8:04 pm

Re: Timed Devices plugin

Post by kmarkley »

BobRoss wrote:I can't figure where to convert the state to a variable to email it
This is not specific to this plugin, and can be accomplished with a standard indigo action. Look for "Insert Device State Into Variable" under variable actions.
BobRoss
Posts: 101
Joined: Sun Jan 15, 2006 2:13 pm
Location: Arizona
Contact:

Re: Timed Devices plugin

Post by BobRoss »

I must have look at that 1000 times but I guess I never needed it!!
User avatar
FlyingDiver
Posts: 7323
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Timed Devices plugin

Post by FlyingDiver »

BobRoss wrote: I can't figure where to convert the state to a variable to email it
Why do you need to put it in a variable to email it?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
BobRoss
Posts: 101
Joined: Sun Jan 15, 2006 2:13 pm
Location: Arizona
Contact:

Re: Timed Devices plugin

Post by BobRoss »

I travel and it's nice to see what's going on. I don't have to log into the system.

Bob
User avatar
FlyingDiver
Posts: 7323
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Timed Devices plugin

Post by FlyingDiver »

BobRoss wrote:I travel and it's nice to see what's going on. I don't have to log into the system.
I wasn't asking why you email the data, I was asking why you needed to put it in a variable first. Instead of using the device state directly in your email.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
whmoorejr
Posts: 767
Joined: Tue Jan 15, 2013 11:23 am
Location: Houston, TX

Re: Timed Devices plugin

Post by whmoorejr »

FlyingDiver wrote:
BobRoss wrote:I travel and it's nice to see what's going on. I don't have to log into the system.
I wasn't asking why you email the data, I was asking why you needed to put it in a variable first. Instead of using the device state directly in your email.
Was thinking the same thing.... but with some devices, it can be tricky figuring out what the device state verbiage is. I typically do this when composing an email/text/SMS/Pushover via python.... set the device state to a variable in python and add it to theMessage to get plopped into a something.
Bill
My Plugin: My People
User avatar
jay (support)
Site Admin
Posts: 18413
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Timed Devices plugin

Post by jay (support) »

whmoorejr wrote:Was thinking the same thing.... but with some devices, it can be tricky figuring out what the device state verbiage is.
Say more?
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
User avatar
whmoorejr
Posts: 767
Joined: Tue Jan 15, 2013 11:23 am
Location: Houston, TX

Re: Timed Devices plugin

Post by whmoorejr »

jay (support) wrote:Say more?
With some devices, I can look at the home window for that device and scroll down to see all the different states and they are written in pytonese(sp?). onOffState , onTime, etc. Like for a Running Timer device.

For some devices, they are harder for me to find.... Example; my insteon thermostat. When I was writing a python script to tell me a device state from my thermostat, I made a thermostat device on a control page, then looked at the 22 different states you can choose from to use as a baseline for the verbiage I needed for my python script.

Is this the part where you tell me about the super simple button you click on somewhere that lists all of a devices states in a python reference format?
Bill
My Plugin: My People
User avatar
FlyingDiver
Posts: 7323
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Timed Devices plugin

Post by FlyingDiver »

whmoorejr wrote:Is this the part where you tell me about the super simple button you click on somewhere that lists all of a devices states in a python reference format?
You mean this list?
Attachments
Screen Shot 2020-07-08 at 7.37.54 AM.png
Screen Shot 2020-07-08 at 7.37.54 AM.png (306.73 KiB) Viewed 8803 times
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
whmoorejr
Posts: 767
Joined: Tue Jan 15, 2013 11:23 am
Location: Houston, TX

Re: Timed Devices plugin

Post by whmoorejr »

FlyingDiver wrote:You mean this list?
I didn't know you could right-click on that stuff to get the python reference..... but how do you get the python references for states when certain devices don't show custom states? My thermostat shows the controls, but no custom state block below it. Same thing with lights, fans, motion sensors.... without going through everything, it looks like the stuff that works directly without a plugin.

The devices that work via plugin typically have that "Custom States" box.
Attachments
Insteon Thermostat.png
Insteon Thermostat.png (35.04 KiB) Viewed 8793 times
Bill
My Plugin: My People
User avatar
jay (support)
Site Admin
Posts: 18413
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Timed Devices plugin

Post by jay (support) »

TL;DR - check the Indigo IOM documentation when you want to access properties/states of built-in device types. Read on for more specific information.

Device types that are directly implemented by Indigo often don't have custom states, because they are not custom devices. Plugins can implement any of the device types Indigo supports or they can define a "custom" device, in which case Indigo shows them in a list. Plugins can also add "custom" states to devices that implement one of the supported classes.

For the standard device definitions, the properties and states for the device are documented in the Indigo IOM documentation. We don't expose them in the Custom States tile because they aren't custom. The original intent was for built-in devices to have direct properties (i.e. my_device.fanMode) and that the states list would be used for things that were custom to the specific model of the device. In practice, and over time, it's become less clear about the distinction between properties and states. Perhaps something we'll address some day, but it would be a big fundamental change so it's not likely to happen soon.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
indy
Posts: 23
Joined: Sat Nov 15, 2014 12:01 am
Location: Auckland, New Zealand

Timed Devices plugin now compatible with Indigo2022.1

Post by indy »

Hi kmarkley

I've updated the plugin code to work with the latest version of Indigo (Python 3 and other goodness).

The code did not require much change, and I have already sent you a pull request to you on Github. Hope you can merge it in the main repo and publish a new version. I did not increment the version number etc in the XML as you might want to use your own rules for versioning.

Till then, anyone else interested in it can get the code from: https://github.com/indynz/Indigo-Timed-Devices

I find the plugin really handy. Thanks for creating it @kmarkely!
kmarkley
Posts: 185
Joined: Tue Nov 15, 2016 8:04 pm

Re: Timed Devices plugin

Post by kmarkley »

Hi indy

Thank you for doing this, however I'm seeing device start errors for several types of devices. There are a couple unicode errors that should be easy to fix, and several errors from the change in dictionary indexes. It's also possible that other errors will be revealed once these device types are able to start.

Shouldn't be hard to fix, but I'll obviously need to before releasing a new version.
kmarkley
Posts: 185
Joined: Tue Nov 15, 2016 8:04 pm

Re: Timed Devices plugin

Post by kmarkley »

Python 3 version compatible with Indigo 2022.1+ is now on the plugin store. Thanks @indy for getting this started.
vtmikel
Posts: 648
Joined: Fri Aug 31, 2012 12:45 pm
Location: Boston, MA
Contact:

Re: Timed Devices plugin

Post by vtmikel »

Hi @kmarkley --

I use the heck out of this plugin, so if I forgot to say thanks, I want to say it now.

I have a request --

I have been using the heck out of FlyingDiver's Home Assistant Agent plugin. The devices that the plugin bridges from Home Assistant have dynamic custom states. For example, if the AVR is off, there is no volume state.

When I put a timer on one of those variable states, the Timed Devices spams the logs:
Timed Devices Error "House AV - Main area volume change" thread error
'key volume_level not found in dict'
Is there a way we could quiet some of these notifications? I understand under some circumstances they could be useful, so I'm not saying we should silence them.

I've actually been using this combination for some time, but something recently has made the spamming to the logs much more noisy.
Post Reply

Return to “kmarkley's plugins”