MySensors Raspberry port suggestions
-
- routing problems?
Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:READ,1-1-255,s=255,c=3,t=7,pt=0,l=0,sg=0: Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:BC Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:FPAR REQ,ID=1 Aug 22 09:02:16 pi mysGateway[22785]: TSF:CHKUPL:OK,FCTRL Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:GWL OK Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:READ,3-3-255,s=255,c=3,t=7,pt=0,l=0,sg=0: Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:BC Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:FPAR REQ,ID=3 Aug 22 09:02:16 pi mysGateway[22785]: TSF:CHKUPL:OK,FCTRL Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:GWL OK Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:SEND,0-0-3-3,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0: Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:BC Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:FPAR REQ,ID=2 Aug 22 09:02:16 pi mysGateway[22785]: TSF:CHKUPL:OK,FCTRL Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:GWL OK Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0: Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:BC Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:FPAR REQ,ID=2 Aug 22 09:02:16 pi mysGateway[22785]: TSF:CHKUPL:OK,FCTRL Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:GWL OK Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:READ,1-1-255,s=255,c=3,t=7,pt=0,l=0,sg=0: Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:BC Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:FPAR REQ,ID=1 Aug 22 09:02:16 pi mysGateway[22785]: TSF:CHKUPL:OK,FCTRL Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:GWL OK Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:READ,3-3-255,s=255,c=3,t=7,pt=0,l=0,sg=0: Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:BC Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:FPAR REQ,ID=3 Aug 22 09:02:16 pi mysGateway[22785]: TSF:CHKUPL:OK,FCTRL Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:GWL OK Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:SEND,0-0-3-3,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0: Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:BC Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:FPAR REQ,ID=2 Aug 22 09:02:16 pi mysGateway[22785]: TSF:CHKUPL:OK,FCTRL Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:GWL OK Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:READ,3-3-255,s=255,c=3,t=7,pt=0,l=0,sg=0: Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:BC Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:FPAR REQ,ID=3 Aug 22 09:02:16 pi mysGateway[22785]: TSF:CHKUPL:OK,FCTRL Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:GWL OK Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:SEND,0-0-3-3,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0: Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:BC Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:FPAR REQ,ID=2 Aug 22 09:02:16 pi mysGateway[22785]: TSF:CHKUPL:OK,FCTRL Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:GWL OK Aug 22 09:02:16 pi mysGateway[22785]: TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0@b0rmann Fixed a bug with the config file. Please remove your MySensorGateway.cfg and let the gateway re-create it.
Also the default config file name was changed to /etc/mysensors.datFor the routing problem, do you have the output from the nodes that are communicating with the gateway?
-
@b0rmann Fixed a bug with the config file. Please remove your MySensorGateway.cfg and let the gateway re-create it.
Also the default config file name was changed to /etc/mysensors.datFor the routing problem, do you have the output from the nodes that are communicating with the gateway?
it was not a problem with the routing, but the powering nrf24 from 3v3 rpi output. It solved a separate power source
-
I'm trying to get this to work, and it looked good. But after a day of running my Pi3 with Domoticz stopped answering to anything. Couldn't even connect with SSH.
So now I need to start to troubleshoot. But I wonder if mysGateway produces a log somewhere? And where can I find the MySensorGateway.cfg? It is not in /tmp.After restart of the Pi3 I always get a error from Domoticz about not being able to send the command, although it does get through anyway.
Don't know if mysGateway is the problem, but I need to gather all the logs I can find to figure it out. -
@raptorjr MySensorGateway.cfg was renamed to mysensors.dat in the last version. The default directory that the gateway keeps the file is /etc. The file is used mostly to keep the nodes routes, so you won't find anything useful there. Which linux distro/version you're using in your RPi?
-
@raptorjr MySensorGateway.cfg was renamed to mysensors.dat in the last version. The default directory that the gateway keeps the file is /etc. The file is used mostly to keep the nodes routes, so you won't find anything useful there. Which linux distro/version you're using in your RPi?
Thank you. I thought that the .cfg file contained some information about a log file, but now I know it's purpose =)
I'm using a SD card image I found at the Domoticz site, preinstalled with Domoticz.
Linux raspberrypi 4.1.18-v7+ #846 SMP Thu Feb 25 14:22:53 GMT 2016 armv7l GNU/Linux
The problem could be with Domoticz also, but since I thought that mysGateway is still kind of beta I would start to look for the problem there.
Now I found a entry in the Domoticz error log:
2016-08-26 19:31:00.663 Error: Gateway hardware (4) thread seems to have ended unexpectedlySo it seems that something maybe happened with the mysController. Maybe not died, but stopped answering and locking the whole Pi?
Or if that error refers to some internal Domoticz gateway thread. -
@raptorjr you could try to pipe the gateway output to a file starting it manually:
sudo mysGateway &> /tmp/mysensors.log & -
Would it be possible to enable both the Serial and Ethernet communication at the same time in the gateway? I'm about to try PiDome as a controller. And it seems that it only have support for Serial gateway. But the Ethernet gateway is so practical to use when I need to debug and use MYScontroller to connect and see what is happening. Or if I would like to try OTA updates of my nodes.
-
Would it be possible to enable both the Serial and Ethernet communication at the same time in the gateway? I'm about to try PiDome as a controller. And it seems that it only have support for Serial gateway. But the Ethernet gateway is so practical to use when I need to debug and use MYScontroller to connect and see what is happening. Or if I would like to try OTA updates of my nodes.
@raptorjr some people have used nodered to "split" the communication to more than one controller. NodeRed has the ability to prevent certain types of messages. If two controllers are connected to the same gateway without filtering, both controllers will respond which might be very confusing for the node.
https://forum.mysensors.org/topic/4112/is-it-possible-to-connect-an-ethernet-gateway-to-node-red-and-share-it/ is a pretty good place to start
-
@raptorjr some people have used nodered to "split" the communication to more than one controller. NodeRed has the ability to prevent certain types of messages. If two controllers are connected to the same gateway without filtering, both controllers will respond which might be very confusing for the node.
https://forum.mysensors.org/topic/4112/is-it-possible-to-connect-an-ethernet-gateway-to-node-red-and-share-it/ is a pretty good place to start
Thank you. Maybe I should just try out PiDome first with serial gateway =)
But anyway, I thought that mysGateway would create something like /dev/ttyMySensorsGateway that I could then use, or ln to something like ttyUSB20, and add it in PiDome.
But after compiling and installing mysGateway with serial support I only get a a error "Unable to open the serial port /dev/ttyUSB0". Am I thinking the wrong way? Isn't mysGateway supposed to work like the old Raspberry MySensors gateway?
-
Thank you. Maybe I should just try out PiDome first with serial gateway =)
But anyway, I thought that mysGateway would create something like /dev/ttyMySensorsGateway that I could then use, or ln to something like ttyUSB20, and add it in PiDome.
But after compiling and installing mysGateway with serial support I only get a a error "Unable to open the serial port /dev/ttyUSB0". Am I thinking the wrong way? Isn't mysGateway supposed to work like the old Raspberry MySensors gateway?
@raptorjr Sorry, pseudo tty isn't supported. I will try to add it till the end of the day.
-
@raptorjr Sorry, pseudo tty isn't supported. I will try to add it till the end of the day.
What does the serial gateway do then? Can I use it as it is today with PiDomo and a RasberryPi? Or do I need to make a dedicated stand-alone serial gateway with a Arduino and a NRF?
-
@raptorjr
In the current state, serial gateway on RPi can only use a "real" serial port like /dev/ttyAMA0 (gpio pins) or (if an arduino is connected or a USB->Serial adapter) /dev/ttyACM0. To use PiDomo you will need to put an Arduino to the mix. -
@raptorjr
In the current state, serial gateway on RPi can only use a "real" serial port like /dev/ttyAMA0 (gpio pins) or (if an arduino is connected or a USB->Serial adapter) /dev/ttyACM0. To use PiDomo you will need to put an Arduino to the mix.Thank you. I'll have to wait for pseudo tty or for PiDome to get support for Ethernet gateway.
-
Thank you. I'll have to wait for pseudo tty or for PiDome to get support for Ethernet gateway.
@raptorjr
I think PiDome also supports MQTT Gateway. Did you try that? -
@raptorjr
I think PiDome also supports MQTT Gateway. Did you try that?I don't really understands what MQTT is and how to use it. But maybe I'll try that. Would like to see how PiDome works and if I like it better than Domoticz.
-
I don't really understands what MQTT is and how to use it. But maybe I'll try that. Would like to see how PiDome works and if I like it better than Domoticz.
@raptorjr PiDome should work now (https://forum.mysensors.org/topic/2389/added-support-for-local-mysensors-rpi-direct-radio-connection).
You need to add --my-serial-is-pty when running ./configure or uncomment the line #define MY_IS_SERIAL_PTY in mysGateway.cpp.
-
@raptorjr PiDome should work now (https://forum.mysensors.org/topic/2389/added-support-for-local-mysensors-rpi-direct-radio-connection).
You need to add --my-serial-is-pty when running ./configure or uncomment the line #define MY_IS_SERIAL_PTY in mysGateway.cpp.
Wow. That was fast work =)
Trying it now and the /dev/ttyMySensorsGateway is created. Followed the guide in the link you provided. Everything goes great until the last step. I don't see the message "Gateway startup complete". So I don't know if I have any communication between PiDome and the gateway?
I'll start reading forums and see if I can find a solution. Or if I missed something.
-
@marceloaqno I've got the MysGateway configured and built to be an MQTT Gateway. I have a node (MySensors v2.01) sending temperature, humidity and voltage data to the Gateway. Looking at the stdout on the Raspberry Pi I can see that the information is being correctly received but there seems to be a problem with the published messages. I'm getting "send: Broken pipe" messages. I've copied and pasted some of the MysGateway stdout terminal output below. Do you have any insights on what might be going wrong?
Thanks very much
Sending message on topic: MyGW2out/0/255/0/0/18
TSF:MSG:READ,20-20-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
TSF:MSG:BC
TSF:MSG:FPAR REQ,ID=20
TSF:CHKUPL:OK
TSF:MSG:GWL OK
TSF:MSG:SEND,0-0-20-20,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
TSF:MSG:READ,20-20-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
TSF:MSG:PINGED,ID=20,HP=1
TSF:MSG:SEND,0-0-20-20,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
TSF:MSG:READ,20-20-0,s=255,c=3,t=12,pt=0,l=3,sg=0:0.5
Sending message on topic: MyGW2out/20/255/3/0/12
send: Broken pipe
Attempting MQTT connection...
MQTT connected
Sending message on topic: MyGW2out/0/255/0/0/18
TSF:MSG:READ,20-20-0,s=2,c=0,t=23,pt=0,l=0,sg=0:
Sending message on topic: MyGW2out/20/2/0/0/23
TSF:MSG:READ,20-20-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
TSF:MSG:SEND,0-0-20-20,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
TSF:MSG:READ,20-20-0,s=1,c=1,t=0,pt=7,l=5,sg=0:19.9
Sending message on topic: MyGW2out/20/1/1/0/0
send: Broken pipe
Attempting MQTT connection...
MQTT connected
Sending message on topic: MyGW2out/0/255/0/0/18
TSF:MSG:READ,20-20-0,s=2,c=1,t=38,pt=7,l=5,sg=0:3319.0
Sending message on topic: MyGW2out/20/2/1/0/38
send: Broken pipe
Attempting MQTT connection...
MQTT connected
Sending message on topic: MyGW2out/0/255/0/0/18
TSF:MSG:READ,20-20-0,s=0,c=1,t=1,pt=7,l=5,sg=0:58.6
Sending message on topic: MyGW2out/20/0/1/0/1
send: Broken pipe
Attempting MQTT connection...
MQTT connected
Sending message on topic: MyGW2out/0/255/0/0/18 -
@raptorjr PiDome should work now (https://forum.mysensors.org/topic/2389/added-support-for-local-mysensors-rpi-direct-radio-connection).
You need to add --my-serial-is-pty when running ./configure or uncomment the line #define MY_IS_SERIAL_PTY in mysGateway.cpp.
I think there may be a memory leak in the gateway. While using it as a ethernet gateway I loose about 100Mb every day, if my only node is turned on. After a few days I can't even login with SSH and need to remove the power to my Pi3 to reboot it.
If I turn off my node, memory usage is normal. So it seems to have something to to when messages is received/transmitted. Is there anything I can do to get more details where the problem could be?
I'm using the image from Domoticz where everything is installed, and have only added mysGateway.