RFXCOM 2.0 - "Invalid device id" for Somfy (RFY) blinds

Hello,

I’m having some issues getting my Somfy blinds working with the RFXCOM 2.0 binding. I get the following error message:

2016-11-20 15:00:59.911 [ItemCommandEvent          ] - Item 'livingroom_screen1' received command DOWN

2016-11-20 15:00:59.915 [ERROR] [binding.rfxcom.handler.RFXComHandler] - Transmitting error: Invalid device id '11.0.1.1'

My rfxcom.things:

Bridge rfxcom:bridge:rfx [ serialPort="/dev/ttyUSB0" ] {
  Thing temperaturehumidity livingroom_window 	[deviceId="27401", subType="TH2"]
  Thing temperaturehumidity outside 			[deviceId="38145", subType="TH1"]
  Thing temperaturehumidity garage 			[deviceId="60421", subType="TH2"]
  Thing temperaturehumidity teknisk 			[deviceId="60931", subType="TH2"]
  Thing temperaturehumidity livingroom 			[deviceId="58882", subType="TH2"]

  Thing rfy screen_all 	[deviceId="11.0.1.0", subType="RFY"]
  Thing rfy screen_1 	[deviceId="11.0.1.1", subType="RFY"]
  Thing rfy screen_2 	[deviceId="11.0.1.2", subType="RFY"]
  Thing rfy screen_3 	[deviceId="11.0.1.3", subType="RFY"]
  Thing rfy screen_4 	[deviceId="11.0.1.4", subType="RFY"]
}

Items:

Rollershutter livingroom_screen_all "All" 		{ channel="rfxcom:rfy:rfx:screen_all:shutter" }
Rollershutter livingroom_screen1 	"South (1)" { channel="rfxcom:rfy:rfx:screen_1:shutter" }
Rollershutter livingroom_screen2 	"South (2)" { channel="rfxcom:rfy:rfx:screen_2:shutter" }
Rollershutter livingroom_screen3 	"West (3)" 	{ channel="rfxcom:rfy:rfx:screen_3:shutter" }
Rollershutter livingroom_screen4 	"West (4)" 	{ channel="rfxcom:rfy:rfx:screen_4:shutter" }

And finally, my old (working) OH1 items:

Rollershutter livingroom_screen_all "All"               { rfxcom=">11.0.1.0:RFY.RFY:Shutter" }
Rollershutter livingroom_screen1        "South (1)" { rfxcom=">11.0.1.1:RFY.RFY:Shutter" }
Rollershutter livingroom_screen2        "South (2)" { rfxcom=">11.0.1.2:RFY.RFY:Shutter" }
Rollershutter livingroom_screen3        "West (3)"      { rfxcom=">11.0.1.3:RFY.RFY:Shutter" }
Rollershutter livingroom_screen4        "West (4)"      { rfxcom=">11.0.1.4:RFY.RFY:Shutter" }

When looking through the source code, it seems that it is expecting device ID to consist of only two numbers separated by a dot, please see: https://github.com/openhab/openhab2-addons/blob/528473fca963eadd4345451ad19da59fb5232bf2/addons/binding/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/internal/messages/RFXComRfyMessage.java#L212

Has the device ID format changed in v2.0 of the RFXCOM binding? And if so, how do I “convert” between the old and new format?

1 Like

Anyone have any ideas or experienced the same?

Hi Gunnar,

you’re right, the format did actually change, and the RFY thing now expects it in format “DeviceId.UnitCode”.
However, the device ID must be converted from HEX to decimal.

So in your case it should look like this:

  Thing rfy screen_all 	[deviceId="1101.0", subType="RFY"]

If it does not work, please use RFXmgr to get the device definition as it is set in your RFXCom device - this should give the hex values, which you can then convert to decimal.

FWIW, I also spend the whole afternoon figuring this out, after upgrading to OpenHAB2.