bobrak / openhab-cm11a Goto Github PK
View Code? Open in Web Editor NEWcm11a binding for OpenHAB
cm11a binding for OpenHAB
I cannot reproduce this issue. I don't have any issues with last state being restored after restarting openhab2.
Hi Bob,
I thought for clutter purposes it would be easiest to open issues on your repository.
In looking at the log files from openHab it appears the binding doesn't consistently resolve the HouseUnitCode. In the linked log file there are 3 attempts to use the external remote. Only 1 attempt determined the HouseUnitCode as E7 (which is correct)
See line: cm11a: Converted received data to human form: X10ReceivedData
Not sure if these help you.
Is there still a requirement for org.openhab.io.trasport.serial? I cannot find it in openhab2, and I don't think I have it installed. The src code imports gnu.io.SerialPort
When following through the binding code I noted these lines 86 and 92 in https://github.com/BobRak/OpenHAB-cm11a/blob/master/org.openhab.binding.cm11a/src/main/java/org/openhab/binding/cm11a/internal/X10ReceivedData.java
public static final char houseCode[] = new char[] { '-', 'E', 'C', 'K', 'O', 'G', 'A', 'I', 'N', 'F', 'D', 'L', 'P',
'H', 'J' };
public static final byte unitCode[] = new byte[] { 0, 5, 3, 11, 15, 7, 1, 9, 14, 6, 4, 12, 16, 8, 2, 10 };
To me it appears that houseCodes B and M are missing and unitCode 13 is missing.
I suspect this problem is "user error", but I thought it might be helpful to pass along my experience. I'm having an issue where the binding will not connect to the USB serial adapter on /dev/ttyUSB0.
CM11a Binding for X10 devices OFFLINE
CM11a Binding for X10 devices
cm11a:cm11a:MyCm11a
Status: OFFLINE - COMMUNICATION_ERROR No such port exists on this machine: /dev/ttyUSB0
2017-01-19 13:23:22.298 [hingStatusInfoChangedEvent] - 'cm11a:cm11a:e975db78' changed from OFFLINE (COMMUNICATION_ERROR): No such port exists on this machine: /dev/ttyUSB0 to REMOVING
*** However, the port is there, and the user has access to the dialout group:
crw-rw---- 1 root dialout 188, 0 Jan 19 13:19 /dev/ttyUSB0
openhab : openhab tty dialout
Bob:
I have installed and am using the CM11a binding and am using with Openhab2. It works for turning on/off from PaperUI, but I have issues with OpenHab2 losing track of the state of a switch when triggered from a physical switch. When this happens I see something like the lines below in the log. Any ideas for troubleshooting?
10:46:14.808 [WARN ] [.binding.cm11a.internal.X10Interface] - Unexpected data received from X10 interface: 5b
10:46:14.815 [WARN ] [.binding.cm11a.internal.X10Interface] - Unexpected data received from X10 interface: 93
10:46:14.822 [WARN ] [.binding.cm11a.internal.X10Interface] - Unexpected data received from X10 interface: ef
Binding file
brian@openhab:/usr/share/openhab2/addons$ ls -al
total 576
drwxr-xr-x 2 openhab openhab 4096 May 23 17:17 .
drwxr-xr-x 5 openhab openhab 4096 Jan 13 22:09 ..
-rwxr-xr-x 1 openhab openhab 33056 Jan 19 10:29 org.openhab.binding.cm11a.jar
cm11a.things
Bridge cm11a:cm11a:MyCm11a [ serialPort="/dev/ttyUSB0" ] {
Thing switch SwitchC1 [ HouseUnitCode="C1" ]
Thing switch SwitchC3 [ HouseUnitCode="C3" ]
Thing switch SwitchC5 [ HouseUnitCode="C5" ]
Thing switch SwitchC7 [ HouseUnitCode="C7" ]
Thing switch SwitchC13 [ HouseUnitCode="C13" ]
Thing switch SwitchC15 [ HouseUnitCode="C15" ]
Thing switch SwitchB3 [ HouseUnitCode="B3" ]
Thing switch SwitchE5 [ HouseUnitCode="E5" ]
}
cm11a.items
Switch SwitchC1 "Basement Stairs" (someGroup) { channel="cm11a:switch:MyCm11a:SwitchC1:switchstatus" }
Switch SwitchE5 "Porch Lights" (someGroup) { channel="cm11a:switch:MyCm11a:SwitchE5:switchstatus" }
Switch SwitchC3 "Basement Main" (someGroup) { channel="cm11a:switch:MyCm11a:SwitchC3:switchstatus" }
Switch SwitchC5 "Basement Music" (someGroup) { channel="cm11a:switch:MyCm11a:SwitchC5:switchstatus" }
Switch SwitchC7 "Basement Workout" (someGroup) { channel="cm11a:switch:MyCm11a:SwitchC7:switchstatus" }
Switch SwitchC13 "Man Cave" (someGroup) { channel="cm11a:switch:MyCm11a:SwitchC13:switchstatus" }
Switch SwitchC15 "Basement Wall" (someGroup) { channel="cm11a:switch:MyCm11a:SwitchC15:switchstatus" }
Switch SwitchB3 "Main Stairs" (someGroup) { channel="cm11a:switch:MyCm11a:SwitchB3:switchstatus" }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.