%value% and ST Water Sensor


Hi All,

OK, Brand Spankin' New here, and beginning my move from ST. I've been puttering with Rule Machine, and moved over one of my ST Water Sensors to the Hubitat Hub to test with.

Works, water is detected, the logs indicate it is reporting the correct status, but while testing the TTS on one of my Sonos (and the SMS as well), I've noticed that when the rule below triggers, the message spoken is:
"Utility Sump Water Sensor reports that it is dry at 04:35 PM on 30-Jan-2019", even though the sensor is wet.

My output for TTS is: "%device% reports that it is %value% at %time% on %date%"

Value should be dry or wet, and when this rule triggers, logically it should be wet (and it is). Why is %value% dereferencing to dry?

I know I don't need to use %value%, but it seemed like a good test of understanding RM Variables. However it seems like I'm missing something...




Only thing I can think of is the device current state "water" and variable states "status" are not matching. Can you test the sensor and see with they both change to wet.



I don't know why, but I tested it after you sent your note, with the intent of taking a screenshot, and the announcement (when I put water on the sensor) was correct, and said "wet".

Best guess is that something was cached, someplace. Or there was some wierdness in the state as I messed with the rule.

See below:

Thanks for the reply...I'm going to try another couple rules when I get a minute and see if I see any sort of similar behavior.

Again, Thanks.


Interesting problem. Could you look at the logs for that rule, and show those. You should see the triggering event in the logs.


Sorry Bravenel,

I didn't see your message immediately, and the Logs don't seem to go back that far.

As I recall, I looked at the logs immediately, and the events/triggers in the logs all indicated "wet", which is part of what puzzled me. It's only the TTS and Text Messaging that was de-referencing to "dry". I've seen similar issues in ST TTS (Big Talker), in that a previously generated message was cached and played instead of the desired message...

In fact, I tested TTS from Hubitat on one of my Sonos, and when ST/Big Talker played an event on the same speaker, instead of "Garage Door Open", I got "Testing 1 2 3"



I would change the rule to a trigger. "Maybe" in your test when you triggered the sensor the change from wet to dry was faster than the rule itself, "maybe". You use %device% %value% when you have multiple sensors in one rule, even the %date% I think is not necessary to speak, unless you don't know what day is when the sonos speaks. But at the end your rule should work as you expect, not sure why not.


Thanks. I need to play with the Triggers anyway.

Good Tip...the action is overengineered for sure. It was more an attempt to see how the variables worked than anything. The date was put in for the text messages, sort of a logging thing really. You're right, I do generally know the date...lol