MySensors: trying to add Things in WebThings Gateway
-
Ok, here we go. I've had some basic mysensors working with Domoticx for over a year and thought I would give this Gateway a try. I have it installed and everything appears fine (sensor work in Domoticx) but when I try to add 'Things' in the gateway it says that none are found and I get this stuff in the log. (I do have the addin for mysensors added in)
2019-06-15 00:00:01.174 INFO : mysensors: initialising adapter from class
2019-06-15 00:00:01.177 INFO : mysensors: IpcClient: Connected to server, registering...
2019-06-15 00:00:01.180 INFO : mysensors: IpcClient: Received manager message: b'{"messageType":"registerPluginReply","data":{"pluginId":"mysensors-adapter","ipcBaseAddr":"gateway.plugin.mysensors-adapter"}}'
2019-06-15 00:00:01.182 INFO : mysensors: IpcClient: Registered with PluginServer
2019-06-15 00:00:01.183 INFO : mysensors: AddonManagerProxy: add_adapter: mysensors-adapter
2019-06-15 00:00:54.503 ERROR : mysensors: Unexpected source: state=5 source=1 action=5 (src/transports/utils/streamhdr.c:306)
2019-06-15 00:00:54.509 INFO : Plugin: mysensors-adapter died, code = null restarting...
2019-06-15 00:00:56.808 INFO : mysensors: initialising adapter from class
2019-06-15 00:00:56.809 INFO : mysensors: IpcClient: Connected to server, registering...
2019-06-15 00:00:56.811 INFO : mysensors: IpcClient: Received manager message: b'{"messageType":"registerPluginReply","data":{"pluginId":"mysensors-adapter","ipcBaseAddr":"gateway.plugin.mysensors-adapter"}}'
2019-06-15 00:00:56.813 INFO : mysensors: IpcClient: Registered with PluginServer
2019-06-15 00:00:56.815 INFO : mysensors: AddonManagerProxy: add_adapter: mysensors-adapter
2019-06-15 00:02:13.546 ERROR : mysensors: Unexpected source: state=5 source=1 action=5 (src/transports/utils/streamhdr.c:306)
2019-06-15 00:02:13.552 INFO : Plugin: mysensors-adapter died, code = null restarting...
2019-06-15 00:02:15.847 INFO : mysensors: initialising adapter from class
2
Can someone help me with this error? I don't know what to even try. -
It seems the add-on is crashing.
Some questions:
- Have you rebooted the device once?
- What version of the WebThings Gateway are you using?
- On what operating System are you running it?
- Under settings, what type of MySensors Gateway have you selected?
- Under settings, have you checked if the serial port or IP address if ok?
- Have you enabled the Debugging option? If not, can you enable it and see if you get some additional error messages?
The error
mysensors: Unexpected source: state=5 source=1 action=5 (src/transports/utils/streamhdr.c:306)looks a little like what happened if I had two of the same add-ons running at the same time. -
I have tried rebooting. It looks like it's version 0.0.7 (the addon that's included with WebThings). Rasp pi with the latest download gateway-0.8.1.img. I'm using Ethernet gateway, the usb device name is blank. I'm using a IP ADDR: 192.168.98:5003 (which is what is working with Domoticz). Question: I've tried it with and without the port, should I have the port in there or not? FYI: Just for fun I added the weather plugin using 'Dark Sky' and it is working so my WebThings Gateway works for that 'thing'. I have turned on debugging and do have some more stuff in the log (I'm not totally sure when to start the cut/paste of the log):
2019-06-15 21:13:19.062 INFO : mysensors: initialising adapter from class
2019-06-15 21:13:19.063 INFO : mysensors: IpcClient: Connected to server, registering...
2019-06-15 21:13:19.067 INFO : mysensors: IpcClient: Received manager message: b'{"messageType":"registerPluginReply","data":{"pluginId":"mysensors-adapter","ipcBaseAddr":"gateway.plugin.mysensors-adapter"}}'
2019-06-15 21:13:19.070 INFO : mysensors: IpcClient: Registered with PluginServer
2019-06-15 21:13:19.071 INFO : mysensors: AddonManagerProxy: add_adapter: mysensors-adapter
2019-06-15 21:14:04.011 INFO : Pairing timeout
2019-06-15 21:14:04.017 ERROR : Thing was not added
2019-06-15 21:14:04.019 ERROR : addNewThing cancelled
2019-06-15 21:14:04.024 INFO : mysensors: AddonMangerProxy: recv: b'{"messageType":"cancelPairing","data":{"adapterId":"mysensors-adapter","pluginId":"mysensors-adapter"}}'
2019-06-15 21:14:04.027 INFO : weather: Adapter: WeatherAdapter id weather-adapter pairing cancelled
2019-06-15 21:14:04.029 INFO : systeminfo: Adapter: SysteminfoAdapter id SysteminfoAdapter pairing cancelled
2019-06-15 21:17:52.418 INFO : Unloading MySensorsAdapter
2019-06-15 21:17:52.422 INFO : mysensors: AddonMangerProxy: recv: b'{"messageType":"unloadAdapter","data":{"adapterId":"mysensors-adapter","pluginId":"mysensors-adapter"}}'
2019-06-15 21:17:52.426 INFO : mysensors: Shutting down MySensors adapter
2019-06-15 21:17:52.428 INFO : mysensors: MySensors adapter was unable to cleanly close PyMySensors. This is not a problem.
2019-06-15 21:17:52.429 INFO : mysensors: AddonMangerProxy: recv: b'{"messageType":"unloadPlugin","data":{"pluginId":"mysensors-adapter"}}'
2019-06-15 21:17:55.944 INFO : Loading add-on: mysensors-adapter
2019-06-15 21:17:58.235 INFO : mysensors: initialising adapter from class
2019-06-15 21:17:58.237 INFO : mysensors: IpcClient: Connected to server, registering...
2019-06-15 21:17:58.240 INFO : mysensors: IpcClient: Received manager message: b'{"messageType":"registerPluginReply","data":{"pluginId":"mysensors-adapter","ipcBaseAddr":"gateway.plugin.mysensors-adapter"}}'
2019-06-15 21:17:58.243 INFO : mysensors: IpcClient: Registered with PluginServer
2019-06-15 21:17:58.245 INFO : mysensors: AddonManagerProxy: add_adapter: mysensors-adapter
2019-06-15 21:18:11.500 INFO : About to call startPairing on SysteminfoAdapter
2019-06-15 21:18:11.502 INFO : About to call startPairing on WeatherAdapter
2019-06-15 21:18:11.503 INFO : About to call startPairing on MySensorsAdapter
2019-06-15 21:18:11.511 INFO : mysensors: AddonMangerProxy: recv: b'{"messageType":"startPairing","data":{"timeout":60,"adapterId":"mysensors-adapter","pluginId":"mysensors-adapter"}}'
2019-06-15 21:18:11.513 INFO : systeminfo: Adapter: SysteminfoAdapter id SysteminfoAdapter pairing started
2019-06-15 21:18:11.577 INFO : Opened a new things socket
2019-06-15 21:19:11.505 INFO : Pairing timeout
2019-06-15 21:19:11.509 ERROR : Thing was not added
2019-06-15 21:19:11.510 ERROR : addNewThing cancelled
2019-06-15 21:19:11.514 INFO : weather: Adapter: WeatherAdapter id weather-adapter pairing cancelled
2019-06-15 21:19:11.516 INFO : systeminfo: Adapter: SysteminfoAdapter id SysteminfoAdapter pairing cancelled
2019-06-15 21:19:11.518 INFO : mysensors: AddonMangerProxy: recv: b'{"messageType":"cancelPairing","data":{"adapterId":"mysensors-adapter","pluginId":"mysensors-adapter"}}' -
Here is a log of another 'thing' Add with the port number on the IP address: (I also disabled the weather and system addon's to try to keep the log cleaner.)
2019-06-15 21:31:41.231 INFO : mysensors: MySensors adapter was unable to cleanly close PyMySensors. This is not a problem.
2019-06-15 21:31:41.233 INFO : mysensors: AddonMangerProxy: recv: b'{"messageType":"unloadPlugin","data":{"pluginId":"mysensors-adapter"}}'
2019-06-15 21:31:43.097 ERROR : mysensors: Exception in thread Thread-2:
2019-06-15 21:31:43.099 ERROR : mysensors: Traceback (most recent call last):
2019-06-15 21:31:43.101 ERROR : mysensors: File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
2019-06-15 21:31:43.103 ERROR : mysensors: self.run()
2019-06-15 21:31:43.105 ERROR : mysensors: File "/usr/lib/python3.5/threading.py", line 862, in run
2019-06-15 21:31:43.107 ERROR : mysensors: self._target(*self._args, **self._kwargs)
2019-06-15 21:31:43.108 ERROR : mysensors: File "/home/pi/.mozilla-iot/addons/mysensors-adapter/pkg/mysensors_adapter.py", line 381, in start_pairing
2019-06-15 21:31:43.110 ERROR : mysensors: if not self.t.is_alive():
2019-06-15 21:31:43.112 ERROR : mysensors: AttributeError: 'MySensorsAdapter' object has no attribute 't'
2019-06-15 21:31:43.114 ERROR : mysensors:
2019-06-15 21:31:43.115 ERROR : mysensors: Exception in thread Thread-4:
2019-06-15 21:31:43.117 ERROR : mysensors: Traceback (most recent call last):
2019-06-15 21:31:43.119 ERROR : mysensors: File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
2019-06-15 21:31:43.121 ERROR : mysensors: self.run()
2019-06-15 21:31:43.122 ERROR : mysensors: File "/usr/lib/python3.5/threading.py", line 862, in run
2019-06-15 21:31:43.129 ERROR : mysensors: self._target(*self._args, **self._kwargs)
2019-06-15 21:31:43.131 ERROR : mysensors: File "/home/pi/.mozilla-iot/addons/mysensors-adapter/pkg/mysensors_adapter.py", line 381, in start_pairing
2019-06-15 21:31:43.132 ERROR : mysensors: if not self.t.is_alive():
2019-06-15 21:31:43.134 ERROR : mysensors: AttributeError: 'MySensorsAdapter' object has no attribute 't'
2019-06-15 21:31:43.136 ERROR : mysensors:
2019-06-15 21:31:44.747 INFO : Loading add-on: mysensors-adapter
2019-06-15 21:31:47.080 INFO : mysensors: initialising adapter from class
2019-06-15 21:31:47.082 INFO : mysensors: IpcClient: Connected to server, registering...
2019-06-15 21:31:47.085 INFO : mysensors: IpcClient: Received manager message: b'{"messageType":"registerPluginReply","data":{"pluginId":"mysensors-adapter","ipcBaseAddr":"gateway.plugin.mysensors-adapter"}}'
2019-06-15 21:31:47.088 INFO : mysensors: IpcClient: Registered with PluginServer
2019-06-15 21:31:47.090 INFO : mysensors: AddonManagerProxy: add_adapter: mysensors-adapter
2019-06-15 21:31:53.398 INFO : About to call startPairing on MySensorsAdapter
2019-06-15 21:31:53.411 INFO : mysensors: AddonMangerProxy: recv: b'{"messageType":"startPairing","data":{"timeout":60,"adapterId":"mysensors-adapter","pluginId":"mysensors-adapter"}}'
2019-06-15 21:31:53.515 INFO : Opened a new things socket
2019-06-15 21:32:53.402 INFO : Pairing timeout
2019-06-15 21:32:53.405 ERROR : Thing was not added
2019-06-15 21:32:53.407 ERROR : addNewThing cancelled
2019-06-15 21:32:53.410 INFO : mysensors: AddonMangerProxy: recv: b'{"messageType":"cancelPairing","data":{"adapterId":"mysensors-adapter","pluginId":"mysensors-adapter"}}' -
Here is a log where I rebooted, went directly to 'Things' and '+' to add/discover new things: (One thing is strange is that I don't seem to be getting that 'original' error where you said it was like two instances where running so maybe that was the case for that error.)
2019-06-15 21:41:16.559 INFO : About to call startPairing on MySensorsAdapter
2019-06-15 21:41:16.569 INFO : mysensors: AddonMangerProxy: recv: b'{"messageType":"startPairing","data":{"timeout":60,"adapterId":"mysensors-adapter","pluginId":"mysensors-adapter"}}'
2019-06-15 21:41:16.876 INFO : Opened a new things socket
2019-06-15 21:42:16.565 INFO : Pairing timeout
2019-06-15 21:42:16.570 ERROR : Thing was not added
2019-06-15 21:42:16.572 ERROR : addNewThing cancelled
2019-06-15 21:42:16.575 INFO : mysensors: AddonMangerProxy: recv: b'{"messageType":"cancelPairing","data":{"adapterId":"mysensors-adapter","pluginId":"mysensors-adapter"}}' -
I was just thinking, my MySensors gateway was built using version 2.2 mysensors code, I am sort of wondering if that is my problem. This addon was probably never tested against older MySensor version gateway's I'm assuming? At this point I'm thinking I should build a new MS gateway and try that. The WebThings Gateway seems to be working and I know my MySensors sensors are working fine in Domoticz so that really just leaves the MySensors gateway at Version 2.2 as a possible issue. This addon seems to be working for others so I guess that's the most logical thing for me to try. I really would like to get the WebThings gateway working because it really fits what I need for the stuff I have around here!
-
The add-on was never tested with the ethernet gateway option. It should work theoretically.. so it might just be that. I will test it when I get a chance.
You could try running the serial gateway version. If that works, then we know what the issue is.
-
The add-on was never tested with the ethernet gateway option. It should work theoretically.. so it might just be that. I will test it when I get a chance.
You could try running the serial gateway version. If that works, then we know what the issue is.
@alowhum said in MySensors: trying to add Things in WebThings Gateway:
The add-on was never tested with the ethernet gateway option. It should work theoretically.. so it might just be that. I will test it when I get a chance.
You could try running the serial gateway version. If that works, then we know what the issue is.
It's not the problem I'm using an ethernet gateway on an ESP8266 and it's running great now.
@rmalbers said in MySensors: trying to add Things in WebThings Gateway:
I have it installed and everything appears fine (sensor work in Domoticx)
Are you trying to run both Domoticz and Things Gateway in parallel connecting to the same MySensors gateway ?
-
@nca78 Thanks, that saves me some test work :-)
@rmalbers I believe you cannot have two controllers ingest the data at the same time. One of them will 'win', or both will get some of the messages.
A possible future feature could be the re-broadcast the incoming messages on another port (e.g. 5004), so that Domoticz could ingest those. Then you could have two controllers both getting the same MySensors data.
-
Ok, I think I tried it with domoticz shutdown but I'll try that again. Thanks to the other reply that they have this working, that gives my hope! Na78: What version of mysensor gateway code are you running? Mine is at V2.2 and I'm wondering if that might be my problem. Thanks for the help on this BTW!
-
Ok, with Domoticz shutdown I get the same stuff in the log. I'm going to see if I can tell more what's going on with wireshark. I'm thinking it has to be something stupid that I have going on, I know my MySensors gateway is good because it's working with Domoticz, the Mozilla WebThings gateway is working because it works with Dark sky weather, so I would think it's something going on with the comm between the two gateways.
-
Ok, I built a new serial USB MySensor gateway. (The old GW is unplugged and Domoticz is shutdown.) The new MS gateway is working because under the IDE I can turn on the com serial port debug and see it going, communicating with the sensors.) I move the USB serial gw to the rasp pi WebThings gateway and set the addon to: /dev/ttyUSB0 and to USB serial gateway. I get the same messages as above. I'm also seeing this in a couple of log files on the WebThings gateway: cat: /tmp/gateway.addonManager: No such device or address
cat: /tmp/gateway.plugin.mysensors-adapter: No such device or address
So it sure sounds like in this case it's not seeing or able to open that USB device. That is the device name that appears when I plug the usb serial gateway USB cable into the WebThings gateway rasp pi. -
@rmalbers Great work, that narrows things down a lot.
It seems the add-on was crashing. Based on your reporting I dove into the issue and I think I may have found a bug in how it loaded settings.
I'm uploading version 0.0.8 now. It should take a day or two before the Mozilla teams accepts the new version.
-
Ok, when I went into the WT GW the first time the addon was at V0.0.7 but there was an new 'Update' tab that I hit and the new addon version installed. With the USB gateway I get this (I think I started the cut/paste at the right spot):
2019-06-19 15:49:54.172 INFO : Loading add-on: mysensors-adapter
2019-06-19 15:49:56.494 INFO : mysensors: initialising adapter from class
2019-06-19 15:49:56.496 INFO : mysensors: IpcClient: Connected to server, registering...
2019-06-19 15:49:56.500 INFO : mysensors: IpcClient: Received manager message: b'{"messageType":"registerPluginReply","data":{"pluginId":"mysensors-adapter","ipcBaseAddr":"gateway.plugin.mysensors-adapter"}}'
2019-06-19 15:49:56.503 INFO : mysensors: IpcClient: Registered with PluginServer
2019-06-19 15:49:56.505 INFO : mysensors: AddonManagerProxy: add_adapter: mysensors-adapter
2019-06-19 15:50:13.088 INFO : About to call startPairing on MySensorsAdapter
2019-06-19 15:50:13.096 INFO : mysensors: -Connection status was present in the config data.
2019-06-19 15:50:13.098 INFO : mysensors: -Gateway choice: USB Serial gateway
2019-06-19 15:50:13.099 INFO : mysensors: Error extracting settings from config object: local variable 'ip_address' referenced before assignment
2019-06-19 15:50:13.101 INFO : mysensors: AddonMangerProxy: recv: b'{"messageType":"startPairing","data":{"timeout":60,"adapterId":"mysensors-adapter","pluginId":"mysensors-adapter"}}'
2019-06-19 15:50:18.322 INFO : Opened a new things socket
2019-06-19 15:51:13.092 INFO : Pairing timeout
2019-06-19 15:51:13.095 ERROR : Thing was not added
2019-06-19 15:51:13.113 ERROR : addNewThing cancelled
2019-06-19 15:51:13.118 INFO : mysensors: PAIRING INITIATED
2019-06-19 15:51:13.120 INFO : mysensors: Error re-requesting node ID's from devices in the MySensors network:'MySensorsAdapter' object has no attribute 't'
2019-06-19 15:51:13.121 INFO : mysensors: AddonMangerProxy: recv: b'{"messageType":"cancelPairing","data":{"adapterId":"mysensors-adapter","pluginId":"mysensors-adapter"}}' -
This log is from an attempt (with the new addon) using 'Ethernet' GW and the IP address of the GW that I've been using with Domoticz for the last year or so, (it's at mysensor v2.2) This looks like it was communicating with the gw and thus the sensors but still didn't work. This could be because I am at V2.2 of mysensors(?).:
2019-06-19 15:33:17.874 INFO : Loading add-on: mysensors-adapter
2019-06-19 15:33:20.227 INFO : mysensors: initialising adapter from class
2019-06-19 15:33:20.229 INFO : mysensors: IpcClient: Connected to server, registering...
2019-06-19 15:33:20.233 INFO : mysensors: IpcClient: Received manager message: b'{"messageType":"registerPluginReply","data":{"pluginId":"mysensors-adapter","ipcBaseAddr":"gateway.plugin.mysensors-adapter"}}'
2019-06-19 15:33:20.236 INFO : mysensors: IpcClient: Registered with PluginServer
2019-06-19 15:33:20.238 INFO : mysensors: AddonManagerProxy: add_adapter: mysensors-adapter
2019-06-19 15:33:20.314 ERROR : mysensors: DEBUG:mysensors.persistence:Loading sensors from persistence file /home/pi/.mozilla-iot/config/mysensors-adapter-persistence.json
2019-06-19 15:33:20.319 ERROR : mysensors: DEBUG:mysensors.persistence:Saving sensors to persistence file /home/pi/.mozilla-iot/config/mysensors-adapter-persistence.json
2019-06-19 15:33:20.330 ERROR : mysensors: INFO:mysensors.gateway_tcp:Trying to connect to ('192.168.1.98', 5003)
2019-06-19 15:33:20.393 ERROR : mysensors: INFO:mysensors:Connected to <_SelectorSocketTransport fd=14 read=idle write=<idle, bufsize=0>>
2019-06-19 15:33:20.425 ERROR : mysensors: DEBUG:mysensors:Receiving 0;255;3;0;14;Gateway startup complete.
2019-06-19 15:33:20.434 ERROR : mysensors: INFO:mysensors.handler:n:0 c:255 t:3 s:14 p:Gateway startup complete.
2019-06-19 15:33:20.436 ERROR : mysensors: DEBUG:mysensors:Sending 255;255;3;0;20;
2019-06-19 15:33:20.438 ERROR : mysensors: DEBUG:mysensors:Receiving 0;255;0;0;18;2.2.0
2019-06-19 15:33:20.442 ERROR : mysensors: DEBUG:mysensors:Sending 0;255;3;0;26;0
2019-06-19 15:33:27.927 ERROR : mysensors: DEBUG:mysensors:Receiving 1;0;1;0;0;22.6
2019-06-19 15:33:27.932 ERROR : mysensors: WARNING:mysensors:Node 1 is unknown
2019-06-19 15:33:27.934 ERROR : mysensors: INFO:mysensors:Requesting new presentation for node 1
2019-06-19 15:33:27.935 ERROR : mysensors: DEBUG:mysensors:Sending 1;255;3;0;19;
2019-06-19 15:33:29.635 INFO : About to call startPairing on MySensorsAdapter
2019-06-19 15:33:29.642 INFO : mysensors: -Connection status was present in the config data.
2019-06-19 15:33:29.644 INFO : mysensors: -Gateway choice: Ethernet gateway
2019-06-19 15:33:29.646 INFO : mysensors: Selected IP address and port: 192.168.1.98
2019-06-19 15:33:29.648 INFO : mysensors: >> incoming message > internal > id: 0; child: 255; subtype: 14; payload: Gateway startup complete.
2019-06-19 15:33:29.649 INFO : mysensors: >> incoming message > presentation > id: 0; child: 255; subtype: 18; payload: 2.2.0
2019-06-19 15:33:29.651 INFO : mysensors: RECREATING DEVICES FROM PERSISTENCE
2019-06-19 15:33:29.652 INFO : mysensors: Re-requesting presentation of all nodes on the network
2019-06-19 15:33:29.654 INFO : mysensors: AddonMangerProxy: recv: b'{"messageType":"startPairing","data":{"timeout":60,"adapterId":"mysensors-adapter","pluginId":"mysensors-adapter"}}'
2019-06-19 15:33:29.656 ERROR : mysensors: DEBUG:mysensors:Sending 0;255;3;0;26;0
2019-06-19 15:33:29.695 INFO : Opened a new things socket
2019-06-19 15:33:30.333 ERROR : mysensors: DEBUG:mysensors.persistence:Saving sensors to persistence file /home/pi/.mozilla-iot/config/mysensors-adapter-persistence.json
2019-06-19 15:33:30.495 ERROR : mysensors: DEBUG:mysensors:Sending 0;255;3;0;2;
2019-06-19 15:33:30.558 ERROR : mysensors: DEBUG:mysensors:Receiving 0;255;3;0;2;2.2.0
2019-06-19 15:33:34.611 ERROR : mysensors: DEBUG:mysensors:Receiving 2;0;1;0;0;23.2
2019-06-19 15:33:34.614 ERROR : mysensors: WARNING:mysensors:Node 2 is unknown
2019-06-19 15:33:34.617 ERROR : mysensors: INFO:mysensors:Requesting new presentation for node 2
2019-06-19 15:33:34.618 ERROR : mysensors: DEBUG:mysensors:Sending 2;255;3;0;19;
2019-06-19 15:33:40.597 ERROR : mysensors: DEBUG:mysensors:Sending 0;255;3;0;2;
2019-06-19 15:33:40.689 ERROR : mysensors: DEBUG:mysensors:Receiving 0;255;3;0;2;2.2.0
2019-06-19 15:33:50.699 ERROR : mysensors: DEBUG:mysensors:Sending 0;255;3;0;2;
2019-06-19 15:33:50.820 ERROR : mysensors: DEBUG:mysensors:Receiving 0;255;3;0;2;2.2.0
2019-06-19 15:34:00.595 ERROR : mysensors: DEBUG:mysensors:Receiving 1;0;1;0;0;22.6
2019-06-19 15:34:00.599 ERROR : mysensors: WARNING:mysensors:Node 1 is unknown
2019-06-19 15:34:00.601 ERROR : mysensors: INFO:mysensors:Requesting new presentation for node 1
2019-06-19 15:34:00.602 ERROR : mysensors: DEBUG:mysensors:Sending 1;255;3;0;19;
2019-06-19 15:34:00.801 ERROR : mysensors: DEBUG:mysensors:Sending 0;255;3;0;2;
2019-06-19 15:34:00.875 ERROR : mysensors: DEBUG:mysensors:Receiving 0;255;3;0;2;2.2.0
2019-06-19 15:34:09.359 ERROR : mysensors: DEBUG:mysensors:Receiving 2;0;1;0;0;23.2
2019-06-19 15:34:09.362 ERROR : mysensors: WARNING:mysensors:Node 2 is unknown
2019-06-19 15:34:09.365 ERROR : mysensors: INFO:mysensors:Requesting new presentation for node 2
2019-06-19 15:34:09.366 ERROR : mysensors: DEBUG:mysensors:Sending 2;255;3;0;19;
2019-06-19 15:34:10.903 ERROR : mysensors: DEBUG:mysensors:Sending 0;255;3;0;2;
2019-06-19 15:34:10.980 ERROR : mysensors: DEBUG:mysensors:Receiving 0;255;3;0;2;2.2.0
2019-06-19 15:34:21.005 ERROR : mysensors: DEBUG:mysensors:Sending 0;255;3;0;2;
2019-06-19 15:34:21.112 ERROR : mysensors: DEBUG:mysensors:Receiving 0;255;3;0;2;2.2.0
2019-06-19 15:34:29.646 INFO : Pairing timeout
2019-06-19 15:34:29.651 ERROR : Thing was not added
2019-06-19 15:34:29.653 ERROR : addNewThing cancelled -
FWIW: I was just thinking I should mention, after the 'Update' of the addon the first time I tired it I got the same/similar messages as I had in my OP. I rebooted at that point and those messages went away so I'm thinking that after addon install or update a reboot is probably a good idea.
-
I noticed something with the Ethernet GW: On the addon configure page under the 'IP address' the text has an IP address example that includes the port. When I include the port I get this data in the log file: 2019-06-19 17:47:34.750 ERROR : mysensors: INFO:mysensors.gateway_tcp:Trying to connect to ('192.168.1.98:5003', 5003)
2019-06-19 17:47:34.758 ERROR : mysensors: ERROR:mysensors.gateway_tcp:Failed to connect to socket at ('192.168.1.98:5003', 5003)and it doesn't seem to connect.
When I leave off the port number I get this in the log file:
2019-06-19 17:49:44.095 ERROR : mysensors: INFO:mysensors.gateway_tcp:Trying to connect to ('192.168.1.98', 5003)
2019-06-19 17:49:44.111 ERROR : mysensors: INFO:mysensors:Connected to <_SelectorSocketTransport fd=14 read=idle write=<idle, bufsize=0>>and it seems to connect. If I'm interpreting this correctly you have to leave the port number off the IP string for it to work properly, not sure which way it really should be, just pointing this out in case it hadn't been noticed.
-
Thank you for the logs.
Perhaps this is a point where it crashes and reboots the add-on:
2019-06-19 15:33:27.935 ERROR : mysensors: DEBUG:mysensors:Sending 1;255;3;0;19; 2019-06-19 15:33:29.635 INFO : About to call startPairing on MySensorsAdapterI also noticed that it keeps re-requesting the presentation of your nodes:
2019-06-19 15:33:34.617 ERROR : mysensors: INFO:mysensors:Requesting new presentation for node 2This could mean:
- You have created a node that somehow has the same node-ID as an earlier but different node. Although in theory the add-on handles this case now.
- Some data is missing that is required to actually create the device. This could be the name.
Can you share the Arduino Code? Could it be that your presentation function does not send names? Your presentation should look something like this:
sendSketchInfo(F("Sensor name"), F("1.1")); present(CHILD_ID, S_BINARY, F("Button name"));Here's another example sketch:
https://forum.mysensors.org/topic/10342/mozilla-webthings-mysensors-add-on-adapter/14// By the way, I don't think using v2.2 should matter. Internally the PyMySensors library actually uses 2.2.