V4.0.0b4 is up

648 views
Skip to first unread message

Thomas Keffer

unread,
Nov 26, 2019, 8:24:07 PM11/26/19
to weewx-development
In the usual place

What we really need is testing of the drivers, particularly under Python 3. If you have something other than a Vantage, please install and check it out!

-tk

Vince Skahan

unread,
Nov 26, 2019, 9:56:29 PM11/26/19
to weewx-development
On Tuesday, November 26, 2019 at 5:24:07 PM UTC-8, Tom Keffer wrote:
What we really need is testing of the drivers, particularly under Python 3. If you have something other than a Vantage, please install and check it out!


Tests fine on a pi4 with current Raspbian using:
  • WeatherFlow UDP driver 1.03 - my fork with 2to3 run vs. the reference copy (PR already in to author)
  • purple air 0.1 - my fork with added AQI and 2to3 run vs. the reference copy (PR already in to author)
  • mqtt 0.19 - my fork again with 2to3 run against it (no PR in)
  • Belchertown 1.1b8 - no edits from author's copy
  • several of my custom skins, again with 2to3 run to convert them as needed

Hartmut Schweidler

unread,
Nov 27, 2019, 12:25:52 PM11/27/19
to weewx-development
Hallo Tom

the driver fousb.py at line addr1 = (address // 256) & 0xff  not addr1 = (address / 256) & 0xff


works by python 3

Gruss Hartmut

Thomas Keffer

unread,
Nov 27, 2019, 1:32:24 PM11/27/19
to Hartmut Schweidler, weewx-development
Thanks, Hartmut!

Alternatively, how about

    addr1 = (address >> 8) & 0xff

which makes the bit arithmetic more explicit.

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/05c8c383-87e7-4fe5-8a99-b81b2913a738%40googlegroups.com.

Andy

unread,
Nov 27, 2019, 6:13:03 PM11/27/19
to weewx-development
Running with SDR

root@weewx-01:/home/weewx/weewx-4.0.0b4# uname -a && cat /etc/debian_version 
Linux weewx-01 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20) x86_64 GNU/Linux
10.2
Nov 27 15:04:02 weewx-01 weewx[12624] INFO weewx.engine: Starting up weewx version 4.0.0b4
Nov 27 15:04:02 weewx-01 weewx[12624] INFO user.sdr: driver version is 0.70
root     12624     1  0 15:04 ?        00:00:01 /usr/bin/python3 /home/weewx/bin/weewxd /home/weewx/weewx.conf
root     12627 12624  0 15:04 ?        00:00:02 rtl_433 -M utc -F json -G


Thomas Keffer

unread,
Nov 27, 2019, 8:51:12 PM11/27/19
to Hartmut Schweidler, weewx-development
Fixed in commit d60c154.

-tk

On Wed, Nov 27, 2019 at 9:25 AM Hartmut Schweidler <hesf...@gmail.com> wrote:
--

Armando Esteves

unread,
Dec 5, 2019, 8:01:15 PM12/5/19
to weewx-development
Xant here, trying to jump into the "Big Boys league" (aka, development) :P

Since jumping to next up, went to duplicate and upgrade everything:
  • Rpi3 to Rpi4 - check!
  • Bskin 1.1b7 to Bskin 1.1b8 - check!
  • WeeWX 3.9.2 to WeeWX 4.0.0b4 -error (ufff...)
NOT reportingas a bug, but probably some "silly" hands-on upgrade mistake. It seems related to DB, more than other. Some errors as the following:

1) Tried service start

root@raspberrypi:/usr/share/weewx# service weewx start
Job for weewx.service failed because the control process exited with error code.
See "systemctl status weewx.service" and "journalctl -xe" for details.

2) Systemctl

root@raspberrypi:/usr/share/weewx# systemctl status weewx.service
● weewx.service - LSB: weewx weather system
   Loaded: loaded (/etc/init.d/weewx; generated)
   Active: failed (Result: exit-code) since Thu 2019-12-05 17:58:21 EST; 28s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 10858 ExecStart=/etc/init.d/weewx start (code=exited, status=1/FAILURE)

