Turn on Weather Station Precip sensor heater during sleet, freezing rain, snow

I'm have a professional weather station, (I'm in the business) Rainfall sensor has a heater to record frozen rainfall. I cannot figure out how to get AND between the Temperature and the precip types. Probably simple but I have not used RM4 much and struggling a bit. I'd like the heater on only for freezing rainfall events.

Temperature of Weather Underground(38) reports <= 30.0
Weather Underground reports precipType(precip) contains sleet
Weather Underground reports precipType(precip) contains snow
Weather Underground reports precipType(precip) contains freezing
Rain Sensor Heater(off) turns on


Any of these will trigger the rule. In the rule you will need to do an if condition and include the “and” command in there. Makes sense?

Do you want the rule to trigger when the Rain Sensor Heater turns on, or you want that to be part of the rule (instead of the trigger)?

Here’s an example:

I only want the heater to turn on if precip type (from Cobra's weather underground app) is "sleet" or "freezing rain" or "snow" and be off if none of those conditions exist. Don't need the heat if it's just cold, only if there is frozen precip.

What you can do that would work for these conditions is have your trigger on “precip_type” “changed”.

Then in the Actions to run, you can add if Precip_type = “sleet” or Precip_type = “freezing rain” or Precip_type = “snow”, then on: Heat

Let me know if it works!

Just another idea. I use this for mine during the winter months.


I'll give this a go and see if it works. All rain event here in NY this weekend, have to wait for a snow event. I'll turn on the logs.

1 Like

Hi Curtis,
Thanks for the suggestion. I don't need the heater on all the time when it's freezing, just when there is frozen precipitation. Use enough electric around here, trying to conserve some.

Happy New Year!
Does this look correct? I have it installed and logs on.
Thanks again for the help.
(I was having issues coding it with Chrome, used Firefox and it worked much better)
WX Rule

1 Like

Looks good! I would add an “endif” command at the end, but it should run without it as well.

How does it turn off?

Got it, thanks again.

WX Rule

1 Like

Hi Sebastian,
Finally getting some snow and come to find this rule you helped me with is acting flaky, Will not turn on the heater and if I turn it on manually it shuts it off.
Any ideas?

This is the log:
app:8702021-02-01 08:11:48.131 am infoAction: END-IF

app:8702021-02-01 08:11:48.115 am infoAction: Off: Rain Sensor Heater

app:8702021-02-01 08:11:48.110 am infoAction: ELSE (do actions)

app:8702021-02-01 08:11:48.105 am infoAction: On: Rain Sensor Heater (skipped)

app:8702021-02-01 08:11:48.091 am infoAction: IF (Weather Underground precipType(snow) contains "freezing"(F) OR Weather Underground precipType(snow) contains "snow"(F) OR Weather Underground precipType(snow) contains "sleet"(F) OR Weather Underground precipType(snow) contains "hail"(F) [FALSE]) THEN (skipping)

Precip Heater

The heater is not turning on because, for some reason, it is not recognizing that “snow” contains “snow”. That 2nd OR condition should show true (T) but it is showing false (F).

Can you see if you change from “contains” to “=“ and see if it changes the result to (T)? If it does, it will work.

PrecipType in WU still indicates snow this morning, Changed the conditions to "=" and still does not turn on heater. Think it has anything to do with the trigger?
"snow" has not changed.

You are correct in that the rule will only run when the condition changes. Does the rule show “(T)” next to =“snow” now? The rule will only work (once triggered) if it does.

Bright sunny day here for a change, Precip in Weather Underground app indicates "precip Type : precip".
How about this trigger, assuming != is not equal?
Weather Underground reports precipType(precip) != precip

That is correct. I’ll be curious to know if it works!

I guess I should talk to @cobra, clear skies this morning and " precipType : rain". I did see another iteration of Weather Underground on here, have to look into that.

No Joy, still not working. It's snowing and not "true" for "snow".
I put an email into support.

No joy

I suspect the problem is with the driver. Are you able to connect with the driver’s developer to find out why the if condition is not working when the condition’s text is in fact equal?

Tried to research the potential outputs for "Precip Type" used in Wunderground API and could not find them, got taken over by IBM. Been sending them free weather for 15 or so years, and no help anymore. I'll have to send an email to Cobra I suppose.
Today it's sunny and cold, copied this from his app, precipType : precip
Not sure what the ** are, HTML?