openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.87k stars 3.58k forks source link

[rfxcom] Please add support for RFXSENSOR #1934

Closed big-col closed 4 years ago

big-col commented 7 years ago

Hi, could you please add support for the RFXSENSOR which is a temperature sensor.

thanks.

martinvw commented 7 years ago

I might have some time to work on this in the upcoming weeeks, can you supply me with some example debug data of the messages as they are received by the rfxcom.

martinvw commented 7 years ago

There are some example temperature messages in the manual, however the SDK manual suggests that there are also some status messages send every 80 minutes I would love to get some of that too. You can collect the debug information either by enabling the debug modus or by using the RfxMngr

big-col commented 7 years ago

debug enabled when i activated the device i see:

2017-02-22 21:27:02.564 [DEBUG] [g.rfxcom.handler.RFXComBridgeHandler] - Message not supported, data: 0770000008080270 2017-02-22 21:27:02.865 [DEBUG] [g.rfxcom.handler.RFXComBridgeHandler] - Message not supported, data: 077002010801F270 2017-02-22 21:27:03.166 [DEBUG] [g.rfxcom.handler.RFXComBridgeHandler] - Message not supported, data: 077001020800F470 2017-02-22 21:27:04.047 [DEBUG] [g.rfxcom.handler.RFXComBridgeHandler] - Checking RFXCOM transceiver connection, thing status = ONLINE

big-col commented 7 years ago

here's RFXMGR log:


Packettype = RFXSensor subtype = Temperature Sequence nbr = 0 ID = 8 msg = 21.5 °C Signal level = 7 -64dBm


Packettype = RFXSensor subtype = A/D Sequence nbr = 1 ID = 8 msg = 2380 mV Signal level = 7 -64dBm

big-col commented 7 years ago

I left RFXMGR running overnight, there are 3 different message types repeated at various intervals.


Packettype = RFXSensor subtype = Voltage Sequence nbr = 114 ID = 8 msg = 4980 mV Signal level = 7 -64dBm


Packettype = RFXSensor subtype = A/D Sequence nbr = 115 ID = 8 msg = 2430 mV Signal level = 7 -64dBm


Packettype = RFXSensor subtype = Temperature Sequence nbr = 116 ID = 8 msg = 18.87 °C Signal level = 7 -64dBm


i notice i am running an older firmware version on the RFXTRX433E

here's the entire log file in case it helps.

RFXMGR.txt

martinvw commented 7 years ago

If somebody else has time to pick it up would be great, my kid is about to be born so I might not find the time quick enough :-)

martinvw commented 7 years ago

Sorry wrong issue mentioned 1943 vs 1934 👎

martinvw commented 7 years ago

Baby is delayed ;-)

Hereby a first version which supports the voltage and temperature messages.

I have some doubts about how I should link the A/D message what is it especially what is the difference with the voltage message?

Uninstall existing binding, unpack the new one and put in the addons folder:

org.openhab.binding.rfxcom-2.1.0-SNAPSHOT.jar.zip

martinvw commented 7 years ago

@big-col were you able to test the snapshot?

big-col commented 7 years ago

Really sorry only just seen this... Will take a look asap

martinvw commented 7 years ago

any updates?

martinvw commented 6 years ago

Any updates?

wborn commented 5 years ago

my kid is about to be born

Can your kid already help with this? :-)

martinvw commented 5 years ago

He is still a lousy developer 😜

communig8-public commented 5 years ago

Hi just wondering if the support for RFXSensor ever got completed?

martinvw commented 5 years ago

You are still welcome to test the version above, if that is not working I can build a new version for you, I think I should still have the branch lingering around somewhere

communig8-public commented 5 years ago

Just to be clear, do you mean the latest Snapshot version of the Openhab2 and the Addons? Because I'm running that and RFXSENSOR does not show up as supported.

martinvw commented 5 years ago

Just to be clear, do you mean the latest Snapshot version of the Openhab2 and the Addons? Because I'm running that and RFXSENSOR does not show up as supported.

No, I meant the file you can download above, but its very old and most likely not compatible with the current state, I will try to make some time later this week to get it rebased on the current code.

communig8-public commented 5 years ago

Thanks, I'll wait for the rebased version.

martinvw commented 5 years ago

And there it is:

org.openhab.binding.rfxcom-2.5.0-SNAPSHOT.jar.zip

communig8-public commented 5 years ago

And there it is:

org.openhab.binding.rfxcom-2.5.0-SNAPSHOT.jar.zip

Hi, thanks but what do I do with that file?

martinvw commented 5 years ago

First uninstall the existing RFXCOM binding.

Then unpack it and install to the addons folder

communig8-public commented 5 years ago

Thanks. I assume, from the file name, that this has be be installed on top of the latest Snapshot?

martinvw commented 5 years ago

