[weewx-user] Re: Database - Data not archived correctly

2019-07-26 Thread Danie Cillie
Thanks, I got it working a short while ago and is busy testing.



On Friday, 26 July 2019 16:37:26 UTC+2, Andrew Milner wrote:
>
> try copying in the code that reads the sensor used at startup would be a 
> good starting point, and you may need to declare humidity as a global.  
>
>
>
> On Friday, 26 July 2019 16:46:47 UTC+3, Danie Cillie wrote:
>>
>> Thanks Gary, I came to the same conclusion but have not been able to 
>> figure out how to get sampleAndDisplay() to read the humidity sensor.
>>
>> Any ideas?
>>
>> On Thursday, 25 July 2019 21:19:49 UTC+2, gjr80 wrote:
>>>
>>> genLoopPackets() assigns the variable ‘humidity’ to the ‘outHumidity’ 
>>> field in the loop packet (line 341) but when genLoopPackets() is iterating 
>>> continuously it calls the sampleAndDisplay() method to (presumably) obtain 
>>> updated sensor values. As far as I can tell variable ‘humidity’ is not set 
>>> by sampleAndDisplay(). ‘humidity’ is only set at line 254 when the driver 
>>> module is first loaded. This probably explains why the value is only 
>>> correct/updated when WeeWX is started/restarted. 
>>>
>>> I think you need to revise you driver to ensure that that variable 
>>> ‘humidity’ is in fact updated on a regular basis. 
>>>
>>> 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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/0a8fb616-4218-421b-8ded-965506ce8da5%40googlegroups.com.


[weewx-user] Re: Database - Data not archived correctly

2019-07-26 Thread Danie Cillie
Thanks Gary, I came to the same conclusion but have not been able to figure 
out how to get sampleAndDisplay() to read the humidity sensor.

Any ideas?

On Thursday, 25 July 2019 21:19:49 UTC+2, gjr80 wrote:
>
> genLoopPackets() assigns the variable ‘humidity’ to the ‘outHumidity’ 
> field in the loop packet (line 341) but when genLoopPackets() is iterating 
> continuously it calls the sampleAndDisplay() method to (presumably) obtain 
> updated sensor values. As far as I can tell variable ‘humidity’ is not set 
> by sampleAndDisplay(). ‘humidity’ is only set at line 254 when the driver 
> module is first loaded. This probably explains why the value is only 
> correct/updated when WeeWX is started/restarted. 
>
> I think you need to revise you driver to ensure that that variable 
> ‘humidity’ is in fact updated on a regular basis. 
>
> 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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/0cdae0b4-433f-468b-bb44-036900bc8a9b%40googlegroups.com.


[weewx-user] Re: Database - Data not archived correctly

2019-07-25 Thread Danie Cillie
The driver I am currently using has the code added for the Adafruit SHT31D 
humidity sensor which connects to the I2C bus at address 0x44.

I can not use the official Adafruit driver as it needs python3 to run.

The code I added for the SHT31 is from line 233 to 262 and then from line 
478 to 487.

The driver code is attached.

Thank you 

On Wednesday, 24 July 2019 15:26:37 UTC+2, gjr80 wrote:
>
> Agree it is almost certainly the driver. Can you post the driver code you 
> are using, or a link to the code, so we can have a look. As long as the 
> driver is consistently emitting loop packets WeeWX should take care of the 
> rest.
>
> 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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/5f1cd8f5-ae3c-44be-b989-65835bb9a1b1%40googlegroups.com.
#
#
# GroveWeatherPi Solar Powered Weather Station
# Version 2.3 October 3, 2016 
#
# SwitchDoc Labs
# www.switchdoc.com
#
# extended by luksm...@gmail.com - no warranties.

# imports

import sys
import time
from datetime import datetime
import random 
import re
import math
import os

