Problem with Davis VP2 (Data logger or Konsole)?

90 views
Skip to first unread message

Meteo Oberwallis

unread,
May 15, 2020, 2:54:04 AM5/15/20
to weewx-user
Hello everbody.

I have the following problem. The data readout of the Vantage Pro2 console worked without problems for a long time. But I've had this problem for a few weeks now. The solution then seems to be to delete the data logger (with wee_device --clear-memory) and restart weewx. 
Then it works for a while until this error occurs again. What could this be? If I understand that correctly, can't he read the data record from the logger?

May 15 08:43:16 raspberrypi systemd[1]: Starting LSB: weewx weather system...
May 15 08:43:27 raspberrypi weewx[4653]: engine: Initializing weewx version 3.9.1
May 15 08:43:27 raspberrypi weewx[4653]: engine: Using Python 2.7.13 (default, Sep 26 2018, 18:42:22) #012[GCC 6.3.0 20170516]
May 15 08:43:27 raspberrypi weewx[4653]: engine: Platform Linux-4.19.42-v7+-armv7l-with-debian-9.9
May 15 08:43:27 raspberrypi weewx[4653]: engine: Locale is 'de_CH.UTF-8'
May 15 08:43:27 raspberrypi weewx[4653]: engine: pid file is /var/run/weewx.pid
May 15 08:43:27 raspberrypi weewx[4639]: Starting weewx weather system: weewx.
May 15 08:43:27 raspberrypi systemd[1]: Started LSB: weewx weather system.
May 15 08:43:27 raspberrypi weewx[4657]: engine: Using configuration file /etc/weewx/weewx.conf
May 15 08:43:27 raspberrypi weewx[4657]: engine: Debug is 1
May 15 08:43:27 raspberrypi weewx[4657]: engine: Initializing engine
May 15 08:43:27 raspberrypi weewx[4657]: engine: Loading station type Vantage (weewx.drivers.vantage)
May 15 08:43:27 raspberrypi weewx[4657]: vantage: Driver version is 3.1.1
May 15 08:43:27 raspberrypi weewx[4657]: vantage: Opened up serial port /dev/ttyUSB0; baud 19200; timeout 4.00
May 15 08:43:27 raspberrypi weewx[4657]: vantage: Gentle wake up of console successful
May 15 08:43:27 raspberrypi weewx[4657]: vantage: Hardware type is 16
May 15 08:43:27 raspberrypi weewx[4657]: vantage: ISS ID is 1
May 15 08:43:27 raspberrypi weewx[4657]: vantage: Hardware name: Vantage Pro2
May 15 08:43:27 raspberrypi weewx[4657]: engine: Loading service weewx.engine.StdTimeSynch
May 15 08:43:27 raspberrypi weewx[4657]: engine: Finished loading service weewx.engine.StdTimeSynch
May 15 08:43:27 raspberrypi weewx[4657]: engine: Loading service user.cputemp.AddCpuTemp
May 15 08:43:27 raspberrypi weewx[4657]: engine: Finished loading service user.cputemp.AddCpuTemp
May 15 08:43:27 raspberrypi weewx[4657]: engine: Loading service user.radiationhours.RadiationHours
May 15 08:43:27 raspberrypi weewx[4657]: engine: Finished loading service user.radiationhours.RadiationHours
May 15 08:43:27 raspberrypi weewx[4657]: engine: Loading service weewx.engine.StdConvert
May 15 08:43:27 raspberrypi weewx[4657]: engine: StdConvert target unit is 0x1
May 15 08:43:27 raspberrypi weewx[4657]: engine: Finished loading service weewx.engine.StdConvert
May 15 08:43:27 raspberrypi weewx[4657]: engine: Loading service weewx.engine.StdCalibrate
May 15 08:43:27 raspberrypi weewx[4657]: engine: Finished loading service weewx.engine.StdCalibrate
May 15 08:43:27 raspberrypi weewx[4657]: engine: Loading service weewx.engine.StdQC
May 15 08:43:27 raspberrypi weewx[4657]: engine: Finished loading service weewx.engine.StdQC
May 15 08:43:27 raspberrypi weewx[4657]: engine: Loading service weewx.wxservices.StdWXCalculate
May 15 08:43:27 raspberrypi weewx[4657]: wxcalculate: The following values will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, cloudbase=prefer_hardware
May 15 08:43:27 raspberrypi weewx[4657]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
May 15 08:43:27 raspberrypi weewx[4657]: engine: Finished loading service weewx.wxservices.StdWXCalculate
May 15 08:43:27 raspberrypi weewx[4657]: engine: Loading service weewx.engine.StdArchive
May 15 08:43:27 raspberrypi weewx[4657]: engine: Archive will use data binding wx_binding
May 15 08:43:27 raspberrypi weewx[4657]: engine: Record generation will be attempted in 'hardware'
May 15 08:43:27 raspberrypi weewx[4657]: engine: Using archive interval of 300 seconds (specified by hardware)
May 15 08:43:27 raspberrypi weewx[4657]: engine: Use LOOP data in hi/low calculations: 1
May 15 08:43:27 raspberrypi weewx[4657]: manager: Daily summary version is 2.0
May 15 08:43:27 raspberrypi weewx[4657]: engine: Using binding 'wx_binding' to database 'weewx.sdb_new'
May 15 08:43:27 raspberrypi weewx[4657]: manager: Starting backfill of daily summaries
May 15 08:43:27 raspberrypi weewx[4657]: engine: Finished loading service weewx.engine.StdArchive
May 15 08:43:27 raspberrypi weewx[4657]: engine: Loading service weewx.restx.StdStationRegistry
May 15 08:43:27 raspberrypi weewx[4657]: restx: StationRegistry: Registration not requested.
May 15 08:43:27 raspberrypi weewx[4657]: engine: Finished loading service weewx.restx.StdStationRegistry
May 15 08:43:27 raspberrypi weewx[4657]: engine: Loading service weewx.restx.StdWunderground
May 15 08:43:27 raspberrypi weewx[4657]: restx: Wunderground: Posting not enabled.
May 15 08:43:27 raspberrypi weewx[4657]: engine: Finished loading service weewx.restx.StdWunderground
May 15 08:43:27 raspberrypi weewx[4657]: engine: Loading service weewx.restx.StdPWSweather
May 15 08:43:27 raspberrypi weewx[4657]: restx: PWSweather: Posting not enabled.
May 15 08:43:27 raspberrypi weewx[4657]: engine: Finished loading service weewx.restx.StdPWSweather
May 15 08:43:27 raspberrypi weewx[4657]: engine: Loading service weewx.restx.StdCWOP
May 15 08:43:27 raspberrypi weewx[4657]: restx: CWOP: Posting not enabled.
May 15 08:43:27 raspberrypi weewx[4657]: engine: Finished loading service weewx.restx.StdCWOP
May 15 08:43:27 raspberrypi weewx[4657]: engine: Loading service weewx.restx.StdWOW
May 15 08:43:27 raspberrypi weewx[4657]: restx: WOW: Posting not enabled.
May 15 08:43:27 raspberrypi weewx[4657]: engine: Finished loading service weewx.restx.StdWOW
May 15 08:43:27 raspberrypi weewx[4657]: engine: Loading service weewx.restx.StdAWEKAS
May 15 08:43:27 raspberrypi weewx[4657]: restx: AWEKAS: Posting not enabled.
May 15 08:43:27 raspberrypi weewx[4657]: engine: Finished loading service weewx.restx.StdAWEKAS
May 15 08:43:27 raspberrypi weewx[4657]: engine: Loading service user.mqtt.MQTT
May 15 08:43:27 raspberrypi weewx[4657]: restx: MQTT: service version is 0.19
May 15 08:43:27 raspberrypi weewx[4657]: restx: MQTT: Data will not be uploaded: Missing option 'MQTT'
May 15 08:43:27 raspberrypi weewx[4657]: engine: Finished loading service user.mqtt.MQTT
May 15 08:43:27 raspberrypi weewx[4657]: engine: Loading service weewx.engine.StdPrint
May 15 08:43:27 raspberrypi weewx[4657]: engine: Finished loading service weewx.engine.StdPrint
May 15 08:43:27 raspberrypi weewx[4657]: engine: Loading service weewx.engine.StdReport
May 15 08:43:27 raspberrypi weewx[4657]: engine: Finished loading service weewx.engine.StdReport
May 15 08:43:27 raspberrypi weewx[4657]: engine: Starting up weewx version 3.9.1
May 15 08:43:27 raspberrypi weewx[4657]: vantage: Gentle wake up of console successful
May 15 08:43:27 raspberrypi weewx[4657]: engine: Clock error is 1.03 seconds (positive is fast)
May 15 08:43:27 raspberrypi weewx[4657]: vantage: Getting archive packets since 2020-05-13 11:55:00 CEST (1589363700)
May 15 08:43:27 raspberrypi weewx[4657]: vantage: Gentle wake up of console successful
May 15 08:43:28 raspberrypi weewx[4657]: vantage: Retrieving 18 page(s); starting index= 0
May 15 08:43:28 raspberrypi weewx[4657]: engine: Main loop exiting. Shutting engine down.
May 15 08:43:28 raspberrypi weewx[4657]: engine: Caught unrecoverable exception in engine:
May 15 08:43:28 raspberrypi weewx[4657]:     ****  float() argument must be a string or a number
May 15 08:43:28 raspberrypi weewx[4657]:     ****  Traceback (most recent call last):
May 15 08:43:28 raspberrypi weewx[4657]:     ****    File "/usr/share/weewx/weewx/engine.py", line 890, in main
May 15 08:43:28 raspberrypi weewx[4657]:     ****      engine.run()
May 15 08:43:28 raspberrypi weewx[4657]:     ****    File "/usr/share/weewx/weewx/engine.py", line 160, in run
May 15 08:43:28 raspberrypi weewx[4657]:     ****      self.dispatchEvent(weewx.Event(weewx.STARTUP))
May 15 08:43:28 raspberrypi weewx[4657]:     ****    File "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
May 15 08:43:28 raspberrypi weewx[4657]:     ****      callback(event)
May 15 08:43:28 raspberrypi weewx[4657]:     ****    File "/usr/share/weewx/weewx/engine.py", line 520, in startup
May 15 08:43:28 raspberrypi weewx[4657]:     ****      self._catchup(self.engine.console.genStartupRecords)
May 15 08:43:28 raspberrypi weewx[4657]:     ****    File "/usr/share/weewx/weewx/engine.py", line 635, in _catchup
May 15 08:43:28 raspberrypi weewx[4657]:     ****      origin='hardware'))
May 15 08:43:28 raspberrypi weewx[4657]:     ****    File "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
May 15 08:43:28 raspberrypi weewx[4657]:     ****      callback(event)
May 15 08:43:28 raspberrypi weewx[4657]:     ****    File "/usr/share/weewx/user/radiationhours.py", line 20, in newArchiveRecord
May 15 08:43:28 raspberrypi weewx[4657]:     ****      tempe = float(event.record.get('outTemp'))
May 15 08:43:28 raspberrypi weewx[4657]:     ****  TypeError: float() argument must be a string or a number
May 15 08:43:28 raspberrypi weewx[4657]:     ****  Exiting.