Dec 05 17:58:21 raspberrypi weewx[10858]: Starting weewx weather system: weewxTraceback (most recent call last):
Dec 05 17:58:21 raspberrypi weewx[10858]:   File "/usr/bin/weewxd", line 14, in <module>
Dec 05 17:58:21 raspberrypi weewx[10858]:     import user.extensions  # @UnusedImport
Dec 05 17:58:21 raspberrypi weewx[10858]:   File "/usr/share/weewx/user/extensions.py", line 22, in <module>
Dec 05 17:58:21 raspberrypi weewx[10858]:     schema_extended = schemas.wview.schema + [('maxSolarRad', 'REAL'), ('illuminance', 'REAL'), ('lightcount', 'REA
Dec 05 17:58:21 raspberrypi weewx[10858]: TypeError: unsupported operand type(s) for +: 'dict' and 'list'
Dec 05 17:58:21 raspberrypi weewx[10858]:  failed!
Dec 05 17:58:21 raspberrypi systemd[1]: weewx.service: Control process exited, code=exited, status=1/FAILURE
Dec 05 17:58:21 raspberrypi systemd[1]: weewx.service: Failed with result 'exit-code'.
Dec 05 17:58:21 raspberrypi systemd[1]: Failed to start LSB: weewx weather system.

3) DB Reconfigure? (aka, "desperation mode")

root@raspberrypi:/usr/share/weewx# wee_database /etc/weewx/weewx.conf --reconfigure
Traceback (most recent call last):
  File "/usr/bin/wee_database", line 23, in <module>
    import user.extensions  # @UnusedImport
  File "/usr/share/weewx/user/extensions.py", line 22, in <module>
    schema_extended = schemas.wview.schema + [('maxSolarRad', 'REAL'), ('illuminance', 'REAL'), ('lightcount', 'REAL'), ('lightdist', 'REAL'), ('lightavgdist', 'REAL'), ('lightenergy', 'REAL')]
TypeError: unsupported operand type(s) for +: 'dict' and 'list'

Best,
Xant

Thomas Keffer

unread,
Dec 5, 2019, 8:15:26 PM12/5/19
to weewx-development
You're doing things right! It's just that how a schema is specified has changed in V4.0. However, the intention was to make it backwards compatible, which I obviously failed at.

Let me think about this case and I'll get back to you.

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.

Armando Esteves

unread,
Dec 5, 2019, 8:27:00 PM12/5/19
to weewx-development
Affff... thank you Thomas.

Your note is a relief, as didn't want to make a "noobie" mistake in the Dev League (debated much prior to posting).

That said, I'm your new "b-Tester" and glad to help for any. To note, now handling two SD Rpi cards:
  1. Functional 3.9.2
  2. "half-way" v4 (open to any mess and tries)
But now puzzled, how others moved-on when mine didn't...

Thank you always for WeeWX, your continue development and time.


"Long live WeeWX!",
Xant

Armando Esteves

unread,
Dec 6, 2019, 9:17:21 AM12/6/19
to weewx-development
Tom

Hold-on on this issue, as it might not be WeeWX/DB related, but Rpi version/OS conflict (https://groups.google.com/d/msg/weewx-development/ZXChMjAGUjM/RGlnAUzYBAAJ).

Will inform back upon new developments and when ready for further b-Tests.

X

Thomas Keffer

unread,
Dec 6, 2019, 9:31:11 AM12/6/19
to Armando Esteves, weewx-development
I don't think so. It's definitely a problem. Fixed in commit 55f9cb3.

Uploaded V4.0.0b5.

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.

Armando Esteves

unread,
Dec 6, 2019, 4:24:53 PM12/6/19
to weewx-development
Ok.... Rpi4 now resting on side while we go "baby steps".

Downloaded V4.0.0b5 and started all over from working 3.9.2.

  • No error upon rebuilding Database here (but to note that I used Rpi4 - with Rpi3 SD card - which could led to conflict)
  • WeeWX started, but its not reporting; that is per following msg upon 'wee_reports':
root@raspberrypi:/var/lib/weewx# wee_reports
Using configuration file /etc/weewx/weewx.conf
Generating for all time
Traceback (most recent call last):
  File "/usr/share/weewx/weewx/reportengine.py", line 202, in run
    obj.start()
  File "/usr/share/weewx/weewx/reportengine.py", line 285, in start
    self.run()
  File "/usr/share/weewx/weewx/cheetahgenerator.py", line 150, in run
    ngen = self.generate(gen_dict[section_name], self.gen_ts)
  File "/usr/share/weewx/weewx/cheetahgenerator.py", line 220, in generate
    ngen += self.generate(section[subsection], gen_ts)
  File "/usr/share/weewx/weewx/cheetahgenerator.py", line 220, in generate
    ngen += self.generate(section[subsection], gen_ts)
  File "/usr/share/weewx/weewx/cheetahgenerator.py", line 309, in generate
    default_binding)
  File "/usr/share/weewx/weewx/cheetahgenerator.py", line 383, in _getSearchList
    searchList += obj.get_extension_list(timespan, db_lookup)
  File "/usr/share/weewx/user/belchertown.py", line 808, in get_extension_list
    if "?" in str(obs_output):
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb0' in position 5: ordinal not in range(128)
Traceback (most recent call last):
  File "/usr/share/weewx/weewx/reportengine.py", line 202, in run
    obj.start()
  File "/usr/share/weewx/weewx/reportengine.py", line 285, in start
    self.run()
  File "/usr/share/weewx/user/belchertown.py", line 1330, in run
    series_data = self.get_observation_data(binding, archive, observation_type, minstamp, maxstamp, aggregate_type, aggregate_interval, time_length, xAxis_groupby, xAxis_categories, mirrored_value, weatherRange_obs_lookup)
  File "/usr/share/weewx/user/belchertown.py", line 1782, in get_observation_data
    raise Warning( "Error trying to use database binding %s to graph observation %s. Error was: %s." % (binding, obs_lookup, e) )
Warning: Error trying to use database binding wx_binding to graph observation 120.0*maxSolarRad. Error was: 120.0*maxSolarRad.
root@raspberrypi:/var/lib/weewx#


This is SQlite on Rpi, and I did extended timeout.

X

Thomas Keffer

unread,
Dec 6, 2019, 5:12:40 PM12/6/19
to Armando Esteves, weewx-development
Were you using Python 3? If so, the problem is almost surely because the Belchertown skin has not been ported yet.

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.

Vince Skahan

unread,
Dec 6, 2019, 7:45:19 PM12/6/19
to weewx-development
On Friday, December 6, 2019 at 2:12:40 PM UTC-8, Tom Keffer wrote:
Were you using Python 3? If so, the problem is almost surely because the Belchertown skin has not been ported yet.


fyi - the development branch for Belchertown works nicely on python3, but changing multiple things at once can sometime come with its own adventures.....

 

Xant

unread,
Dec 12, 2019, 3:44:20 PM12/12/19
to weewx-development

Starting from scratch (again). PWS is WeatherFlow.

1) RPi3 WeeWX release w Bskin - all is well and running

2) RPi4 WeeWX - python 2x for now; got the following error msg:

root@RPi4:/etc/weewx# service weewx start
Failed to start weewx.service: Unit weewx.service not found.

Only place I see reference for "weewx.service" is under 'vantage.rules' (I'm not using Vantage).

weewx.conf in attach.


Vince
It seems you using WFlow and running. Any to patch?

X

weewx.conf

Thomas Keffer

unread,
Dec 12, 2019, 7:04:56 PM12/12/19
to weewx-development
weewx.service is the systemd configuration file. You'll find it under util/systemd. It's used when starting weewx as a daemon.

One other thing: the weewx.conf file you enclosed is a V3.9.2 file. Are you sure you're running v4.0.0?

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.

Xant

unread,
Dec 12, 2019, 7:16:34 PM12/12/19
to weewx-development
Please, disregard previous weewx.conf (mistaken upload).

1) Starting as: "service weewx start" (RPi4, python 2x)

2) Weewx.conf re-attached.

Thx, X
weewx.conf

Vince Skahan

unread,
Dec 12, 2019, 7:26:00 PM12/12/19
to weewx-development
On Thursday, December 12, 2019 at 12:44:20 PM UTC-8, Xant wrote:
Vince
It seems you using WFlow and running. Any to patch?



Yes - you need to run it through 2to3 if you want to use python3.


Diffs are at https://github.com/captain-coredump/weatherflow-udp/pull/9/files if you want to take a look.  Very trivial differences due to python3.

Vince Skahan

unread,
Dec 12, 2019, 7:27:34 PM12/12/19
to weewx-development
On Thursday, December 12, 2019 at 12:44:20 PM UTC-8, Xant wrote:
root@RPi4:/etc/weewx# service weewx start
Failed to start weewx.service: Unit weewx.service not found.


I'd try "systemctl start weewx" and use full systemd syntax, just in case. 

Xant

unread,
Dec 12, 2019, 11:05:17 PM12/12/19
to weewx-development
It seems a simple path setup, but it beats me...

root@RPi4:/etc/systemd# systemctl start weewx

Failed to start weewx.service: Unit weewx.service not found.

Must declare path somewhere? Shouldn't install take care of that?

gjr80

unread,
Dec 12, 2019, 11:13:30 PM12/12/19
to weewx-development
As far as I am aware development versions are generally distributed as setup.py installs only and not as a (deb or rpm) package. For setup.py installs you need to manually install the service files. Refer to the Run section of the setup.py install instructions http://weewx.com/docs/setup.htm

Gary

Vince Skahan

unread,
Dec 13, 2019, 12:49:43 AM12/13/19
to weewx-development
On Thursday, December 12, 2019 at 8:13:30 PM UTC-8, gjr80 wrote:
As far as I am aware development versions are generally distributed as setup.py installs only and not as a (deb or rpm) package. For setup.py installs you need to manually install the service files. Refer to the Run section of the setup.py install instructions http://weewx.com/docs/setup.htm




Agree.   For a later Debian system that uses systemd, you probably want to install weewx.service into /etc/systemd/system and then run 'systemctl enable weewx' so it starts on boot.
All as root or via sudo, of course.

The Debian instructions in the setup.htm file are for systems that do 'not' have systemd, although they work on those systems too if you install the init.d file in the old locations.

