Weewx on OpenWrt doesn't work with Davis Envoy

64 views
Skip to first unread message

Владислав Торговцев

unread,
Oct 22, 2020, 8:58:09 AM10/22/20
to weewx-user

Hello. I have OpenWrt device with installed Openwrt. It works with Vantage pro 2 Console and Vantage vue Console, But doesn't work with Davis Envoy(6316). I get an error: "weewx.WakeupError: Unable to wake up Vantage console". I have already installed pySerial package, it doesn't help.
In other thread(#293, GitHub) i found this test script:

import serial 
port = serial.Serial("/dev/ttyUSB0", 19200) 

port.write("WRD" + chr(0x12) + chr(0x4d) + "\n") 

ack = port.read() 
if ack != chr(0x06): 
 print "Unable to get ACK. Got %d instead." % ack 

htype = port.read() 

print "Hardware type is %d" % htype 
port.close()

But she stops at the line: "ack = port.read()" , it cannot run line, however it doesn't show me any errors, it just hangs.

Envoy use USB data logger and have this name in system - /dev/ttyUSB0
someone faced this problem, or can help with any advice?
Thanks in advance to everyone!

Tom Keffer

unread,
Oct 22, 2020, 10:57:34 AM10/22/20
to weewx-user
Things to try:

1. Are you sure the port is /dev/ttyUSB0 under OpenWrt?

2. Make sure the baud rate is correct. Perhaps your Envoy expects something other than 19,200?

3. Make sure nothing else is claiming port /dev/ttyUSB0. If you have the utility 'lsof', you can check this with the command:

lsof /dev/ttyUSB0

4. If your version of Openwrt has something like minicom, you can perform a connectivity test. See the section Establishing connectivity in the wiki for how to do this. This also allows you to check the baud rate.

5. This is not the problem, but your test program needs a small change in order to work. Change this

print "Hardware type is %d" % htype

to this

print "Hardware type is %d" % ord(htype)

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/7e8291e7-e641-468e-986e-ffe67561e77en%40googlegroups.com.

Владислав Торговцев

unread,
Oct 23, 2020, 1:50:13 PM10/23/20
to weewx-user
The problem was with the power supply to envoy.
Thanks everyone for the advice!

четверг, 22 октября 2020 г. в 17:57:34 UTC+3, tke...@gmail.com:
Reply all
Reply to author
Forward
0 new messages