David,

OK, it looks like what has happened is for some reason WeeWX has received 
some radiation data yesterday resulting in one archive record being saved 
with radiation data (2nd row in the first SELECT output is yesterday). The 
other captures you provide indicate that no radiation data is being 
received by WeeWX now. I expect the same for UV and ET. Now that you are 
onto a new day your index.html will be radiation, UV and ET free but week, 
month and year will still have them, at least until next week, next month 
and next year respectively.

So what is the fix, well just a bit of cleaning up of corrupt data in the 
database using sqlite3. First we need to remove the bad data from the 
archive then we will drop and rebuild the daily summaries to remove the bad 
data from the daily summaries. The following should fix things for you:

1. stop WeeWX and make a backup copy of your weewx database, something like:

$ sudo cp /home/weewx/archive/weewx.sdb /home/weewx/archive/weewx_backup.sdb

should do the trick, substitute the path to and file name of your database 
as required.

2. remove any non-zero radiation, UV and ET values from the archive:

$ sudo sqlite3 /home/weewx/archive/weewx.sdb
sqlite> UPDATE archive SET radiation=NULL,UV=NULL,ET=NULL WHERE radiation>=0
;

3. now check that we got them all:

sqlite> SELECT COUNT(radiation) FROM archive WHERE radiation>=0;
sqlite> SELECT COUNT(UV) FROM archive WHERE UV>=0;
sqlite> SELECT COUNT(ET) FROM archive WHERE ET>=0;

each of those queries should return 0, if any return > 0 then we need to go 
back and clear that column in your archive with

sqlite> UPDATE archive SET UV=NULL WHERE UV>=0;

and/or

sqlite> UPDATE archive SET ET=NULL WHERE ET>=0;

4. once done with sqlite3 exit with .q

5. drop and rebuild the daily summaries 
<http://weewx.com/docs/utilities.htm#Action_--drop-daily>:

$ wee_database --drop-daily
$ wee_database --rebuild-daily

you may need to prefix wee_database with sudo and you may need to use the 
full path to wee_database (it will be in /home/weewx/bin or /usr/share/weewx
)

6. restart WeeWX

When your reports next generate all traces of radiation, UV and ET should 
be gone. As I said earlier I have no idea why, I guess put it down as a one 
off but if it happens again or repeatedly then maybe start looking deeper.

Gary

On Saturday, 16 March 2019 14:52:47 UTC+10, David Watts wrote:
>
> Hi Gary
>
> Many thanks for your instructions. The weird thing is that the radiation 
> entries that appeared yesterday have now gone today! Nonetheless, pasted 
> below are the outputs you requested. I'm wondering if a weird anomalous 
> reading from the weather station tricked weewx into thinking that 
> non-existent sensors were present?
>
> sqlite>  SELECT * FROM archive_day_radiation ORDER BY dateTime DESC LIMIT 
>> 10;
>> dateTime|min|mintime|max|maxtime|sum|count|wsum|sumtime
>> 1552694400|||||0.0|0|0.0|0
>>
>> 1552608000|13679.096575|1552622758|13679.096575|1552623000|13679.096575|1|13679.096575|1
>> 1552521600|||||0.0|0|0.0|0
>> 1552435200|||||0.0|0|0.0|0
>> 1552348800|||||0.0|0|0.0|0
>> 1552262400|||||0.0|0|0.0|0
>> 1552176000|||||0.0|0|0.0|0
>> 1552089600|||||0.0|0|0.0|0
>> 1552003200|||||0.0|0|0.0|0
>> 1551916800|||||0.0|0|0.0|0
>>
>
>
> sqlite> SELECT dateTime,radiation,UV,ET FROM archive ORDER BY dateTime 
>> DESC LIMIT 25;
>> dateTime|radiation|UV|ET
>> 1552710900|||
>> 1552710600|||
>> 1552710300|||
>> 1552710000|||
>> 1552709700|||
>> 1552709400|||
>> 1552709100|||
>> 1552708800|||
>> 1552708500|||
>> 1552708200|||
>> 1552707900|||
>> 1552707600|||
>> 1552707300|||
>> 1552707000|||
>> 1552706700|||
>> 1552706400|||
>> 1552706100|||
>> 1552705800|||
>> 1552705500|||
>> 1552705200|||
>> 1552704900|||
>> 1552704600|||
>> 1552704300|||
>> 1552704000|||
>> 1552703700|||
>>
>
>
> ratta@gosigweather:~ $ sudo weewxd /etc/weewx/weewx.conf
>> REC:    2019-03-16 04:40:09 GMT (1552711209) altimeter: 29.7488889413, 
>> appTemp: 45.4480105877, barometer: 29.7597303646, cloudbase: 1625.54261003, 
>> dateTime: 1552711209, delay: 5, dewpoint: 44.1132125159, ET: None, 
>> heatindex: 47.8180556736, humidex: 50.72, inDewpoint: 46.9329495302, 
>> inHumidity: 43.0, inTemp: 70.52, interval: 5, maxSolarRad: None, 
>> outHumidity: 78.0, outTemp: 50.72, outTempBatteryStatus: 0, pressure: 
>> 29.62448346, ptr: 7008, radiation: None, rain: None, rainRate: 0, 
>> rainTotal: 71.7, rxCheckPercent: 100, status: 0, usUnits: 1, UV: None, 
>> windchill: 50.72, windDir: 180.0, windGust: 10.7373208893, windGustDir: 
>> 180.0, windrun: 19.0341263825, windSpeed: 6.93451974101
>> LOOP:   2019-03-16 04:40:12 GMT (1552711212) altimeter: 29.7488889413, 
>> appTemp: 45.4480105877, barometer: 29.7597303646, cloudbase: 1625.54261003, 
>> dateTime: 1552711212, delay: 0, dewpoint: 44.1132125159, heatindex: 
>> 48.1188094211, humidex: 50.72, inDewpoint: 46.9329495302, inHumidity: 43.0, 
>> inTemp: 70.52, maxSolarRad: None, outHumidity: 78.0, outTemp: 50.72, 
>> outTempBatteryStatus: 0, pressure: 29.62448346, ptr: 7024, radiation: None, 
>> rain: None, rainRate: 0, rainTotal: 71.7, rxCheckPercent: 100, status: 0, 
>> usUnits: 1, UV: None, windchill: 50.72, windDir: 180.0, windGust: 
>> 10.7373208893, windGustDir: 180.0, windSpeed: 6.93451974101
>> LOOP:   2019-03-16 04:40:55 GMT (1552711255) altimeter: 29.7518526948, 
>> appTemp: 45.9520105877, barometer: 29.7626968449, cloudbase: 1625.54261003, 
>> dateTime: 1552711255, delay: 0, dewpoint: 44.1132125159, heatindex: 
>> 47.9360729669, humidex: 50.72, inDewpoint: 46.9329495302, inHumidity: 43.0, 
>> inTemp: 70.52, maxSolarRad: None, outHumidity: 78.0, outTemp: 50.72, 
>> outTempBatteryStatus: 0, pressure: 29.6274364588, ptr: 7024, radiation: 
>> None, rain: 0.0, rainRate: 0, rainTotal: 71.7, rxCheckPercent: 100, status: 
>> 0, usUnits: 1, UV: None, windchill: 50.72, windDir: 180.0, windGust: 
>> 12.9742627412, windGustDir: 180.0, windSpeed: 6.03974300024
>> LOOP:   2019-03-16 04:41:37 GMT (1552711297) altimeter: 29.7518526948, 
>> appTemp: 45.9520105877, barometer: 29.7626968449, cloudbase: 1625.54261003, 
>> dateTime: 1552711297, delay: 0, dewpoint: 44.1132125159, heatindex: 
>> 47.9360729669, humidex: 50.72, inDewpoint: 46.9329495302, inHumidity: 43.0, 
>> inTemp: 70.52, maxSolarRad: None, outHumidity: 78.0, outTemp: 50.72, 
>> outTempBatteryStatus: 0, pressure: 29.6274364588, ptr: 7024, radiation: 
>> None, rain: 0.0, rainRate: 0, rainTotal: 71.7, rxCheckPercent: 100, status: 
>> 0, usUnits: 1, UV: None, windchill: 50.72, windDir: 180.0, windGust: 
>> 12.9742627412, windGustDir: 180.0, windSpeed: 6.03974300024
>> LOOP:   2019-03-16 04:42:18 GMT (1552711338) altimeter: 29.7518526948, 
>> appTemp: 46.8340105877, barometer: 29.7626968449, cloudbase: 1625.54261003, 
>> dateTime: 1552711338, delay: 1, dewpoint: 44.1132125159, heatindex: 
>> 48.7888430864, humidex: 50.72, inDewpoint: 46.9329495302, inHumidity: 43.0, 
>> inTemp: 70.52, maxSolarRad: None, outHumidity: 78.0, outTemp: 50.72, 
>> outTempBatteryStatus: 0, pressure: 29.6274364588, ptr: 7024, radiation: 
>> None, rain: 0.0, rainRate: 0, rainTotal: 71.7, rxCheckPercent: 100, status: 
>> 0, usUnits: 1, UV: None, windchill: 50.72, windDir: 180.0, windGust: 
>> 8.27668485218, windGustDir: 180.0, windSpeed: 4.47388370388
>> LOOP:   2019-03-16 04:42:59 GMT (1552711379) altimeter: 29.7518526948, 
>> appTemp: 46.3300105877, barometer: 29.7626968449, cloudbase: 1625.54261003, 
>> dateTime: 1552711379, delay: 2, dewpoint: 44.1132125159, heatindex: 
>> 48.5451944809, humidex: 50.72, inDewpoint: 47.0951998592, inHumidity: 43.0, 
>> inTemp: 70.7, maxSolarRad: None, outHumidity: 78.0, outTemp: 50.72, 
>> outTempBatteryStatus: 0, pressure: 29.6274364588, ptr: 7024, radiation: 
>> None, rain: 0.0, rainRate: 0, rainTotal: 71.7, rxCheckPercent: 100, status: 
>> 0, usUnits: 1, UV: None, windchill: 50.72, windDir: 180.0, windGust: 
>> 9.17146159295, windGustDir: 180.0, windSpeed: 5.36866044465
>> LOOP:   2019-03-16 04:43:40 GMT (1552711420) altimeter: 29.754816448, 
>> appTemp: 46.8340105877, barometer: 29.7656633252, cloudbase: 1625.54261003, 
>> dateTime: 1552711420, delay: 3, dewpoint: 44.1132125159, heatindex: 
>> 48.8802113135, humidex: 50.72, inDewpoint: 47.0951998592, inHumidity: 43.0, 
>> inTemp: 70.7, maxSolarRad: None, outHumidity: 78.0, outTemp: 50.72, 
>> outTempBatteryStatus: 0, pressure: 29.6303894575, ptr: 7024, radiation: 
>> None, rain: 0.0, rainRate: 0, rainTotal: 71.7, rxCheckPercent: 100, status: 
>> 0, usUnits: 1, UV: None, windchill: 50.72, windDir: 270.0, windGust: 
>> 7.60560229659, windGustDir: 270.0, windSpeed: 4.47388370388
>> LOOP:   2019-03-16 04:44:21 GMT (1552711461) altimeter: 29.754816448, 
>> appTemp: 45.4480105877, barometer: 29.7656633252, cloudbase: 1625.54261003, 
>> dateTime: 1552711461, delay: 3, dewpoint: 44.1132125159, heatindex: 
>> 47.6010561342, humidex: 50.72, inDewpoint: 47.0951998592, inHumidity: 43.0, 
>> inTemp: 70.7, maxSolarRad: None, outHumidity: 78.0, outTemp: 50.72, 
>> outTempBatteryStatus: 0, pressure: 29.6303894575, ptr: 7024, radiation: 
>> None, rain: 0.0, rainRate: 0, rainTotal: 71.7, rxCheckPercent: 100, status: 
>> 0, usUnits: 1, UV: None, windchill: 50.72, windDir: 225.0, windGust: 
>> 14.5401220376, windGustDir: 225.0, windSpeed: 6.93451974101
>> LOOP:   2019-03-16 04:45:02 GMT (1552711502) altimeter: 29.7518526948, 
>> appTemp: 47.5900105877, barometer: 29.7626968449, cloudbase: 1625.54261003, 
>> dateTime: 1552711502, delay: 4, dewpoint: 44.1132125159, heatindex: 
>> 49.1543159948, humidex: 50.72, inDewpoint: 47.0951998592, inHumidity: 43.0, 
>> inTemp: 70.7, maxSolarRad: None, outHumidity: 78.0, outTemp: 50.72, 
>> outTempBatteryStatus: 0, pressure: 29.6274364588, ptr: 7024, radiation: 
>> None, rain: 0.0, rainRate: 0, rainTotal: 71.7, rxCheckPercent: 100, status: 
>> 0, usUnits: 1, UV: None, windchill: 50.72, windDir: 270.0, windGust: 
>> 6.93451974101, windGustDir: 270.0, windSpeed: 3.13171859272
>> LOOP:   2019-03-16 04:45:43 GMT (1552711543) altimeter: 29.7518526948, 
>> appTemp: 41.6680105877, barometer: 29.7626968449, cloudbase: 1625.54261003, 
>> dateTime: 1552711543, delay: 0, dewpoint: 44.1132125159, heatindex: 
>> 46.5046374091, humidex: 50.72, inDewpoint: 47.0951998592, inHumidity: 43.0, 
>> inTemp: 70.7, maxSolarRad: None, outHumidity: 78.0, outTemp: 50.72, 
>> outTempBatteryStatus: 0, pressure: 29.6274364588, ptr: 7040, radiation: 
>> None, rain: 0.0, rainRate: 0, rainTotal: 71.7, rxCheckPercent: 100, status: 
>> 0, usUnits: 1, UV: None, windchill: 50.72, windDir: 315.0, windGust: 
>> 15.8822871488, windGustDir: 315.0, windSpeed: 13.6453452968
>> REC:    2019-03-16 04:45:00 GMT (1552711500) altimeter: 29.7522760881, 
>> appTemp: 46.1140105877, barometer: 29.7631206278, cloudbase: 1625.54261003, 
>> dateTime: 1552711500.0, delay: 1.28571428571, dewpoint: 44.1132125159, ET: 
>> None, heatindex: 47.4166881045, humidex: 50.72, inDewpoint: 47.0024853855, 
>> inHumidity: 43.0, inTemp: 70.5971428571, interval: 5, maxSolarRad: None, 
>> outHumidity: 78.0, outTemp: 50.72, outTempBatteryStatus: 0.0, pressure: 
>> 29.6278583157, ptr: 7024.0, radiation: None, rain: 0.0, rainRate: 0.0, 
>> rainTotal: 71.7, rxCheckPercent: 100.0, status: 0.0, usUnits: 1, UV: None, 
>> windchill: 50.72, windDir: 195.523406742, windGust: 14.5401220376, 
>> windGustDir: 225.0, windrun: 19.6120030276, windSpeed: 5.7521361907
>> LOOP:   2019-03-16 04:45:44 GMT (1552711544) altimeter: 29.7518526948, 
>> appTemp: 41.6680105877, barometer: 29.7626968449, cloudbase: 1625.54261003, 
>> dateTime: 1552711544, delay: 0, dewpoint: 44.1132125159, heatindex: 
>> 46.5046374091, humidex: 50.72, inDewpoint: 47.0951998592, inHumidity: 43.0, 
>> inTemp: 70.7, maxSolarRad: None, outHumidity: 78.0, outTemp: 50.72, 
>> outTempBatteryStatus: 0, pressure: 29.6274364588, ptr: 7040, radiation: 
>> None, rain: 0.0, rainRate: 0, rainTotal: 71.7, rxCheckPercent: 100, status: 
>> 0, usUnits: 1, UV: None, windchill: 50.72, windDir: 315.0, windGust: 
>> 15.8822871488, windGustDir: 315.0, windSpeed: 13.6453452968
>> LOOP:   2019-03-16 04:46:31 GMT (1552711591) altimeter: 29.754816448, 
>> appTemp: 43.087216787, barometer: 29.7657111581, cloudbase: 1624.34136711, 
>> dateTime: 1552711591, delay: 1, dewpoint: 43.9384979847, heatindex: 
>> 46.2550066001, humidex: 50.54, inDewpoint: 47.0951998592, inHumidity: 43.0, 
>> inTemp: 70.7, maxSolarRad: None, outHumidity: 78.0, outTemp: 50.54, 
>> outTempBatteryStatus: 0, pressure: 29.6303894575, ptr: 7040, radiation: 
>> None, rain: 0.0, rainRate: 0, rainTotal: 71.7, rxCheckPercent: 100, status: 
>> 0, usUnits: 1, UV: None, windchill: 50.54, windDir: 247.5, windGust: 
>> 19.0140057415, windGustDir: 247.5, windSpeed: 10.7373208893
>>
>
>
> On Saturday, 16 March 2019 01:53:21 UTC, gjr80 wrote:
>
>> I don't know why you are suddenly seeing N/A UV, radiation and ET 
>> values. WeeWX will display those readings on your index.html page if 
>> there is UV, radiation of ET data in your daily summaries for the current 
>> day. Likewise on the week, month and year pages if there is data in the 
>> daily summaries for the week, month and year to date. The N/A values 
>> indicate that the current record has the 'value' None against each field. 
>> From a quick look at the fousb driver it would appear that if there are no 
>> UV/illuminance sensors on the station the driver should be returning None 
>> for UV and radiation. WeeWX would be calculating ET and will return None if 
>> radiation is None. This ties in with the N/As you are seeing.
>>
>> It might be worth having a look what is in your daily summaries. I'll 
>> assume you are using SQLite and a Debian based distribution so you will 
>> need the sqlite3 command line utility to perform a query on your daily 
>> summaries, you may need to install sqlite3 with the following command:
>>
>> $ sudo apt-get install sqlite3
>>
>> Once sqlite3 is installed verify where you WeeWX database, nominally 
>> weewx.sdb, is located. It will likely be in /home/weewx/archive or 
>> /var/lib/weewx depending on your WeeWX install type. Once you know the 
>> name and where your database is (I will assume /home/weewx/archive and 
>> weewx.sdb) enter the following commands:
>>
>> $ sqlite3 /home/weewx/archive/weewx.sdb
>> sqlite> .headers on
>> sqlite> SELECT * FROM archive_day_radiation ORDER BY dateTime DESC LIMIT 
>> 10;
>>
>> If you could post the results of the SELECT statement we can then see 
>> what is going on in your daily summaries. While you are using sqlite3 we 
>> might as well look at your archive, in this case use the following command:
>>
>> sqlite> SELECT dateTime,radiation,UV,ET FROM archive ORDER BY dateTime 
>> DESC LIMIT 25;
>> sqlite> .q
>>
>> Again if you could post the output of the SELECT statement.
>>
>> Finally, just so we have a full picture of what is being emitted by your 
>> station could you stop WeeWX and the run WeeWX directly 
>> <http://weewx.com/docs/usersguide.htm#Running_directly>, this will 
>> display the loop packets and archive records on screen. Let WeeWX run for 
>> at least two full archive periods and then post the entire screen output.
>>
>> Gary
>>
>> On Saturday, 16 March 2019 08:10:01 UTC+10, David Watts wrote:
>>>
>>> Hi
>>>
>>> It's version 3.6.2 and on the Standard skin that the problem is showing. 
>>> I made some tweaks etc a few years ago but it's worked fine since. The 
>>> sun-related figures suddenly appeared after I restarted weewx, which I did 
>>> as the wind speed was playing up (turns out that was a loose cable at the 
>>> transmitter).
>>>
>>> Thanks.
>>>
>>> On Friday, 15 March 2019 21:55:41 UTC, gjr80 wrote:
>>>>
>>>> Hi,
>>>>
>>>> A little more info would help. What version of WeeWX are you running? 
>>>> What version didn't you previously run? What skin are we talking about, 
>>>> Standard, Seasons or something else? Have you made any changes to WeeWX? 
>>>> When did the change happen, after an upgrade or don't know?
>>>>
>>>> Gary
>>>>
>>>>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to