Device/Variable parameters list

Posted on
Sat Jan 25, 2020 11:13 am
chase offline
Posts: 75
Joined: Oct 27, 2013

Device/Variable parameters list

I would like to use iMessage for my primary notifications method.

I would also like to use the DeviceIDs, VariableIDs to minimize hardcoding the message text, and reduce the number of triggers I need to maintain.

I can't find any documentation of parameters available. I have had some success combining the documentation and using educated guesses, but a listing would be handy.

Example: I want to send an iMessage every night @ 9:00 pm with the status of a deadbolt lock. The sensor is an Insteon hidden door sensor which has states of on on/off. I am using the EPS-Device extensions to create a new device 'Garage Deadbolt' with States of Locked/Unlocked (EPS-Device Extensions devices are working as needed).

I was hoping to make an iMessage send the Device Name and the Device State.

%%d:710933748:DeviceName%% is %%d:710933748:OnOffState%%

DeviceName, Name, etc all return errors. ( iMessage Plugin Error Device id 710933748 or state id DeviceName not found for substitution )

OnOffState gives a result of True or False. ( I am looking for the State text to be returned (either 'Locked' or 'Unlocked'))

The desired iMessage text would be
'
Garage Deadbolt is Locked


Any thought on how to do this? Is it possible?

Posted on
Sat Jan 25, 2020 6:57 pm
GlennNZ offline
User avatar
Posts: 1562
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Device/Variable parameters list

Hi

Short reply - on the road ....

The iMessage plugin supports all device and variable state substitutions.

The issue seems to be what is the correct state for your lock device?

You should look at all the lock device states - there is a Plugin to list these might be the best start

Will update when can.

Glenn


Sent from my iPhone using Tapatalk

Posted on
Sun Jan 26, 2020 7:18 pm
GlennNZ offline
User avatar
Posts: 1562
Joined: Dec 07, 2014
Location: Central Coast, Australia

Device/Variable parameters list

chase wrote:
I would like to use iMessage for my primary notifications method.
I would also like to use the DeviceIDs, VariableIDs to minimize hardcoding the message text, and reduce the number of triggers I need to maintain.
I can't find any documentation of parameters available. I have had some success combining the documentation and using educated guesses, but a listing would be handy.
Example: I want to send an iMessage every night @ 9:00 pm with the status of a deadbolt lock. The sensor is an Insteon hidden door sensor which has states of on on/off. I am using the EPS-Device extensions to create a new device 'Garage Deadbolt' with States of Locked/Unlocked (EPS-Device Extensions devices are working as needed).
I was hoping to make an iMessage send the Device Name and the Device State.
%%d:710933748:DeviceName%% is %%d:710933748:OnOffState%%
DeviceName, Name, etc all return errors. ( iMessage Plugin Error Device id 710933748 or state id DeviceName not found for substitution )
OnOffState gives a result of True or False. ( I am looking for the State text to be returned (either 'Locked' or 'Unlocked'))
The desired iMessage text would be
Garage Deadbolt is Locked
Any thought on how to do this? Is it possible?


Hi

Back again

onOffState = onOffState, note missing captilisation.

If uncertain as to what states certain device has, would suggest
-Indigo Plugins Open scripting Shell
- Go to device - Right click device - select 'Copy Python Reference"

Go back to Scripting shell
type print and then paste above

end will be something like:
print indigo.devices[1325699550] # "FrontDoor Lock Indigo"

This will print all the device info - including correct spelling.
Have a look for States:
For my locks - seems like
onOffState.ui- would be ideal

But for some reasons indigo substitution %%d: doesnt work for this state... probably because of .ui - but quotes, escaping doesn’t seem to help...

Couple of options

Could use EPS-Device Extensions - set up one for each door lock and link to the state within these Device Extensions devices with substitution
or
Use python script to create and then send the message:
Would depend on your states available, and need to change buddyId to correct email address for buddy.

Code: Select all
doorstatus = indigo.devices[1325699550].displayStateValUi
name = indigo.devices[1325699550].name
messagevariable = name + " is " +doorstatus
imessageID = 'com.GlennNZ.indigoplugin.iMessage'
imsgPlugin = indigo.server.getPlugin(imessageID)
imsgPlugin.executeAction('sendMessage', props={'message':messagevariable, 'buddyId':'me@myemail.com'})


Glenn