Both ways work fine.

Ralph Underwood

unread,
Dec 13, 2019, 6:07:37 PM12/13/19
to weewx-development
Hi,


I used Vince's script to install ( that was easy).  After all worked with Simulator, I changed the driver to the Ultimeter, shut down the Rpi4 and connected the hardware and restarted.
This is my log output. I'm thinking I may need to look into USB rules or the serialutl.py python3 issue??


Dec 13 14:51:17 JV-Wx systemd[1]: Started weewx weather system.
Dec 13 14:51:17 JV-Wx weewx[1441] INFO weewx.engine: Initializing weewx version 4.0.0b5
Dec 13 14:51:17 JV-Wx weewx[1441] INFO weewx.engine: Using Python 3.7.3 (default, Apr  3 2019, 05:39:12) #012[GCC 8.2.0]
Dec 13 14:51:17 JV-Wx weewx[1441] INFO weewx.engine: Platform Linux-4.19.75-v7l+-armv7l-with-debian-10.1
Dec 13 14:51:17 JV-Wx weewx[1441] INFO weewx.engine: Locale is 'en_US.UTF-8'
Dec 13 14:51:17 JV-Wx weewx[1441] INFO weewx.engine: PID file is /var/run/weewx.pid
Dec 13 14:51:17 JV-Wx weewx[1448] INFO weewx.engine: Using configuration file /home/weewx/weewx.conf
Dec 13 14:51:17 JV-Wx weewx[1448] DEBUG weewx.engine: Debug is 1
Dec 13 14:51:17 JV-Wx weewx[1448] DEBUG weewx.engine: Initializing engine
Dec 13 14:51:17 JV-Wx weewx[1448] INFO weewx.engine: Loading station type Ultimeter (weewx.drivers.ultimeter)
Dec 13 14:51:17 JV-Wx weewx[1448] INFO weewx.drivers.ultimeter: driver version is 0.30
Dec 13 14:51:17 JV-Wx weewx[1448] INFO weewx.drivers.ultimeter: using serial port /dev/ttyUSB0
Dec 13 14:51:17 JV-Wx weewx[1448] DEBUG weewx.drivers.ultimeter: open serial port /dev/ttyUSB0
Dec 13 14:51:17 JV-Wx systemd[1]: weewx.service: Supervising process 1448 which is not our child. We'll most likely not notice when it exits.
Dec 13 14:51:17 JV-Wx weewx[1448] DEBUG weewx.engine: Loading service weewx.engine.StdTimeSynch
Dec 13 14:51:17 JV-Wx weewx[1448] DEBUG weewx.engine: Finished loading service weewx.engine.StdTimeSynch
Dec 13 14:51:17 JV-Wx weewx[1448] DEBUG weewx.engine: Loading service weewx.engine.StdConvert
Dec 13 14:51:17 JV-Wx weewx[1448] INFO weewx.engine: StdConvert target unit is 0x1
Dec 13 14:51:17 JV-Wx weewx[1448] DEBUG weewx.engine: Finished loading service weewx.engine.StdConvert
Dec 13 14:51:17 JV-Wx weewx[1448] DEBUG weewx.engine: Loading service weewx.engine.StdCalibrate
Dec 13 14:51:17 JV-Wx weewx[1448] DEBUG weewx.engine: Finished loading service weewx.engine.StdCalibrate
Dec 13 14:51:17 JV-Wx weewx[1448] DEBUG weewx.engine: Loading service weewx.engine.StdQC
Dec 13 14:51:17 JV-Wx weewx[1448] DEBUG weewx.engine: Finished loading service weewx.engine.StdQC
Dec 13 14:51:17 JV-Wx weewx[1448] DEBUG weewx.engine: Loading service weewx.wxservices.StdWXCalculate
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.manager: Daily summary version is 2.0
Dec 13 14:51:18 JV-Wx weewx[1448] INFO weewx.wxservices: The following values will be calculated: altimeter=prefer_hardware, appTemp=prefer_hardware, barometer=prefer_hardware, beaufort=prefer_hardware, cloudbase=prefer_hardware, dewpoint=prefer_hardware, ET=prefer_hardware, heatindex=prefer_hardware, humidex=prefer_hardware, inDewpoint=prefer_hardware, maxSolarRad=prefer_hardware, pressure=prefer_hardware, rainRate=prefer_hardware, windchill=prefer_hardware, windrun=prefer_hardware
Dec 13 14:51:18 JV-Wx weewx[1448] INFO weewx.wxservices: The following algorithms will be used for calculations: altimeter=aaASOS, maxSolarRad=RS
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Finished loading service weewx.wxservices.StdWXCalculate
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Loading service weewx.engine.StdArchive
Dec 13 14:51:18 JV-Wx weewx[1448] INFO weewx.engine: Archive will use data binding wx_binding
Dec 13 14:51:18 JV-Wx weewx[1448] INFO weewx.engine: Record generation will be attempted in 'hardware'
Dec 13 14:51:18 JV-Wx weewx[1448] INFO weewx.engine: Using archive interval of 300 seconds (specified in weewx configuration)
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Use LOOP data in hi/low calculations: 1
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Finished loading service weewx.engine.StdArchive
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Loading service weewx.restx.StdStationRegistry
Dec 13 14:51:18 JV-Wx weewx[1448] INFO weewx.restx: StationRegistry: Registration not requested.
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Finished loading service weewx.restx.StdStationRegistry
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Loading service weewx.restx.StdWunderground
Dec 13 14:51:18 JV-Wx weewx[1448] INFO weewx.restx: Wunderground: Posting not enabled.
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Finished loading service weewx.restx.StdWunderground
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Loading service weewx.restx.StdPWSweather
Dec 13 14:51:18 JV-Wx weewx[1448] INFO weewx.restx: PWSweather: Posting not enabled.
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Finished loading service weewx.restx.StdPWSweather
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Loading service weewx.restx.StdCWOP
Dec 13 14:51:18 JV-Wx weewx[1448] INFO weewx.restx: CWOP: Posting not enabled.
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Finished loading service weewx.restx.StdCWOP
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Loading service weewx.restx.StdWOW
Dec 13 14:51:18 JV-Wx weewx[1448] INFO weewx.restx: WOW: Posting not enabled.
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Finished loading service weewx.restx.StdWOW
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Loading service weewx.restx.StdAWEKAS
Dec 13 14:51:18 JV-Wx weewx[1448] INFO weewx.restx: AWEKAS: Posting not enabled.
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Finished loading service weewx.restx.StdAWEKAS
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Loading service weewx.engine.StdPrint
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Finished loading service weewx.engine.StdPrint
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Loading service weewx.engine.StdReport
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Finished loading service weewx.engine.StdReport
Dec 13 14:51:18 JV-Wx weewx[1448] INFO weewx.engine: Starting up weewx version 4.0.0b5
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.engine: Station does not support reading the time
Dec 13 14:51:18 JV-Wx weewx[1448] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
Dec 13 14:51:18 JV-Wx weewx[1448] INFO weewx.manager: Starting backfill of daily summaries
Dec 13 14:51:18 JV-Wx weewx[1448] INFO weewx.engine: Starting main packet loop.
Dec 13 14:51:18 JV-Wx weewx[1448] INFO weewx.engine: Main loop exiting. Shutting engine down.
Dec 13 14:51:18 JV-Wx weewx[1448] DEBUG weewx.drivers.ultimeter: close serial port /dev/ttyUSB0
Dec 13 14:51:19 JV-Wx weewx[1448] CRITICAL weewx.engine: Caught unrecoverable exception:
Dec 13 14:51:19 JV-Wx weewx[1448] CRITICAL weewx.engine:     ****  unicode strings are not supported, please encode to bytes: '>I\r'
Dec 13 14:51:19 JV-Wx weewx[1448] CRITICAL weewx.engine:     ****  Traceback (most recent call last):
Dec 13 14:51:19 JV-Wx weewx[1448] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/engine.py", line 892, in main
Dec 13 14:51:19 JV-Wx weewx[1448] CRITICAL weewx.engine:     ****      engine.run()
Dec 13 14:51:19 JV-Wx weewx[1448] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/engine.py", line 193, in run
Dec 13 14:51:19 JV-Wx weewx[1448] CRITICAL weewx.engine:     ****      for packet in self.console.genLoopPackets():
Dec 13 14:51:19 JV-Wx weewx[1448] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/drivers/ultimeter.py", line 123, in genLoopPackets
Dec 13 14:51:19 JV-Wx weewx[1448] CRITICAL weewx.engine:     ****      self.station.set_logger_mode()
Dec 13 14:51:19 JV-Wx weewx[1448] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/drivers/ultimeter.py", line 213, in set_logger_mode
Dec 13 14:51:19 JV-Wx weewx[1448] CRITICAL weewx.engine:     ****      self.serial_port.write(">I\r")
Dec 13 14:51:19 JV-Wx weewx[1448] CRITICAL weewx.engine:     ****    File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 532, in write
Dec 13 14:51:19 JV-Wx weewx[1448] CRITICAL weewx.engine:     ****      d = to_bytes(data)
Dec 13 14:51:19 JV-Wx weewx[1448] CRITICAL weewx.engine:     ****    File "/usr/lib/python3/dist-packages/serial/serialutil.py", line 63, in to_bytes
Dec 13 14:51:19 JV-Wx weewx[1448] CRITICAL weewx.engine:     ****      raise TypeError('unicode strings are not supported, please encode to bytes: {!r}'.format(seq))
Dec 13 14:51:19 JV-Wx weewx[1448] CRITICAL weewx.engine:     ****  TypeError: unicode strings are not supported, please encode to bytes: '>I\r'
Dec 13 14:51:19 JV-Wx weewx[1448] CRITICAL weewx.engine:     ****  Exiting.
Dec 13 14:51:19 JV-Wx systemd[1]: weewx.service: Main process exited, code=exited, status=1/FAILURE
Dec 13 14:51:19 JV-Wx systemd[1]: weewx.service: Failed with result 'exit-code'.

