Timed Devices plugin

Posted on
Tue Jul 07, 2020 2:26 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Timed Devices plugin

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.

Posted on
Tue Jul 07, 2020 2:56 pm
BobRoss offline
Posts: 101
Joined: Jan 15, 2006
Location: Arizona

Re: Timed Devices plugin

I must have look at that 1000 times but I guess I never needed it!!

Posted on
Tue Jul 07, 2020 4:26 pm
FlyingDiver offline
User avatar
Posts: 7213
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Timed Devices plugin

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

Posted on
Tue Jul 07, 2020 5:35 pm
BobRoss offline
Posts: 101
Joined: Jan 15, 2006
Location: Arizona

Re: Timed Devices plugin

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

Bob

Posted on
Tue Jul 07, 2020 6:06 pm
FlyingDiver offline
User avatar
Posts: 7213
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Timed Devices plugin

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

Posted on
Tue Jul 07, 2020 6:44 pm
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Timed Devices plugin

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

Posted on
Tue Jul 07, 2020 7:21 pm
jay (support) offline
Site Admin
User avatar
Posts: 18215
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Timed Devices plugin

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

Posted on
Tue Jul 07, 2020 8:58 pm
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Timed Devices plugin

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

Posted on
Wed Jul 08, 2020 5:38 am
FlyingDiver offline
User avatar
Posts: 7213
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Timed Devices plugin

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 8002 times

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

Posted on
Wed Jul 08, 2020 7:34 am
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Timed Devices plugin

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 7992 times

Bill
My Plugin: My People

Posted on
Wed Jul 08, 2020 9:13 am
jay (support) offline
Site Admin
User avatar
Posts: 18215
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Timed Devices plugin

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

Posted on
Tue Jul 12, 2022 12:23 pm
indy offline
Posts: 23
Joined: Nov 15, 2014
Location: Auckland, New Zealand

Timed Devices plugin now compatible with Indigo2022.1

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!

Posted on
Sat Jul 16, 2022 3:06 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Timed Devices plugin

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.

Posted on
Sun Jul 17, 2022 11:58 am
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Timed Devices plugin

Python 3 version compatible with Indigo 2022.1+ is now on the plugin store. Thanks @indy for getting this started.

Who is online

Users browsing this forum: No registered users and 1 guest

cron