sys.path.append('/home/pi/SDL_Pi_GroveWeatherPi')
sys.path.append('/home/pi/SDL_Pi_GroveWeatherPi/SDL_Adafruit_ADS1x15')
sys.path.append('/home/pi/SDL_Pi_GroveWeatherPi/SDL_Pi_SSD1306')
sys.path.append('/home/pi/SDL_Pi_GroveWeatherPi/Adafruit_Python_SSD1306')
sys.path.append('/home/pi/SDL_Pi_GroveWeatherPi/RTC_SDL_DS3231')
sys.path.append('/home/pi/SDL_Pi_GroveWeatherPi/Adafruit_Python_BMP')
sys.path.append('/home/pi/SDL_Pi_GroveWeatherPi/Adafruit_Python_GPIO')
sys.path.append('/home/pi/SDL_Pi_GroveWeatherPi/SDL_Pi_WeatherRack')
sys.path.append('/home/pi/SDL_Pi_GroveWeatherPi/SDL_Pi_FRAM')
sys.path.append('/home/pi/SDL_Pi_GroveWeatherPi/RaspberryPi-AS3935/RPi_AS3935')
sys.path.append('/home/pi/SDL_Pi_GroveWeatherPi/SDL_Pi_INA3221')
sys.path.append('/home/pi/SDL_Pi_GroveWeatherPi/SDL_Pi_TCA9545')
sys.path.append('/home/pi/SDL_Pi_GroveWeatherPi/graphs')
sys.path.append('/usr/share/weewx')

import subprocess
import RPi.GPIO as GPIO

import smbus

import struct

# Check for user imports
try:
	import conflocal as config
except ImportError:
	import config

# if (config.enable_MySQL_Logging == True):
#	import MySQLdb as mdb

import weewx.drivers
DRIVER_NAME = 'GrovePi'


# Device Present State Variables
###

config.TCA9545_I2CMux_Present = False
config.SunAirPlus_Present = False
config.AS3935_Present = False
config.DS3231_Present = False
config.BMP280_Present = False
config.FRAM_Present = False
config.HTU21DF_Present = False
config.AM2315_Present = False
config.ADS1015_Present = False
config.ADS1115_Present = False
config.OLED_Present = False
config.WXLink_Present = False


import SDL_Pi_INA3221
import SDL_DS3231
import Adafruit_BMP.BMP280 as BMP280
import SDL_Pi_WeatherRack as SDL_Pi_WeatherRack

import SDL_Pi_FRAM
from RPi_AS3935 import RPi_AS3935

import SDL_Pi_TCA9545

import Adafruit_SSD1306

import Scroll_SSD1306


def loader(config_dict, engine):
return GrovePiDriver(**config_dict[DRIVER_NAME])

def returnStatusLine(device, state):

returnString = device
if (state == True):
returnString = returnString + ":   \t\tPresent"
else:
returnString = returnString + ":   \t\tNot Present"
return returnString


# TCA9545 I2C Mux 

#/*=
#I2C ADDRESS/BITS
#---*/
TCA9545_ADDRESS = (0x73)# 1110011 (A0+A1=VDD)
#/*=*/

#/*=
#CONFIG REGISTER (R/W)
#---*/
TCA9545_REG_CONFIG=  (0x00)
#/*-*/

TCA9545_CONFIG_BUS0  =(0x01)  # 1 = enable, 0 = disable 
TCA9545_CONFIG_BUS1  =(0x02)  # 1 = enable, 0 = disable 
TCA9545_CONFIG_BUS2  =(0x04)  # 1 = enable, 0 = disable 
TCA9545_CONFIG_BUS3  =(0x08)  # 1 = enable, 0 = disable 

#/*=*/

# I2C Mux TCA9545 Detection
try:
	tca9545 = SDL_Pi_TCA9545.SDL_Pi_TCA9545(addr=TCA9545_ADDRESS, bus_enable = TCA9545_CONFIG_BUS0)


	# turn I2CBus 1 on
	tca9545.write_control_register(TCA9545_CONFIG_BUS2)
	config.TCA9545_I2CMux_Present = True
except:
	print ">>><<<"
	print "TCA9545 I2C Mux Not Present" 
	print ">>><<<"
	config.TCA9545_I2CMux_Present = False



[weewx-user] Re: Database - Data not archived correctly

2019-07-24 Thread Danie Cillie
I think I am starting to understand what is happening.

