Openhab running on a raspi with connected RFXCOM

Can anyone provide sample examples of thing/item files to configure RFXCOM to send chime commands to Byron SX Devices.
I have set up the RFXCOM bridge as:

Bridge rfxcom:bridge:usb0 [ serialPort="/dev/ttyUSB0" ] {
chimesound byron1 [deviceId=“15”, subType=“Byron SX”]}

I can receive chime data, and create chime things but I do not understand the syntax of the items file.
I have a Chime thing with address 15, and want to play chime number 2. I have a items file like this:

Switch byron1 {channel=“rfxcom:usb0:15:2”}

and a sitemap item:

Switch item=byron1 label="[Byron sx]" icon=“Switch”

No data is passed via usb0 to the RFXCOM as the data receive do not flicker.

Can anyone advise on correct syntax???

Cheers…Kendo

You’ve defined your bridge and a chimesound channel, but there’s no chime type Thing for the channel to attach to. You’ll need to change

Bridge rfxcom:bridge:usb0 [ serialPort="/dev/ttyUSB0" ] {
   Thing chime byron1 [deviceId="15", subType="Byron SX"] 
}

Every chime type Thing automatically creates a chimesound channel, so you don’t need to define that.

Next, docs say that Byron SX device is recognized as subType BYRONSX, best fix that

Bridge rfxcom:bridge:usb0 [ serialPort="/dev/ttyUSB0" ] {
   Thing chime byron1 [deviceId="15", subType="BYRONSX"] 
}

Next, the Item -

Docs say that chimesound is a Number type channel, so you’d create a Number type Item. And link that to your new Thing and channel.

Number byronchime "Chime" {channel="rfxcom:usb0:byron1:chimesound"}

As the Item is a Number, you’d need to send a number command, maybe a button in your sitemap?

Switch item=byronchime mappings=[2="DingDong"]
1 Like

Many thanks for you prompt response, I can now see the syntax errors I made and this has helped understand the Docs a little more. I have amended my files and they all load error free, the Bridge and chime show to be online. Looks like I have a little more investigation work to carry out as the rfcom is not receiving a tx command, as the coms lights do not flicker when button operated. The log shows the item has received a command but nothing from there. Will carry out some further checks and update the post shortly. Thanks again for the syntax advice…kendo

Update :open_mouth: :smiley: :smiley: , I now have the Chime working and the RFXCOM module leds flash showing communicating.
All I have done is manually linked the chime sound manually on paper UI and saved it. I think this link should have been made by the items file but, having manually linked its working.

The devil is in the detail.

While I suggested -

The docs, and your PaperUI link, show that the precreated channelname is chimeSound

If I were you I would delete the link in PaperUI and then fix in your xxx.items file, mixing the methods usually ends in tears.

Items file:
Number byron1 “Chime” {channel=“rfxcom:usb0:byron1:chimesound”}
Logs:
20-05-11 21:31:06.060 [.ItemChannelLinkAddedEvent] - Link ‘byron1-rfxcom:usb0:byron1:chimesound’ has been added.

Paper UI Things shows:
rfxcom:chime:usb0:byron1:chimeSound

Whatever I do, the capital S in Paper UI remains the same with the capital S and the chime unlinked.

image

Items file deleted, renamed and recreated, still no change…

signing off for the night will have a look tomorrow…thanks again

Yes, this is not a valid link. The chimeSound channel with big-S is created by the binding, whether you like it or not. There is no chimesound channel with little-s on this Thing, so the link would be dead.

Further, the Thing is not rfxcom:usb0:byron1 as guessed, but rather rfxcom:chime:usb0:byron1
It’s best to copy-paste from PaperUI

Number byron1 "Chime" {channel="rfxcom:chime:usb0:byron1:chimeSound"}
1 Like

Got it, links and works…happy days…

Thanks again for staying with it…….

Regards…

kendo

1 Like