Tom Keffer

unread,
May 15, 2020, 8:13:35 AM5/15/20
to weewx-user
It looks like your extension 'radationhours' is not prepared for the case where outTemp is either missing from a record, or has a value of None. You must check for these cases.

Also, it should not be necessary to cast the value as a float: it's already either a float, or None.

As for why outTemp would be missing from the record, or have a value of None, that's hard to say. It would depend on what processing has occurred earlier in the engine pipeline.

-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/ddc5ebcc-e531-4cf9-8a8c-51dd5ebeb6d0%40googlegroups.com.

Meteo Oberwallis

unread,
May 15, 2020, 9:00:53 AM5/15/20
to weewx-user
Hello.

I have the problem that the reading stops at once. If I then check, this message always comes. As soon as I delete the archive memory from the data logger, weewx can be started again. I can rule out that the data logger is defective. After this procedure everything works again.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

Tom Keffer

unread,
May 15, 2020, 9:48:54 AM5/15/20
to weewx-user
The reading stops because weewxd crashed. It crashed because you're trying to convert a None value to a float value. 

Fix the extension radiationhours.py first, then try again.

-tk

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/e227524f-5715-4900-b9a1-cd8f193763b5%40googlegroups.com.

Jacques Terrettaz

unread,
May 15, 2020, 10:04:21 AM5/15/20
to weewx-user
Hi Meteo Oberwallis,

Try to modify the script /usr/share/weewx/user/radiationhours.py as follow :

Replace (in line 20 ?) :

tempe = float(event.record.get('outTemp'))

by

tempe = event.record.get('outTemp')
if tempe is None:
    tempe=15

Tom Keffer

unread,
May 15, 2020, 10:10:26 AM5/15/20
to weewx-user
Or, even simpler,

tempe = event.record.get('outTemp', 15.0)

-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.

Meteo Oberwallis

unread,
May 15, 2020, 10:17:24 AM5/15/20
to weewx-user
Hello Jacques

Ok. Its Work! Thank you. I will test this.

def newArchiveRecord(self, event):
        """Gets called on a new archive record event."""
        seuil = 0

        tempe = event.record.get('outTemp')
        if tempe is None: tempe=15
        radiation = event.record.get('radiation')
        event.record['sunshine_hours'] = 0.0
        if radiation is not None:
            utcdate = datetime.utcfromtimestamp(event.record.get('dateTime'))
            dayofyear = int(time.strftime("%j",time.gmtime(event.record.get('dateTime'))))
            theta = 360 * dayofyear / 365
            equatemps = 0.0172 + 0.4281 * cos((pi / 180) * theta) - 7.3515 * sin(
                (pi / 180) * theta) - 3.3495 * cos(2 * (pi / 180) * theta) - 9.3619 * sin(
                2 * (pi / 180) * theta)