I'll try and explain what the symptoms are as clearly as possible:

When the weewxd engine is started, all values are stored to the database. 
However the humidity reading stays at the first level and does not change 
unless the weewxd engine is restarted.
This morning the humidity reading was still at the level displayed early 
last night. Only when I restarted the weewxd engine did the value change.

I am almost 100% certain that the problem is in the GrovePi driver.
I thought that the driver was providing the correct values when looking at 
the LOOP data but I'll have to monitor it over a longer period to see if it 
actually changes.

The LOOP data file is attached.

Thank you for your help

On Tuesday, 23 July 2019 19:05:53 UTC+2, Andrew Milner wrote:
>
> why do you say it is updated in the webpage and the database??  The data 
> on the webpage comes from the database!!
>
> have you tried forcing a browser page reload (shift refresh usually) when 
> things appear 'stuck'??  There is no reason whatsoever why humidity should 
> be any different with regards updates than the other fields?
>
> you can capture the terminal output from running directly by sending the 
> terminal output to a file as a simple way
>
> the log does not appear to show anything strange, and confirms that 
> archive records are being written every 3 minutes
>
>
>
> On Tuesday, 23 July 2019 18:34:42 UTC+3, Danie Cillie wrote:
>>
>> *Here is the log information*
>>
>> On Tuesday, 23 July 2019 17:19:42 UTC+2, Danie Cillie wrote:
>>>
>>> By display I mean the html page in a web browser.
>>> I have since stopped and started weewx a few times and every time it 
>>> updates the humidity value on the webpage and in the database.
>>> I'll attach log shortly.
>>>
>>> How do I capture the LOOP and REC data?
>>>
>>>
>>>
>>> On Tuesday, 23 July 2019 16:53:33 UTC+2, Andrew Milner wrote:
>>>>
>>>> what does the log say from startup until two archive intervals have 
>>>> passed??
>>>>
>>>> the answer usually lies in the log - so please post your log from 
>>>> startup until two intervals later.
>>>>
>>>> Also, as a seperate exercise, can you post the result of running weewx 
>>>> directly and give us the LOOP and REC data for at least two archive 
>>>> intervals.
>>>>
>>>> When you say the humidity updated what exacgly do you mean - in a 
>>>> report, in weewx.sdb or somewhere else.  When you say humidity is 
>>>> displayed 
>>>> as 48% where and how is it displayed?  weewx does not 'display' data 
>>>> anywhere it merely stores archive data in a database, runs a report 
>>>> generator to create html pages and outpts data to other places - there is 
>>>> no 'display' anywhere
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Tuesday, 23 July 2019 17:46:55 UTC+3, Danie Cillie wrote:
>>>>>
>>>>> Since my last message, the humidity was displayed as 48% (last 3 
>>>>> hours) even though we had rain and the direct sensor reading was 94%.
>>>>>
>>>>> Just out of desperation I stopped the weewx engine and restarted and 
>>>>> the humidity updated.
>>>>> So for some reason it only updates when the weewx engine starts.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Tuesday, 23 July 2019 13:39:42 UTC+2, Andrew Milner wrote:
>>>>>>
>>>>>> that is correct.  BUt you really should not see much difference 
>>>>>> between polling values if you are polling at 2.5 seconds!!  But the 
>>>>>> value 
>>>>>> which is archived will be the average value over the 3 minute archive 
>>>>>> period.
>>>>>>
>>>>>> If you are displaying the LOOP packets - the values written to the 
>>>>>> database are in the REC packet - which should occur once every 3 minutes 
>>>>>> - 
>>>>>> and they are ALL averaged values for values received in the LOOP packets 
>>>>>> of 
>>>>>> the interval - pressure, temperature, humidity etc etc
>>>>>>
>>>>>> On Tuesday, 23 July 2019 14:32:17 UTC+3, Danie Cillie wrote:
>>>>>>>
>>>>>>> The archive period you refer to, is that the value set in the 
>>>>>>> weewx.co

[weewx-user] Re: Database - Data not archived correctly

2019-07-23 Thread Danie Cillie
*Here is the log information*

