Giter Site home page Giter Site logo

tobof / openhab-addons Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openhab/openhab-addons

39.0 39.0 30.0 305.73 MB

The next-generation open Home Automation Bus (openHAB)

License: Eclipse Public License 2.0

Batchfile 0.01% Shell 0.06% Java 85.91% HTML 0.86% C++ 0.07% C 0.07% Awk 0.04% CSS 0.78% JavaScript 12.13% XSLT 0.01% Vue 0.07%

openhab-addons's People

Contributors

bgilmer77 avatar cdjackson avatar clinique avatar cweitkamp avatar digitaldan avatar dimalo avatar floriansw avatar gerrieg avatar hakan42 avatar hilbrand avatar jongj avatar kaikreuzer avatar kgoderis avatar lolodomo avatar maggu2810 avatar marcelrv avatar martinvw avatar mherwege avatar mhilbush avatar mjagdis avatar olibutzki avatar paulianttila avatar peuter avatar pfink avatar ssalonen avatar thomdietrich avatar vbier avatar velinyordanov avatar watou avatar wborn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openhab-addons's Issues

Mysensors 2.2.0 beta splash screen throws java stacks

I've plugged my gateway with last beta, and splash_screen enabled.

It seems that splash_screen printed by gateway is not supported by the binding . Here is the log :

2017-09-18 15:51:28.058 [DEBUG] [col.serial.MySensorsSerialConnection] - Connecting to /dev/ttyUSB1 [baudRate:115200]
2017-09-18 15:51:28.131 [DEBUG] [col.serial.MySensorsSerialConnection] - Final port list: /dev/ttyUSB1
2017-09-18 15:51:28.189 [DEBUG] [col.serial.MySensorsSerialConnection] - Successfully connected to serial port.
2017-09-18 15:51:28.192 [DEBUG] [col.serial.MySensorsSerialConnection] - Waiting 3 seconds to allow correct reset trigger on serial connection opening
2017-09-18 15:51:31.198 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 0;0;3;0;2;
2017-09-18 15:51:31.198 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received:  __  __       ____
2017-09-18 15:51:31.202 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
java.text.ParseException: class java.text.ParseException : Message length is not > 4
	at org.openhab.binding.mysensors.internal.protocol.message.MySensorsMessage.parse(MySensorsMessage.java:337)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:345)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
2017-09-18 15:51:31.207 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
2017-09-18 15:51:31.209 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
java.text.ParseException: class java.text.ParseException : Message length is not > 4
	at org.openhab.binding.mysensors.internal.protocol.message.MySensorsMessage.parse(MySensorsMessage.java:337)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:345)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
2017-09-18 15:51:31.214 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
2017-09-18 15:51:31.217 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
java.text.ParseException: class java.text.ParseException : Message length is not > 4
	at org.openhab.binding.mysensors.internal.protocol.message.MySensorsMessage.parse(MySensorsMessage.java:337)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:345)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
2017-09-18 15:51:31.222 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
2017-09-18 15:51:31.225 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
java.text.ParseException: class java.text.ParseException : Message length is not > 4
	at org.openhab.binding.mysensors.internal.protocol.message.MySensorsMessage.parse(MySensorsMessage.java:337)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:345)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
2017-09-18 15:51:31.230 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
2017-09-18 15:51:31.234 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
java.text.ParseException: class java.text.ParseException : Message length is not > 4
	at org.openhab.binding.mysensors.internal.protocol.message.MySensorsMessage.parse(MySensorsMessage.java:337)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:345)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
2017-09-18 15:51:31.240 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received:         |___/                      2.2.0-beta
2017-09-18 15:51:31.252 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
java.text.ParseException: class java.text.ParseException : Message length is not > 4
	at org.openhab.binding.mysensors.internal.protocol.message.MySensorsMessage.parse(MySensorsMessage.java:337)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:345)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
2017-09-18 15:51:31.255 [DEBUG] [col.serial.MySensorsSerialConnection] - Request disconnection flag setted to: true
2017-09-18 15:51:31.257 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 
2017-09-18 15:51:31.258 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
java.text.ParseException: class java.text.ParseException : Message length is not > 4
	at org.openhab.binding.mysensors.internal.protocol.message.MySensorsMessage.parse(MySensorsMessage.java:337)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
	at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:345)[182:org.openhab.binding.mysensors:2.2.0.201708090807]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
2017-09-18 15:51:31.261 [DEBUG] [col.serial.MySensorsSerialConnection] - Request disconnection flag setted to: true
2017-09-18 15:51:31.262 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;14;Gateway startup complete.
2017-09-18 15:51:31.264 [INFO ] [rs.internal.gateway.MySensorsGateway] - Node 0 available again!
2017-09-18 15:51:31.266 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;0;0;18;2.2.0-beta
2017-09-18 15:51:31.267 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Presentation Message received
2017-09-18 15:51:31.268 [WARN ] [rs.internal.gateway.MySensorsGateway] - Presented child is alredy present in gateway
2017-09-18 15:51:31.270 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;2;2.2.0-beta
2017-09-18 15:51:31.272 [DEBUG] [rsAbstractConnection$MySensorsReader] - Good,Gateway is up and running! (Ver:2.2.0-beta)
2017-09-18 15:51:31.277 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Writing on cache given_ids, content: [0,2]
2017-09-18 15:51:31.279 [INFO ] [col.serial.MySensorsSerialConnection] - Successfully connected to MySensors Bridge.

The splash screen which is sent by the gateway is this one :

  __  __       ____
 |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
 | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
 | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
 |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
         |___/                      2.2.0-beta
0;255;3;0;14;Gateway startup complete.
0;255;0;0;18;2.2.0-beta
0;255;3;0;2;2.2.0-beta

I've also opened an issue on MySensors git, since this issue could be resolved by a modification on mysensors gateway code (prefix splash with a standard frame )

messages are sent multiple times

With an arduino pro mini driving a 5v relay module, turning on and off a bunch of LEDs, Openhab2 log is showing multiple ACK sent. Behavior is not consistent :)
capture
capture2
I attached the items and things
config_files.zip

NPE inside NetworkSanityChecker

Issue reported by: @doctor64 on MySensors Forum, here below the log:

