RFXCom binding does not decode TEMPERATURE_RAIN (Alecto WS-1200) message

RFXCom binding is working fine for messages TEMPERATURE_HUMIDITY and RAIN coming from my Oregon sensors.
But when receiving temp and rain readings from an Alecto WS-1200 temperatur sensor/rain gauge, like this (taken from RFXmngr):


Packettype = TEMP_RAIN
subtype = TR1 - WS1200
Sequence nbr = 6
ID = 54272
Temperature = 14,6 °C
Total rain = 9 mm
Signal level = 6 -72dBi
Battery = OK

the binding issues the following error messages:

18:07:46.484 [DEBUG] [.b.r.internal.RFXComConnection:151 ] - Unknown data received, data: 0A4F0104D4000096005A79
18:07:46.506 [ERROR] [.rfxcom.internal.RFXComBinding:292 ] - Error occured during packet receiving, data: 0A4F0104D4000096005A79
org.openhab.binding.rfxcom.internal.RFXComException: Message TEMPERATURE_RAIN not implemented
at org.openhab.binding.rfxcom.internal.messages.RFXComMessageFactory.getMessageInterface(RFXComMessageFactory.java:121) ~[bundlefile:na]
at org.openhab.binding.rfxcom.internal.RFXComBinding$MessageLister.packetReceived(RFXComBinding.java:253) ~[bundlefile:na]
at org.openhab.binding.rfxcom.internal.connector.RFXComSerialConnector$SerialReader.run(RFXComSerialConnector.java:211) [bundlefile:na]
Caused by: java.lang.ClassNotFoundException: org.openhab.binding.rfxcom.internal.messages.RFXComTemperatureRainMessage
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501) ~[na:na]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421) ~[na:na]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412) ~[na:na]
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) ~[na:na]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0]
at java.lang.Class.forName0(Native Method) ~[na:1.8.0]
at java.lang.Class.forName(Class.java:259) ~[na:1.8.0]
at org.openhab.binding.rfxcom.internal.messages.RFXComMessageFactory.getMessageInterface(RFXComMessageFactory.java:116) ~[bundlefile:na]
… 2 common frames omitted

This TEMPERATUR_RAIN message is obviosly not implemented yet. Is it possible to get this decoded too?

Dirk

Hi Curlyel,
Please have a look at https://github.com/openhab/openhab/issues/3854
Damien

Thanks, I’ve tried the provided jar. It worked for me :ok_hand:
Quite happy with it…

Recently Openhab 2.0 was officially released. With the old Openhab I could read my Alecto WS-1200 sensor outdoors. Unfortunately, the RFXCom binding still does not understand TEMPERATURE_RAIN messages. Any news here?

@flagg As I’m still using the Alecto-WS-1200 rain sensor in my OpenHAB1 installation I’m also waiting for the TEMPERATURE_RAIN in RFXCom-2 …

@speeder has implemented this and other sensors in the RFXCom1-binding and luckily @martinvw started to port these into RFXCom-2 binding, see:

So hopefully, we’ll get this supported soon thanks to @martinvw 's work.

If TEMPERATURE_RAIN is a priority I can definitely give it priority.

Can you please test whether it works as expected? Please first uninstall the existing binding before (trying) to install the new one.

See https://github.com/martinvw/openhab2-addons/files/752940/org.openhab.binding.rfxcom-2.1.0-SNAPSHOT.zip

Wow - that was quick :wink: Thanks Martin for looking into it!

TEMPERATURE_RAIN is now partly decoded and some channels are detected:

2017-02-05 14:48:24.255 [ItemAddedEvent            ] - Item 'TEMPERATURE_RAIN61441_LowBattery' has been added.
2017-02-05 14:48:24.755 [ItemChannelLinkAddedEvent ] - Link 'TEMPERATURE_RAIN61441_LowBattery-rfxcom:rain:51dd5bd0:61441:lowBattery' has been added.
2017-02-05 14:48:38.180 [ItemStateChangedEvent     ] - Zeit changed from 2017-02-05 14:47:38 CET to 2017-02-05 14:48:38 CET
2017-02-05 14:48:39.906 [ItemAddedEvent            ] - Item 'TEMPERATURE_RAIN61441_SignalStrength' has been added.
2017-02-05 14:48:40.464 [ItemChannelLinkAddedEvent ] - Link 'TEMPERATURE_RAIN61441_SignalStrength-rfxcom:rain:51dd5bd0:61441:signalLevel' has been added.
2017-02-05 14:48:48.847 [ItemAddedEvent            ] - Item 'TEMPERATURE_RAIN61441_RainTotal' has been added.
2017-02-05 14:48:49.369 [ItemChannelLinkAddedEvent ] - Link 'TEMPERATURE_RAIN61441_RainTotal-rfxcom:rain:51dd5bd0:61441:rainTotal' has been added.
2017-02-05 14:48:58.264 [ItemAddedEvent            ] - Item 'TEMPERATURE_RAIN61441_RainRate' has been added.
2017-02-05 14:48:58.821 [ItemChannelLinkAddedEvent ] - Link 'TEMPERATURE_RAIN61441_RainRate-rfxcom:rain:51dd5bd0:61441:rainRate' has been added.
2017-02-05 14:49:09.758 [ItemStateChangedEvent     ] - TEMPERATURE_RAIN61441_SignalStrength changed from NULL to 2
2017-02-05 14:49:09.767 [ItemStateChangedEvent     ] - TEMPERATURE_RAIN61441_RainTotal changed from NULL to 95.10000000000000852651282912120223045349121093

Two issues at the moment:

  • RainTotal is wrongly decoded (95mm shown in Paper UI but 93,9mm on the WS1200 display)
  • channel temperature is not detected

Regarding RainRate: I’m not sure if the WS1200 is sending this (because it’s indoor unit is not showing rain rate). It only calculates “rain this hour”, “rain today”, “rain this week” and so on…

Probably the second value is the temperature channel instead of the RainRate?

Hi Martin,
It almost works…
Right after adding your binding, openhab added my Alecto sensor.
a few channels are rightfully added: Rain Rate, Rain Total (and the obvious Signal Strength, Battery Level and Low Battery).
But is doesn’t add any temperature.
After searching, I saw that the device is recognised as a rfxcom:rain sensor and not the rfxcom:temperature_rain sensor.
Manually adding however dit not solve this. The sensor is then added, with only rain and temperature channels, but that doesn’t work.

@Flagg Is it reporting the correct RainTotal (compared to the indoor display?)

@Curlyel: Almost. Raintotal in openhab: 57 MM. Indoor Display: 57.9 MM.
I will settle for that…

Other thing is that if Rain Rate is empty, it shows -NaN. I think it should be 0 (zero)

I think, the outdoor unit is not calculating any RainRate and therefore don’t transmit a value for it. The hour/today/weekly… values are calculated by the indoor part.

The sensor just sends values for temperature, rain total, battery low…

I found the problem regarding accidentally mapping temperature-rain to rain, a new version:

https://github.com/martinvw/openhab2-addons/files/753043/org.openhab.binding.rfxcom-2.1.0-SNAPSHOT.jar.zip

Maybe this also resolves the incorrect rainTotal otherwise I need some debug output to test it locally

We’ll try. Thanks Martin!

Excellent! Temperature is working too now :wink:

TEMPERATURE_RAIN61441_Temperature changed from 8.300000000000000710542735760100185871124267578125 to 8.2000000000000010658141036401502788066864013671875

But the RainTotal is still not right decoded. 93,9mm on display vs. 95,1mm in OpenHAB. This could not be blamed on some rounding etc.

TEMPERATURE_RAIN61441_RainTotal2 changed from NULL to 95.1000000000000085265128291212022304534912109375

Could we dig into the wrong RainTotal?

Yes, I would love too, I need some debug output, like the one mentioned in the opening post:

18:07:46.506 [ERROR] [.rfxcom.internal.RFXComBinding:292 ] - Error occured during packet receiving, data: 0A4F0104D4000096005A79

If you sign into the Karaf console you can enable it, see

Works almost properly here:
16:12:21.051 [DEBUG] [g.rfxcom.handler.RFXComBridgeHandler] - Message received: Raw data = 0A4F010ADA090050024369, Packet type = TEMPERATURE_RAIN, Seq number = 10, - Sub type = WS1200, - Id = 55817, - Temperature = 8.0, - Rain total = 57.900000000000006, - Signal level = 6, - Battery level = 9
16:12:21.062 [DEBUG] [binding.rfxcom.handler.RFXComHandler] - Received message from bridge: rfxcom:bridge:38ad4eac message: Raw data = 0A4F010ADA090050024369, Packet type = TEMPERATURE_RAIN, Seq number = 10, - Sub type = WS1200, - Id = 55817, - Temperature = 8.0, - Rain total = 57.900000000000006, - Signal level = 6, - Battery level = 9

The RainTotal is exactly the same as on the display, but on the paperUI, it is Rounded to 57, where I think it should round to 58 MM. Temperature is working properly here…
I will try to put some “rain” on it, since I think it should show the rain_rate as well.

2017-02-05 16:20:21.983 [DEBUG] [binding.rfxcom.handler.RFXComHandler] - Received message from bridge: rfxcom:bridge:51dd5bd0 message: Raw data = 0A4F01CCF001004F03B759, Packet type = TEMPERATURE_RAIN, Seq number = 204, - Sub type = WS1200, - Id = 61441, - Temperature = 7.9, - Rain total = 95.10000000000001, - Signal level = 5, - Battery level = 9

Values on Display:
7,9 Grd. C
93,9 mm rain total

Just “had it rain”:
Display:
7.8 C
60.9 MM rain total

openhab.log:
7.8 C
60.9 MM Rain total

Openhab UI:
7.8 C
60 mm