RFXCOM Cheap PIR Sensor Binding in Openhab2

Ouch, that sounds like a painfull process. I would hope you can just remove it without removing your items first. Maybe the proper steps could be (untested):

  • remove original binding via karaf console (the benefit of doing it like this at the gnu.io is not removed)
  • put the binding in the addons folder.
  • possibly do a restart

This is most likely related to auto-discovery not working properly with the default drivers in debian based installs. Not related to the new version of binding.

Thank you for the answer! Probably you’re right, I thought it’s a new binding issue because the “out of box” OH2 installation hasn’t troubles with RFXCOM discovery. The only one issue with “original” OH2 setup is that only “generic USB RFXCOM” thing works in my configuration, not more specific “RFXCOM RFXtrx433E transmitter”. But I’m very happy that yesterday evening it finally started with your binding, because it’s CommandID modification is very-very useful for me. Thanks again for the hint of easier binding installation!

Can someone help me with my manual thing configuration for rfxcom and these lightning4 things?

If this is my thing (one of the lighting4 sockets), then what should I change in my thing configuration?

Bridge rfxcom:bridge:usb0 [ serialPort="COM3" ] {
    Thing lighting4 17733 [deviceId="17733", subType="AC"]
}

I also don’t know what to put as subType, should it be ‘lighting4’?

That should be subType = PT2262

This is what I have now:

home.things

Bridge rfxcom:bridge:238adf67 [ serialPort="COM3" ] {
    Thing lighting4 17733 [deviceId="17733", subType="PT2262"]
}

home.items

Switch Switch_Staanlamp "Staanlamp txt item" { rfxcom="<17733:Command" } 

home.sitemap

sitemap home label="Home"{
	Frame label="Lights" {
		Switch item=Switch_Staanlamp
	}
}

I can see the switch on http://openhab:8080/basicui/app?sitemap=home but nothing happens when switching it


I did only do some things with openHAB2 (my main system is (still) running OH 1.8 / 1.9)

But I know that this is a mix of old and new style, by defining a thing you should use a channel.

The items file should contain

Switch	Switch_Staanlamp	 { channel="rfxcom:lighting4:238adf67:17733:command" }

Based on [SOLVED] Need help with manual RFXCOM thing configuration and assuming it to be correct :slight_smile:

I changed it to that new style. This is where I am now.

09:39:48.214 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'Switch_C' received command OFF
09:39:48.219 [INFO ] [ome.core.thing.internal.ThingManager] - Not delegating command 'OFF' for item 'Switch_C' to handler for channel 'rfxcom:lighting4:238adf67:17733:command', because handler is not initialized (thing must be in status UNKNOWN, ONLINE or OFFLINE).
09:39:48.221 [INFO ] [ome.core.thing.internal.ThingManager] - Not delegating update 'OFF' for item 'Switch_C' to handler for channel 'rfxcom:lighting4:238adf67:17733:command', because handler is not initialized (thing must be in status UNKNOWN, ONLINE or OFFLINE).

When I press the original remote:

09:40:06.521 [DEBUG] [g.rfxcom.handler.RFXComBridgeHandler] - Message received: Raw data = 09130000044551013970, Packet type = LIGHTING4, Seq number = 0, Sub type = PT2262, Device Id = 17493, Command = ON_1(1), Pulse = 313
09:40:06.522 [WARN ] [mon.registry.AbstractManagedProvider] - Could not update element with key rfxcom:lighting4:238adf67:17493 in ManagedThingProvider, because it does not exists.

My config now:
Things

Bridge rfxcom:bridge:238adf67 [ serialPort="COM3" ] {
	Thing lighting4 17493 [deviceId="17493", subType="PT2262"]
	Thing lighting4 17685 [deviceId="17685", subType="PT2262"]
    Thing lighting4 17733 [deviceId="17733", subType="PT2262"]
    Thing lighting4 17745 [deviceId="17745", subType="PT2262"]
}

Items

Switch Switch_A { channel="rfxcom:lighting4:238adf67:17493:command" }
Switch Switch_B { channel="rfxcom:lighting4:238adf67:17685:command" }
Switch Switch_C { channel="rfxcom:lighting4:238adf67:17733:command" }
Switch Switch_D { channel="rfxcom:lighting4:238adf67:17745:command" }

I’m not at home now but you can try whether you can see newly added item via the paperUI at the list of things.

Also you can check if errors occur during loading the updated things file, so update things file and in the meanwhile monitor the log for any errors or warnings.

Did you maybe create you two bridges which both connect to the same com-port?

One via the paper-ui and one via the text config?