Thanks. I assume, from the file name, that this has be be installed on top of the latest Snapshot?

Yes, but it might also work on other version such as 2.4 (maybe) and most likely on top of 2.5-milestone-1

communig8-public commented 5 years ago

I've removed the original Binding then upgraded to 2.5-milestone-1 and rebooted, just for fun. Installed the Binding and installed a Thing for the USB Transceiver. This was a little confusing as all the supported Things were doubled up in the list. The first RFXSensor I powered up ended up in the InBox and I added it ok and its showing temperature readings but its showing a serial number of "63" a bit short. Other Sensors are also showing the "63" serial so all the readings are going to the same channel.

martinvw commented 5 years ago

I've removed the original Binding then upgraded to 2.5-milestone-1 and rebooted, just for fun. Installed the Binding and installed a Thing for the USB Transceiver. This was a little confusing as all the supported Things were doubled up in the list. The first RFXSensor I powered up ended up in the InBox and I added it ok and its showing temperature readings but its showing a serial number of "63" a bit short. Other Sensors are also showing the "63" serial so all the readings are going to the same channel.

That is great! Can you enable some debug logging for the binding (org.openhab.binding.rfxcom)?.

I'm really interested in having some other real data samples.

However the ID's which I see in the output from the rfxmngr also look very short so you might have a challenge there which is not caused by a bug...

communig8-public commented 5 years ago

Turned on DEBUG, powered up one RFXSensor...

2019-06-08 07:18:13.259 [DEBUG] [internal.handler.RFXComBridgeHandler] - Message received: Raw data = 077000B13F096050, Packet type = RFXSENSOR, Seq number = 177, Sub type = TEMPERATURE, Device Id = 63, Temperature = 24.0, Voltage = null, Signal level = 5

2019-06-08 07:18:13.270 [DEBUG] [fxcom.internal.handler.RFXComHandler] - Received message from bridge: rfxcom:bridge:2555927d message: Raw data = 077000B13F096050, Packet type = RFXSENSOR, Seq number = 177, Sub type = TEMPERATURE, Device Id = 63, Temperature = 24.0, Voltage = null, Signal level = 5

2019-06-08 07:18:13.369 [vent.ItemStateChangedEvent] - rfxcom_rfxsensor_2555927d_63_temperature changed from 23.0 to 24.0

Then powered off that device and powered up another one....

2019-06-08 07:19:55.680 [DEBUG] [internal.handler.RFXComBridgeHandler] - Message received: Raw data = 077000B33F083450, Packet type = RFXSENSOR, Seq number = 179, Sub type = TEMPERATURE, Device Id = 63, Temperature = 21.0, Voltage = null, Signal level = 5

2019-06-08 07:19:55.691 [DEBUG] [fxcom.internal.handler.RFXComHandler] - Received message from bridge: rfxcom:bridge:2555927d message: Raw data = 077000B33F083450, Packet type = RFXSENSOR, Seq number = 179, Sub type = TEMPERATURE, Device Id = 63, Temperature = 21.0, Voltage = null, Signal level = 5

2019-06-08 07:19:55.794 [vent.ItemStateChangedEvent] - rfxcom_rfxsensor_2555927d_63_temperature changed from 24.5 to 21.0

communig8-public commented 5 years ago

I checked using RfxMngr and that is showing an ID of 63 too. The USB Transceiver was not at the latest Firmware level, so I upgraded to 1039 but it's still 63. I had been using these RFXSensors on Homeseer but that was a few years ago. They have been in a box (batteries out!) for some time. I'm thinking that 63 might be a default ID. I seem to remember that a new (random) ID can be set by putting a 3.5mm plug in the socket on the side with a couple of the pins shorted. I'll have a look around for docs on that.

communig8-public commented 5 years ago

Got a Manual from Bert at RFXComm and I can now set the ID so they are unique.

martinvw commented 5 years ago

Got a Manual from Bert at RFXComm and I can now set the ID so they are unique.

Great! So it works? Should we just merge the PR then?

martinvw commented 5 years ago

@communig8-public do you only have/use temperature sensors or also voltage / a/d sensors?

communig8-public commented 5 years ago

Got a Manual from Bert at RFXComm and I can now set the ID so they are unique.

Great! So it works? Should we just merge the PR then?

not really up to me :-)

communig8-public commented 5 years ago

@communig8-public do you only have/use temperature sensors or also voltage / a/d sensors?

I have a couple of Type 2 RFXSensors that have an internal Temperature and Humidity Sensors. I'm getting the following in DEBUG when I power one up...

[DEBUG] [internal.handler.RFXComBridgeHandler] - Message not supported, data: 0770000C0C08EF60 [DEBUG] [internal.handler.RFXComBridgeHandler] - Message not supported, data: 0770010D0C00E960

martinvw commented 5 years ago