Thomas Keffer

unread,
Dec 13, 2019, 6:58:11 PM12/13/19
to Ralph Underwood, weewx-development
Thank you, Ralph, for giving the Ultimeter driver a try!

Looking through the code, it appears that, under Python 3, the driver is attempting to use unicode strings, when bytes are called for. In the attached version, I've fixed the most obvious cases where this is happening, but I've probably missed a few.

Can you give it a try?

Thanks

-tk


--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
ultimeter.py

Ralph Underwood

unread,
Dec 13, 2019, 9:31:40 PM12/13/19
to weewx-development
This is the result with the new driver. I let it go several times with same result.



Dec 13 18:23:16 JV-Wx weewx[3658] INFO weewx.engine: retrying...
Dec 13 18:23:16 JV-Wx weewx[3658] INFO weewx.engine: Using configuration file /home/weewx/weewx.conf
Dec 13 18:23:16 JV-Wx weewx[3658] DEBUG weewx.engine: Debug is 1
Dec 13 18:23:16 JV-Wx weewx[3658] DEBUG weewx.engine: Initializing engine
Dec 13 18:23:16 JV-Wx weewx[3658] INFO weewx.engine: Loading station type Ultimeter (weewx.drivers.ultimeter)
Dec 13 18:23:16 JV-Wx weewx[3658] INFO weewx.drivers.ultimeter: driver version is 0.30
Dec 13 18:23:16 JV-Wx weewx[3658] INFO weewx.drivers.ultimeter: using serial port /dev/ttyUSB0
Dec 13 18:23:16 JV-Wx weewx[3658] DEBUG weewx.drivers.ultimeter: open serial port /dev/ttyUSB0
Dec 13 18:23:16 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.engine.StdTimeSynch
Dec 13 18:23:16 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.engine.StdTimeSynch
Dec 13 18:23:16 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.engine.StdConvert
Dec 13 18:23:16 JV-Wx weewx[3658] INFO weewx.engine: StdConvert target unit is 0x1
Dec 13 18:23:16 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.engine.StdConvert
Dec 13 18:23:16 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.engine.StdCalibrate
Dec 13 18:23:16 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.engine.StdCalibrate
Dec 13 18:23:16 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.engine.StdQC
Dec 13 18:23:16 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.engine.StdQC
Dec 13 18:23:16 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.wxservices.StdWXCalculate
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.manager: Daily summary version is 2.0
Dec 13 18:23:17 JV-Wx weewx[3658] INFO weewx.wxservices: The following values will be calculated: altimeter=prefer_hardware, appTemp=prefer_hardware, barometer=prefer_hardware, beaufort=prefer_hardware, cloudbase=prefer_hardware, dewpoint=prefer_hardware, ET=prefer_hardware, heatindex=prefer_hardware, humidex=prefer_hardware, inDewpoint=prefer_hardware, maxSolarRad=prefer_hardware, pressure=prefer_hardware, rainRate=prefer_hardware, windchill=prefer_hardware, windrun=prefer_hardware
Dec 13 18:23:17 JV-Wx weewx[3658] INFO weewx.wxservices: The following algorithms will be used for calculations: altimeter=aaASOS, maxSolarRad=RS
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.wxservices.StdWXCalculate
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.engine.StdArchive
Dec 13 18:23:17 JV-Wx weewx[3658] INFO weewx.engine: Archive will use data binding wx_binding
Dec 13 18:23:17 JV-Wx weewx[3658] INFO weewx.engine: Record generation will be attempted in 'hardware'
Dec 13 18:23:17 JV-Wx weewx[3658] INFO weewx.engine: Using archive interval of 300 seconds (specified in weewx configuration)
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Use LOOP data in hi/low calculations: 1
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.engine.StdArchive
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.restx.StdStationRegistry
Dec 13 18:23:17 JV-Wx weewx[3658] INFO weewx.restx: StationRegistry: Registration not requested.
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.restx.StdStationRegistry
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.restx.StdWunderground
Dec 13 18:23:17 JV-Wx weewx[3658] INFO weewx.restx: Wunderground: Posting not enabled.
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.restx.StdWunderground
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.restx.StdPWSweather
Dec 13 18:23:17 JV-Wx weewx[3658] INFO weewx.restx: PWSweather: Posting not enabled.
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.restx.StdPWSweather
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.restx.StdCWOP
Dec 13 18:23:17 JV-Wx weewx[3658] INFO weewx.restx: CWOP: Posting not enabled.
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.restx.StdCWOP
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.restx.StdWOW
Dec 13 18:23:17 JV-Wx weewx[3658] INFO weewx.restx: WOW: Posting not enabled.
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.restx.StdWOW
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.restx.StdAWEKAS
Dec 13 18:23:17 JV-Wx weewx[3658] INFO weewx.restx: AWEKAS: Posting not enabled.
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.restx.StdAWEKAS
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.engine.StdPrint
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.engine.StdPrint
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.engine.StdReport
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.engine.StdReport
Dec 13 18:23:17 JV-Wx weewx[3658] INFO weewx.engine: Starting up weewx version 4.0.0b5
Dec 13 18:23:17 JV-Wx weewx[3658] DEBUG weewx.engine: Station does not support reading the time
Dec 13 18:23:17 JV-Wx weewx[3658] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
Dec 13 18:23:17 JV-Wx weewx[3658] INFO weewx.manager: Starting backfill of daily summaries
Dec 13 18:23:17 JV-Wx weewx[3658] INFO weewx.engine: Starting main packet loop.
Dec 13 18:23:17 JV-Wx weewx[3658] INFO weewx.drivers.ultimeter: Failed attempt 1 of 5 to get readings: Unexpected buffer length 26
Dec 13 18:23:20 JV-Wx weewx[3658] INFO weewx.drivers.ultimeter: Failed attempt 2 of 5 to get readings: Unexpected header bytes 'b'!!''
Dec 13 18:23:23 JV-Wx weewx[3658] INFO weewx.drivers.ultimeter: Failed attempt 3 of 5 to get readings: Unexpected header bytes 'b'!!''
Dec 13 18:23:26 JV-Wx weewx[3658] INFO weewx.drivers.ultimeter: Failed attempt 4 of 5 to get readings: Unexpected header bytes 'b'!!''
Dec 13 18:23:29 JV-Wx weewx[3658] INFO weewx.drivers.ultimeter: Failed attempt 5 of 5 to get readings: Unexpected header bytes 'b'!!''
Dec 13 18:23:32 JV-Wx weewx[3658] ERROR weewx.drivers.ultimeter: Max retries (5) exceeded for readings
Dec 13 18:23:32 JV-Wx weewx[3658] INFO weewx.engine: Main loop exiting. Shutting engine down.
Dec 13 18:23:32 JV-Wx weewx[3658] DEBUG weewx.drivers.ultimeter: close serial port /dev/ttyUSB0
Dec 13 18:23:33 JV-Wx weewx[3658] CRITICAL weewx.engine: Caught WeeWxIOError: Max retries (5) exceeded for readings
Dec 13 18:23:33 JV-Wx weewx[3658] CRITICAL weewx.engine:     ****  Waiting 60 seconds then retrying...
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.engine: retrying...
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.engine: Using configuration file /home/weewx/weewx.conf
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Debug is 1
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Initializing engine
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.engine: Loading station type Ultimeter (weewx.drivers.ultimeter)
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.drivers.ultimeter: driver version is 0.30
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.drivers.ultimeter: using serial port /dev/ttyUSB0
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.drivers.ultimeter: open serial port /dev/ttyUSB0
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.engine.StdTimeSynch
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.engine.StdTimeSynch
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.engine.StdConvert
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.engine: StdConvert target unit is 0x1
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.engine.StdConvert
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.engine.StdCalibrate
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.engine.StdCalibrate
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.engine.StdQC
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.engine.StdQC
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.wxservices.StdWXCalculate
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.manager: Daily summary version is 2.0
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.wxservices: The following values will be calculated: altimeter=prefer_hardware, appTemp=prefer_hardware, barometer=prefer_hardware, beaufort=prefer_hardware, cloudbase=prefer_hardware, dewpoint=prefer_hardware, ET=prefer_hardware, heatindex=prefer_hardware, humidex=prefer_hardware, inDewpoint=prefer_hardware, maxSolarRad=prefer_hardware, pressure=prefer_hardware, rainRate=prefer_hardware, windchill=prefer_hardware, windrun=prefer_hardware
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.wxservices: The following algorithms will be used for calculations: altimeter=aaASOS, maxSolarRad=RS
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.wxservices.StdWXCalculate
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.engine.StdArchive
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.engine: Archive will use data binding wx_binding
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.engine: Record generation will be attempted in 'hardware'
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.engine: Using archive interval of 300 seconds (specified in weewx configuration)
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Use LOOP data in hi/low calculations: 1
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.engine.StdArchive
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.restx.StdStationRegistry
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.restx: StationRegistry: Registration not requested.
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.restx.StdStationRegistry
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.restx.StdWunderground
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.restx: Wunderground: Posting not enabled.
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.restx.StdWunderground
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.restx.StdPWSweather
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.restx: PWSweather: Posting not enabled.
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.restx.StdPWSweather
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.restx.StdCWOP
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.restx: CWOP: Posting not enabled.
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.restx.StdCWOP
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.restx.StdWOW
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.restx: WOW: Posting not enabled.
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.restx.StdWOW
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.restx.StdAWEKAS
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.restx: AWEKAS: Posting not enabled.
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.restx.StdAWEKAS
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.engine.StdPrint
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.engine.StdPrint
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Loading service weewx.engine.StdReport
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Finished loading service weewx.engine.StdReport
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.engine: Starting up weewx version 4.0.0b5
Dec 13 18:24:33 JV-Wx weewx[3658] DEBUG weewx.engine: Station does not support reading the time
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.manager: Starting backfill of daily summaries
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.engine: Starting main packet loop.
Dec 13 18:24:33 JV-Wx weewx[3658] INFO weewx.drivers.ultimeter: Failed attempt 1 of 5 to get readings: Unexpected buffer length 22
Dec 13 18:24:36 JV-Wx weewx[3658] INFO weewx.drivers.ultimeter: Failed attempt 2 of 5 to get readings: Unexpected header bytes 'b'!!''
Dec 13 18:24:39 JV-Wx weewx[3658] INFO weewx.drivers.ultimeter: Failed attempt 3 of 5 to get readings: Unexpected header bytes 'b'!!''
Dec 13 18:24:42 JV-Wx weewx[3658] INFO weewx.drivers.ultimeter: Failed attempt 4 of 5 to get readings: Unexpected header bytes 'b'!!''
Dec 13 18:24:45 JV-Wx weewx[3658] INFO weewx.drivers.ultimeter: Failed attempt 5 of 5 to get readings: Unexpected header bytes 'b'!!''
Dec 13 18:24:48 JV-Wx weewx[3658] ERROR weewx.drivers.ultimeter: Max retries (5) exceeded for readings
Dec 13 18:24:48 JV-Wx weewx[3658] INFO weewx.engine: Main loop exiting. Shutting engine down.
Dec 13 18:24:48 JV-Wx weewx[3658] DEBUG weewx.drivers.ultimeter: close serial port /dev/ttyUSB0
Dec 13 18:24:49 JV-Wx weewx[3658] CRITICAL weewx.engine: Caught WeeWxIOError: Max retries (5) exceeded for readings
Dec 13 18:24:49 JV-Wx weewx[3658] CRITICAL weewx.engine:     ****  Waiting 60 seconds then retrying...
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-de...@googlegroups.com.

Thomas Keffer

unread,
Dec 14, 2019, 12:46:48 PM12/14/19
to Ralph Underwood, weewx-development
I think this problem may be related to this thread, which was never resolved. Hopefully, we'll get it this time.

Try this version, but before you do, not only set debug=1 at the top of weewx.conf, but also set debug_serial in the [Ultimeter] section:

debug = 1
...

[Ultimeter]
  port = XXX
  debug_serial = 1

-tk




To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/27945442-f04b-4f03-9934-fa6927abc14a%40googlegroups.com.
ultimeter.py

Ralph Underwood

unread,
Dec 14, 2019, 1:18:09 PM12/14/19
to weewx-development
This is the result with latest ultimeter.py and debug_serial = 1


Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.engine: retrying...
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.engine: Using configuration file /home/weewx/weewx.conf
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Debug is 1
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Initializing engine
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.engine: Loading station type Ultimeter (weewx.drivers.ultimeter)
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.drivers.ultimeter: Driver version is 0.40
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.drivers.ultimeter: Using serial port /dev/ttyUSB0
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.drivers.ultimeter: Open serial port /dev/ttyUSB0
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Loading service weewx.engine.StdTimeSynch
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Finished loading service weewx.engine.StdTimeSynch
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Loading service weewx.engine.StdConvert
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.engine: StdConvert target unit is 0x1
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Finished loading service weewx.engine.StdConvert
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Loading service weewx.engine.StdCalibrate
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Finished loading service weewx.engine.StdCalibrate
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Loading service weewx.engine.StdQC
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Finished loading service weewx.engine.StdQC
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Loading service weewx.wxservices.StdWXCalculate
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.manager: Daily summary version is 2.0
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.wxservices: The following values will be calculated: altimeter=prefer_hardware, appTemp=prefer_hardware, barometer=prefer_hardware, beaufort=prefer_hardware, cloudbase=prefer_hardware, dewpoint=prefer_hardware, ET=prefer_hardware, heatindex=prefer_hardware, humidex=prefer_hardware, inDewpoint=prefer_hardware, maxSolarRad=prefer_hardware, pressure=prefer_hardware, rainRate=prefer_hardware, windchill=prefer_hardware, windrun=prefer_hardware
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.wxservices: The following algorithms will be used for calculations: altimeter=aaASOS, maxSolarRad=RS
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Finished loading service weewx.wxservices.StdWXCalculate
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Loading service weewx.engine.StdArchive
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.engine: Archive will use data binding wx_binding
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.engine: Record generation will be attempted in 'hardware'
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.engine: Using archive interval of 300 seconds (specified in weewx configuration)
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Use LOOP data in hi/low calculations: 1
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Finished loading service weewx.engine.StdArchive
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Loading service weewx.restx.StdStationRegistry
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.restx: StationRegistry: Registration not requested.
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Finished loading service weewx.restx.StdStationRegistry
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Loading service weewx.restx.StdWunderground
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.restx: Wunderground: Posting not enabled.
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Finished loading service weewx.restx.StdWunderground
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Loading service weewx.restx.StdPWSweather
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.restx: PWSweather: Posting not enabled.
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Finished loading service weewx.restx.StdPWSweather
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Loading service weewx.restx.StdCWOP
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.restx: CWOP: Posting not enabled.
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Finished loading service weewx.restx.StdCWOP
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Loading service weewx.restx.StdWOW
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.restx: WOW: Posting not enabled.
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Finished loading service weewx.restx.StdWOW
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Loading service weewx.restx.StdAWEKAS
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.restx: AWEKAS: Posting not enabled.
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Finished loading service weewx.restx.StdAWEKAS
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Loading service weewx.engine.StdPrint
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Finished loading service weewx.engine.StdPrint
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Loading service weewx.engine.StdReport
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Finished loading service weewx.engine.StdReport
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.engine: Starting up weewx version 4.0.0b5
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.engine: Station does not support reading the time
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.manager: Starting backfill of daily summaries
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.engine: Starting main packet loop.
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.drivers.ultimeter: Set station to logger mode
Dec 14 10:06:36 JV-Wx weewx[12591] DEBUG weewx.drivers.ultimeter: Station said: 21
Dec 14 10:06:36 JV-Wx weewx[12591] INFO weewx.drivers.ultimeter: Failed attempt 1 of 5 to get readings: Unexpected buffer length 1
Dec 14 10:06:39 JV-Wx weewx[12591] DEBUG weewx.drivers.ultimeter: Station said: 21
Dec 14 10:06:39 JV-Wx weewx[12591] INFO weewx.drivers.ultimeter: Failed attempt 2 of 5 to get readings: Unexpected buffer length 1
Dec 14 10:06:42 JV-Wx weewx[12591] DEBUG weewx.drivers.ultimeter: Station said: 21
Dec 14 10:06:42 JV-Wx weewx[12591] INFO weewx.drivers.ultimeter: Failed attempt 3 of 5 to get readings: Unexpected buffer length 1
Dec 14 10:06:46 JV-Wx weewx[12591] DEBUG weewx.drivers.ultimeter: Station said: 21
Dec 14 10:06:46 JV-Wx weewx[12591] INFO weewx.drivers.ultimeter: Failed attempt 4 of 5 to get readings: Unexpected buffer length 1
Dec 14 10:06:49 JV-Wx weewx[12591] DEBUG weewx.drivers.ultimeter: Station said: 21
Dec 14 10:06:49 JV-Wx weewx[12591] INFO weewx.drivers.ultimeter: Failed attempt 5 of 5 to get readings: Unexpected buffer length 1
Dec 14 10:06:52 JV-Wx weewx[12591] ERROR weewx.drivers.ultimeter: Max retries (5) exceeded for readings
Dec 14 10:06:52 JV-Wx weewx[12591] INFO weewx.engine: Main loop exiting. Shutting engine down.
Dec 14 10:06:52 JV-Wx weewx[12591] DEBUG weewx.drivers.ultimeter: Close serial port /dev/ttyUSB0
Dec 14 10:06:53 JV-Wx weewx[12591] CRITICAL weewx.engine: Caught WeeWxIOError: Max retries (5) exceeded for readings
Dec 14 10:06:53 JV-Wx weewx[12591] CRITICAL weewx.engine:     ****  Waiting 60 seconds then retrying...



PS:
On the site that I am replacing with the new WeeWx version, I use a MQTT based sensor and in attempting to get it working on Python 3, I get results like this:

weather b'TIME:0,INTE:75.83,INHU:33.06'
b'TIME:0,INTE:75.83,INHU:33.06'

from my Python program that writes a filepile.txt from the MQTT.

I have been struggling with those darn "b" for a couple  of hours.


Thanks for all the help!

Ralph
 

Thomas Keffer

unread,
Dec 14, 2019, 1:43:59 PM12/14/19
to Ralph Underwood, weewx-development
Silly me. I forgot to save the characters to the buffer! Try the attached.

Those damn 'b's are because you are printing bytes or bytearrays, not strings. If you want to get rid of them, you need to convert to a string (which is unicode under Python3). This illustrates:

>>> print(b'abc)
b'abc'
>>> # This fails, because str(b'abc') returns the "informal" representation, which includes the b's:
>>> print(str(b'abc'))
b'abc
>>> print(b'abc'.decode())
abc


-tk

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
ultimeter.py

Ralph Underwood

unread,
Dec 14, 2019, 3:57:24 PM12/14/19
to weewx-development
Thanks Tom.  WeeWx appears to be running - I'm getting output  to home/weewx/public_html/index.html.

Now to tackle the damn 'b's, should keep me busy for a few hours.

I plan on waiting a bit before adding cmom, I have been having trouble with the old system stopping, I suspect because of  a memory leak with either cmom or the Ultimeter driver. Never got a good log to determine what was happening before the crash so I am speculating. 

New system is a RPi4 with a new memory card and a RTC.  Going Python3 all the way with this station.


Ralph

Ralph Underwood

unread,
Dec 16, 2019, 4:17:51 PM12/16/19
to weewx-development
I tried to install the cmon extension with the version 4 and got this error.  

I had just restarted my tail of the log so I hope this is enough.

Dec 16 13:02:16 JV-Wx weewx[27906] CRITICAL weewx.engine:     ****      obj = weeutil.weeutil.get_object(svc)(self,config_dict)
Dec 16 13:02:16 JV-Wx weewx[27906] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weeutil/weeutil.py", line 1093, in get_object
Dec 16 13:02:16 JV-Wx weewx[27906] CRITICAL weewx.engine:     ****      mod = __import__(module)
Dec 16 13:02:16 JV-Wx weewx[27906] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/user/cmon.py", line 331
Dec 16 13:02:16 JV-Wx weewx[27906] CRITICAL weewx.engine:     ****      except (ValueError, IOError, KeyError), e:
Dec 16 13:02:16 JV-Wx weewx[27906] CRITICAL weewx.engine:     ****                                            ^
Dec 16 13:02:16 JV-Wx weewx[27906] CRITICAL weewx.engine:     ****  SyntaxError: invalid syntax
Dec 16 13:02:16 JV-Wx weewx[27906] CRITICAL weewx.engine:     ****  Exiting.
Dec 16 13:02:16 JV-Wx systemd[1]: weewx.service: Main process exited, code=exited, status=1/FAILURE
Dec 16 13:02:16 JV-Wx systemd[1]: weewx.service: Failed with result 'exit-code'.

Thomas Keffer

unread,
Dec 16, 2019, 4:19:10 PM12/16/19
to Ralph Underwood, weewx-development
cmon has not been ported to Python 3.

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.

Ralph Underwood

unread,
Dec 16, 2019, 4:29:23 PM12/16/19
to weewx-development
OK. I tried doing a wee-extension uninstall with no success.  Any hints on how/where  to remove it?  May be simpler to just start with another install of WeeWx. 


I did manage to update my program that reads the mqtt data and write to file pile.txt without those 'b's.




On Monday, December 16, 2019 at 1:19:10 PM UTC-8, Tom Keffer wrote:
cmon has not been ported to Python 3.

On Mon, Dec 16, 2019 at 2:17 PM Ralph Underwood <ral...@gmail.com> wrote:
I tried to install the cmon extension with the version 4 and got this error.  

I had just restarted my tail of the log so I hope this is enough.

Dec 16 13:02:16 JV-Wx weewx[27906] CRITICAL weewx.engine:     ****      obj = weeutil.weeutil.get_object(svc)(self,config_dict)
Dec 16 13:02:16 JV-Wx weewx[27906] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weeutil/weeutil.py", line 1093, in get_object
Dec 16 13:02:16 JV-Wx weewx[27906] CRITICAL weewx.engine:     ****      mod = __import__(module)
Dec 16 13:02:16 JV-Wx weewx[27906] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/user/cmon.py", line 331
Dec 16 13:02:16 JV-Wx weewx[27906] CRITICAL weewx.engine:     ****      except (ValueError, IOError, KeyError), e:
Dec 16 13:02:16 JV-Wx weewx[27906] CRITICAL weewx.engine:     ****                                            ^
Dec 16 13:02:16 JV-Wx weewx[27906] CRITICAL weewx.engine:     ****  SyntaxError: invalid syntax
Dec 16 13:02:16 JV-Wx weewx[27906] CRITICAL weewx.engine:     ****  Exiting.
Dec 16 13:02:16 JV-Wx systemd[1]: weewx.service: Main process exited, code=exited, status=1/FAILURE
Dec 16 13:02:16 JV-Wx systemd[1]: weewx.service: Failed with result 'exit-code'.

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-de...@googlegroups.com.

Ralph Underwood

unread,
Dec 16, 2019, 4:42:58 PM12/16/19
to weewx-development
I commented out various cmon stuff in weewx.conf and have whew running again.

Thanks,
Ralph

Vince Skahan

unread,
Dec 16, 2019, 5:29:41 PM12/16/19
to weewx-development
On Monday, December 16, 2019 at 1:42:58 PM UTC-8, Ralph Underwood wrote:
I commented out various cmon stuff in weewx.conf and have whew running again.



HA - I'm not the only person that Google is auto-correcting 'weewx' to be 'whew' on !

You could 'try' to edit cmon to make it python3 compliant by running "2to3 filename.py" and see how far you get.  The snippet you posted is definitely something 2to3 fixes.   Add the -w switch to have it write out a modified file.

gjr80

unread,
Dec 16, 2019, 6:47:42 PM12/16/19
to weewx-development
Appreciate you have managed to disable cmon but for future reference manual uninstallation of an extension is fairly easy once you know what to look for. There is no simple 'find this and do this', the amount of work involved and where to work depends on the extension. A skin/report based extension will likely require work on the [StdReport] stanza of weewx.conf  to disable and the skins directory to remove. A WeeWX service based extension will likely require work on the [Engine] [[Services]] stanza in weewx.conf to disable and the bin/user directory and likely other stanzas in weewx.conf to remove. More complex extension will require all of the above and possibly more.

The key is to look in the extension installer file install.py which shows the changes the extension installer made to the WeeWX setup. The key areas of the installer are the process_services, config and files settings. These settings show what will be added/changed, you essentially need to reverse these.

For the cmon service:

to disable:
1. in weewx.conf under [Engine] [Services]] comment out/remove the user.cmon.ComputerMonitor entry in the process_services setting
2. restart WeeWX