On Tuesday, 23 July 2019 17:19:42 UTC+2, Danie Cillie wrote:
>
> By display I mean the html page in a web browser.
> I have since stopped and started weewx a few times and every time it 
> updates the humidity value on the webpage and in the database.
> I'll attach log shortly.
>
> How do I capture the LOOP and REC data?
>
>
>
> On Tuesday, 23 July 2019 16:53:33 UTC+2, Andrew Milner wrote:
>>
>> what does the log say from startup until two archive intervals have 
>> passed??
>>
>> the answer usually lies in the log - so please post your log from startup 
>> until two intervals later.
>>
>> Also, as a seperate exercise, can you post the result of running weewx 
>> directly and give us the LOOP and REC data for at least two archive 
>> intervals.
>>
>> When you say the humidity updated what exacgly do you mean - in a report, 
>> in weewx.sdb or somewhere else.  When you say humidity is displayed as 48% 
>> where and how is it displayed?  weewx does not 'display' data anywhere it 
>> merely stores archive data in a database, runs a report generator to create 
>> html pages and outpts data to other places - there is no 'display' anywhere
>>
>>
>>
>>
>>
>> On Tuesday, 23 July 2019 17:46:55 UTC+3, Danie Cillie wrote:
>>>
>>> Since my last message, the humidity was displayed as 48% (last 3 hours) 
>>> even though we had rain and the direct sensor reading was 94%.
>>>
>>> Just out of desperation I stopped the weewx engine and restarted and the 
>>> humidity updated.
>>> So for some reason it only updates when the weewx engine starts.
>>>
>>>
>>>
>>>
>>> On Tuesday, 23 July 2019 13:39:42 UTC+2, Andrew Milner wrote:
>>>>
>>>> that is correct.  BUt you really should not see much difference between 
>>>> polling values if you are polling at 2.5 seconds!!  But the value which is 
>>>> archived will be the average value over the 3 minute archive period.
>>>>
>>>> If you are displaying the LOOP packets - the values written to the 
>>>> database are in the REC packet - which should occur once every 3 minutes - 
>>>> and they are ALL averaged values for values received in the LOOP packets 
>>>> of 
>>>> the interval - pressure, temperature, humidity etc etc
>>>>
>>>> On Tuesday, 23 July 2019 14:32:17 UTC+3, Danie Cillie wrote:
>>>>>
>>>>> The archive period you refer to, is that the value set in the 
>>>>> weewx.conf file? I have reduced that to 240 or 3 minutes. If I understand 
>>>>> you correctly, the average is over the 3 minute period until the next 
>>>>> write 
>>>>> is done to the database.
>>>>> If I run weewxd directly, (sudo weewxd weewx.conf) the LOOP values are 
>>>>> correct.
>>>>> Then I assume the values read (poll_interval is 2.5 seconds) in the 3 
>>>>> minute period is averaged and written to the database, is that correct?
>>>>> I'll monitor the readings over a few days to see if I can make any 
>>>>> sense out of this.
>>>>>
>>>>> On Tuesday, 23 July 2019 11:45:46 UTC+2, Danie Cillie wrote:
>>>>>>
>>>>>> It will stay at a certain value for example 51% for a long time even 
>>>>>> though the loop value has changed drastically. Both the loop and archive 
>>>>>> record values are correct when displayed on the terminal but that is not 
>>>>>> what is written to the database.
>>>>>> How does one determine the archive period over which the values are 
>>>>>> averaged?
>>>>>>
>>>>>> On Tuesday, 23 July 2019 11:33:33 UTC+2, Andrew Milner wrote:
>>>>>>>
>>>>>>> how do you know it is 'stuck'??  the archived value is the AVERAGE 
>>>>>>> of readings received during the archive period.  What values are 
>>>>>>> displayed 
>>>>>>> that you say are correct - the loop value or the archive record value?? 
>>>>>>>  
>>>>>>> Remember that humidity does not change very quickly.
>>>>>>>
>>>>>>> On Tuesday, 23 July 2019 12:15:20 UTC+3, Danie Cillie wrote:
>>>>>>>>
>>>>>>>> Morning,
>>>>>>>>
>>>>>>>> I use a Raspberry Pi with the Gr

