It's definitely the driver. It looks like Matthew never finished the port to Python 3.
On Mon, Oct 12, 2020 at 2:36 AM Erik Finskas <[email protected]> wrote: > Hi all. > > Followed up this thread to fix the WXT5x0 driver from GitHub and got bit > forward but got jammed to another issue, apparently something to do with > python3 (?) > Running Ubuntu server 20.04.1 LTS > > Startup log looks like this; > Oct 12 12:30:51 PusulaServer systemd[1]: Starting LSB: weewx weather > system... > Oct 12 12:30:51 PusulaServer weewx[4672]: * Starting weewx weather system > weewx > Oct 12 12:30:51 PusulaServer weewx[4684] INFO __main__: Initializing weewx > version 4.1.1 > Oct 12 12:30:51 PusulaServer weewx[4684] INFO __main__: Using Python 3.8.5 > (default, Jul 28 2020, 12:59:40) #012[GCC 9.3.0] > Oct 12 12:30:51 PusulaServer weewx[4684] INFO __main__: Platform > Linux-5.4.0-48-generic-x86_64-with-glibc2.29 > Oct 12 12:30:51 PusulaServer weewx[4684] INFO __main__: Locale is > 'en_US.UTF-8' > Oct 12 12:30:51 PusulaServer weewx[4684] INFO __main__: PID file is > /var/run/weewx.pid > Oct 12 12:30:51 PusulaServer weewx[4687] INFO __main__: Using > configuration file /etc/weewx/weewx.conf > Oct 12 12:30:51 PusulaServer weewx[4687] INFO __main__: Debug is 0 > Oct 12 12:30:51 PusulaServer weewx[4687] INFO weewx.engine: Loading > station type WXT5x0 (user.wxt5x0) > Oct 12 12:30:51 PusulaServer weewx[4672]: ...done. > Oct 12 12:30:51 PusulaServer systemd[1]: Started LSB: weewx weather system. > Oct 12 12:30:51 PusulaServer weewx[4687] INFO user.wxt5x0: driver version > is 0.5 > ... > Oct 12 12:30:51 PusulaServer weewx[4687] INFO weewx.engine: Starting main > packet loop. > Oct 12 12:30:51 PusulaServer weewx[4687] INFO weewx.engine: Main loop > exiting. Shutting engine down. > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: Caught > unrecoverable exception: > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > unicode strings are not supported, please encode to bytes: '0R0\r\n' > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > Traceback (most recent call last): > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > File "/usr/share/weewx/weewxd", line 154, in main > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > engine.run() > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > File "/usr/share/weewx/weewx/engine.py", line 188, in run > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > for packet in self.console.genLoopPackets(): > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > File "/usr/share/weewx/user/wxt5x0.py", line 483, in genLoopPackets > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > raw = self._station.get_composite() > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > File "/usr/share/weewx/user/wxt5x0.py", line 202, in get_composite > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > return self.get_data('R0') > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > File "/usr/share/weewx/user/wxt5x0.py", line 155, in get_data > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > self.send_cmd(cmd) > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > File "/usr/share/weewx/user/wxt5x0.py", line 149, in send_cmd > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > self.device.write(cmd) > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 532, in > write > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > d = to_bytes(data) > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > File "/usr/lib/python3/dist-packages/serial/serialutil.py", line 63, in > to_bytes > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > raise TypeError('unicode strings are not supported, please encode to bytes: > {!r}'.format(seq)) > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > TypeError: unicode strings are not supported, please encode to bytes: > '0R0\r\n' > Oct 12 12:30:51 PusulaServer weewx[4687] CRITICAL __main__: **** > Exiting. > > Any clues how to get forward? The system works OK with the simulation > driver so this might be still to do with the WXT5x0 driver. > > .. > Erik > > On Monday, 17 August 2020 at 14:13:21 UTC+3 [email protected] wrote: > >> >> Thanks! >> That got the driver running. >> >> I have another hurdle. >> I am seeing data from the device but it is in NMEA format. >> The driver is set up for serial format. So my data is not being parsed. >> >> I see a command/method defined which would >> put it in serial mode as a side effect: set_automatic_mode() >> but I don't see that method being called anywhere. >> (there is also set_polled_mode() but it has an error and I also don't see >> it being used either.) >> >> I can mangle this up myself... but I thought I should ask: is >> it generally considered kosher to do a re-config on the hardware when >> weewx starts up? Or does the user have to sort that out >> himself using whatever config tools available to him? >> >> >> >> >> On Thursday, August 13, 2020 at 11:52:56 PM UTC-5, Glenn McKechnie wrote: >>> >>> Ah. Thanks Gary, that makes more sense. >>> >>> @Chris >>> Gary's correction has been applied to this attachment wxt5x0-trimmed2.py >>> and has the following diff... >>> >>> -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/fdd27793-8376-40cd-90f0-5cc327cdd307n%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/fdd27793-8376-40cd-90f0-5cc327cdd307n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEC8JM0VcPmBngoWBT0fjYyHrJneLkV5f2%3DFfK-yz1nnzQ%40mail.gmail.com.
