{"action":"created","issue":{"url":"https://api.github.com/repos/openhab/openhab/issues/3858","repository_url":"https://api.github.com/repos/openhab/openhab","labels_url":"https://api.github.com/repos/openhab/openhab/issues/3858/labels{/name}","comments_url":"https://api.github.com/repos/openhab/openhab/issues/3858/comments","events_url":"https://api.github.com/repos/openhab/openhab/issues/3858/events","html_url":"https://github.com/openhab/openhab/issues/3858","id":127806773,"number":3858,"title":"Several LIGHTING4 commands not supported in RFXCOM binding","user":{"login":"buzink","id":105793,"avatar_url":"https://avatars.githubusercontent.com/u/105793?v=3","gravatar_id":"","url":"https://api.github.com/users/buzink","html_url":"https://github.com/buzink","followers_url":"https://api.github.com/users/buzink/followers","following_url":"https://api.github.com/users/buzink/following{/other_user}","gists_url":"https://api.github.com/users/buzink/gists{/gist_id}","starred_url":"https://api.github.com/users/buzink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buzink/subscriptions","organizations_url":"https://api.github.com/users/buzink/orgs","repos_url":"https://api.github.com/users/buzink/repos","events_url":"https://api.github.com/users/buzink/events{/privacy}","received_events_url":"https://api.github.com/users/buzink/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openhab/openhab/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/openhab/openhab/milestones/12","html_url":"https://github.com/openhab/openhab/milestones/1.9.0","labels_url":"https://api.github.com/repos/openhab/openhab/milestones/12/labels","id":1479830,"number":12,"title":"1.9.0","description":"","creator":{"login":"teichsta","id":2108636,"avatar_url":"https://avatars.githubusercontent.com/u/2108636?v=3","gravatar_id":"","url":"https://api.github.com/users/teichsta","html_url":"https://github.com/teichsta","followers_url":"https://api.github.com/users/teichsta/followers","following_url":"https://api.github.com/users/teichsta/following{/other_user}","gists_url":"https://api.github.com/users/teichsta/gists{/gist_id}","starred_url":"https://api.github.com/users/teichsta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teichsta/subscriptions","organizations_url":"https://api.github.com/users/teichsta/orgs","repos_url":"https://api.github.com/users/teichsta/repos","events_url":"https://api.github.com/users/teichsta/events{/privacy}","received_events_url":"https://api.github.com/users/teichsta/received_events","type":"User","site_admin":false},"open_issues":32,"closed_issues":137,"state":"open","created_at":"2016-01-01T16:37:00Z","updated_at":"2016-04-10T17:21:52Z","due_on":null,"closed_at":null},"comments":16,"created_at":"2016-01-20T23:10:10Z","updated_at":"2016-04-11T11:15:08Z","closed_at":null,"body":"I bought some cheap [contact] (https://github.com/openhab/openhab/blob/master/bundles/binding/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/internal/messages/RFXComLighting4Message.java) and motion sensors based on the 1527 chipset. I tried to use them with the RFXCOM binding. Unfortunately the devices do not send an ON command on contact, but a UNKNOWN command. Domoticz treats these commands as ON, so they can be used in that platform without problem (if you set auto update to OFF after a few seconds). Unfortunately, openHAB throws exceptions. I think I tracked the problem down to [this file]  (https://github.com/openhab/openhab/blob/master/bundles/binding/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/internal/messages/RFXComLighting4Message.java)\r\n\r\nIf i interpret the code correctly, all command types of the LIGHTING4 protocol are defined ([line 70] (https://github.com/openhab/openhab/blob/master/bundles/binding/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/internal/messages/RFXComLighting4Message.java#L70)), but only ON/OFF is handled correctly, the rest throw exceptions ([line 190] (https://github.com/openhab/openhab/blob/master/bundles/binding/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/internal/messages/RFXComLighting4Message.java#L190)). Additionally, the RawData type is allowed ([line 93] (https://github.com/openhab/openhab/blob/master/bundles/binding/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/internal/messages/RFXComLighting4Message.java#L93)) but not implemented ([line 232] (https://github.com/openhab/openhab/blob/master/bundles/binding/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/internal/messages/RFXComLighting4Message.java#L93)). \r\n\r\nIt would be perfect when:\r\n\r\n1. The binding treats the UNDEFINED_0, UNDEFINED_2, UNDEFINED_3 and UNKNOWN commands as ON commands, so the motion and contact sensors can be assigned to Switch and Contact items. (Switch ContactSensor01 { rfxcom=\"<9287177:Command\" })\r\n\r\n2. The binding allows for using the RawMode to put the received command into a String (or Selection?) item. (String ContactSensor01 { rfxcom=\"<9287177:RawData\" })\r\n\r\nThanks for looking into this!"},"comment":{"url":"https://api.github.com/repos/openhab/openhab/issues/comments/208291630","html_url":"https://github.com/openhab/openhab/issues/3858#issuecomment-208291630","issue_url":"https://api.github.com/repos/openhab/openhab/issues/3858","id":208291630,"user":{"login":"sheppy99","id":12907428,"avatar_url":"https://avatars.githubusercontent.com/u/12907428?v=3","gravatar_id":"","url":"https://api.github.com/users/sheppy99","html_url":"https://github.com/sheppy99","followers_url":"https://api.github.com/users/sheppy99/followers","following_url":"https://api.github.com/users/sheppy99/following{/other_user}","gists_url":"https://api.github.com/users/sheppy99/gists{/gist_id}","starred_url":"https://api.github.com/users/sheppy99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheppy99/subscriptions","organizations_url":"https://api.github.com/users/sheppy99/orgs","repos_url":"https://api.github.com/users/sheppy99/repos","events_url":"https://api.github.com/users/sheppy99/events{/privacy}","received_events_url":"https://api.github.com/users/sheppy99/received_events","type":"User","site_admin":false},"created_at":"2016-04-11T11:15:08Z","updated_at":"2016-04-11T11:15:08Z","body":"I've just got hold of a Aoke 4 relay board which needs the full range of values sending to it from 0 to 15, to select all combinations of the 4 relays, is there a way of configuring the modified lighting4 protocol to do this? Currently the switch item seems to send either 1 or 4 in response to ON and OFF (can't remember which order)"}}