[weewx-user] Re: Database - Data not archived correctly

2019-07-23 Thread Danie Cillie
By display I mean the html page in a web browser.
I have since stopped and started weewx a few times and every time it 
updates the humidity value on the webpage and in the database.
I'll attach log shortly.

How do I capture the LOOP and REC data?



On Tuesday, 23 July 2019 16:53:33 UTC+2, Andrew Milner wrote:
>
> what does the log say from startup until two archive intervals have 
> passed??
>
> the answer usually lies in the log - so please post your log from startup 
> until two intervals later.
>
> Also, as a seperate exercise, can you post the result of running weewx 
> directly and give us the LOOP and REC data for at least two archive 
> intervals.
>
> When you say the humidity updated what exacgly do you mean - in a report, 
> in weewx.sdb or somewhere else.  When you say humidity is displayed as 48% 
> where and how is it displayed?  weewx does not 'display' data anywhere it 
> merely stores archive data in a database, runs a report generator to create 
> html pages and outpts data to other places - there is no 'display' anywhere
>
>
>
>
>
> On Tuesday, 23 July 2019 17:46:55 UTC+3, Danie Cillie wrote:
>>
>> Since my last message, the humidity was displayed as 48% (last 3 hours) 
>> even though we had rain and the direct sensor reading was 94%.
>>
>> Just out of desperation I stopped the weewx engine and restarted and the 
>> humidity updated.
>> So for some reason it only updates when the weewx engine starts.
>>
>>
>>
>>
>> On Tuesday, 23 July 2019 13:39:42 UTC+2, Andrew Milner wrote:
>>>
>>> that is correct.  BUt you really should not see much difference between 
>>> polling values if you are polling at 2.5 seconds!!  But the value which is 
>>> archived will be the average value over the 3 minute archive period.
>>>
>>> If you are displaying the LOOP packets - the values written to the 
>>> database are in the REC packet - which should occur once every 3 minutes - 
>>> and they are ALL averaged values for values received in the LOOP packets of 
>>> the interval - pressure, temperature, humidity etc etc
>>>
>>> On Tuesday, 23 July 2019 14:32:17 UTC+3, Danie Cillie wrote:
>>>>
>>>> The archive period you refer to, is that the value set in the 
>>>> weewx.conf file? I have reduced that to 240 or 3 minutes. If I understand 
>>>> you correctly, the average is over the 3 minute period until the next 
>>>> write 
>>>> is done to the database.
>>>> If I run weewxd directly, (sudo weewxd weewx.conf) the LOOP values are 
>>>> correct.
>>>> Then I assume the values read (poll_interval is 2.5 seconds) in the 3 
>>>> minute period is averaged and written to the database, is that correct?
>>>> I'll monitor the readings over a few days to see if I can make any 
>>>> sense out of this.
>>>>
>>>> On Tuesday, 23 July 2019 11:45:46 UTC+2, Danie Cillie wrote:
>>>>>
>>>>> It will stay at a certain value for example 51% for a long time even 
>>>>> though the loop value has changed drastically. Both the loop and archive 
>>>>> record values are correct when displayed on the terminal but that is not 
>>>>> what is written to the database.
>>>>> How does one determine the archive period over which the values are 
>>>>> averaged?
>>>>>
>>>>> On Tuesday, 23 July 2019 11:33:33 UTC+2, Andrew Milner wrote:
>>>>>>
>>>>>> how do you know it is 'stuck'??  the archived value is the AVERAGE of 
>>>>>> readings received during the archive period.  What values are displayed 
>>>>>> that you say are correct - the loop value or the archive record value??  
>>>>>> Remember that humidity does not change very quickly.
>>>>>>
>>>>>> On Tuesday, 23 July 2019 12:15:20 UTC+3, Danie Cillie wrote:
>>>>>>>
>>>>>>> Morning,
>>>>>>>
>>>>>>> I use a Raspberry Pi with the GroveWeatherRack and sensors and weewx.
>>>>>>>
>>>>>>> The grovePi driver sends the data directly to weewx.
>>>>>>>
>>>>>>> The LOOP data and the archive data as printed on the terminal when 
>>>>>>> weewxd runs is correct and updates correctly, but  the humidity data is 
>>>>>>> stored correctly the first time in the database and then gets stuck. 
>>>>>>> Sometimes after a long time (hours) it changes to a new value and 
>>>>>>> sticks to 
>>>>>>> that again.
>>>>>>>
>>>>>>> I can not understand why the data is read and displayed correctly 
>>>>>>> but not stored in the database.
>>>>>>>
>>>>>>> The data on this page illustrates what the problem is 
>>>>>>> https://www.pwsweather.com/obs/IBLUERID2.html
>>>>>>>
>>>>>>> Please find the config file and log file attached.
>>>>>>>
>>>>>>> Any suggestions appreciated.
>>>>>>>
>>>>>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/6d7b361a-b1a8-4434-b81d-842e0591dd96%40googlegroups.com.