Posted on
Mon Jan 27, 2020 10:09 am
jay (support) offline
Site Admin
User avatar
Posts: 18212
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Device/Variable parameters list

GlennNZ wrote:
But for some reasons indigo substitution %%d: doesnt work for this state... probably because of .ui - but quotes, escaping doesn’t seem to help...


That appears to be a bug. We'll look into it.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Feb 08, 2020 11:46 am
chase offline
Posts: 75
Joined: Oct 27, 2013

Re: Device/Variable parameters list

So I have had no luck trying to get the variables to work in the plug in.

But I used GlennNZ's example Python script for inspiration and it worked first time.... not even a typo.

So I think my data is correct, for whatever reason the plugin textfield is not passing the text correctly.

Posted on
Sat Feb 08, 2020 1:50 pm
GlennNZ offline
User avatar
Posts: 1562
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Device/Variable parameters list

chase wrote:
So I have had no luck trying to get the variables to work in the plug in.

But I used GlennNZ's example Python script for inspiration and it worked first time.... not even a typo.

So I think my data is correct, for whatever reason the plugin textfield is not passing the text correctly.


Can you post a screenshot of the the message window with the failing device substitution ?


Sent from my iPad using Tapatalk

Posted on
Sat Jun 20, 2020 11:23 am
philipbasile offline
Posts: 113
Joined: Jan 08, 2015
Location: NJ

Re: Device/Variable parameters list

Glenn,

Awesome plugin !
How would I add a carriage return / new line to a message ?

Thanks

Philip

Posted on
Fri Jul 10, 2020 4:58 pm
ppespepe offline
Posts: 49
Joined: May 27, 2020

Re: Device/Variable parameters list

Hi Guys...

Perhaps you can give me a hand... I would like to send some variables content but not sure how to do that. For instance, I tried the example I saw here but with little modifications:

%%d:1298093272:name%% is %%d:1298093272:displayStateValUi%%. <-- this will only show - is - (of course without the dashes)

The thing is, I can make it show onOffState but that will show False which is not cool... but the variables I need to show are not under "States"... Look:

