💬 MYSController
-
@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 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.
@andy5211d this is good news! I'm going to take a look at HA's direct access. I hope it works, I really would like the remote programming.
-
So is there a gateway where it also possible to use the serial connection for Home Assistant and the IP connection for mysensors?
-
@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.
-
I think
#define MY_GATEWAY_MAX_CLIENTS 2will allow 2 controllers to connect to the gateway. But be aware that strange things may happen if two controllers are used. For example, if a node requests a node ID, and two controllers respond with different IDs.
-
'
@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. -
'
@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.@andy5211d great that it worked.
I found it in the wifi gateway example, https://www.mysensors.org/build/esp8266_gateway
It is also listed on https://www.mysensors.org/apidocs/group__GatewaySettingGrpPub.html#gab307cf122e775d3bfc241195cd552a3f -
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...
-
Does anyone have a copy of MYSController they can share? The link to a dropbox folder says the folder is no longer available.
I'm trying to test out a new gateway device and it would make it a lot simpler to use MYSController that to start integrating it into my infrastructure.
-
Does anyone have a copy of MYSController they can share? The link to a dropbox folder says the folder is no longer available.
I'm trying to test out a new gateway device and it would make it a lot simpler to use MYSController that to start integrating it into my infrastructure.
-
@jkandasa Thanks!