[weewx-user] Re: Database - Data not archived correctly

2019-07-23 Thread Danie Cillie
Since my last message, the humidity was displayed as 48% (last 3 hours) 
even though we had rain and the direct sensor reading was 94%.

Just out of desperation I stopped the weewx engine and restarted and the 
humidity updated.
So for some reason it only updates when the weewx engine starts.




On Tuesday, 23 July 2019 13:39:42 UTC+2, Andrew Milner wrote:
>
> that is correct.  BUt you really should not see much difference between 
> polling values if you are polling at 2.5 seconds!!  But the value which is 
> archived will be the average value over the 3 minute archive period.
>
> If you are displaying the LOOP packets - the values written to the 
> database are in the REC packet - which should occur once every 3 minutes - 
> and they are ALL averaged values for values received in the LOOP packets of 
> the interval - pressure, temperature, humidity etc etc
>
> On Tuesday, 23 July 2019 14:32:17 UTC+3, Danie Cillie wrote:
>>
>> The archive period you refer to, is that the value set in the weewx.conf 
>> file? I have reduced that to 240 or 3 minutes. If I understand you 
>> correctly, the average is over the 3 minute period until the next write is 
>> done to the database.
>> If I run weewxd directly, (sudo weewxd weewx.conf) the LOOP values are 
>> correct.
>> Then I assume the values read (poll_interval is 2.5 seconds) in the 3 
>> minute period is averaged and written to the database, is that correct?
>> I'll monitor the readings over a few days to see if I can make any sense 
>> out of this.
>>
>> On Tuesday, 23 July 2019 11:45:46 UTC+2, Danie Cillie wrote:
>>>
>>> It will stay at a certain value for example 51% for a long time even 
>>> though the loop value has changed drastically. Both the loop and archive 
>>> record values are correct when displayed on the terminal but that is not 
>>> what is written to the database.
>>> How does one determine the archive period over which the values are 
>>> averaged?
>>>
>>> On Tuesday, 23 July 2019 11:33:33 UTC+2, Andrew Milner wrote:
>>>>
>>>> how do you know it is 'stuck'??  the archived value is the AVERAGE of 
>>>> readings received during the archive period.  What values are displayed 
>>>> that you say are correct - the loop value or the archive record value??  
>>>> Remember that humidity does not change very quickly.
>>>>
>>>> On Tuesday, 23 July 2019 12:15:20 UTC+3, Danie Cillie wrote:
>>>>>
>>>>> Morning,
>>>>>
>>>>> I use a Raspberry Pi with the GroveWeatherRack and sensors and weewx.
>>>>>
>>>>> The grovePi driver sends the data directly to weewx.
>>>>>
>>>>> The LOOP data and the archive data as printed on the terminal when 
>>>>> weewxd runs is correct and updates correctly, but  the humidity data is 
>>>>> stored correctly the first time in the database and then gets stuck. 
>>>>> Sometimes after a long time (hours) it changes to a new value and sticks 
>>>>> to 
>>>>> that again.
>>>>>
>>>>> I can not understand why the data is read and displayed correctly but 
>>>>> not stored in the database.
>>>>>
>>>>> The data on this page illustrates what the problem is 
>>>>> https://www.pwsweather.com/obs/IBLUERID2.html
>>>>>
>>>>> Please find the config file and log file attached.
>>>>>
>>>>> Any suggestions appreciated.
>>>>>
>>>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/d66520ec-257d-4438-9207-dc4927f57e1b%40googlegroups.com.