Code: Select all
address : 5
batteryLevel : None
buttonConfiguredCount : 0
buttonGroupCount : 0
configured : True
description :
deviceTypeId : zwRelayType
displayStateId : onOffState
displayStateImageSel : PowerOff
displayStateValRaw : False
displayStateValUi : off
enabled : True
energyAccumBaseTime : 2000-01-01 00:00:00
energyAccumTimeDelta : 0
energyAccumTotal : 12.15
energyCurLevel : 0.0
errorState :
folderId : 0
globalProps : MetaProps : (dict)
     com.perceptiveautomation.indigoplugin.zwave : (dict)
          SupportsEnergyMeter : true (bool)
          SupportsEnergyMeterCurPower : true (bool)
          SupportsEnergyMeterReset : true (bool)
          SupportsGasMeterReset : true (bool)
          SupportsWaterMeterReset : true (bool)
          address : 5 (integer)
          disableStatusLogging : false (bool)
          indigoObjVersion : 8 (integer)
          modelNameAndFirmware : Smart Switch 6 (ZW096), firmware 1.03 (string)
          propsPushTickler : 2 (string)
          tempAlwaysFalse : false (bool)
          userConfigVal003 : true (bool)
          userConfigVal020 : 0 (integer)
          userConfigVal081 : 0 (integer)
          userConfigVal090 : false (bool)
          userConfigVal091 : 5 (integer)
          userConfigVal092 : 5 (integer)
          userConfigVal111 : 600 (integer)
          userConfigVal255 : false (bool)
          userPollAfterActivity : true (bool)
          userPollInterval : 0 (integer)
          userPollingEnabled : true (bool)
          userWakeInterval : 60 (integer)
          version : 1.03 (string)
          zwAppVersMajor : 1 (integer)
          zwAppVersMinor : 3 (integer)
          zwAssociationsMap : (dict)
               g1 : (list)
                    Item : 1 (integer)
               g2 : (list)
          zwAssociationsMapStr : 1:[1] 2:[] (string)
          zwClassCmdBase : 37 (integer)
          zwClassCmdMap : (dict)
               c112 : 1 (integer)
               c114 : 1 (integer)
               c115 : 1 (integer)
               c122 : 1 (integer)
               c129 : 1 (integer)
               c133 : 1 (integer)
               c134 : 1 (integer)
               c32 : 1 (integer)
               c37 : 1 (integer)
               c38 : 2 (integer)
               c39 : 1 (integer)
               c50 : 3 (integer)
               c51 : 1 (integer)
               c89 : 1 (integer)
               c94 : 1 (integer)
          zwClassCmdMapStr : 20v1 81v1 25v1 26v2 27v1 32v3 70v1 72v1 73v1 5Ev1 59v1 7Av1 85v1 86v1 33v1 (string)
          zwClassIds : (list)
               Item : 4 (integer)
               Item : 16 (integer)
               Item : 1 (integer)
          zwClassInstanceCountMap : (dict)
          zwClassInstanceCountMapStr : - none - (string)
          zwClassName : Relay Power Switch (string)
          zwConfigVals : (dict)
               p101 : 12 (integer)
               p102 : 0 (integer)
               p103 : 0 (integer)
               p111 : 600 (integer)
               p112 : 600 (integer)
               p113 : 600 (integer)
               p20 : 0 (integer)
               p252 : 0 (integer)
               p3 : 1 (integer)
               p80 : 2 (integer)
               p81 : 0 (integer)
               p83 : 1774619 (integer)
               p84 : 3289650 (integer)
               p90 : 0 (integer)
               p91 : 5 (integer)
               p92 : 5 (integer)
          zwConfigValsStr : 112:600 3:1 101:12 102:0 113:600 252:0 103:0 111:600 80:2 81:0 83:1774619 20:0 84:3289650 90:0 91:5 92:5 (string)
          zwDevSubIndex : 0 (integer)
          zwEncryptClassCmdMap : (dict)
          zwEncryptClassCmdMapStr : - none - (string)
          zwEncryptionStatusStr : Not Supported (string)
          zwEndpointClassMap : (dict)
          zwEndpointClassMapStr : - none - (string)
          zwEndpointDevTypeMap : (dict)
          zwEndpointDevTypeMapStr : - none - (string)
          zwFeatureListStr : routing, beaming, energyMeter (string)
          zwLibType : 3 (integer)
          zwManufactureId : 134 (integer)
          zwManufactureName : Aeon Labs (string)
          zwMeterSubTypeFlags : 53 (integer)
          zwMeterSupportsReset : true (bool)
          zwMeterType : 1 (integer)
          zwModelDefnVers : 1 (integer)
          zwModelId : 16973920 (integer)
          zwModelName : Smart Switch 6 (ZW096) (string)
          zwNodeNeighbors : (list)
               Item : 1 (integer)
          zwNodeNeighborsStr : 1 (string)
          zwProtoVersMajor : 4 (integer)
          zwProtoVersMinor : 5 (integer)
          zwShowDumpDevToLog : true (bool)
          zwShowMainUI : true (bool)
          zwShowManualModifyConfigParmUI : false (bool)
          zwShowPollingUI : false (bool)
          zwShowSubmitModelInfoUI : false (bool)
          zwShowWakeIntervalUI : false (bool)
          zwWakeInterval : 0 (integer)
id : 1298093272
lastChanged : 2020-07-10 16:37:37
lastSuccessfulComm : 2020-07-10 16:37:37
ledStates : []
model : Smart Switch 6 (ZW096)
name : 005 - Smart Switch 6 (ZW096)
onState : False
ownerProps : com.perceptiveautomation.indigoplugin.zwave : (dict)
     SupportsEnergyMeter : true (bool)
     SupportsEnergyMeterCurPower : true (bool)
     SupportsEnergyMeterReset : true (bool)
     SupportsGasMeterReset : true (bool)
     SupportsWaterMeterReset : true (bool)
     address : 5 (integer)
     disableStatusLogging : false (bool)
     indigoObjVersion : 8 (integer)
     modelNameAndFirmware : Smart Switch 6 (ZW096), firmware 1.03 (string)
     propsPushTickler : 2 (string)
     tempAlwaysFalse : false (bool)
     userConfigVal003 : true (bool)
     userConfigVal020 : 0 (integer)
     userConfigVal081 : 0 (integer)
     userConfigVal090 : false (bool)
     userConfigVal091 : 5 (integer)
     userConfigVal092 : 5 (integer)
     userConfigVal111 : 600 (integer)
     userConfigVal255 : false (bool)
     userPollAfterActivity : true (bool)
     userPollInterval : 0 (integer)
     userPollingEnabled : true (bool)
     userWakeInterval : 60 (integer)
     version : 1.03 (string)
     zwAppVersMajor : 1 (integer)
     zwAppVersMinor : 3 (integer)
     zwAssociationsMap : (dict)
          g1 : (list)
               Item : 1 (integer)
          g2 : (list)
     zwAssociationsMapStr : 1:[1] 2:[] (string)
     zwClassCmdBase : 37 (integer)
     zwClassCmdMap : (dict)
          c112 : 1 (integer)
          c114 : 1 (integer)
          c115 : 1 (integer)
          c122 : 1 (integer)
          c129 : 1 (integer)
          c133 : 1 (integer)
          c134 : 1 (integer)
          c32 : 1 (integer)
          c37 : 1 (integer)
          c38 : 2 (integer)
          c39 : 1 (integer)
          c50 : 3 (integer)
          c51 : 1 (integer)
          c89 : 1 (integer)
          c94 : 1 (integer)
     zwClassCmdMapStr : 20v1 81v1 25v1 26v2 27v1 32v3 70v1 72v1 73v1 5Ev1 59v1 7Av1 85v1 86v1 33v1 (string)
     zwClassIds : (list)
          Item : 4 (integer)
          Item : 16 (integer)
          Item : 1 (integer)
     zwClassInstanceCountMap : (dict)
     zwClassInstanceCountMapStr : - none - (string)
     zwClassName : Relay Power Switch (string)
     zwConfigVals : (dict)
          p101 : 12 (integer)
          p102 : 0 (integer)
          p103 : 0 (integer)
          p111 : 600 (integer)
          p112 : 600 (integer)
          p113 : 600 (integer)
          p20 : 0 (integer)
          p252 : 0 (integer)
          p3 : 1 (integer)
          p80 : 2 (integer)
          p81 : 0 (integer)
          p83 : 1774619 (integer)
          p84 : 3289650 (integer)
          p90 : 0 (integer)
          p91 : 5 (integer)
          p92 : 5 (integer)
     zwConfigValsStr : 112:600 3:1 101:12 102:0 113:600 252:0 103:0 111:600 80:2 81:0 83:1774619 20:0 84:3289650 90:0 91:5 92:5 (string)
     zwDevSubIndex : 0 (integer)
     zwEncryptClassCmdMap : (dict)
     zwEncryptClassCmdMapStr : - none - (string)
     zwEncryptionStatusStr : Not Supported (string)
     zwEndpointClassMap : (dict)
     zwEndpointClassMapStr : - none - (string)
     zwEndpointDevTypeMap : (dict)
     zwEndpointDevTypeMapStr : - none - (string)
     zwFeatureListStr : routing, beaming, energyMeter (string)
     zwLibType : 3 (integer)
     zwManufactureId : 134 (integer)
     zwManufactureName : Aeon Labs (string)
     zwMeterSubTypeFlags : 53 (integer)
     zwMeterSupportsReset : true (bool)
     zwMeterType : 1 (integer)
     zwModelDefnVers : 1 (integer)
     zwModelId : 16973920 (integer)
     zwModelName : Smart Switch 6 (ZW096) (string)
     zwNodeNeighbors : (list)
          Item : 1 (integer)
     zwNodeNeighborsStr : 1 (string)
     zwProtoVersMajor : 4 (integer)
     zwProtoVersMinor : 5 (integer)
     zwShowDumpDevToLog : true (bool)
     zwShowMainUI : true (bool)
     zwShowManualModifyConfigParmUI : false (bool)
     zwShowPollingUI : false (bool)
     zwShowSubmitModelInfoUI : false (bool)
     zwShowWakeIntervalUI : false (bool)
     zwWakeInterval : 0 (integer)
pluginId : com.perceptiveautomation.indigoplugin.zwave
pluginProps : emptyDict : (dict)
protocol : ZWave
remoteDisplay : True
sharedProps : com.indigodomo.indigoserver : (dict)
states : States : (dict)
     accumEnergyTimeDelta : 0 (integer)
     accumEnergyTimeDelta.ui : 0 seconds (string)
     accumEnergyTotal : 12.15 (real)
     accumEnergyTotal.ui : 12.150 kWh (string)
     curEnergyLevel : 0 (integer)
     onOffState : off (on/off bool)
subModel :
supportsAllLightsOnOff : False
supportsAllOff : False
supportsStatusRequest : True
version : 1.03


Can you guys point me to the right direction? or perhaps to the documentation about the variable substitution format?

Thanks in advance!

PP

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests