Using %%d:DEVICEID:STATEKEY%% in e-mail notification

Posted on
Tue Mar 22, 2016 7:21 pm
Pierre offline
Posts: 8
Joined: Jul 10, 2014

Using %%d:DEVICEID:STATEKEY%% in e-mail notification

Hi guys,

I wish to use the available notification plug-in to generate email with rich content, ex: In the situation of a High Temperature condition detected, start cooling process, but send periodic Warning message with actual Temp in order to follow the tendency of the measured temperature and the cooling process.

I wish to use the %%d:DEVICEID:STATEKEY%% , but I don't know where to start with this.

Thanks in advance

Piere

Posted on
Tue Mar 22, 2016 7:40 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Using %%d:DEVICEID:STATEKEY%% in e-mail notification

Which plugin are you trying to use? My BetterEmail plugin will send emails and you can call it's action from any trigger you set up to detect the over/under temperature condition. Then you can use the %%d:DEVICEID:STATEKEY%% syntax in the template for either the subject or the body of the email.

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

Posted on
Tue Mar 22, 2016 8:16 pm
Pierre offline
Posts: 8
Joined: Jul 10, 2014

Re: Using %%d:DEVICEID:STATEKEY%% in e-mail notification

Hi Joe,

I will certainly use use your plug-in for e-mail. For now, I was just trying to do build rich notification with Growl to learn how to use the %%d:DEVICEID:STATEKEY%% syntax, but I don't know where to find the state key values.

Thanks for you plugin reference, it looks great

Pierre

Posted on
Wed Mar 23, 2016 2:21 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Using %%d:DEVICEID:STATEKEY%% in e-mail notification

You're looking for the list of states available for a specific device? In the main Indigo database window, select a device (any device). Then drag the top of the gray details panel (bottom of right side of window) up from the little dot above the device name. The panel will expand and show the device specific "Custom States" below the "Device Details". Those are the STATEKEY names you can use.

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

Posted on
Thu Mar 24, 2016 4:52 pm
Pierre offline
Posts: 8
Joined: Jul 10, 2014

Re: Using %%d:DEVICEID:STATEKEY%% in e-mail notification

HI,

Are you talking about the Custom States value that are visible under the device details at the bottom of the main Device windows ?

Thanks in advance

Pierre

Posted on
Thu Mar 24, 2016 4:59 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Using %%d:DEVICEID:STATEKEY%% in e-mail notification

Pierre wrote:
HI,

Are you talking about the Custom States value that are visible under the device details at the bottom of the main Device windows ?

Thanks in advance

Pierre


Yes.

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

Posted on
Thu Mar 24, 2016 6:45 pm
Pierre offline
Posts: 8
Joined: Jul 10, 2014

Re: Using %%d:DEVICEID:STATEKEY%% in e-mail notification

Ok, we were talking about the same thing.

I was testing a new Insteon Thermostat 2441ZTH and their is no custom property at all.

Thanks for your help

Pierre

Posted on
Thu Mar 24, 2016 6:54 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Using %%d:DEVICEID:STATEKEY%% in e-mail notification

Pierre wrote:
Ok, we were talking about the same thing.

I was testing a new Insteon Thermostat 2441ZTH and their is no custom property at all.

Thanks for your help

Pierre


If it's a standard device type, like a thermostat, then you don't need the custom properties. The device details should list the standard device properties you can reference.

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

Posted on
Fri Mar 25, 2016 4:09 am
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Using %%d:DEVICEID:STATEKEY%% in e-mail notification

For any Inidigo device, you can get a list of all available device states with the following Python snippet (replace the number with the device ID of your device):
Code: Select all
dev = indigo.devices[71199202]
indigo.server.log(str(dev.states))

Which, for this device type, yields:
Code: Select all
  Script                          States : (dict)
     humidityInput1 : 22 (real)
     humidityInputsAll : 22 (string)
     hvacFanMode : 1 (integer)
     hvacFanMode.ui : always on (string)
     hvacFanModeIsAlwaysOn : true (bool)
     hvacFanModeIsAuto : false (bool)
     hvacOperationMode : 2 (integer)
     hvacOperationMode.ui : cool on (string)
     hvacOperationModeIsAuto : false (bool)
     hvacOperationModeIsCool : true (bool)
     hvacOperationModeIsHeat : false (bool)
     hvacOperationModeIsOff : false (bool)
     hvacOperationModeIsProgramAuto : false (bool)
     hvacOperationModeIsProgramCool : false (bool)
     hvacOperationModeIsProgramHeat : false (bool)
     setpointCool : 78 (real)
     setpointHeat : 72 (real)
     temperatureInput1 : 75 (real)
     temperatureInputsAll : 75 (string)

Then it's just:
Code: Select all
%%d:71199202:setpointHeat%%

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

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests

cron