[weewx-user] Re: Database - Data not archived correctly

2019-07-23 Thread Danie Cillie
The archive period you refer to, is that the value set in the weewx.conf 
file? I have reduced that to 240 or 3 minutes. If I understand you 
correctly, the average is over the 3 minute period until the next write is 
done to the database.
If I run weewxd directly, (sudo weewxd weewx.conf) the LOOP values are 
correct.
Then I assume the values read (poll_interval is 2.5 seconds) in the 3 
minute period is averaged and written to the database, is that correct?
I'll monitor the readings over a few days to see if I can make any sense 
out of this.

On Tuesday, 23 July 2019 11:45:46 UTC+2, Danie Cillie wrote:
>
> It will stay at a certain value for example 51% for a long time even 
> though the loop value has changed drastically. Both the loop and archive 
> record values are correct when displayed on the terminal but that is not 
> what is written to the database.
> How does one determine the archive period over which the values are 
> averaged?
>
> On Tuesday, 23 July 2019 11:33:33 UTC+2, Andrew Milner wrote:
>>
>> how do you know it is 'stuck'??  the archived value is the AVERAGE of 
>> readings received during the archive period.  What values are displayed 
>> that you say are correct - the loop value or the archive record value??  
>> Remember that humidity does not change very quickly.
>>
>> On Tuesday, 23 July 2019 12:15:20 UTC+3, Danie Cillie wrote:
>>>
>>> Morning,
>>>
>>> I use a Raspberry Pi with the GroveWeatherRack and sensors and weewx.
>>>
>>> The grovePi driver sends the data directly to weewx.
>>>
>>> The LOOP data and the archive data as printed on the terminal when 
>>> weewxd runs is correct and updates correctly, but  the humidity data is 
>>> stored correctly the first time in the database and then gets stuck. 
>>> Sometimes after a long time (hours) it changes to a new value and sticks to 
>>> that again.
>>>
>>> I can not understand why the data is read and displayed correctly but 
>>> not stored in the database.
>>>
>>> The data on this page illustrates what the problem is 
>>> https://www.pwsweather.com/obs/IBLUERID2.html
>>>
>>> Please find the config file and log file attached.
>>>
>>> Any suggestions appreciated.
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/07eaffb9-3599-4239-83d4-7f0d6031b33e%40googlegroups.com.


[weewx-user] Re: Database - Data not archived correctly

2019-07-23 Thread Danie Cillie
It will stay at a certain value for example 51% for a long time even though 
the loop value has changed drastically. Both the loop and archive record 
values are correct when displayed on the terminal but that is not what is 
written to the database.
How does one determine the archive period over which the values are 
averaged?

On Tuesday, 23 July 2019 11:33:33 UTC+2, Andrew Milner wrote:
>
> how do you know it is 'stuck'??  the archived value is the AVERAGE of 
> readings received during the archive period.  What values are displayed 
> that you say are correct - the loop value or the archive record value??  
> Remember that humidity does not change very quickly.
>
> On Tuesday, 23 July 2019 12:15:20 UTC+3, Danie Cillie wrote:
>>
>> Morning,
>>
>> I use a Raspberry Pi with the GroveWeatherRack and sensors and weewx.
>>
>> The grovePi driver sends the data directly to weewx.
>>
>> The LOOP data and the archive data as printed on the terminal when weewxd 
>> runs is correct and updates correctly, but  the humidity data is stored 
>> correctly the first time in the database and then gets stuck. Sometimes 
>> after a long time (hours) it changes to a new value and sticks to that 
>> again.
>>
>> I can not understand why the data is read and displayed correctly but not 
>> stored in the database.
>>
>> The data on this page illustrates what the problem is 
>> https://www.pwsweather.com/obs/IBLUERID2.html
>>
>> Please find the config file and log file attached.
>>
>> Any suggestions appreciated.
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/011bcc27-7f32-40e4-9bb9-552285d7d65b%40googlegroups.com.


