Not reconnecting serial port

Moderator: leecollings

Post Reply
peerkersezuuker
Posts: 70
Joined: Monday 14 December 2015 22:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Mierlo
Contact:

Not reconnecting serial port

Post by peerkersezuuker »

I have a weird problems since i switched to mysensors 2.0, with 1.5.4 i never had this problem. (same hardware)
Domoticz seems to lose the connection to the serial gateway, and is not reconnecting.
Image
Sometimes it comes back, manny times it won't.
A restart of the system sometimes works, manny time's it dosn't.
A disconnect/reconnect of the gateway from the usb port sometimes works, manny time's it dosn't.
It is the correct port :
tree /dev Image
Sometime's it reconnects and when i try to activate a mysensor switch, boom the connection is lost.
I tried :
Switching USB ports for the gateway on my machine => nope
Different arduino gateway => nope
And now i am a little bit lost.
Off frustation a ordered the components for a ethernet gateway, but ths is still annoying, and the components will not come in before newyear is suppose :-(
I cam accros a post on the MySensors forum https://forum.mysensors.org/topic/4945/ ... -power-rpi with the same problem, but no sollution. I will cross link this post on the same thread.

I hope someone can push me in the right direction.
With regards
Peer
peerkersezuuker
Posts: 70
Joined: Monday 14 December 2015 22:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Mierlo
Contact:

Re: Not reconnecting serial port

Post by peerkersezuuker »

Almost forgot, this is the output on the serial port :

Code: Select all

root@phalanx:~# cat /dev/ttyUSB0
0;255;3;0;9;TSP:SANCHK:OK
0;255;3;0;9;TSP:MSG:READ 6-5-0 s=255,c=3,t=24,pt=1,l=1,sg=0:1
0;255;3;0;9;TSP:MSG:PINGED (ID=6, hops=1)
0;255;3;0;9;TSP:MSG:SEND 0-0-5-6 s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=ok:1
0;255;3;0;9;TSP:MSG:READ 6-5-0 s=1,c=2,t=41,pt=0,l=0,sg=0:
6;1;2;0;41;
0;255;3;0;9;TSP:MSG:READ 6-5-0 s=255,c=3,t=15,pt=6,l=2,sg=0:0100
0;255;3;0;9;TSP:MSG:SEND 0-0-5-6 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100
0;255;3;0;9;TSP:MSG:READ 6-5-0 s=255,c=3,t=15,pt=6,l=2,sg=0:0100
0;255;3;0;9;TSP:MSG:SEND 0-0-5-6 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100
0;255;3;0;9;TSP:MSG:READ 6-5-0 s=255,c=0,t=18,pt=0,l=5,sg=0:2.0.0
6;255;0;0;18;2.0.0
0;255;3;0;9;TSP:MSG:READ 6-5-0 s=255,c=3,t=6,pt=1,l=1,sg=0:5
6;255;3;0;6;5
0;255;3;0;9;TSP:MSG:READ 6-5-0 s=255,c=3,t=11,pt=0,l=7,sg=0:RGBW 01
6;255;3;0;11;RGBW 01
0;255;3;0;9;TSP:MSG:READ 6-5-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
6;255;3;0;12;1.0
0;255;3;0;9;TSP:MSG:READ 6-5-0 s=1,c=0,t=27,pt=0,l=7,sg=0:RGBW 01
0;255;3;0;9;TSP:MSG:ACK msg
0;255;3;0;9;TSP:MSG:SEND 0-0-5-6 s=1,c=0,t=27,pt=0,l=7,sg=0,ft=0,st=ok:RGBW 01
6;1;0;0;27;RGBW 01
0;255;3;0;9;TSP:MSG:READ 6-5-0 s=1,c=0,t=27,pt=0,l=7,sg=0:RGBW 01
0;255;3;0;9;TSP:MSG:ACK msg
0;255;3;0;9;TSP:MSG:SEND 0-0-5-6 s=1,c=0,t=27,pt=0,l=7,sg=0,ft=0,st=ok:RGBW 01
6;1;0;0;27;RGBW 01
0;255;3;0;9;TSP:MSG:READ 6-5-0 s=255,c=3,t=26,pt=1,l=1,sg=0:2
0;255;3;0;9;!TSP:MSG:SEND 0-0-5-6 s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=fail:1
0;255;3;0;9;TSP:MSG:READ 6-5-0 s=255,c=3,t=26,pt=1,l=1,sg=0:2
0;255;3;0;9;TSP:MSG:SEND 0-0-5-6 s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=ok:1
0;255;3;0;9;TSP:MSG:READ 6-5-0 s=255,c=3,t=26,pt=1,l=1,sg=0:2
0;255;3;0;9;TSP:MSG:SEND 0-0-5-6 s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=ok:1
0;255;3;0;9;TSP:MSG:READ 6-5-0 s=255,c=3,t=26,pt=1,l=1,sg=0:2
0;255;3;0;9;TSP:MSG:SEND 0-0-5-6 s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=ok:1
0;255;3;0;9;TSP:MSG:READ 6-5-0 s=255,c=3,t=26,pt=1,l=1,sg=0:2
0;255;3;0;9;TSP:MSG:SEND 0-0-5-6 s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=ok:1
0;255;3;0;9;TSP:MSG:READ 6-5-0 s=255,c=3,t=26,pt=1,l=1,sg=0:2
0;255;3;0;9;TSP:MSG:SEND 0-0-5-6 s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=ok:1
0;255;3;0;9;TSP:SANCHK:OK
0;255;3;0;9;TSP:SANCHK:OK
0;255;3;0;9;TSP:SANCHK:OK
0;255;3;0;9;TSP:SANCHK:OK
tommyken
Posts: 7
Joined: Thursday 12 March 2015 23:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Belgium
Contact:

Re: Not reconnecting serial port

Post by tommyken »

Hey ,
Just wondering, could it be a conflict with USB ports ? I mean, i saw you have a Zwave , could it be he's using same USB port as mysensors. Probably not.

Im using fixed ports.

greetings,
peerkersezuuker
Posts: 70
Joined: Monday 14 December 2015 22:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Mierlo
Contact:

Re: Not reconnecting serial port

Post by peerkersezuuker »

Hello Tommyken,
They are using different USB ports.
/dev/USB) is for the mysensors gateway, and the /dev/ACM0 is for the Zwave controller.
In the meantime i upgrade my domoticz to the latest develeopment branch V3.6235 but still no luck
tommyken
Posts: 7
Joined: Thursday 12 March 2015 23:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Belgium
Contact:

Re: Not reconnecting serial port

Post by tommyken »

I'm guessing this is the solution (however it works for me)
Domoticz with hardware : MySensors Gateway with LAN interface
sudo raspi-config
5 Interfacing Options Configure connections to peripher
P8 Remote GPIO Enable/Disable remote access to G

I hope this might be the same solution, like we mentioned before with the quotation mark.
peerkersezuuker
Posts: 70
Joined: Monday 14 December 2015 22:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Mierlo
Contact:

Re: Not reconnecting serial port

Post by peerkersezuuker »

Yes, the ethernet gateway components are bought, and underway.
But i figgured out my problem (i think)
Between meals i was tinkering arround and i noticed something..
I was running in a terminal screen with "cat /dev/ttyUSB0" to monitor the messages comming to the serial port of the mysensor gateway on my linux machine.
Between testing and a several reboots, i noticed that domiticz returned the correct values from my senosors gateway, and as soon i start in a terminal "cat /dev/ttyUSB0" it stoped and reported the questionmarks... and no response from the gateway.

So it seems that when i was listening on the serial port from the terminal the connection between domoticz and the gateway was lost. As soon as i quit the terminal session, the connection was restored.

This behaviour didn't happen with the 1.5.4. version of the gateway, so i was set on a wrong foot (allong with the different cookie :D )

So for me this solved my problem (I am still building the ethernet gateway to play with it)

The other difference between my first post about this and now is that i upgraded domoticz to V3.6235 and in the post of Tommyken viewtopic.php?f=42&t=15030 Gizmocuz suggested to leave the check box "accept new hardware" enabeled.

So it works for me now.
Happy christmas

With Regards
Peer
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest