Hi dzairo,
Just wondering if you still monitor this thread. If so would love to know how to install the ComPort component so I can modify and use your terminal code. For some reason I don't have any luck with adding it to the IDE.
thanks, Andy.
Hi dzairo,
Just wondering if you still monitor this thread. If so would love to know how to install the ComPort component so I can modify and use your terminal code. For some reason I don't have any luck with adding it to the IDE.
thanks, Andy.
Not wanting to dilute this forum much with HA but notice that HA is a bit picky as to how it connects to the Gateway when in this direct IP mode. If it can't connect to the gateway within a certain timeframe then it gives up or looses connection and can't re-connect again within a short timeframe. Also seems to need a full re-boot to re-connect once 'given up'. And also seems to need the HA connection to the gateway first else does not connect. So leave the MYSController disconnected until HA has done its thing. Not extensive experiments; your experience may differ!
Now going to try the direct serial via USB as my HA controller is a NUC so has several USB connections, as does the Dev HA R-Pi which I'll play with first. Of course the serial connect will be only for one controller, so would be good if the Gateway software had the option of both IP and serial connections, but lets play...
'
@mfalkvidd Thanks so much for that. Both MYSController and the direct connection to HA connected via IP and working. I think I must have missed that option, is it listed somewhere? Thanks again.
@Jan Spies, @Joerideman. Well HA has on its MySensors integration page, https://www.home-assistant.io/integrations/mysensors/, an extended example script lower down the page which shows several different methods of attaching the MySensors Gateway. Serial via USB, serial direct, IP and MQTT. Up until this week I've always used the MQTT option as my gateway was set to use MQTT and been working well for 5 or more of years. Following the conversation below I generated another development instance of HA and as I had a spare Sensebender Gateways board set up another gateway. This time using the IP direct connection, example 3, and it works, sort of.
Let me explain. I'm trying to get the MYSController to work and as best I can tell if you use the IP connection for the controller then HA can't access or read from the controller. So if the MYSController connects first then HA does not work, the other way around then the controller software does not work. I have not made the serial connection to the gateway board work with the controller software if the gateway is set for an IP connection. That is including that option in the software build. Looking at the serial link (via usb connection) on terminal software YAT there is nothing sent out. I have not tried to build the gateway software for serial connection only as I don't intend to use this mode, but may do just for connection to the MYSController software.
As best I can tell at this time the Sensebender gateway can only connect to one 'controller' at a time. Does not allow two IP connections to the same port, which of course makes sense. Same I does not send the same information out of the USB (Serial) and IP at the same time.
However still investigation (playing) as I have a mix of sensor versions on my network and that can't help.... Some are so old I can't find the initial source code to re-compile to the latest version so will try to reverse engineer what I did. Mostly one-wire temp sensors and a solar battery bank voltage/current monitor so not too complicated.
@Jan Spies But wait, just noticed that Home Assistant can take MySensors data direct from either a serial port of IP connection. Must be a new option. My implementation is from some 5 years or more ago and think then only MQTT was the way into the Controller. Guess it could have been because I started out with OpenHAB and perhaps that controller only had a MQTT option then. When i moved over to HA it just worked so did not look at anything else. Now want more sensors has have a solar power system I'd like to monitor closely and i can't easily interface to the solar power units. So more sensors and some sort of MYSController.
@Jan Spies, Thanks for your help. Was about to try different sketches over the weekend but guess I'll try some other approach now. Would really like to get MYSController or something similar to work. I can see data on the serial port (as shown below) but nothing on the ethernet port that looks useful other than what is sent and is returned from MQTT (I'm using Home Assistant). I have Lazerus so may have a play with the data on the serial port. Perhaps could feed the serial data into another Arduino and make it available on another IP address for different MySensor controller software. as not easy to get to my gateway hardware with a serail connection. Or seeing that the data is in MQTT perhaps feeding it into another app to display similar to MYSController. Wonder if the source of MYSController in in Guthub. Will have a look; no point in re-inventing the wheel... Wish I could work out what the ERROR ErrorFlag=255, etc means in my serial port output in the post below.
@tekka, thanks for the pointer. I'm using the GatewayW5100MQTTClient sketch, is this not the correct one? Works well though! Or, I do have MY_DEBUG at the beginning enabled, is then incorrect? However I can't connect MYSController via the IP port either. So if it is MY_DEBUG enabled as the problem then it impacts on both connections?
Have Mysensors in use with Home Assistant for several years, no issues. Using a Sensebender Ethernet MQTT gateway to feed HA. Just found this software. Can only get this software to connect via serial connection, not IP, and only shows data in the MYSController Debug tab. No nodes are discovered just 0 and 255. Is there something I need to do with the Gateway to allow connection for this software? Example of debug tab messages:
22/04/2020 18:34:56 ERROR ErrorFlag=255, Msg=2433158 GWT:TPS:TOPIC=mygateway2-out/23/1/1/0/0,MSG SENT
22/04/2020 18:34:56 RX 2433224 TSF:MSG:READ,23-23-0,s=2,c=1,t=0,pt=7,l=5,sg=0:28.1
22/04/2020 18:34:56 ERROR ErrorFlag=255, Msg=2433224 TSF:MSG:READ,23-23-0,s=2,c=1,t=0,pt=7,l=5,sg=0:28.1
22/04/2020 18:34:56 RX 2433224 GWT:TPS:TOPIC=mygateway2-out/23/2/1/0/0,MSG SENT
22/04/2020 18:34:56 ERROR ErrorFlag=255, Msg=2433224 GWT:TPS:TOPIC=mygateway2-out/23/2/1/0/0,MSG SENT
22/04/2020 18:35:00 RX 2437119 TSF:MSG:READ,23-23-0,s=1,c=1,t=0,pt=7,l=5,sg=0:28.5
22/04/2020 18:35:00 ERROR ErrorFlag=255, Msg=2437119 TSF:MSG:READ,23-23-0,s=1,c=1,t=0,pt=7,l=5,sg=0:28.5
22/04/2020 18:35:00 RX 2437120 GWT:TPS:TOPIC=mygateway2-out/23/1/1/0/0,MSG SENT
22/04/2020 18:35:00 ERROR ErrorFlag=255, Msg=2437120 GWT:TPS:TOPIC=mygateway2-out/23/1/1/0/0,MSG SENT
22/04/2020 18:35:00 RX 2437186 TSF:MSG:READ,23-23-0,s=2,c=1,t=0,pt=7,l=5,sg=0:28.5
22/04/2020 18:35:00 ERROR ErrorFlag=255, Msg=2437186 TSF:MSG:READ,23-23-0,s=2,c=1,t=0,pt=7,l=5,sg=0:28.5
22/04/2020 18:35:00 RX 2437186 GWT:TPS:TOPIC=mygateway2-out/23/2/1/0/0,MSG SENT
22/04/2020 18:35:00 ERROR ErrorFlag=255, Msg=2437186 GWT:TPS:TOPIC=mygateway2-out/23/2/1/0/0,MSG SENT
22/04/2020 18:35:03 RX 2439780 GWT:TPC:IP=192.168.1.96
22/04/2020 18:35:03 ERROR ErrorFlag=255, Msg=2439780 GWT:TPC:IP=192.168.1.96
22/04/2020 18:35:04 RX 2440780 GWT:RMQ:CONNECTING...
22/04/2020 18:35:04 ERROR ErrorFlag=255, Msg=2440780 GWT:RMQ:CONNECTING...
22/04/2020 18:35:04 RX 2440783 GWT:RMQ:OK
22/04/2020 18:35:04 ERROR ErrorFlag=255, Msg=2440783 GWT:RMQ:OK
22/04/2020 18:35:04 RX 2440784 GWT:TPS:TOPIC=mygateway2-out/0/255/0/0/18,MSG SENT
22/04/2020 18:35:04 ERROR ErrorFlag=255, Msg=2440784 GWT:TPS:TOPIC=mygateway2-out/0/255/0/0/18,MSG SENT
22/04/2020 18:35:04 RX 2441081 TSF:MSG:READ,23-23-0,s=1,c=1,t=0,pt=7,l=5,sg=0:28.4
22/04/2020 18:35:04 ERROR ErrorFlag=255, Msg=2441081 TSF:MSG:READ,23-23-0,s=1,c=1,t=0,pt=7,l=5,sg=0:28.4
22/04/2020 18:35:04 RX 2441081 GWT:TPS:TOPIC=mygateway2-out/23/1/1/0/0,MSG SENT
Any suggestions anyone? Thanks.
Hello,
I have a similar issue with Sensebender Ethernet MQTT Gateway and MYSController. Can only connect to the gateway by serial from MYSController. The set-up is working correctly as best I can tell, and has several different MySensors in use. Has been working for a number of years. Only just discovered the MYSController software.
So the Controller only shows data in the MYSController Debug tab. Nothing in any of the others. NOTE in the screen grab below the Controller at 192.168.1.96 is not connected, there is no difference when it is other than the Gateway error (!GWT:RMQ:FAIL) is not shown. Anyone with any ides for me to pursue? Thanks.
@mfalkvidd Thanks for that, I'd not found it in my searches. Will try and report back.
Anyone using PlatformIO and the sensebender board and know what boad to select? I have tried all the various Arduino Zero boards and the SAMD based boards. Most compile without errors but so far upload will not work. Mostly just hangs or if it complete the upload the board does not work again without re-flashing via the Arduino IDE and Sensebender borad selected. Thanks for any help.
I have spent a long time going through the posts to try to figure out what my system or I am doing wrong. But from the beginning, about three/four years ago I started with MYSensors and initially integrated it with OpenHAB. Some three years ago I moved to Home Assistant. In all this time and even now the sensors using MySensors firmware have worked well. And it still do! I discovered MYSController about 6 months ago after starting out writing my own (also using Lazarus) so decided to use the that software rather then re-invent the wheel. However I can not make the software do anything useful. That is in never shows any nodes or the data between them. I can only connect to the Sensebender ethernet MQTT gateway by serial connection. The ethernet connection is connected to the Home Assistant so I know it works but get back from the IP address 'no reply'.
Using the serial connection then data is shown in the MYSController Debug tab but with errors. The messages tab does not have anything. or the Nodes tab. Using the Discover function seems to do nothing. The following is an example of the data in the debug tab. Note this gateway is NOT connected to a Controller in this instance thus the 'GWT:RMQ Fail' errors. Is ErrorFlag=255 meaning listed anywhere?
20/04/2020 21:37:07 RX 19659 GWT:TPC:IP=192.168.1.96
20/04/2020 21:37:07 ERROR ErrorFlag=255, Msg=19659 GWT:TPC:IP=192.168.1.96
20/04/2020 21:37:08 RX 20659 GWT:RMQ:CONNECTING...
20/04/2020 21:37:08 ERROR ErrorFlag=255, Msg=20659 GWT:RMQ:CONNECTING...
20/04/2020 21:37:10 RX 22661 !GWT:RMQ:FAIL
20/04/2020 21:37:10 ERROR ErrorFlag=255, Msg=22661 !GWT:RMQ:FAIL
20/04/2020 21:37:10 RX 22662 TSF:MSG:READ,23-23-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.0
20/04/2020 21:37:10 ERROR ErrorFlag=255, Msg=22662 TSF:MSG:READ,23-23-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.0
20/04/2020 21:37:10 RX 22662 GWT:TPC:IP=192.168.1.96
20/04/2020 21:37:10 ERROR ErrorFlag=255, Msg=22662 GWT:TPC:IP=192.168.1.96
20/04/2020 21:37:11 RX 23663 GWT:RMQ:CONNECTING...
20/04/2020 21:37:11 ERROR ErrorFlag=255, Msg=23663 GWT:RMQ:CONNECTING...
20/04/2020 21:37:13 RX 25664 !GWT:RMQ:FAIL
20/04/2020 21:37:13 ERROR ErrorFlag=255, Msg=25664 !GWT:RMQ:FAIL
20/04/2020 21:37:13 RX 25664 GWT:TPC:IP=192.168.1.96
20/04/2020 21:37:13 ERROR ErrorFlag=255, Msg=25664 GWT:TPC:IP=192.168.1.96
20/04/2020 21:37:14 RX 26665 GWT:RMQ:CONNECTING...
20/04/2020 21:37:14 ERROR ErrorFlag=255, Msg=26665 GWT:RMQ:CONNECTING...
20/04/2020 21:37:16 RX 28667 !GWT:RMQ:FAIL
20/04/2020 21:37:16 ERROR ErrorFlag=255, Msg=28667 !GWT:RMQ:FAIL
20/04/2020 21:37:16 RX 28667 TSF:MSG:READ,24-24-0,s=28,c=1,t=38,pt=7,l=5,sg=0:6.32
20/04/2020 21:37:16 ERROR ErrorFlag=255, Msg=28667 TSF:MSG:READ,24-24-0,s=28,c=1,t=38,pt=7,l=5,sg=0:6.32
20/04/2020 21:37:16 RX 28668 TSF:MSG:READ,24-24-0,s=29,c=1,t=38,pt=7,l=5,sg=0:6.32
20/04/2020 21:37:16 ERROR ErrorFlag=255, Msg=28668 TSF:MSG:READ,24-24-0,s=29,c=1,t=38,pt=7,l=5,sg=0:6.32
20/04/2020 21:37:16 RX 28669 TSF:MSG:READ,24-24-0,s=30,c=1,t=38,pt=7,l=5,sg=0:6.32
20/04/2020 21:37:16 ERROR ErrorFlag=255, Msg=28669 TSF:MSG:READ,24-24-0,s=30,c=1,t=38,pt=7,l=5,sg=0:6.32
20/04/2020 21:37:16 RX 28669 GWT:TPC:IP=192.168.1.96
20/04/2020 21:37:16 ERROR ErrorFlag=255, Msg=28669 GWT:TPC:IP=192.168.1.96
I'm sure I'm doing something fundamentally wrong as all the posts I see no one seems to have a problem connected to the gateway. I'm using version 2.3.2 of the mysensors software with some nodes using 2.3.0.
Can some one please give me a clue as to how to connect to the gateway via ethernet or point me in the right direction, is the port I should use different to the default? I would like to expand my MySensors from the existing 6 nodes (Uno and Nano, all working fine with Home Assistant) and thus think the MYSController software will be really helpful.
Thanks.
@andy5211d Sorted. After trying to use different versions and combinations of the various files nothing made any difference; it had to be an issue with the include file to drive the Ethernet module. I discovered the default configuration for a new Ardunio IDE install uses includes from a different location compared to my original software build. Thus the Ethernet.h file was the default Ardunio sketch not the one for the SAMD board included in MySensors and as suspected the Ethernet module was not being communicated with.
Using the verbose options for the compiler in the IDE preferences it is possible to see which 'includes' are used. So far I have not been able to 'drive' the compiler to use specific locations and the description of how and the order of Library preference is not that clear to me. There are now IDE warnings about nRF5 but as I don't use nRF5's its not important, these are different issues though.
Hi I have exactly the same problem but now using the latest IDE environment and MySensors build. Did you manage to find out what was causing the issue? In my set-up seems like the ethernet module is not communication with the rest of the hardware.
Fixed. The IDE was using the incorrect Ethernet library after a clean install of the Arduino IDE.
SenseBender MQTT Ethernet Gateway - Ethernet stopped working with latest software build.
Using the hardware with nRF24 radio from Itead and has been working for over 6 months. Came to add some local sensors and using the latest versions of all the software will not work with the Ethernet board. From the diagnostic data seems the software does not see the Ethernet board, which is the W5100 module from Itead. Diagnostic shows the IP to be 0.0.0.0 if fixed defined or if using DHCP 'No DHCP' found. Purchased a new set of hardware from Itead as I thought I had damaged the board but exactly the same problem. Using the same hardware and loading the serial gateway software, the unit works correctly so seems something has changes in the Ethernet board driver part of the software over the last 6 months. I do not remember what the versions of the software was that worked, unfortunately!
None of the Ethernet test software works either so must be a driver issue. Anyone with suggestions please?