emonhub /dev/ttyUSB0 switching /dev/ttyUSB1

Hi,

After upgrading my Ubuntu server from oem_gate to emonhub I see that my /dev/ttyUSB0 jeelink v3c is switching from time to time to /dev/ttyUSB1 causing my emonhub.conf to be wrong.  Once I reconfigure emonhub.conf the set-up is working again...until...it switches back to /dev/ttyUSB0 again.  So how do I stop ttyUSB0/1 from switching in Linux/Ubuntu so my config emonhub.conf can stay the same.  Strangely I never had this problem before with oem_gate.  That set-up was running for more than 2 years but it all started with the use of emonhub....strange...

So all help welcome...

TrystanLea's picture

Re: emonhub /dev/ttyUSB0 switching /dev/ttyUSB1

Im not sure about this, I dont think there should be any difference in the way its selected, could it be a temperamental physical connection issue? This might be useful I havent tried it myself http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/

pb66's picture

Re: emonhub /dev/ttyUSB0 switching /dev/ttyUSB1

Also just as an addition to Trystan's points,

Do you have more than one usb device connected (ie both the JeeLink and JeeNode)? Due to the way the OS assigns the refs dynamically, there is no guarantee which order they will get numbered at boot.

This is a big issue for Pi's booting to hdd when they have any other usb device connected at boot and is the reason the uuid is used rather than the assigned ref in fstab and cmdline.txt.

The persistent ref for your jeelink would be highly advisable. I cannot vouch for the guide Trystan has linked to, but the idea of a persistent usb ref is a must unless you only ever have one device connected, the connection is 100% sound and you never remove/refit it on the live system, only when shut down.

Paul  

hschroyen's picture

Re: emonhub /dev/ttyUSB0 switching /dev/ttyUSB1

Hello both,

See my other topic on http://openenergymonitor.org/emon/node/11851 .

It looks stable now.  I think that due to the fact that I used a wrong interfacer the operating system was always resetting the port for some reason.  After reinstalling emonhub RC1.2 and configuring it with the correct interfacer it is now stable (2 days) So I will further monitor it but I think this is solved now.

Herbert

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.