Append contact state to variable


#1

1) Give a description of the problem
How to append device status to message

2) What is the expected behavior?
A message is built based on open door contacts

3) What is happening/not happening?
I can’t figure out how to append a string to a variable.

**4) Post a Green Snapshot of the piston![image|45x37]


#2

something like this?
image
image

and to fill the deviceList:
image


#3

I cannot figure out how to do this part…

If {ContactsToMonitor}'s contact is open. I don’t see where in webcore I can do that.


#4

Ahh forgot to mention that, just hit that gear button:


#5

I need help one step above that, but that would have been my next question. For my condition, I was selecting “Varable” and my ContactsToMonitor that wasn’t giving me the option to subscribe to the contact state. What I needed to do was select “Physical Device” and then select the ContactsToMonitor variable from THAT list. I was then able to subscribe to the contact state.

One more question (thanks for all the help) one of my devices is not a contact switch, but a garage door. The check to see if its open is working, it fires the piston, but I don’t think the [deviceList : switch] in the ContactsNotification is getting. I’m assuming I need to add [deviceList : ? ] but what would the ? be for a garage door?


#6

I take that back… none of the names are working. I modified my piston to show all the devices and I’m getting the following message: " These devices: are open and , , , , , and are closed"

Here is my piston


#7

Try this?


#8

With this piston, I’m getting the message exactly as typed, “The devices ‘deviceList’ are open”. Not getting any of the devices. Its like the save matching isn’t working or I’m not formatting my string correctly.


#9

You have to do {deviceList} In your string


#10

Thank you, that fixed that. Is there any documentation for string/device formatting? I couldn’t find anything in the wiki.


#11

No idea haha