22:41:33.015 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 0;0;3;0;2;
22:41:33.029 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;2;2.1.1
22:41:36.015 [DEBUG] [ateway.MySensorsNetworkSanityChecker] - Network sanity check: PASSED
22:41:36.015 [DEBUG] [ateway.MySensorsNetworkSanityChecker] - Sending I_HEARTBEAT_REQUESTs
22:41:36.016 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 0;255;3;0;18;
22:41:36.032 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;22;436674305
22:41:36.116 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 1;255;3;0;18;
22:41:36.217 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 2;255;3;0;18;
22:41:36.317 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 3;255;3;0;18;
22:41:36.398 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 3;255;3;0;22;717683
22:41:36.418 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 4;255;3;0;18;
22:41:36.518 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 5;255;3;0;18;
22:41:36.619 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 6;255;3;0;18;
22:41:36.652 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 5;255;3;0;22;9428217
22:41:36.683 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 6;255;3;0;22;3111897
22:41:39.016 [DEBUG] [ateway.MySensorsNetworkSanityChecker] - Node 1 request heartbreat answer, missing null of 10
22:41:39.016 [ERROR] [ateway.MySensorsNetworkSanityChecker] - Exception in network sanity thread checker
java.lang.NullPointerException
at org.openhab.binding.mysensors.internal.gateway.MySensorsNetworkSanityChecker.checkHeartbeatsResponse(MySensorsNetworkSanityChecker.java:178)[195:org.openhab.binding.mysensors:2.2.0.201708090807]
at org.openhab.binding.mysensors.internal.gateway.MySensorsNetworkSanityChecker.run(MySensorsNetworkSanityChecker.java:122)[195:org.openhab.binding.mysensors:2.2.0.201708090807]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_144]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_144]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_144]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_144]
at java.lang.Thread.run(Thread.java:748)[:1.8.0_144]

I've already replicated the issue in my environment. Working on a solution.

Variable types missing (V_VAR1...) and why readOnly="true"

Hello.

I am dealing with a sensor that requests a numeric value from OH2. Unfortunatelly, the only item type I can use to link the channel from where the node makes its request, is a dimmer type because all the other variables are read only.

 <channel-type id="temp-channel">
        <item-type>Number</item-type>
        <label>Temperature</label>
        <description>MySensors Temperature Channel</description>
        <category>Temperature</category>
        <state pattern="%.1f Ā°C" readOnly="true"></state>
    </channel-type>

Is there any reason for this? Why wouldn't be possible for a node to ask for a temperature for example?
I have found that when I set the type as temperature or other numeric tipe variables, the payload sent out has '0' where it should have the desired value.

Another thing I noticed, is the lack of variables V_VAR1, V_VAR2...that are defined at MySensors variable types. Is there any reason to avoid this type of variables.

Once again, I appreciate very much the effort you have put in this binding. It really works greats.
Hope we can add the mentioned features.
Regards.
Gonzalo

Binding not reconnecting to ethernet gateway

Expected Behavior

If the gateway goes offline it should automatically reconnect when it is back online.

Current Behavior

If I want to program my arduino with new software it gets disconnected from the network (obvious) but when I reconnect it to the network, the MySensors binding doesn't initiate a reconnect to the gateway.
It looks like it doesn't even know that the gateway went offline since its status remains online.
This is the configuration of the gateway:
image

Note: all my sensors are connected to the gateway itself but I don't think this could cause the issue.

Greetings,
Frederic

Package build fails: Type mismatch: cannot convert from List<Object> to List<Integer>

A "mvn clean package" in the directory "addons/binding/org.openhab.binding.mysensors/" results in:

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.24.0:compile (default-compile) on project org.openhab.binding.mysensors: Compilation failure: Compilation failure:
[ERROR] /home/toberfoe/git/openhab2-addons/addons/binding/org.openhab.binding.mysensors/src/main/java/org/openhab/binding/mysensors/internal/handler/MySensorsBridgeHandler.java:[163]
[ERROR] List givenIds = Arrays
[ERROR] .stream(cacheFactory.readCache(MySensorsCacheFactory.GIVEN_IDS_CACHE_FILE, new int[] {}, int[].class))
[ERROR] .boxed().collect(Collectors.toList());
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] Type mismatch: cannot convert from List to List
[ERROR] /home/toberfoe/git/openhab2-addons/addons/binding/org.openhab.binding.mysensors/src/main/java/org/openhab/binding/mysensors/internal/handler/MySensorsBridgeHandler.java:[197]
[ERROR] List givenIds = Arrays
[ERROR] .stream(cacheFactory.readCache(MySensorsCacheFactory.GIVEN_IDS_CACHE_FILE, new int[] {}, int[].class))
[ERROR] .boxed().collect(Collectors.toList());
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] Type mismatch: cannot convert from List to List
[ERROR] /home/toberfoe/git/openhab2-addons/addons/binding/org.openhab.binding.mysensors/src/main/java/org/openhab/binding/mysensors/internal/handler/MySensorsBridgeHandler.java:[234]
[ERROR] List givenIds = Arrays.stream(
[ERROR] cacheFactory.readCache(MySensorsCacheFactory.GIVEN_IDS_CACHE_FILE, new int[] {}, int[].class))
[ERROR] .boxed().collect(Collectors.toList());
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Gateway connection failed on MS 2.0 beta

Hi Tim,

I'll report here the Francois issue just to remeber to take a look at it.

Additional info:

  • He has RFM69 radio
  • Manually send message: 0;0;3;0;2; and 0;255;3;0;2; has no effects

Attached log:

12:49:05.469 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors Bridge
12:49:05.543 [DEBUG] [col.serial.MySensorsSerialConnection] - Connecting to /dev/ttyUSB0 [baudRate:115200]
12:49:06.140 [INFO ] [smarthome.event.ItemAddedEvent ] - Item 'mysensors_bridge_ser_bb7302f6' has been added.
12:49:06.390 [DEBUG] [col.serial.MySensorsSerialConnection] - Successfully connected to serial port.
12:49:06.446 [INFO ] [rthome.event.ItemThingLinkAddedEvent] - Link 'mysensors_bridge_ser_bb7302f6-mysensors:bridge-ser:bb7302f6' has been added.
12:49:09.409 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;Starting gateway (RRNGA-, 2.0.0-beta)
12:49:09.426 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;Radio init successful.
12:49:09.434 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;14;Gateway startup complete.
12:49:09.441 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;Init complete, id=0, parent=0, distance=0
12:49:09.506 [DEBUG] [g.mysensors.protocol.MySensorsWriter] - Sending to MySensors: 0;0;3;0;2;
12:49:10.488 [WARN ] [ome.core.thing.internal.ThingManager] - Initializing handler for thing 'mysensors:bridge-ser:bb7302f6' takes more than 5000ms.
12:49:10.763 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;read: 40-40-0 s=1,c=1,t=16,pt=0,l=1,sg=0:1
12:49:10.767 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 40;1;1;0;16;1
12:49:11.676 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;read: 40-40-0 s=1,c=1,t=16,pt=0,l=1,sg=0:1
12:49:11.680 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 40;1;1;0;16;1
12:49:11.778 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;read: 40-40-0 s=0,c=1,t=23,pt=2,l=2,sg=0:72
12:49:11.783 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 40;0;1;0;23;72
12:49:11.792 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;read: 40-40-0 s=5,c=1,t=38,pt=7,l=5,sg=0:3.07
12:49:11.796 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 40;5;1;0;38;3.07
12:49:11.838 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;read: 40-40-0 s=5,c=1,t=38,pt=7,l=5,sg=0:3.07
12:49:11.843 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 40;5;1;0;38;3.07
12:49:11.861 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;read: 40-40-0 s=255,c=3,t=0,pt=1,l=1,sg=0:100
12:49:11.866 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 40;255;3;0;0;100
12:49:12.079 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;read: 66-66-0 s=1,c=1,t=24,pt=5,l=4,sg=0:3579898
12:49:12.083 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 66;1;1;0;24;3579898
12:49:14.409 [ERROR] [s.internal.MySensorsBridgeConnection] - Cannot start reading/writing thread, probably sync message (I_VERSION) not received
12:49:14.410 [DEBUG] [col.serial.MySensorsSerialConnection] - Shutting down serial connection!
12:49:14.412 [DEBUG] [g.mysensors.protocol.MySensorsWriter] - Stopping Writer thread
12:49:14.418 [WARN ] [g.mysensors.protocol.MySensorsWriter] - Writer thread interrupted
12:49:14.428 [DEBUG] [g.mysensors.protocol.MySensorsReader] - Stopping Reader thread
12:49:14.528 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:bridge-ser:bb7302f6' changed from INITIALIZING to OFFLINE

Forum discussion

Motion channel ON/OFF

Hi Tim,

I'm wondering to change the tripped channel from OPEN/CLOSE to ON/OFF because presence in OH2 was linked to the ON/OFF state. What do you think?

RGBW node definition via things file doesn't work

I am running openhab 2.1.0 and the version 2.2.0.201707241115 of the MySensors binding on a raspberry pi.

I have defined several things via a *.things file.

Bridge mysensors:bridge-ser:gwSerial [ serialPort="/dev/ttyUSB0", sendDelay=100 ] {

    /** Lights */
    rgbwLight 		LichtKuecheUnten	[nodeID=4, childId=1, requestAck=true]
  	rgbwLight 		LichtFenster 		[nodeID=5, childId=1, requestAck=true]
  	rgbwLight 		LichtSchrank 		[nodeID=6, childId=1, requestAck=true]
  	rgbwLight 		LichtWand 			[nodeID=7, childId=1, requestAck=true]

	/** Sensors */	
	temperature		tempBad				[nodeId=8, childId=0]
  	humidity 		humBad 				[nodeId=8, childId=1]
	temperature		tempWohnzimmer		[nodeId=1, childId=0]
  	humidity 		humWohnzimmer		[nodeId=1, childId=1]
  	light-level		lightWohnzimmer		[nodeId=17, childId=1]
}

All sensors are working just fine. They show up in the paperUI, initialize and show the updated values. The rgbw nodes don't. They don't get initialized. The nodeID and childId settings are correct, I use the same values with domoticz.
image

The items do pop up as new things in the inbox though (after restarting the nodes so that they present themselves). I can add them there and use them. This should be the thing "LichtKuecheUnten" from above.
image

Automatic door configuration

How can an automatic door be configured ?
The door is presented as S_LOCK (child_id=5), data is sent and received with V_LOCK_STATUS
How must the mysensors binding in openHab be configured to make this work ?
I'd like to see the door status in openHab but I also want to be able to open/close the door from openHab.
Is this possible ?

RollerShutter item not updated when recieving data

Hi,
My RollerSutters devices can be controlled by button or can be suddenly stop by user and they send updates to the gateway (Percetage value). Binding correctly recieve data but not updating RollerShutter items :
`22:51:35.159 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'VoletBureau' received command 50

22:51:35.168 [DEBUG] [rs.internal.protocol.MySensorsWriter] - Sending to MySensors: 50;1;1;0;3;50

22:51:35.169 [INFO ] [marthome.event.ItemStateChangedEvent] - VoletBureau changed from 100 to 50

22:51:37.796 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'VoletBureau' received command STOP

22:51:37.799 [DEBUG] [rs.internal.protocol.MySensorsWriter] - Sending to MySensors: 50;1;1;0;31;1

22:51:37.986 [DEBUG] [rs.internal.protocol.MySensorsReader] - 50;1;1;0;3;87

22:51:37.987 [DEBUG] [ternal.handler.MySensorsThingHandler] - Setting last update for node 50 to 2017-02-14T22:51:37.987+0100
`

RGBW node can't be set to pure white

RGBW leds have the distinct advantage over simple RGB ones that they can be set to a pure white without color mixing. They just use the dedicated white leds. I guess this also saves on energy
Currently it doesn't seem to possible to set a color value like 000000FF. I always either get a mixed color or no color at all. I don't know if this is a bug or a missing feature or intended but the ability to send the above value to RGBW nodes would be great!
I guess the fix would be somewhere in the org.openhab.binding.mysensors.converter.MySensorsRGBWTypeConverter as openhab seems to use HSB/HSV internally that gets converted here. Currently white is just set to the minimum of all other values. Perhaps an if statement could help there. Or a completely new conversion like this one. I am no expert in color conversion though, so I don't really know. I do know that domoticz handles it the way I described (sending pure white for a white color).

can't setup from snapshot binding

Hi!
I am test install by
https://github.com/tobof/openhab2-addons/wiki/Installation
but have error.
Please help, i am not good know debian.

2016-11-01 10:36:16.859 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.mysensors-2.0.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.mysensors [197]
  Unresolved requirement: Import-Package: gnu.io

	at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)[8:org.apache.felix.fileinstall:3.5.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1217)[8:org.apache.felix.fileinstall:3.5.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:509)[8:org.apache.felix.fileinstall:3.5.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[8:org.apache.felix.fileinstall:3.5.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[8:org.apache.felix.fileinstall:3.5.0]

Motion sensor does not work

I'm trying to use this binding on the latest version of Openhab (2.0.0.b4 Build openhab#477), but it does not work well.

Here is my things config:
Bridge mysensors:bridge-ser:gateway [ serialPort="/dev/ttyUSB0", sendDelay=200 ] { humidity hum01 [ nodeId="3", childId="1" ] motion mot01 [ nodeId="3", childId="3" ] }
items:
Number hum01 "Humidity" { channel="mysensors:humidity:gateway:hum01:hum" } Number mot01 "Motion" { channel="mysensors:motion:gateway:mot01:tripped" }

Log:
11:15:30.369 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 3;255;3;0;0;96 11:15:30.375 [DEBUG] [g.mysensors.handler.MySensorsHandler] - Setting last update for node 3 to 2016-09-26T11:15:30.372-0400 11:15:30.634 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 3;3;1;0;16;1 11:15:30.893 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 3;0;1;0;23;26 11:15:31.157 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 3;2;1;0;0;25.1 11:15:31.420 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 3;1;1;0;1;45.8 11:15:31.440 [INFO ] [marthome.event.ItemStateChangedEvent] - hum01 changed from NULL to 45.8 11:15:31.680 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 3;4;1;0;4;744.4
As you can see hum01 was updated, but mot01 was ignored. The same thing is with a "sound" type(V_LEVEL).

Zwave incompatibility

Current Behavior

With the last 2.2.0-SNAPSHOT, the binding make the Zwave binding error below :

11:06:17.023 [DEBUG] [org.openhab.binding.zwave ] - BundleEvent STARTING - org.openhab.binding.zwave 11:06:17.025 [DEBUG] [inding.zwave.internal.ZWaveActivator] - Z-Wave binding started. Version 2.2.0.201707190537 11:06:17.428 [DEBUG] [org.openhab.binding.zwave ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.core.ConfigOptionProvider, org.eclipse.smarthome.config.core.ConfigDescriptionProvider}={component.name=org.openhab.binding.zwave.ConfigDescription, component.id=222, service.id=1013, service.bundleid=208, service.scope=bundle} - org.openhab.binding.zwave 11:06:17.486 [DEBUG] [org.openhab.binding.zwave ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=org.openhab.binding.zwave.internal.ZWaveHandlerFactory, component.id=225, service.id=1014, service.bundleid=208, service.scope=bundle} - org.openhab.binding.zwave 11:06:17.502 [DEBUG] [org.openhab.binding.zwave ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.events.EventFactory}={component.name=org.openhab.binding.zwave.event.BindingEventFactory, component.id=226, service.id=1015, service.bundleid=208, service.scope=bundle} - org.openhab.binding.zwave 11:06:17.555 [DEBUG] [org.openhab.binding.zwave ] - BundleEvent STARTED - org.openhab.binding.zwave 11:06:27.484 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:gateway:node5' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED) 11:06:27.498 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:gateway:node6' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED) 11:06:27.507 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:gateway:node7' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED) 11:06:27.520 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:gateway:node8' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED) 11:06:27.536 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:gateway:node9' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED) 11:06:27.549 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:gateway:node10' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED) 11:06:27.559 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:gateway:node2' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED) 11:06:27.572 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:gateway:node3' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED) 11:06:27.583 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:gateway:node4' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED) 11:06:27.777 [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] - Initializing ZWave serial controller. 11:06:27.779 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Initializing ZWave Controller. 11:06:27.786 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:serial_zstick:gateway' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING 11:06:27.805 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:serial_zstick:gateway' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline 11:06:27.829 [DEBUG] [org.openhab.binding.zwave ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.core.status.ConfigStatusProvider}={service.id=1018, service.bundleid=208, service.scope=singleton} - org.openhab.binding.zwave 11:06:27.834 [DEBUG] [org.openhab.binding.zwave ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.core.status.ConfigStatusProvider}={service.id=1019, service.bundleid=208, service.scope=singleton} - org.openhab.binding.zwave 11:06:27.848 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyACM0' 11:06:27.855 [DEBUG] [org.openhab.binding.zwave ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.core.status.ConfigStatusProvider}={service.id=1020, service.bundleid=208, service.scope=singleton} - org.openhab.binding.zwave 11:06:27.859 [DEBUG] [org.openhab.binding.zwave ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.core.status.ConfigStatusProvider}={service.id=1022, service.bundleid=208, service.scope=singleton} - org.openhab.binding.zwave 11:06:27.863 [DEBUG] [org.openhab.binding.zwave ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.core.status.ConfigStatusProvider}={service.id=1021, service.bundleid=208, service.scope=singleton} - org.openhab.binding.zwave 11:06:27.909 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:serial_zstick:gateway' changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to OFFLINE (COMMUNICATION_ERROR): zwave.thingstate.serial_notfound
When no mysensors things exist at start, the zwave connection is OK, but after adding a mysensors thing and a restart, you can't get the zwave binding works.

Possible Solution

Revert back to the 2.1.0-SNAPSHOT version of the mysensors binding and it's work.

Your Environment

  • Version used: 2.2.0-SNAPSHOT
  • Environment name and version : Java 8:
  • Operating System and version : Fedora 23 Arm

Binding issue related to recent updates on Smarthome API

Hi Tim!

Due to the recent issue on the binding please note that conversation about new API lifecycle eclipse-archived/smarthome#2087.

I think that one try you could do is to put event listener registration inside MySensorsThingHandler.initialize(). This should allow you to avoid the problem.
I've tested this on my refactoring (I hope to PR it early šŸ˜‰ ) but should work also in your version.

Let me know!

Typo at thing-types.xml

There is a badly closed definition at for channel-type-id "status-channel".
I have already correct it in my PR along with other things being added.

<channel-type id="status-channel">
<item-type>Switch</item-type>
        <label>Status</label>
        <description>Status</description>
        <category>Light</category>
        **<state readOnly="false" />**
    </channel-type>

bindings arent updating items

I cant seem to get the mysensor bridge to update the items:

Debug output suggests its reading the serial data correctly.

17:00:27.285 [DEBUG] [col.serial.MySensorsSerialConnection] - 105;1;1;0;0;19.0
17:00:27.347 [DEBUG] [col.serial.MySensorsSerialConnection] - 0;0;3;0;9;read: 105-105-0 s=2,c=1,t=0,pt=7,l=5,sg=0:19.1
17:00:27.347 [DEBUG] [col.serial.MySensorsSerialConnection] - 105;2;1;0;0;19.1
17:00:32.761 [DEBUG] [col.serial.MySensorsSerialConnection] - 0;0;3;0;9;read: 105-105-0 s=0,c=1,t=0,pt=7,l=5,sg=0:25.1
17:00:32.765 [DEBUG] [col.serial.MySensorsSerialConnection] - 105;0;1;0;0;25.1
17:00:32.810 [DEBUG] [col.serial.MySensorsSerialConnection] - 0;0;3;0;9;read: 105-105-0 s=1,c=1,t=0,pt=7,l=5,sg=0:19.0

However OH2 doesnt update.
The auto discovery in things worked, hence it created the 3 sensors I have.

I've tried manually updating the things and items and still no luck.

things conf:

Bridge mysensors:bridge-ser:gateway [ serialPort="/dev/arduino", sendDelay=200 ] {
temperature temp01 [ nodeId="105", childId="1" ]
}

Items
Number temp01 { channel="mysensors:temperature:gateway:temp01:temp" }

RGB & RGBW channel missing

RGB(W) channels are now added.

Tested with:

*.things:
rgbwLight rgbwLight01 [ nodeId="199", childId="0" ]

*.items:
Color rgbwLight01 "RGBW Light" <slider> { channel="mysensors:rgbwLight:gateway:rgbwLight01:rgbw" }

*.sitemap
Colorpicker item=rgbwLight01

Please use this binding to test the additional channels:
Binding

RGB should work just fine, but I'm unsure about the RGBW implementation: https://github.com/tobof/openhab2-addons/blob/103f6f970147818c6191a82a79b00613c1a92d65/addons/binding/org.openhab.binding.mysensors/src/main/java/org/openhab/binding/mysensors/converter/MySensorsRGBWTypeConverter.java

Node request ID are never answered ?

I've plugged a new node with auto-id attribution.

The logs in server shows that node ask for a node ID, but the binding doesn't seems to answer :

2017-09-18 21:49:58.466 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 255;247;3;0;3;
2017-09-18 21:50:00.452 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 255;219;3;0;3;
2017-09-18 21:51:05.281 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 255;241;3;0;3;
2017-09-18 21:51:07.271 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 255;215;3;0;3;
2017-09-18 21:51:09.245 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 255;186;3;0;3;
2017-09-18 21:51:11.235 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 255;157;3;0;3;
2017-09-18 21:52:14.077 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 255;212;3;0;3;
2017-09-18 21:52:16.054 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 255;184;3;0;3;
2017-09-18 21:52:18.042 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 255;155;3;0;3;
2017-09-18 21:52:20.021 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 255;129;3;0;3

Is there a configuration to to set to enable auto node id attribution ?

Support for Firmware OTA update

MySensors allows the user to update the firmware of a node over the air.

It would be nice if we could implement this feature !

Exception on disposing binding when item configured

Hi Tim, during my tests I've noticed that when I have thing inside the demo.things file the binding fail to stop due to a strange exception.

2016-02-02 11:07:51.350 [ERROR] [org.openhab.binding.mysensors ] - [org.openhab.binding.mysensors.internal.MySensorsHandlerFactory(178)] The deactivate method has thrown an exception java.lang.IllegalStateException: Could not update status, because callback is missing at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.updateStatus(BaseThingHandler.java:346) at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.updateStatus(BaseThingHandler.java:373) at org.openhab.binding.mysensors.handler.MySensorsHandler.dispose(MySensorsHandler.java:69) at org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory.unregisterHandler(BaseThingHandlerFactory.java:109) at org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory.deactivate(BaseThingHandlerFactory.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_40] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_40] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_40] at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_40] at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)[28:org.apache.felix.scr:2.0.2] at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)[28:org.apache.felix.scr:2.0.2] at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)[28:org.apache.felix.scr:2.0.2] at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)[28:org.apache.felix.scr:2.0.2] at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)[28:org.apache.felix.scr:2.0.2] at org.apache.felix.scr.impl.manager.SingleComponentManager.disposeImplementationObject(SingleComponentManager.java:342)[28:org.apache.felix.scr:2.0.2] at org.apache.felix.scr.impl.manager.SingleComponentManager.deleteComponent(SingleComponentManager.java:157)[28:org.apache.felix.scr:2.0.2] at org.apache.felix.scr.impl.manager.AbstractComponentManager.doDeactivate(AbstractComponentManager.java:783)[28:org.apache.felix.scr:2.0.2] at org.apache.felix.scr.impl.manager.AbstractComponentManager.deactivateInternal(AbstractComponentManager.java:757)[28:org.apache.felix.scr:2.0.2] at org.apache.felix.scr.impl.manager.AbstractComponentManager.dispose(AbstractComponentManager.java:550)[28:org.apache.felix.scr:2.0.2] at org.apache.felix.scr.impl.config.ConfigurableComponentHolder.disposeComponents(ConfigurableComponentHolder.java:725)[28:org.apache.felix.scr:2.0.2] at org.apache.felix.scr.impl.BundleComponentActivator.dispose(BundleComponentActivator.java:530)[28:org.apache.felix.scr:2.0.2] at org.apache.felix.scr.impl.Activator.disposeComponents(Activator.java:414)[28:org.apache.felix.scr:2.0.2] at org.apache.felix.scr.impl.Activator.access$300(Activator.java:53)[28:org.apache.felix.scr:2.0.2] at org.apache.felix.scr.impl.Activator$ScrExtension.destroy(Activator.java:273)[28:org.apache.felix.scr:2.0.2] at org.apache.felix.utils.extender.AbstractExtender$2.run(AbstractExtender.java:290)[28:org.apache.felix.scr:2.0.2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_40] at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_40] at org.apache.felix.utils.extender.AbstractExtender.destroyExtension(AbstractExtender.java:312)[28:org.apache.felix.scr:2.0.2] at org.apache.felix.utils.extender.AbstractExtender.bundleChanged(AbstractExtender.java:186)[28:org.apache.felix.scr:2.0.2] at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:] at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:] at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:] at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:] at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:] at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:] at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:] at org.eclipse.osgi.container.Module.publishEvent(Module.java:466)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:] at org.eclipse.osgi.container.Module.doStop(Module.java:624)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:] at org.eclipse.osgi.container.Module.stop(Module.java:488)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:] at org.eclipse.osgi.internal.framework.EquinoxBundle.stop(EquinoxBundle.java:420)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:] at org.apache.karaf.bundle.command.Stop.executeOnBundle(Stop.java:38)[32:org.apache.karaf.bundle.core:4.0.3] at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:64)[32:org.apache.karaf.bundle.core:4.0.3] at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:54)[32:org.apache.karaf.bundle.core:4.0.3] at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[48:org.apache.karaf.shell.core:4.0.3] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[48:org.apache.karaf.shell.core:4.0.3] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[48:org.apache.karaf.shell.core:4.0.3] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[48:org.apache.karaf.shell.core:4.0.3] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[48:org.apache.karaf.shell.core:4.0.3] at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[48:org.apache.karaf.shell.core:4.0.3] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[48:org.apache.karaf.shell.core:4.0.3] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[48:org.apache.karaf.shell.core:4.0.3] at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[48:org.apache.karaf.shell.core:4.0.3] at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:270)[48:org.apache.karaf.shell.core:4.0.3] at java.lang.Thread.run(Thread.java:745)[:1.8.0_40]
It seems that the OH2 fail on invoking a method of binding. Everything works if there aren't items configured for MySensors bridge.

Update issues with CustomSensor

Hi,

I'm using MySensors to keep track of my power consumption and therefore I'm also using a CustomSensor to store the pulse count of all sensors (Water, Gas and Power). All my sensors are connected to the gateway (issue that has been solved yesterday). I'm using the refactored binding which was released yesterday.

Config of the CustomSensor:
image

I noticed that in both directions the pulse counters are not updated. So, to be more precise:

  • When I update the pulse count (via rest API for example), it is not updated in the binding. For example I've set all pulse counters to 1000 and when I plug in the gateway, the gateway requests the last know pulse count at the MySensors binding. Instead of returning the pulse count of 1000, I see the following error message:
    2017-02-28 19:04:39.255 [WARN ] [rs.internal.gateway.MySensorsGateway] - Request received, but variable state is not yet defined
    Even though the pulse counters are set to 1000:
    image

  • Same thing for other way around. I disabled the request for the pulse counters in my sketch so that the gateway can still do its job and starts counting from 0.
    When receiving the new pulse counts from the gateway I see in the binding that it is receiving the pulse count but in reality the pulse counts still remain at 1000 (screenshot above):

2017-03-01 04:41:11.808 [DEBUG] [rsAbstractConnection$MySensorsReader] - 0;4;1;0;26;695
2017-03-01 04:41:11.809 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 0 found in gateway
2017-03-01 04:41:11.809 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 4 found in node 0
2017-03-01 04:41:11.809 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: var3(26) value to: 695

All channels are linked corrrectly. I only see this issue with the CustomSensor. The flowmeter and power things are functioning correctly and are updating it's values correctly (only receive from gateway, nothing is sent from these things).

If I gave a vague description, let me know what I need to clarify more!

Thanks!

Greetings,
Frederic

MQTT dependency error

Hi @tobof, I finally found some time to spent on this error šŸ˜…
I found out a possible solution but I'm not able to test it. In particular I've changed:

  • META-INF/MANIFEST.MF (Import-Package section)
    • org.openhab.core.events -> org.eclipse.smarthome.core.events
    • org.openhab.io.transport.mqtt -> org.eclipse.smarthome.io.transport.mqtt

After that I've adjusted the import inside MySensorsMqttConnection.java and MySensorsMqttService.java and everything compile (with some deprecation warnings).

Hope this helps!

Light-level sensor not being updates

Hi,
I have a light-level sensor which I'm trying to configure in openHab, but its values isn't being refreshed. Any idea what's going wrong ?

These are the configuration files
things

Bridge mysensors:bridge-eth:gateway [ ipAddress="192.168.0.7", tcpPort=5003, sendDelay=200 , skipStartupCheck=true]

{
	humidity 		vochtigheidKeuken	[ nodeId="3", childId="2" ]  
	temperature		temperatuurKeuken 	[ nodeId="3", childId="1" ]  
    lock			deurKippenhok		[ nodeId="1", childId="5" ]  
	temperature		temperatuurKippenhok [ nodeId="1", childId="3" ]  
	multimeter		multimeterKippenhok	[ nodeId="1", childId="2" ]  
	light-level		lichtKippenhok		[ nodeId="1", childId="1" ]  
  }

items

   Number vochtigheidKeuken 	  "Vochtigheid" { channel="mysensors:humidity:gateway:vochtigheidKeuken:hum" }
  Number temperatuurKeuken	  "Temp" { channel="mysensors:temperature:gateway:temperatuurKeuken:temp" }
  Switch deurKippenhok		  "Door" { channel="mysensors:lock:gateway:deurKippenhok:lock-status" }
  Number temperatuurKippenhok "Temp" { channel="mysensors:temperature:gateway:temperatuurKippenhok:temp" }
  Number lichtKippenhok "Licht niveau" { channel="mysensors:light-level:gateway:lichtKippenhok:light-level" }
  Number spanningKippenhok "Batterij spanning" { channel="mysensors:multimeter:gateway:multimeterKippenhok:volt" }
  Number stroomKippenhok "Batterij stroom" { channel="mysensors:multimeter:gateway:multimeterKippenhok:current" }

sitemap

sitemap demo label="Main Menu" { 

	Frame label="Keuken"{ 
		Text item=temperatuurKeuken icon="temperature"
		Text item=vochtigheidKeuken icon="humidity"
	} 
	Frame label="Kippenhok"{ 
		Text item=temperatuurKippenhok icon="temperature"
		Text item=lichtKippenhok icon="sun"
		Switch item=deurKippenhok icon="lock"
		Text item=spanningKippenhok icon="battery"
		Text item=stroomKippenhok icon="energy"
	} 
 }

Serial port does not reopen after being closed (exception says port is not found)

First, thanks so much for creating this binding! Your efforts are truly appreciated!

FYI - This issue is happening on Windows 7 and may not be applicable to a *nix OS.

Removing the System.SetProperty call in the following code block in MySensorsSerialConnection.java fixes the error:

    //
    // Finally overwrite the "gnu.io.rxtx.SerialPorts" System property.
    //
    // Note: calling setProperty() is not threadsafe. All bindings run in
    // the same address space, System.setProperty() is globally visible
    // to all bindings.
    // This means if multiple bindings use the serial port there is a
    // race condition where two bindings could be changing the properties
    // at the same time
    //
    System.setProperty("gnu.io.rxtx.SerialPorts", finalPorts);

Internally, windows may represent the COM port names differently than COM1:COM2:COM3, etc so perhaps re-creating the list is causing the issue?

Thanks!

Alan

Setpoint not send

I try to send ORP calibration value to my sensors but it doesn't work.
NODE_ID : 10, CHILD_NODE_ID : 0
When I'm recieve ORP from my sensors it's ok :

13:55:38.216 [DEBUG] [rs.internal.protocol.MySensorsReader] - 10;0;1;0;52;996.3

But when I change the value, the value is not send :

14:09:24.051 [INFO ] [marthome.event.ItemStateChangedEvent] - orp01 changed from 40 to 50
14:09:24.266 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'orp01' received command 60
14:09:24.266 [DEBUG] [rs.internal.protocol.MySensorsWriter] - Sending to MySensors: 10;0;1;0;0;

Item :

Number orp01 "Redox [%.1f mV]" <faucet> (gPiscine) { channel="mysensors:waterQuality:gateway:orp01:orp"}
Sitemap :

sitemap test label="Main Menu" { 
  Frame label="Piscine" { 
      Setpoint item=orp01 label="Calirabte ORP" minValue=0 maxValue=1000 step=10
  } 
}

Changing dimmer value of RGBW throws an error

I am running openhab 2.1.0 and the version 2.2.0.201707241115 of the MySensors binding on a raspberry pi.

When trying to dim the RGBW leds via the paperUI's setting
image
or via the basic ui I get an error message. The node receives either no value at all or and V_RGBW of length 0. No V_DIMMER at all.
This is the used sketch for the node: https://github.com/OliverHi/RGBW-Controller/blob/master/Software/RGBWDimmerV2/RGBWDimmerV2.ino

Looks like the converter function gets called with an empty string somehow.

Error:

00:04:31.311 [ERROR] [nternal.event.MySensorsEventRegister] - Event broadcasting throw an exception
java.lang.StringIndexOutOfBoundsException: String index out of range: 2
        at java.lang.String.substring(String.java:1963)[:1.8.0_131]
        at org.openhab.binding.mysensors.converter.MySensorsRGBWTypeConverter.fromString(MySensorsRGBWTypeConverter.java:27)
        at org.openhab.binding.mysensors.converter.MySensorsTypeConverter.stateFromChannel(MySensorsTypeConverter.java:33)
        at org.openhab.binding.mysensors.handler.MySensorsThingHandler.handleChildUpdateEvent(MySensorsThingHandler.java:275)
        at org.openhab.binding.mysensors.handler.MySensorsThingHandler.sensorUpdateEvent(MySensorsThingHandler.java:198)
        at org.openhab.binding.mysensors.internal.event.MySensorsEventRegister.lambda$4(MySensorsEventRegister.java:129)[190:org.openhab.binding.mysensors:2.2.0.201707241115]
        at java.lang.Iterable.forEach(Iterable.java:75)[:1.8.0_131]
        at org.openhab.binding.mysensors.internal.event.MySensorsEventRegister.notifyNodeUpdateEvent(MySensorsEventRegister.java:125)[190:org.openhab.binding.mysensors:2.2.0.201707241115]
        at org.openhab.binding.mysensors.internal.gateway.MySensorsGateway.handleSetReqMessage(MySensorsGateway.java:566)[190:org.openhab.binding.mysensors:2.2.0.201707241115]
        at org.openhab.binding.mysensors.internal.gateway.MySensorsGateway.handleIncomingMessage(MySensorsGateway.java:461)[190:org.openhab.binding.mysensors:2.2.0.201707241115]
        at org.openhab.binding.mysensors.internal.gateway.MySensorsGateway.messageReceived(MySensorsGateway.java:372)[190:org.openhab.binding.mysensors:2.2.0.201707241115]
        at org.openhab.binding.mysensors.internal.event.MySensorsEventRegister.lambda$1(MySensorsEventRegister.java:85)[190:org.openhab.binding.mysensors:2.2.0.201707241115]
        at java.lang.Iterable.forEach(Iterable.java:75)[:1.8.0_131]
        at org.openhab.binding.mysensors.internal.event.MySensorsEventRegister.notifyMessageReceived(MySensorsEventRegister.java:81)[190:org.openhab.binding.mysensors:2.2.0.201707241115]
        at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:365)[190:org.openhab.binding.mysensors:2.2.0.201707241115]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_131]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_131]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_131]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_131]
        at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]

Updates stops after OpenHAB offline

When I woke up I had received two notifications, OpenHAB offline 02:20 and back online 02:21. Since then, my first and only mysensors sensor, outdoor temperature, has stopped updating. The last update was received at 02:20. When I had this problem last time, a restart of the Rpi solved the problem.

I'm running OpenHAB on a Rpi rev2 + (512mb), and an esp8266 as mysensors gw. The temperature sensor runs of AC and updates temperature on every change. In paperui the gw is still marked as Online.

Will update with log when I get home.

Binding doesn't always send (RGBW) updates to the node(s)

I am running openhab 2.1.0 and the version 2.2.0.201707241115 of the MySensors binding on a raspberry pi.

When trying to change values of my RGBW node the updates don't always get send to the node. I have enabled debug logging for the mysensors Binding so normal output looks something like this:

Sending to MySensors: 4;1;1;1;41;1d00ff00
12:23:00.513 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;663394 Nonce requested from 4. Waiting...
12:23:00.525 [INFO ] [marthome.event.ItemStateChangedEvent] - LichtKuecheUntenColor changed from 300,100,100 to 246.82355,100.0,100.0
// ... + all the signing messages 

I have activated signing for the nodes and requestAck=true for the openhab thing.

Sometimes when I change some settings for the node all I get in the openhab log is

12:32:45.036 [INFO ] [rsAbstractConnection$MySensorsWriter] - ACK received for message: 5;1;1;1;2;1

12:32:45.044 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'LichtFensterOn' received command ON
12:32:45.136 [INFO ] [marthome.event.ItemStateChangedEvent] - LichtFensterOn changed from OFF to ON

no indication in either the openhab or the nodes log that any messages actually get send.
I don't see any pattern about when this is happening but it seems to mostly occur when I change the state of the node more quickly.

Failed to connect on port: /dev/ttyUSB20...

I'm not sure if this is a bug or just an issue with the user (me).

I'm running the newest OH2 and the newest MySensors binding on a RPi2 with my nrf24l01+ connected directly to the RPi and I'm running PiGatewaySerial

After trying a million things I think I'm close to getting it working, except I keep getting an error saying failed to connect to port.

I've tried /dev/ttyUSB20, /dev/ttyMySensorsGateway and /dev/pts/0 - I've also tried various permissions combinations, and nothing seems to do the trick.

Here is my things setup:
Bridge mysensors:bridge-ser:gateway [ serialPort="/dev/ttyUSB20", sendDelay=200, baudRate=115200, skipStartupCheck=true ] { humidity hum01 [ nodeId="2", childId="0" ] temperature temp01 [ nodeId="2", childId="1" ] }

Here is my error log
11:49:30.930 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors Bridge 11:49:30.933 [DEBUG] [col.serial.MySensorsSerialConnection] - Connecting to /dev/ttyUSB20 [baudRate:115200] Failed to connect on port: /dev/ttyUSB20 exception: gnu.io.NoSuchPortException at gnu.io.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:273) at gnu.io.NRSerialPort.connect(NRSerialPort.java:48) at org.openhab.binding.mysensors.protocol.serial.MySensorsSerialConnection.connect(MySensorsSerialConnection.java:56) at org.openhab.binding.mysensors.handler.MySensorsBridgeHandler.initialize(MySensorsBridgeHandler.java:92) at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.thingUpdated(BaseThingHandler.java:182) at org.eclipse.smarthome.core.thing.internal.ThingManager$5.call(ThingManager.java:542) at org.eclipse.smarthome.core.thing.internal.ThingManager$5.call(ThingManager.java:1) at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:170) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 11:49:30.986 [ERROR] [col.serial.MySensorsSerialConnection] - Can't connect to serial port. Wrong port? 11:49:31.028 [INFO ] [smarthome.event.ThingUpdatedEvent ] - Thing 'mysensors:bridge-ser:gateway' has been updated.

Allow 0 as a valid node id

Hello all,

Since the release of version 2 of the mysensors library it is also possible to have sensors attached to the gateway, making the node id 0 a valid node id.
When I try to add sensors that are connected to node 0 (the gataway) i get the error message:
"Invalid node id supplied: 0".

This is the complete stacktrace:
2017-02-27 16:17:31.035 [ERROR] [ensors.handler.MySensorsThingHandler] - Failing on create node/child for thing mysensors:power:1e91ebba java.lang.IllegalArgumentException: Invalid node id supplied: 0 at org.openhab.binding.mysensors.internal.sensors.MySensorsNode.<init>(MySensorsNode.java:49)[9:org.openhab.binding.mysensors:2.0.0.201702111243] at org.openhab.binding.mysensors.handler.MySensorsThingHandler.generateNodeFromThing(MySensorsThingHandler.java:319)[9:org.openhab.binding.mysensors:2.0.0.201702111243] at org.openhab.binding.mysensors.handler.MySensorsThingHandler.addIntoGateway(MySensorsThingHandler.java:296)[9:org.openhab.binding.mysensors:2.0.0.201702111243] at org.openhab.binding.mysensors.handler.MySensorsThingHandler.initialize(MySensorsThingHandler.java:86)[9:org.openhab.binding.mysensors:2.0.0.201702111243] at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:701)[107:org.eclipse.smarthome.core.thing:0.9.0.201702171712] at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:1)[107:org.eclipse.smarthome.core.thing:0.9.0.201702171712] at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:181)[100:org.eclipse.smarthome.core:0.9.0.201702171712] at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_101] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_101] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_101] at java.lang.Thread.run(Thread.java:745)[:1.8.0_101] 2017-02-27 16:17:31.036 [ERROR] [ensors.handler.MySensorsThingHandler] - Failed to build sensor for thing: mysensors:power:1e91ebba

Greetings,
Frederic

[new message-type] S_IR (V_IR_SEND, V_IR_RECEIVE)

I'd like to use my IR Proxy with the new binding. If you find the time, it would be awesome if you could add these types. They don't do anything special so it should work flawlessly.

I'll also try to set up openhab2 development on my machine, but don't expect to much. Last time I failed.

Thank you!

Gateway restart

Using the same setup as described there #61, when the node driving the relay is offline I get the following output in OpenHab.
screen_log
I attached the items and things files and also part of the openhab log for easier copy paste :-)
config_files.zip
openhab_log.zip

If there is something else you need me to try just let me know.

S_LIGHT_LEVEL & V_LEVEL

Since the last update, the V_LEVEL sensor is not recognize properly (OH think it is an actuator may be ?) :

00:55:43.190 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,101-101-0,s=2,c=1,t=37,pt=7,l=5,sg=0:246 00:55:43.196 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:ACK REQ 00:55:43.211 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;Will not sign message for destination 101 as it does not require it 00:55:43.223 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:SEND,0-0-101-101,s=2,c=1,t=37,pt=7,l=5,sg=0,ft=0,st=OK:246 00:55:43.235 [DEBUG] [rs.internal.protocol.MySensorsReader] - 101;2;1;0;37;246 00:55:43.247 [ERROR] [rs.internal.protocol.MySensorsReader] - (java.lang.IllegalStateException: Could not update state, because callback is missing) on reading from connection, message: class org.openhab.binding.mysensors.internal.protocol.serial.MySensorsSerialReader

OH version : SNAPSHOT BUILD NĀ°710
MYSensorsBinding version : 2.0.0 SNAPSHOT

armed-channel should be a switch item?

I believe that the armed type for example motion sensors is a command sent from the controller to the sensor.

Suggestion: Change armed-channel to a switch item so it is possible to send armed commands to sensors.

Same parameter for all things (except the bridge)

Hello @tobof !
I'm wondering to put in each "config-description" tag (inside thing-types file) all the parameters contained in MySensorsThingConfig.java . This allows user to set, for example, smartSleep to a Motion Sensor (it has the armed channel) and simplify, for us, the update of that file. I told you that because I'm now adding new configurable parameters and I've encountered some difficulties. Clearly I'll do this on "Refactoring" branch.
What do you think? šŸ˜ƒ

MQTT Support

Hi @tobof @andreacioni,

This isn't an issue per se but I didn't want to submit a PR for this yet.

I have forked the refactored branch and added MQTT gateway support here

I'm pretty new to Java so it's probably pretty rough but it does work.

For sending messages out to the MySensors network, I've overridden the send sendMessage function of MySensorsWriter class to intercept the message string and pass it on to the MQTT broker. This seemed to be the best way to keep the MQTT connection abstracted from the gateway object, but I'd be grateful for any comments.

For incoming messages from the MQTT broker, I pass the MySensorsReader a PipedInputStream that is fed by a PipedOutputStream that is written to by the Mqtt messageArrived callback. Again, this may or may not be the best solution but it works.

I've had this running for a day or two and it's been solid but it would be good if someone else could test it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.