[weewx-user] Database - Data not archived correctly

2019-07-23 Thread Danie Cillie
Morning,

I use a Raspberry Pi with the GroveWeatherRack and sensors and weewx.

The grovePi driver sends the data directly to weewx.

The LOOP data and the archive data as printed on the terminal when weewxd 
runs is correct and updates correctly, but  the humidity data is stored 
correctly the first time in the database and then gets stuck. Sometimes 
after a long time (hours) it changes to a new value and sticks to that 
again.

I can not understand why the data is read and displayed correctly but not 
stored in the database.

The data on this page illustrates what the problem is 
https://www.pwsweather.com/obs/IBLUERID2.html

Please find the config file and log file attached.

Any suggestions appreciated.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/696e84b3-fd99-46fb-8479-c11c3ff879b5%40googlegroups.com.


mylog
Description: Binary data
# WEEWX CONFIGURATION FILE
#
# Copyright (c) 2009-2019 Tom Keffer 
# See the file LICENSE.txt for your rights.

##

# This section is for general configuration information.

# Set to 1 for extra debug info, otherwise comment it out or set to zero
debug = 1

# Root directory of the weewx data file hierarchy for this station
WEEWX_ROOT = /

# Whether to log successful operations
log_success = True

# Whether to log unsuccessful operations
log_failure = True

# How long to wait before timing out a socket (FTP, HTTP) connection
socket_timeout = 20

# Do not modify this. It is used when installing and updating weewx.
version = 3.9.1

##

#   This section is for information about the station.

[Station]

# Description of the station location
location = "Blue Ridge Estate, Dana Bay, Western Cape, South Africa"

# Latitude and longitude in decimal degrees
latitude = -34.200
longitude = 22.025

# Altitude of the station, with unit it is in. This is downloaded from
# from the station if the hardware supports it.
altitude = 123, meter

# Set to type of station hardware. There must be a corresponding stanza
# in this file with a 'driver' parameter indicating the driver to be used.
station_type = GrovePi

# If you have a website, you may specify an URL
#station_url = http://www.example.com

# The start of the rain year (1=January; 10=October, etc.). This is
# downloaded from the station if the hardware supports it.
rain_year_start = 1

# Start of week (0=Monday, 6=Sunday)
week_start = 0

##

[GrovePi]
driver = user.GrovePi
poll_interval = 2.5
mode = generator

##

[Simulator]
# This section is for the weewx weather station simulator

# The time (in seconds) between LOOP packets.
loop_interval = 2.5

# The simulator mode can be either 'simulator' or 'generator'.
# Real-time simulator. Sleep between each LOOP packet.
mode = simulator
# Generator.  Emit LOOP packets as fast as possible (useful for testing).
#mode = generator

# The start time. Format is -mm-ddTHH:MM. If not specified, the default 
# is to use the present time.
#start = 2011-01-01T00:00

# The driver to use:
driver = weewx.drivers.simulator

##

#   This section is for uploading data to Internet sites

[StdRESTful]

[[StationRegistry]]
# To register this weather station with weewx, set this to true
register_this_station = true

[[AWEKAS]]
# This section is for configuring posts to AWEKAS.

# If you wish to do this, set the option 'enable' to true,
# and specify a username and password.
# To guard against parsing errors, put the password in quotes.
enable = false
username = replace_me
password = replace_me

[[CWOP]]
# This section is for configuring posts to CWOP.

# If you wish to do this, set the option 'enable' to true,
# and specify the station ID (e.g., CW1234).
enable = false
station = replace_me

# If this is an APRS (radio amateur) station, uncomment
# the following and replace with a passcode (e.g., 12345).
#passcode = replace_me (APRS stations only)

[[PWSweather]]
# This section is for configuring posts to PWSweather.com.

# If you wish to do this, set the option 'enable' to true,
# and