USBTTT0 change to USBTTY1

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

Post Reply
Pik
Starting Member
Starting Member
Posts: 33
Joined: Sun Apr 13, 2014 2:14 pm

USBTTT0 change to USBTTY1

Post by Pik »

Something strange today : at 7:00 am, my RPI was working with its RFXCom on ttyUSB0.
DOMOTIGA switched lights On and later, ~7:30 am, no more actions (RX/TX).
I double checked with Putty "dmesg" and I can see port changed from ttyUSB0 to ttyUSB1 !!!
I checked wih RFXcmd if RFXcom is well receiving signals on USB1 => Yes I confirm dmesg information.

So, of course, my DOMOTIGA stop to read and to send signal in such situation.
I changed my DOMOTIGA setup to ttyUSB1 => working fine.

Do you know why this port changed to USB1 ? How to avoid this trouble (locking on USB0 or making possible DOMOTIGA to switch to USB1 if USB0 not used) ?
That's the first time I see this trouble !

:?:
Pik
Starting Member
Starting Member
Posts: 33
Joined: Sun Apr 13, 2014 2:14 pm

Re: USBTTT0 change to USBTTY1

Post by Pik »

An update to my post : I found a procedure in DOMOTIGA installation topic in order to avoid this trouble creating a symlink.
I tried it yesterday evening : it's working (in harware point of view)... I explain :

I created a symlink "ttyUSBrfxcom" equal to ttyUSB0 or ttyUSB1.
Using dmesg, I can see my RFXcom on usb0 and in DOMOTIGA , my configuration on "ttyUSBrfxcom" working.

I unplug/plug my RFXCom, checking with dmesg, I see now ttyUSB1 for RFXCom.
DOMOTIGA is not running even if using ttyUSBrfxcom.
I just stop DOMOTIGA and reboot it again : it's working.
So, my "ttyUSBrfxcom" symlink seems to work, but not in DOMOTIGA... is there a parameter to allow DOMOTIGA to refresh port in case of signal lost on USB Port ?

Thanks for your help.

Best regards.
raymonvdm
Senior Member
Senior Member
Posts: 1153
Joined: Sun Dec 18, 2011 1:23 am

Re: USBTTT0 change to USBTTY1

Post by raymonvdm »

This only occurs when your device is re-deteced (Plugged/Unplugged) or maybe the driver crashed or a hardware issue occured

Are u using RaspberryPI ?
Running HS3PRO on PC with Z-Wave / OpenTherm / Plugwise / RFXcom / MQTT / XAP400 / Logitech Media Server and Squeezelite on PI`s
Pik
Starting Member
Starting Member
Posts: 33
Joined: Sun Apr 13, 2014 2:14 pm

Re: USBTTT0 change to USBTTY1

Post by Pik »

YEs, RPI user.
In fact, sometimes, I find DOMOTIGA locked (not reading, not sending signal). Checking RFXCom link, I found ttyUSB changed to ttyUSB1.
So, I created this symlink and as descrribed in forums, to check if this is working, I unplug/plug RFXCom and through dmesg, I can see ttyUSB0 changed to ttyUSB1.
In DOMOTIGA Interface menu for RFXCom, my interface is on my symlink "ttyUSBrfxcom". But, when I unplug/plug RFXCom, DOMOTIGA lose RFXCom - DOMOTIGA don't re-detect RFXCom. If I reboot DOMOTIGA, it's working. So, DOMOTIGA can find RFXCom through symlink but can't refresh the ink if lost.

Thanks for your help.
Pik
Starting Member
Starting Member
Posts: 33
Joined: Sun Apr 13, 2014 2:14 pm

Re: USBTTT0 change to USBTTY1

Post by Pik »

I changed RFXCom address to /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A9XH00KF-if00-port0
This works fine and always pointing to good port. But, when a short cut or for unknow reason RFXCom is rebooting, DOMOTIGA can't recover function => Stop to read or send signal.
If I just open Inetrface menu and I switch Off/On "enabled" box, DOMOTIGIGA is running back.

Should it be possible, when DOMTOIGA lose the RFXCom to launch a search function to reconnect RFXCom ?
(I tried with symlink and same result).

Regards.
Borgso
Starting Member
Starting Member
Posts: 5
Joined: Thu Nov 21, 2013 4:24 pm

Re: USBTTT0 change to USBTTY1

Post by Borgso »

Pik is correct.

On boot its first come, first served what USBTTY number they get.
And its not fixed what devices get detected first by the usb controller.

To find the your correct path, logon shell and type "ls -ld /dev/serial/by-id/*" and you will see something like this:

Code: Select all

$ ls -ld /dev/serial/by-id/*
lrwxrwxrwx 1 root root 13 Apr  9 22:28 /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AH01xxxx-if00-port0 -> ../../ttyUSB1
lrwxrwxrwx 1 root root 13 Apr  9 22:28 /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1Xxxxxx-if00-port0 -> ../../ttyUSB0
Note: Pik examples use "/dev/serial/by-id/usb-RFXCOM_RFXtrx433_A9XH00KF-if00-port0", here "A9XH00KF" is serialnumber on his device..

This will atleast make sure you have the same path to your device on every boot.
If you reconnect device after booted, you may need to disable/enable device in domotiga.
Pik
Starting Member
Starting Member
Posts: 33
Joined: Sun Apr 13, 2014 2:14 pm

Re: USBTTT0 change to USBTTY1

Post by Pik »

Hello,

My RPI change USB port from ttyUSB0 to ttyUSB1. I have an idea about this trouble but not yet 100% sure : I have a small LCD screen closed to RPI and I think this is generating RF signal witch interfer with RPI and generating a RFXCom reboot..
Since 24 Hrs, I switch off this screen and no more trouble.
If it's the case, I will design an EMI box to protect RPI.

Anyway, if for an undefined reason RFXCom has to reboot, it could be nice for DOMOTUGA to recover RXCom function without the need to reboot RPI... but easy to say, not so easy maybe to do...

Anyway, I keep this post open until I confirm this hypothesis....

Best regards.
Pik
Starting Member
Starting Member
Posts: 33
Joined: Sun Apr 13, 2014 2:14 pm

Re: USBTTT0 change to USBTTY1

Post by Pik »

Hello,

After 24 hrs working fine, just few minutes after to write the post, I got again a ttyUSB change.
My hypothesis to have a RF signal which interfer with RPI is wrong.
Now, I'lll try something else : to use ttyUSB1 with Wifi Dongle. So, if RFXCom is lost for un unknown reason, it should be coming back on same port... I hope !

I found in other forum this kind of trouble could be due to data from/to RFXCom not finalized and if RPI try to send or read when RFXCom is still running, this can generate a cut in USB Port...

I keep in touch ...
Borgso
Starting Member
Starting Member
Posts: 5
Joined: Thu Nov 21, 2013 4:24 pm

Re: USBTTT0 change to USBTTY1

Post by Borgso »

Do you have a powered USB hub or is RFXCom inserted directly into your RPI?
If you do not use powered USB hub, thats your problem.
RPI does not give enough power to USB devices.

Also make sure your RPI is powered with a good 5V minimum 1A power, recommended +2A power.
Pik
Starting Member
Starting Member
Posts: 33
Joined: Sun Apr 13, 2014 2:14 pm

Re: USBTTT0 change to USBTTY1

Post by Pik »

Yes, I have a PiHub.
I changed cable from RPI to RFXCom using a shorter length... I'm checking...
Borgso
Starting Member
Starting Member
Posts: 5
Joined: Thu Nov 21, 2013 4:24 pm

Re: USBTTT0 change to USBTTY1

Post by Borgso »

Im abit confused, you changed the cable from RPI to RFXCom?
Do you mean "RPI USB -> PiHub USB -> RFXCom USB" or are you using the PiHub as PSU only and "RPI USB -> RFXCom USB"?
Pik
Starting Member
Starting Member
Posts: 33
Joined: Sun Apr 13, 2014 2:14 pm

Re: USBTTT0 change to USBTTY1

Post by Pik »

Hello,

Sorry for delay to give answer... little bit busy last few days.
Yes, I change USB cable from RFXCom to PiHub (cable provided by RFXCOM company).
Now, I use a short one (5 cm) and since 48 hrs, no trouble. I have to check for again 3 to 5 days and if no trouble, I'll consider this trouble solved.

Within few days, I'll give a final result
Pik
Starting Member
Starting Member
Posts: 33
Joined: Sun Apr 13, 2014 2:14 pm

Re: USBTTT0 change to USBTTY1

Post by Pik »

Hello,

One week working with this short USB cable and until now, no more trouble.
:) :) :)

So, I estimate I can close the post.

Have a great day !
Post Reply

Return to “DomotiGa Forum”