to remove:
1. in weewx.conf under [Engine] [Services]] remove the user.cmon.ComputerMonitor entry in the process_services setting
2. in weewx.conf delete the [ComputerMonitor] stanza in its entirety
3. in weewx.conf under [DataBindings] delete the [[cmon_binding]] stanza in its entirety
4. in weewx.conf under [Databases] delete the [[cmon_sqlite]] stanza in its entirety
5. in weewx.conf under [StdReport] delete the [[cmon]] stanza in its entirety
6. delete the skins/cmon directory
7. delete the file bin/user/cmon.py
8. if it exists, delete the directory bin/user/installer/cmon
9. restart WeeWX

Certainly make a backup of your install (especially weewx.conf) before removing, in fact commenting out first then deleting once you have the expected result is probably a good approach.

Gary

Ralph Underwood

unread,
Dec 16, 2019, 8:53:19 PM12/16/19
to weewx-development
I found most of those items, but I was still getting a bunch of errors. My system running 3.?? died a few days ago and my backups were not good so I was installing the version 4 as a replacement - consequently I had less that 24 hours data on the system I mistakenly installed cmon on.

I am interested in cmon because I want to track down why my "old" system was periodically crashing - I was suspecting a memory leak. The memory in use would just creep up, seemed to crash 

I just made a clean installation using a newly imaged card and Vince's script. Copied over the latest ultimeter driver and I am up and running.