I have a couple of Type 2 RFXSensors that have an internal Temperature and Humidity Sensors. I'm getting the following in DEBUG when I power one up...

As what type are they recognized at the rfxmngr software?

communig8-public commented 5 years ago

11/06/2019 07:40:56:349 Packettype = RFXSensor subtype = Temperature Sequence nbr = 0 ID = 12 msg = 18.37 °C Signal level = 5 -80dBm

11/06/2019 07:40:56:677 Packettype = RFXSensor subtype = Voltage Sequence nbr = 1 ID = 12 msg = 4990 mV Signal level = 5 -80dBm

11/06/2019 07:40:57:004 Packettype = RFXSensor subtype = A/D Sequence nbr = 2 ID = 12 msg = 2690 mV Signal level = 5 -80dBm

martinvw commented 5 years ago

I don't see any humidity reading, is that correct? Or this the type 1?

communig8-public commented 5 years ago

It just seems to be coming through as "A/D"

communig8-public commented 5 years ago

Hi, any progress on the Type 2 Sensor?

martinvw commented 5 years ago

@communig8-public do you only have/use temperature sensors or also voltage / a/d sensors?

I have a couple of Type 2 RFXSensors that have an internal Temperature and Humidity Sensors. I'm getting the following in DEBUG when I power one up...

[DEBUG] [internal.handler.RFXComBridgeHandler] - Message not supported, data: 0770000C0C08EF60 [DEBUG] [internal.handler.RFXComBridgeHandler] - Message not supported, data: 0770010D0C00E960

When adding those values to the unit tests its recognized, can it be that you were still working with a regular version of this binding and not with the version compiled by me?

martinvw commented 5 years ago

It just seems to be coming through as "A/D"

@communig8-public What is the meaning of that 'A/D' and under what name should be sensibly published? Or is maybe the voltage not interesting and should I just ignore that? Without that information I cannot finish the PR. :-)

communig8-public commented 5 years ago

@communig8-public do you only have/use temperature sensors or also voltage / a/d sensors?

I have a couple of Type 2 RFXSensors that have an internal Temperature and Humidity Sensors. I'm getting the following in DEBUG when I power one up... [DEBUG] [internal.handler.RFXComBridgeHandler] - Message not supported, data: 0770000C0C08EF60 [DEBUG] [internal.handler.RFXComBridgeHandler] - Message not supported, data: 0770010D0C00E960

When adding those values to the unit tests its recognized, can it be that you were still working with a regular version of this binding and not with the version compiled by me?

Ah Yes, my Bad. Just double checked and the Type 2 RFXSensor is being recognised BUT only as a temperature Sensor.

martinvw commented 5 years ago

@communig8-public did you also see my other question?

communig8-public commented 5 years ago

Sorry, yes but it seemed it needs to be reworked bearing in mind that the Type 2 RFXSensor IS recognised BUT only as a temperature sensor.

martinvw commented 5 years ago

In the build I delivered only the temperature sensor was supported so that is not surprising, I was actually referring to

What is the meaning of that 'A/D' and under what name should be sensibly published? Or is maybe the voltage not interesting and should I just ignore that? Without that information I cannot finish the PR. :-)

I did not finish a build with support for a/d because I don’t know what it means in the context of this sensor. I do have a local version with support for the voltage message but I also doubt how that should be exposed.

communig8-public commented 5 years ago

Attached is a PDF I got from RFXCom that should answer all your questions... RFXSensor.pdf

martinvw commented 5 years ago

@kaikreuzer for this device we receive separate information frames about 3 measurements, a reference voltage, a measured voltage and a temperature. Using these 3 the humidity can be calculated assuming of course that the connected sensor (and thus the measurement) is a humidity sensor.

Given we in general (but also in this binding) do not store states in bindings I am in doubt how to proceed would the most sensible way be something for the new rule engine? Or do you have any other suggestions?

kaikreuzer commented 5 years ago

@martinvw The process to calculate the humidity sounds pretty specific for this binding - I don't think we should aim to make this a "generally available mechanism" to get a humidity from a set of "raw" items. I hence do not mind if those "intermediate" values are cached within the binding and a humidity channel is only updated, once a value can be calculated. Does that answer your question?

martinvw commented 4 years ago

@communig8-public sorry that I was 'away' for so long, but because of the calculations, it was more complex, in the meantime life happened :-D

https://download.martinvw.nl/org.openhab.binding.rfxcom-2.5.0-SNAPSHOT-2980.jar

But I have a new version which should work including pressure and/or humidity depending on the sensors you have connected. It would be great if you could check it out.

martinvw commented 4 years ago

@big-col @communig8-public or others who might be interested in this feature it would be great if you could test the new feature and report back, thanks!

communig8-public commented 4 years ago

@martinvw Sorry but I had so many issues with the Milestone and Snapshot releases that I've gone back to the Stable release and concentrated on hardware support in Stable.