Hmm alright that doesn’t look too good.

10:53:03.999 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'home.things'
10:53:04.000 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'home.things' is either empty or cannot be parsed correctly!
10:53:04.002 [ERROR] [.core.internal.folder.FolderObserver] - Error handling update of file 'C:\openHAB2\conf\things\home.things': null.
java.lang.NullPointerException
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.getAllThingUIDs(GenericThingProvider.java:929)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.modelChanged(GenericThingProvider.java:884)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:207)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:120)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:272)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.access$1(FolderObserver.java:265)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.folder.FolderObserver$WatchQueueReader.processWatchEvent(FolderObserver.java:146)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.core.service.AbstractWatchQueueReader.run(AbstractWatchQueueReader.java:122)[98:org.eclipse.smarthome.core:0.9.0.b4]
        at java.lang.Thread.run(Unknown Source)[:1.8.0_121]
10:53:04.026 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'home.things'
10:53:04.034 [DEBUG] [g.rfxcom.handler.RFXComBridgeHandler] - Handler disposed.
10:53:04.035 [DEBUG] [rnal.connector.RFXComSerialConnector] - Disconnecting
10:53:04.042 [DEBUG] [rnal.connector.RFXComSerialConnector] - Serial port event listener stopped
10:53:04.042 [DEBUG] [rnal.connector.RFXComSerialConnector] - Interrupt serial listener
10:53:04.042 [DEBUG] [rnal.connector.RFXComSerialConnector] - Close serial out stream
10:53:04.043 [DEBUG] [rnal.connector.RFXComSerialConnector] - Close serial in stream
10:53:04.043 [DEBUG] [rnal.connector.RFXComSerialConnector] - Close serial port
10:53:09.035 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while calling thing updated at ThingHandler 'org.openhab.binding.rfxcom.handler.RFXComBridgeHandler@be6d06': null
java.util.concurrent.TimeoutException
        at java.util.concurrent.FutureTask.get(Unknown Source)[:1.8.0_121]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:188)[98:org.eclipse.smarthome.core:0.9.0.b4]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:81)[98:org.eclipse.smarthome.core:0.9.0.b4]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:65)[98:org.eclipse.smarthome.core:0.9.0.b4]
        at org.eclipse.smarthome.core.thing.internal.ThingManager.thingUpdated(ThingManager.java:518)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
        at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyTrackers(ThingRegistryImpl.java:227)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
        at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutUpdatedElement(ThingRegistryImpl.java:150)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
        at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutUpdatedElement(ThingRegistryImpl.java:1)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
        at org.eclipse.smarthome.core.common.registry.AbstractRegistry.updated(AbstractRegistry.java:167)[98:org.eclipse.smarthome.core:0.9.0.b4]
        at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:57)[98:org.eclipse.smarthome.core:0.9.0.b4]
        at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListenersAboutUpdatedElement(AbstractProvider.java:82)[98:org.eclipse.smarthome.core:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.access$4(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$21.accept(GenericThingProvider.java:1044)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$21.accept(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at java.util.ArrayList.forEach(Unknown Source)[:1.8.0_121]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.createThingsFromModelForThingHandlerFactory(GenericThingProvider.java:1054)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.access$1(GenericThingProvider.java:1008)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$1$1.accept(GenericThingProvider.java:236)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$1$1.accept(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at java.util.concurrent.ConcurrentHashMap$KeySetView.forEach(Unknown Source)[:1.8.0_121]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$1.apply(GenericThingProvider.java:239)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$1.apply(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.config.core.BundleProcessorVetoManager.applyActionFor(BundleProcessorVetoManager.java:121)[94:org.eclipse.smarthome.config.core:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$6.accept(GenericThingProvider.java:320)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$6.accept(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at java.lang.Iterable.forEach(Unknown Source)[:1.8.0_121]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.createThingsFromModel(GenericThingProvider.java:323)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.modelChanged(GenericThingProvider.java:870)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:207)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:99)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:272)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.access$1(FolderObserver.java:265)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.folder.FolderObserver$WatchQueueReader.processWatchEvent(FolderObserver.java:146)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.core.service.AbstractWatchQueueReader.run(AbstractWatchQueueReader.java:122)[98:org.eclipse.smarthome.core:0.9.0.b4]
        at java.lang.Thread.run(Unknown Source)[:1.8.0_121]
10:53:09.037 [INFO ] [smarthome.event.ThingUpdatedEvent   ] - Thing 'rfxcom:bridge:238adf67' has been updated.
10:53:09.038 [INFO ] [smarthome.event.ThingUpdatedEvent   ] - Thing 'rfxcom:lighting4:238adf67:17493' has been updated.
10:53:09.039 [INFO ] [smarthome.event.ThingUpdatedEvent   ] - Thing 'rfxcom:lighting4:238adf67:17685' has been updated.
10:53:09.040 [INFO ] [smarthome.event.ThingUpdatedEvent   ] - Thing 'rfxcom:lighting4:238adf67:17733' has been updated.
10:53:09.040 [INFO ] [smarthome.event.ThingUpdatedEvent   ] - Thing 'rfxcom:lighting4:238adf67:17745' has been updated.

Yes I can see the things as ‘uninitialized’ in Paper UI, and my bridge is ‘online’. I removed the bridge and other items that were added through paper UI before.

First thank you @martinvw for your efforts on this! Good work!

I had some time to test this today. I had the similar problems that @westward had - so I had to add the bridge first manually to Things file and after that I could add bridge also manually from PaperUI, but after that seems to work ok.

Of course I had to discover all Ligthning4 things again, because the device id changes. Everything seems to work ok. I will run this binding on my production openhab also for few days and report if I see issues.

One question about the device id. If I have this in rfxmgr:

Packettype    = Lighting4
subtype       = PT2262
Sequence nbr  = 78
Code          = E00021 decimal:14680097
S1- S24  = 1110 0000 0000 0000 0010 0001 
Pulse         = 362 usec
Signal level  = 7  -64dBm

What is the device id? I read the code, but bitwise operations are not things that I read fluently :slight_smile:

I would just use the debug logging for rfxcom or the inbox, you can not easily say it without having the raw message. I think the rfxmgr defines something else as the device-id then the binding does.

Some options I can think of now without having a proper computer (working from the computer of my father in law):

  • Maybe you’r not allowed to have a name with only numbers
?
  • Can you rename the 238adf67 and check whether that one still appears online, maybe you now two with the same name.
  • Try with a minimal sample.

If we have this working we should definitely update the readme I’ll try to make some time for that this weekend.

I renamed ‘238adf67’ in things and items to ‘usb0’. I see it changed in Paper UI and there is still only one rfxcom transceiver listed. So that seems to be OK.

Keeps saying ‘handler is not initialized’ in the logs when I use the switch from the sitemap.

okay and changing the all numeric thing id’s to eg switch_17493

And you could ofcourse try to restart openHAB if you did not yet do that


11:41:01.011 [ERROR] [.core.internal.folder.FolderObserver] - Error handling update of file 'C:\openHAB2\conf\things\home.things': null.
java.lang.NullPointerException
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.getAllThingUIDs(GenericThingProvider.java:929)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.modelChanged(GenericThingProvider.java:884)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:207)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:120)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:272)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.access$1(FolderObserver.java:265)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.folder.FolderObserver$WatchQueueReader.processWatchEvent(FolderObserver.java:146)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.core.service.AbstractWatchQueueReader.run(AbstractWatchQueueReader.java:122)[98:org.eclipse.smarthome.core:0.9.0.b4]
        at java.lang.Thread.run(Unknown Source)[:1.8.0_121]
11:41:01.020 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'home.things'
11:41:01.028 [DEBUG] [g.rfxcom.handler.RFXComBridgeHandler] - Handler disposed.
11:41:01.029 [DEBUG] [rnal.connector.RFXComSerialConnector] - Disconnecting
11:41:01.029 [DEBUG] [rnal.connector.RFXComSerialConnector] - Serial port event listener stopped
11:41:01.029 [DEBUG] [rnal.connector.RFXComSerialConnector] - Interrupt serial listener
11:41:01.029 [DEBUG] [rnal.connector.RFXComSerialConnector] - Close serial out stream
11:41:01.029 [DEBUG] [rnal.connector.RFXComSerialConnector] - Close serial in stream
11:41:01.030 [DEBUG] [rnal.connector.RFXComSerialConnector] - Close serial port
11:41:06.029 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while calling thing updated at ThingHandler 'org.openhab.binding.rfxcom.handler.RFXComBridgeHandler@1bfa484': null
java.util.concurrent.TimeoutException
        at java.util.concurrent.FutureTask.get(Unknown Source)[:1.8.0_121]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:188)[98:org.eclipse.smarthome.core:0.9.0.b4]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:81)[98:org.eclipse.smarthome.core:0.9.0.b4]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:65)[98:org.eclipse.smarthome.core:0.9.0.b4]
        at org.eclipse.smarthome.core.thing.internal.ThingManager.thingUpdated(ThingManager.java:518)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
        at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyTrackers(ThingRegistryImpl.java:227)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
        at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutUpdatedElement(ThingRegistryImpl.java:150)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
        at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutUpdatedElement(ThingRegistryImpl.java:1)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
        at org.eclipse.smarthome.core.common.registry.AbstractRegistry.updated(AbstractRegistry.java:167)[98:org.eclipse.smarthome.core:0.9.0.b4]
        at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:57)[98:org.eclipse.smarthome.core:0.9.0.b4]
        at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListenersAboutUpdatedElement(AbstractProvider.java:82)[98:org.eclipse.smarthome.core:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.access$4(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$21.accept(GenericThingProvider.java:1044)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$21.accept(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at java.util.ArrayList.forEach(Unknown Source)[:1.8.0_121]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.createThingsFromModelForThingHandlerFactory(GenericThingProvider.java:1054)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.access$1(GenericThingProvider.java:1008)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$1$1.accept(GenericThingProvider.java:236)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$1$1.accept(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at java.util.concurrent.ConcurrentHashMap$KeySetView.forEach(Unknown Source)[:1.8.0_121]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$1.apply(GenericThingProvider.java:239)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$1.apply(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.config.core.BundleProcessorVetoManager.applyActionFor(BundleProcessorVetoManager.java:121)[94:org.eclipse.smarthome.config.core:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$6.accept(GenericThingProvider.java:320)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$6.accept(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at java.lang.Iterable.forEach(Unknown Source)[:1.8.0_121]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.createThingsFromModel(GenericThingProvider.java:323)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.modelChanged(GenericThingProvider.java:870)[133:org.eclipse.smarthome.model.thing:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:207)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:99)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:272)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.access$1(FolderObserver.java:265)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.folder.FolderObserver$WatchQueueReader.processWatchEvent(FolderObserver.java:146)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.core.service.AbstractWatchQueueReader.run(AbstractWatchQueueReader.java:122)[98:org.eclipse.smarthome.core:0.9.0.b4]
        at java.lang.Thread.run(Unknown Source)[:1.8.0_121]
11:41:06.032 [INFO ] [smarthome.event.ThingUpdatedEvent   ] - Thing 'rfxcom:bridge:usb0' has been updated.
11:41:06.033 [INFO ] [smarthome.event.ThingUpdatedEvent   ] - Thing 'rfxcom:lighting4:usb0:switch_17493' has been updated.
11:41:06.035 [INFO ] [smarthome.event.ThingUpdatedEvent   ] - Thing 'rfxcom:lighting4:usb0:switch_17685' has been updated.
11:41:06.036 [INFO ] [smarthome.event.ThingUpdatedEvent   ] - Thing 'rfxcom:lighting4:usb0:switch_17733' has been updated.
11:41:06.037 [INFO ] [smarthome.event.ThingUpdatedEvent   ] - Thing 'rfxcom:lighting4:usb0:switch_17745' has been updated.

Openhab restart doesn’t seem to help.

I’m sorry, I fear that is caused by the changes in the binding :frowning:

I tested your config with stable rfxcom and with my own its fails only with my own.

This seems to work better, no more uninitialized handlers, I however did not mean to make the on/off commands required, so some work is required there. I think the pulse is optional, I’ll put it is a review comment of myself to the PR, I’ll fix it later.

	Thing lighting4 L17493 [deviceId="17493", subType="PT2262", onCommand="OFF_0", offCommand="OFF_0"] 
	Thing lighting4 L17685 [deviceId="17685", subType="PT2262", onCommand="OFF_0", offCommand="OFF_0"]
    Thing lighting4 L17733 [deviceId="17733", subType="PT2262", onCommand="OFF_0", offCommand="OFF_0", pulse=350]
    Thing lighting4 L17745 [deviceId="17745", subType="PT2262", onCommand="OFF_0", offCommand="OFF_0", pulse=350]

Alright, now we are getting somwhere. I’m planning to switch to Paper UI + sitemap/rules only, but for now I’d like to get it working so we can at least squash the remaining bugs from your changes


You used OFF_0 for onCommand too, I assume this needs to be ON_1 looking at the enum in your code.

I changed my things, the switch is not operating yet, the ‘handler uninitialized’ messages are gone.
I had some errors until I restarted openhab. Now it’s working! Anything else you want me to try/do before I switch over to srict paper ui + sitemaps/rules (without items/things files)?

The default options should be
on: ON_1
off OFF_4

Maybe you could also define the pulse as expected. Do you have debuging output for on/off switching? Maybe we can tell what’s wrong from that debug information.