Meteo Oberwallis

unread,
May 15, 2020, 10:21:00 AM5/15/20
to weewx-user
Thx Tom. I hope, this failure its away. Its not good, when i must clear the Logger every Day.


Am Freitag, 15. Mai 2020 16:10:26 UTC+2 schrieb Tom Keffer:
Or, even simpler,

tempe = event.record.get('outTemp', 15.0)

-tk

On Fri, May 15, 2020 at 7:04 AM Jacques Terrettaz <jterr...@gmail.com> wrote:
Hi Meteo Oberwallis,

Try to modify the script /usr/share/weewx/user/radiationhours.py as follow :

Replace (in line 20 ?) :

tempe = float(event.record.get('outTemp'))

by

tempe = event.record.get('outTemp')
if tempe is None:
    tempe=15

--
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...@googlegroups.com.

Tom Keffer

unread,
May 15, 2020, 10:23:20 AM5/15/20
to weewx-user
No, it is not good. But, the VP2 driver is used by hundreds, maybe thousands of users. I'm sure it can be made to work.

What happened after putting in the fix for the extension radiationhours?

-tk

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/6e52ed1a-ba10-49c1-a6eb-0492eccd664b%40googlegroups.com.

Meteo Oberwallis

unread,
May 15, 2020, 10:29:01 AM5/15/20
to weewx-user
The error has now disappeared and I have also found out why this happens. If the console lost the connection to the outside, then the expansion had a problem because there was no value. That is why weewx was stopped.
Now it runs even after the data logger has been deleted and no data from the outdoor station is available.
What is the value 15 for? What does this mean?

Jacques Terrettaz

unread,
May 15, 2020, 10:50:32 AM5/15/20
to weewx...@googlegroups.com
The formula include a small correction of the Davis radiation sensor values depending on the temperature.  
If the temperature is not available, a default temperature of 15°C is used. 

You can use alternatively 25.0 instead of 15.0 as default temperature -  tempe = event.record.get('outTemp', 25.0) -   and in that case the radiation value will not be corrected if temperature value is not available.   
Reply all
Reply to author
Forward
0 new messages