I still have to get my MQTT stuff working again - I stumbled upon how to get the python 3 version of paho.mqtt installed yesterday, but didn't make good notes.

Thanks again to Tom, Vince and Gary!




Thomas Keffer

unread,
Dec 17, 2019, 7:37:32 PM12/17/19
to Ralph Underwood, weewx-development
Ralph,

Try this version of cmon.py. I did a quick port to Python 3. It should work with Python 2 or 3, and under either WeeWX V3.9, or 4.0.

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/c5f6e1cb-4934-4ae3-b62c-aab93668bd07%40googlegroups.com.
cmon.py

Xant

unread,
Dec 18, 2019, 12:05:20 AM12/18/19
to weewx-development
"Baby steps" here.... and started from scratch all over again for RPi4...

1) RPi 3b+ / stable
On the side, in parallel, and working fine with WeeWX 3.9.2 & Bskin 1.1b7

2) RPi 4 / bench test
Transposed the above to RPi4 (ie, adjust previous 3.9.2 with Seasons skin to RPi 4, rebuild db, etc).
After usual adjustments, all seems fine (prior to update to WeeWX vs4b): Day, Week, Month, but not Year... which is mostly empty.
Sure, it can be a "transfusion" issue, but urge you to click in "Year" at your side, and verify that all is Ok (sometimes, we all forget about this last click and timeframe).

If no other reports, will soon continue beta upgrade and report.

Best, X

Rich Bell

unread,
Dec 18, 2019, 1:17:18 PM12/18/19
to weewx-development
Just FYI, the cmon skin is one of the skins that uses the imaging library's default font. On my Pi 3, this causes a slow increase in memory usage. See, https://groups.google.com/forum/#!topic/weewx-user/qeVSNzy7Zck for any additional information I might discover.
- Rich

Xant

unread,
Dec 18, 2019, 1:43:50 PM12/18/19
to weewx-development
(update)

Please, disregard my previous posting as Year now showing.


After much do and starting over, WeeWX 4.0.0b5 now working with no issues on RPi4 2.7 python. Will leave for a while, and later try python 3.

X

Chris Alemany

unread,
Dec 18, 2019, 2:04:46 PM12/18/19
to weewx-development
Has anyone tried V4 on macOS yet? I am running weewx on Catalina (macOS 10.15) now so was thinking of trying to work on a procedure for installing python 3 and weewx4 over the next couple weeks.

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.

Thomas Keffer

unread,
Dec 18, 2019, 4:00:11 PM12/18/19
to Chris Alemany, weewx-development
Yes, I have run WeeWX on Catalina and have not had any problems. The how-to-install instructions in the file macos.htm that comes in the tarball are current. 

-tk

Chris Alemany

unread,
Dec 18, 2019, 5:22:45 PM12/18/19
to Thomas Keffer, weewx-development
Great thanks Thomas, I’ll check it out soon and report back if I run across anything but I don’t anticipate anything other than maybe hiccups with extensions.

Xant

unread,
Dec 18, 2019, 7:59:59 PM12/18/19
to weewx-development

Update report:
  • WeeWX: 4.0.0b5
  • computer: RPi4
  • OS: Raspbian GNU/Linux 10 (buster)
  • PWS; WeatherFlow
  • driver: weatherflow-udp (by Capitan-Coredump)
  • skin: Seasons
  • Python: 3.7.3
Just restarted in Python 3 mode... no issues so far.

X

Thomas Keffer

unread,
Dec 18, 2019, 8:07:38 PM12/18/19
to Xant, weewx-development
That's good news!

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.

John Kline

unread,
Dec 19, 2019, 9:45:58 PM12/19/19
to weewx-development
I got the CC3000 driver running on Debian Buster in Python 2.7.16 and Python 3.7.3.

It did require changes to run on Python 3.  I’ve sent a pull request that also includes a great deal of robustness enhancements to the CC3000 driver that I have been running (on two CC3000s) for many months.  I’m hoping you can take all of this.

On Dec 18, 2019, at 5:07 PM, Thomas Keffer <tke...@gmail.com> wrote:



Thomas Keffer

unread,
Dec 20, 2019, 9:16:26 AM12/20/19
to John Kline, weewx-development
That's quite the PR! Thank you.

It will take me a day or two to review it. Get back to you soon.

-tk

Andy

unread,
Dec 30, 2019, 11:37:11 AM12/30/19
to weewx-development
Weewx stops when rain starts. Log attached. I have not spent much time looking into this yet and could be a layer 8 issue.

user.sdr: driver version is 0.72
weewx.engine: Initializing weewx version 4.0.0b5
Using Python 3.7.3 (default, Apr  3 2019, 05:39:12) #012[GCC 8.3.0]
Platform Linux-4.19.0-6-amd64-x86_64-with-debian-10.2


{"time" : "2019-12-29 23:24:16", "model" : "Acurite 5n1 sensor", "sensor_id" : 2662, "channel" : "A", "sequence_num" : 1, "battery" : "OK", "message_type" : 49, "wind_speed_kph" : 0.000, "wind_dir_deg" : 90.000, "rain_inch" : 6.900}
{"time" : "2019-12-29 23:25:28", "model" : "Acurite 5n1 sensor", "sensor_id" : 2662, "channel" : "A", "sequence_num" : 1, "battery" : "OK", "message_type" : 49, "wind_speed_kph" : 0.000, "wind_dir_deg" : 157.500, "rain_inch" : 6.910}


Dec 29 15:25:48 weewx-01 python3[19381]:     rain = weewx.units.convertStd((record['rain'], u, g), self.unit_system)[0]
Dec 29 15:25:48 weewx-01 python3[19381]:   File "/home/weewx/bin/weewx/units.py", line 1222, in convertStd
Dec 29 15:25:48 weewx-01 weewx[19381] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/units.py", line 1222, in convertStd
Dec 29 15:25:48 weewx-01 python3[19381]:     return StdUnitConverters[target_std_unit_system].convert(val_t)





Andy

weewx-01-Log.txt

Vince Skahan

unread,
Dec 30, 2019, 12:03:47 PM12/30/19
to weewx-development
On Monday, December 30, 2019 at 8:37:11 AM UTC-8, Andy wrote:
Weewx stops when rain starts. Log attached. I have not spent much time looking into this yet and could be a layer 8 issue.



Sounds like the problem I reported a while back - https://groups.google.com/forum/#!topic/weewx-development/IoTUyFA21pY

Thomas Keffer

unread,
Dec 30, 2019, 4:28:22 PM12/30/19
to Vince Skahan, weewx-development
I think it is too. So we don't go chasing old bugs, I've posted beta 6.

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages