💬 Building a Raspberry Pi Gateway
-
@mfalkvidd I could not find ttyMySensorsGateway on Domoticz. Only ttyUSB0, ttyUSB20 and ttyAMA0. Even after I did ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway
-
I wanna update not to re install of MySensors. I thought about something like ./updaterelease or ./updatebeta... I spend hours of make it work before, so I leave it as it is. No time or nerves for fighting next couple of days.
@Oli I´m thinking is hard to "only" update (changing from develop to master branch) directly from github if the repository is not been previously prepared to do this kind of updates... but maybe I´m wrong.
Will be good you give feedback if you get it.
Cheers
-
@mfalkvidd hah... thats a good question, don't know. After dozen or more reinstallations, spending hours on Google I finally make it work. Got some notes but frankly I am worrying it will happen again. Hahaha
-
@mfalkvidd hah... thats a good question, don't know. After dozen or more reinstallations, spending hours on Google I finally make it work. Got some notes but frankly I am worrying it will happen again. Hahaha
-
@Oli I´m thinking is hard to "only" update (changing from develop to master branch) directly from github if the repository is not been previously prepared to do this kind of updates... but maybe I´m wrong.
Will be good you give feedback if you get it.
Cheers
@Oli :-) :-)
Good !
I like when people can make something work that nobody even knows what it is :-)For me it usually happens just the opposite I am not able to make work even the things I know perfectly well ... maybe it will be a matter of "bad karma" :-)
-
OK, I did it, I f....g did it, and guess what...
s...t happened again.
Everything went as it should, no errors at all, but no ttyUSBMySensorsGateway...

log error message:
2017-01-03 19:56:38.784 MySensors: Using serial port: /dev/ttyUSBMySensorsGateway
2017-01-03 19:56:38.785 Error: MySensors: Error opening serial port!
2017-01-03 19:56:39.785 MySensors: retrying in 30 seconds...and again...
and again...
...any help would be appreciated.
-
Hello,
Could someone answer: if i have RPi NRF24 GW, how I could connect MYSController from other computer (for example from Windows computer)?
- Is it possible to make that type connection with RPi NRF24 GW?
- May I use some integrated web server for this type of connection in RPi to make it work? Is there are easier solutions?
EDIT: no matter, already answered it by myself :)
Its easy becose it's like Ethernet GW. -
OK, I did it, I f....g did it, and guess what...
s...t happened again.
Everything went as it should, no errors at all, but no ttyUSBMySensorsGateway...

log error message:
2017-01-03 19:56:38.784 MySensors: Using serial port: /dev/ttyUSBMySensorsGateway
2017-01-03 19:56:38.785 Error: MySensors: Error opening serial port!
2017-01-03 19:56:39.785 MySensors: retrying in 30 seconds...and again...
and again...
...any help would be appreciated.
@Oli: when you do a "ls /dev" is ttyUSBMySensorsGateway shown ?
-
@Oli: when you do a "ls /dev" is ttyUSBMySensorsGateway shown ?
@Oli: by the way, the name of the port you used is ttyMySensorsGateway, not ttyUSBMySensorsGateway:
@mfalkvidd I could not find ttyMySensorsGateway on Domoticz. Only ttyUSB0, ttyUSB20 and ttyAMA0. Even after I did ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway
Is the gateway running, ie, "ps -ef "grep my" shows a process there ?
Cheers,
Luiz
-
@Oli: by the way, the name of the port you used is ttyMySensorsGateway, not ttyUSBMySensorsGateway:
@mfalkvidd I could not find ttyMySensorsGateway on Domoticz. Only ttyUSB0, ttyUSB20 and ttyAMA0. Even after I did ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway
Is the gateway running, ie, "ps -ef "grep my" shows a process there ?
Cheers,
Luiz
@Oli: sorry, correct syntax is ps -ef | grep my
-
@Oli: sorry, correct syntax is ps -ef | grep my
@luizrrocha
pi@raspberrypi ~ $ ls /devautofs mmcblk0p1 stderr tty36 ttyAMA0
block mmcblk0p2 stdin tty37 ttyMySensorsGateway
btrfs-control net stdout tty38 ttyprintk
bus network_latency tty tty39 ttyUSB0
cachefiles network_throughput tty0 tty4 ttyUSB20
char null tty1 tty40 uhid
console ppp tty10 tty41 uinput
cpu_dma_latency ptmx tty11 tty42 urandom
cuse pts tty12 tty43 vc-cma
disk ram0 tty13 tty44 vchiq
fb0 ram1 tty14 tty45 vcio
fd ram10 tty15 tty46 vc-mem
full ram11 tty16 tty47 vcs
fuse ram12 tty17 tty48 vcs1
gpiomem ram13 tty18 tty49 vcs2
hwrng ram14 tty19 tty5 vcs3
i2c-1 ram15 tty2 tty50 vcs4
input ram2 tty20 tty51 vcs5
kmsg ram3 tty21 tty52 vcs6
log ram4 tty22 tty53 vcsa
loop0 ram5 tty23 tty54 vcsa1
loop1 ram6 tty24 tty55 vcsa2
loop2 ram7 tty25 tty56 vcsa3
loop3 ram8 tty26 tty57 vcsa4
loop4 ram9 tty27 tty58 vcsa5
loop5 random tty28 tty59 vcsa6
loop6 raw tty29 tty6 vhci
loop7 root tty3 tty60 watchdog
loop-control serial tty30 tty61 watchdog0
MAKEDEV shm tty31 tty62 xconsole
mapper snd tty32 tty63 zero
mem sndstat tty33 tty7
memory_bandwidth spidev0.0 tty34 tty8
mmcblk0 spidev0.1 tty35 tty9pi@raspberrypi ~ $ ps -ef | grep my
root 2079 1 1 18:40 ? 00:02:49 /usr/local/bin/mysgw -b
pi 4214 4181 0 21:25 pts/2 00:00:00 grep --color=auto my -
@luizrrocha
pi@raspberrypi ~ $ ls /devautofs mmcblk0p1 stderr tty36 ttyAMA0
block mmcblk0p2 stdin tty37 ttyMySensorsGateway
btrfs-control net stdout tty38 ttyprintk
bus network_latency tty tty39 ttyUSB0
cachefiles network_throughput tty0 tty4 ttyUSB20
char null tty1 tty40 uhid
console ppp tty10 tty41 uinput
cpu_dma_latency ptmx tty11 tty42 urandom
cuse pts tty12 tty43 vc-cma
disk ram0 tty13 tty44 vchiq
fb0 ram1 tty14 tty45 vcio
fd ram10 tty15 tty46 vc-mem
full ram11 tty16 tty47 vcs
fuse ram12 tty17 tty48 vcs1
gpiomem ram13 tty18 tty49 vcs2
hwrng ram14 tty19 tty5 vcs3
i2c-1 ram15 tty2 tty50 vcs4
input ram2 tty20 tty51 vcs5
kmsg ram3 tty21 tty52 vcs6
log ram4 tty22 tty53 vcsa
loop0 ram5 tty23 tty54 vcsa1
loop1 ram6 tty24 tty55 vcsa2
loop2 ram7 tty25 tty56 vcsa3
loop3 ram8 tty26 tty57 vcsa4
loop4 ram9 tty27 tty58 vcsa5
loop5 random tty28 tty59 vcsa6
loop6 raw tty29 tty6 vhci
loop7 root tty3 tty60 watchdog
loop-control serial tty30 tty61 watchdog0
MAKEDEV shm tty31 tty62 xconsole
mapper snd tty32 tty63 zero
mem sndstat tty33 tty7
memory_bandwidth spidev0.0 tty34 tty8
mmcblk0 spidev0.1 tty35 tty9pi@raspberrypi ~ $ ps -ef | grep my
root 2079 1 1 18:40 ? 00:02:49 /usr/local/bin/mysgw -b
pi 4214 4181 0 21:25 pts/2 00:00:00 grep --color=auto my@Oli : the port name is actually ttyMySensorsGateway, you have to correct the definition of the gateway on Domoticz to use it....
Luiz
-
Hello,
Could someone answer: if i have RPi NRF24 GW, how I could connect MYSController from other computer (for example from Windows computer)?
- Is it possible to make that type connection with RPi NRF24 GW?
- May I use some integrated web server for this type of connection in RPi to make it work? Is there are easier solutions?
EDIT: no matter, already answered it by myself :)
Its easy becose it's like Ethernet GW.@jacikaas : on MYSController go to Settings -> Gateway -> TCP/IP and add the IP address of the Gateway and use port 5003. It works even if the gateway is feeding data to Domoticz, so you can monitor your sensors in "raw" mode.
Cheers,
Luiz
-
@Oli : the port name is actually ttyMySensorsGateway, you have to correct the definition of the gateway on Domoticz to use it....
Luiz
@luizrrocha as You can see, on the picture above, I've wrote that ttyUSBMySensors.... is from my previous backup copy. On the same pictures You can also see that I can choose only from three serial ports: USB0, USB20 and AMA0. Thera are no ttyMySensorsGateway despite that it is present after ls /dev.
And that's the problem, I dont know how to make it present in the serial ports popup menu. -
@luizrrocha as You can see, on the picture above, I've wrote that ttyUSBMySensors.... is from my previous backup copy. On the same pictures You can also see that I can choose only from three serial ports: USB0, USB20 and AMA0. Thera are no ttyMySensorsGateway despite that it is present after ls /dev.
And that's the problem, I dont know how to make it present in the serial ports popup menu.@Oli : why not remove the old definition to avoid any trash information and restarting Domoticz to make shure it rereads the port info before creating the new entry ?
And I do not understand why if you are running domoticz and the gateway on the same Pi, why not use a ethernet gateway and set 127.0.0.1 and port 5003 on the Domoticz gateway entry. I did that and never had to worry about USB ports at all.
-
@Oli : why not remove the old definition to avoid any trash information and restarting Domoticz to make shure it rereads the port info before creating the new entry ?
And I do not understand why if you are running domoticz and the gateway on the same Pi, why not use a ethernet gateway and set 127.0.0.1 and port 5003 on the Domoticz gateway entry. I did that and never had to worry about USB ports at all.
@luizrrocha said:
@Oli : why not remove the old definition to avoid any trash information and restarting Domoticz to make shure it rereads the port info before creating the new entry ?
Of course I did that, I started from the scratch... but when it did not work I try to restore my backup... but it did not work also...
@luizrrocha said:
And I do not understand why if you are running domoticz and the gateway on the same Pi, why not use a ethernet gateway and set 127.0.0.1 and port 5003 on the Domoticz gateway entry. I did that and never had to worry about USB ports at all.
simple... I have no free LAN on my rotuer... there is more, I also have raZberry daughter board (Z-Wave) connected to same Raspberry Pi GPIO port. And till today everything works perfect until... "Better is the enemy of the good" ;-)
-
OK I found the solution (thanks to @luizrrocha). I change
./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway
to
./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSBMySensorsGateway and now its working.Question is, It's only workaround (in my case) or there is bug in the installation guide?
-
OK I found the solution (thanks to @luizrrocha). I change
./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway
to
./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSBMySensorsGateway and now its working.Question is, It's only workaround (in my case) or there is bug in the installation guide?
@Oli : if both the gateway and Domoticz run on the same Raspi, there is no physical network involved, hence the 127.0.0.1 dummy local address is used by Domoticz to talk to the gateway on the same machine, just using port 5003... and since you use localhost (127.0.0.1, a virtual network) there is no need to create a virtual USB port which is what you did...
-
@Oli : if both the gateway and Domoticz run on the same Raspi, there is no physical network involved, hence the 127.0.0.1 dummy local address is used by Domoticz to talk to the gateway on the same machine, just using port 5003... and since you use localhost (127.0.0.1, a virtual network) there is no need to create a virtual USB port which is what you did...
@luizrrocha interesting... step by step instruction?
-
@luizrrocha interesting... step by step instruction?
@Oli: delete the Makefile.inc file on mysensors folder
./configure --my-gateway=ethernet
make
sudo ./bin/mysgw -b
go to domoticz and create a new MySensors Gateway with LAN, inform 127.0.0.1 as the address and 5003 as the port...that should do the trick.