[weewx-user] Re: ExtraTemp1 as Outside Temperature

2022-01-29 Thread matthew wall
you can do this in the weewx configuration file using the 'sensor_map' in 
the TE923 section.

the default sensor map looks like this (you should see this in your weewx 
configuration file, but it is probably commented, since it is the default 
behavior):

[TE923]
...
[[sensor_map]]
windLinkStatus = link_wind
windBatteryStatus = bat_wind
rainLinkStatus = link_rain
rainBatteryStatus = bat_rain
uvLinkStatus = link_uv
uvBatteryStatus = bat_uv
inTemp = t_in
inHumidity = h_in
outTemp = t_1
outHumidity = h_1
outTempBatteryStatus = bat_1
outLinkStatus = link_1
extraTemp1 = t_2
extraHumid1 = h_2
extraBatteryStatus1 = bat_2
extraLinkStatus1 = link_2
extraTemp2 = t_3
extraHumid2 = h_3
extraBatteryStatus2 = bat_3
extraLinkStatus2 = link_3
extraTemp3 = t_4
extraHumid3 = h_4
extraBatteryStatus3 = bat_4
extraLinkStatus3 = link_4
extraTemp4 = t_5
extraHumid4 = h_5
extraBatteryStatus4 = bat_5
extraLinkStatus4 = link_5

to change the sensor mapping, uncomment the entire sensor map, or, if it is 
not yet in your weewx configuration, paste it into the TE923 section.  you 
must specify the entire sensor map, not just a single item.

then, to swap channel 1 and channel 2, change this:

outTemp = t_1
outHumidity = h_1
outTempBatteryStatus = bat_1
outLinkStatus = link_1
extraTemp1 = t_2
extraHumid1 = h_2
extraBatteryStatus1 = bat_2
extraLinkStatus1 = link_2

to this:

outTemp = t_2
outHumidity = h_2
outTempBatteryStatus = bat_2
outLinkStatus = link_2
extraTemp1 = t_1
extraHumid1 = h_1
extraBatteryStatus1 = bat_1
extraLinkStatus1 = link_1

by changing the configuration file, your changes will persist even when you 
update/upgrade weewx.

and be sure that your neighbor does not also use channel 2!

m

-- 
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/d6a0b213-f7c9-4f84-b8d1-cb98513c03b5n%40googlegroups.com.


[weewx-user] Re: ExtraTemp1 as Outside Temperature

2022-01-29 Thread Søren Helskov
Hi Thanks Michael

Was really helpful and solved my problem.

I was really looking in the documentation here
https://www.weewx.com/  
but found nothing. :(

Best Regards.

lørdag den 29. januar 2022 kl. 11.37.42 UTC+1 skrev Michael:

> In the directory /usr/share/weewx/weewx/drivers you should find the file 
> te923.py. From line 473 you will find the mappings starting with 
> DEFAULT_MAP = {
> ...
> 'outTemp': 't_1',
> 'outHumidity': 'h_1',
> 'extraTemp1': 't_2',
> 'extraHumidity1': 'h_2',
>
>
> by:
> 'outTemp': 't_2',
> 'outHumidity': 'h_2',
> # 'extraTemp1': 't_2',
> # 'extraHumid1': 'h_2',
>
> replace.
>
> Please make a copy of te923.py before editing.
>
>
> Michael
>
> sorenh...@gmail.com schrieb am Samstag, 29. Januar 2022 um 11:06:52 UTC+1:
>
>> From the driver:
>> I Would like to Map t_2 to Outside Temperature
>> Where are all these mapped?
>>
>> Using configuration file /etc/weewx/weewx.conf
>> Using TE923 driver version 0.41.1 (weewx.drivers.te923)
>> Querying the station for current weather data...
>> dateTime: 1643449936
>> forecast: 5
>>  h_1: 48
>>h_1_state: ok
>>  h_2: 91
>>h_2_state: ok
>>  h_3: 56
>>h_3_state: ok
>>  h_4: None
>>h_4_state: no_link
>>  h_5: None
>>h_5_state: no_link
>> h_in: 51
>>   h_in_state: ok
>> rain: 520
>>   rain_state: ok
>>  slp: 1004.0625
>>slp_state: ok
>>storm: 0
>>  t_1: 24.6
>>t_1_state: ok
>>  t_2: 8.2
>>t_2_state: ok
>>  t_3: 15.9
>>t_3_state: ok
>>  t_4: None
>>t_4_state: no_link
>>  t_5: None
>>t_5_state: no_link
>> t_in: 25.95
>>   t_in_state: ok
>>   uv: None
>> uv_state: no_link
>>windchill: 7.4
>>  windchill_state: ok
>>  winddir: 8
>>winddir_state: ok
>> windgust: 4.5
>>   windgust_state: ok
>>windspeed: 2.6
>>  windspeed_state: ok
>>
>> lørdag den 29. januar 2022 kl. 10.27.56 UTC+1 skrev Søren Helskov:
>>
>>> Hi 
>>>
>>> I have this TE923 weatherstation that has been running with Weewx for 
>>> almost 
>>> 7 years now. 
>>> My problem is that on Channel 1 on my weather station, i have some 
>>> strange sensor reporting in, with wrong value and overwriting my local 
>>> sensor. I think it could be my neighbours weather station of same brand. 
>>> I have now changed my outdoor sensor to channel 2. 
>>> But in weewx it results in i now have Outside Temperature with wrong 
>>> value and a new measurement called Temperature 1. 
>>>
>>> I dont want to rename Temperature 1 to Outside as i have 7 years of log 
>>> data on the Outside Temperature. So i would like to switch, so the Channel 
>>> 1 is Temperature 1 and Channel 2 is outside Temperature. 
>>> I have tried to look in weewx.conf but its only labels. 
>>>
>>> Hope someone can help my. 
>>>
>>

-- 
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/022f9612-61a6-4cab-a974-cdc822588682n%40googlegroups.com.


[weewx-user] Re: ExtraTemp1 as Outside Temperature

2022-01-29 Thread Michael
In the directory /usr/share/weewx/weewx/drivers you should find the file 
te923.py. From line 473 you will find the mappings starting with 
DEFAULT_MAP = {
...
'outTemp': 't_1',
'outHumidity': 'h_1',
'extraTemp1': 't_2',
'extraHumidity1': 'h_2',


by:
'outTemp': 't_2',
'outHumidity': 'h_2',
# 'extraTemp1': 't_2',
# 'extraHumid1': 'h_2',

replace.

Please make a copy of te923.py before editing.


Michael

sorenh...@gmail.com schrieb am Samstag, 29. Januar 2022 um 11:06:52 UTC+1:

> From the driver:
> I Would like to Map t_2 to Outside Temperature
> Where are all these mapped?
>
> Using configuration file /etc/weewx/weewx.conf
> Using TE923 driver version 0.41.1 (weewx.drivers.te923)
> Querying the station for current weather data...
> dateTime: 1643449936
> forecast: 5
>  h_1: 48
>h_1_state: ok
>  h_2: 91
>h_2_state: ok
>  h_3: 56
>h_3_state: ok
>  h_4: None
>h_4_state: no_link
>  h_5: None
>h_5_state: no_link
> h_in: 51
>   h_in_state: ok
> rain: 520
>   rain_state: ok
>  slp: 1004.0625
>slp_state: ok
>storm: 0
>  t_1: 24.6
>t_1_state: ok
>  t_2: 8.2
>t_2_state: ok
>  t_3: 15.9
>t_3_state: ok
>  t_4: None
>t_4_state: no_link
>  t_5: None
>t_5_state: no_link
> t_in: 25.95
>   t_in_state: ok
>   uv: None
> uv_state: no_link
>windchill: 7.4
>  windchill_state: ok
>  winddir: 8
>winddir_state: ok
> windgust: 4.5
>   windgust_state: ok
>windspeed: 2.6
>  windspeed_state: ok
>
> lørdag den 29. januar 2022 kl. 10.27.56 UTC+1 skrev Søren Helskov:
>
>> Hi 
>>
>> I have this TE923 weatherstation that has been running with Weewx for 
>> almost 
>> 7 years now. 
>> My problem is that on Channel 1 on my weather station, i have some 
>> strange sensor reporting in, with wrong value and overwriting my local 
>> sensor. I think it could be my neighbours weather station of same brand. 
>> I have now changed my outdoor sensor to channel 2. 
>> But in weewx it results in i now have Outside Temperature with wrong 
>> value and a new measurement called Temperature 1. 
>>
>> I dont want to rename Temperature 1 to Outside as i have 7 years of log 
>> data on the Outside Temperature. So i would like to switch, so the Channel 
>> 1 is Temperature 1 and Channel 2 is outside Temperature. 
>> I have tried to look in weewx.conf but its only labels. 
>>
>> Hope someone can help my. 
>>
>

-- 
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/2bde72eb-96ea-4657-8c1f-b8d145df8dd7n%40googlegroups.com.


[weewx-user] Re: ExtraTemp1 as Outside Temperature

2022-01-29 Thread Søren Helskov
>From the driver:
I Would like to Map t_2 to Outside Temperature
Where are all these mapped?

Using configuration file /etc/weewx/weewx.conf
Using TE923 driver version 0.41.1 (weewx.drivers.te923)
Querying the station for current weather data...
dateTime: 1643449936
forecast: 5
 h_1: 48
   h_1_state: ok
 h_2: 91
   h_2_state: ok
 h_3: 56
   h_3_state: ok
 h_4: None
   h_4_state: no_link
 h_5: None
   h_5_state: no_link
h_in: 51
  h_in_state: ok
rain: 520
  rain_state: ok
 slp: 1004.0625
   slp_state: ok
   storm: 0
 t_1: 24.6
   t_1_state: ok
 t_2: 8.2
   t_2_state: ok
 t_3: 15.9
   t_3_state: ok
 t_4: None
   t_4_state: no_link
 t_5: None
   t_5_state: no_link
t_in: 25.95
  t_in_state: ok
  uv: None
uv_state: no_link
   windchill: 7.4
 windchill_state: ok
 winddir: 8
   winddir_state: ok
windgust: 4.5
  windgust_state: ok
   windspeed: 2.6
 windspeed_state: ok

lørdag den 29. januar 2022 kl. 10.27.56 UTC+1 skrev Søren Helskov:

> Hi 
>
> I have this TE923 weatherstation that has been running with Weewx for 
> almost 
> 7 years now. 
> My problem is that on Channel 1 on my weather station, i have some strange 
> sensor reporting in, with wrong value and overwriting my local sensor. I 
> think it could be my neighbours weather station of same brand. 
> I have now changed my outdoor sensor to channel 2. 
> But in weewx it results in i now have Outside Temperature with wrong value 
> and a new measurement called Temperature 1. 
>
> I dont want to rename Temperature 1 to Outside as i have 7 years of log 
> data on the Outside Temperature. So i would like to switch, so the Channel 
> 1 is Temperature 1 and Channel 2 is outside Temperature. 
> I have tried to look in weewx.conf but its only labels. 
>
> Hope someone can help my. 
>

-- 
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/c293977d-2a5f-4178-b400-5d0face565d1n%40googlegroups.com.


Re: [weewx-user] Re: ExtraTemp1

2019-02-02 Thread John Masters


Yes tk, i have followed the instructions and added FilePile via your manual 
method.
Hey Presto, no more spikes on the graph! Your code has cracked it, many 
thanks:
the RECs are correctly showing extraTemp1:
john@pyzero:/home/weewx $ sudo bin/weewxd weewx.conf 
REC:2019-02-02 19:50:13 GMT (1549137013) altimeter: 30.2555134087, 
appTemp: 26.8722205692, barometer: 30.2692025906, cloudbase: 977.76006791, 
dateTime: 1549137013, delay: 5, dewpoint: 27.1278557012, ET: None, 
extraTemp1: 38.48, heatindex: 31.1, humidex: 31.1, inDewpoint: 
53.4656096097, inHumidity: 59.0, inTemp: 68.36, interval: 5, maxSolarRad: 
0.0, outHumidity: 85.0, outTemp: 31.1, outTempBatteryStatus: 0, pressure: 
30.1826002238, ptr: 20528, radiation: None, rain: None, rainRate: 0, 
rainTotal: 77.73, rxCheckPercent: 100, status: 0, usUnits: 1, UV: None, 
windchill: 31.1, windDir: None, windGust: 0.67108282, windrun: 
23.0591422571, windSpeed: 0.0
REC:2019-02-02 19:55:13 GMT (1549137313) altimeter: 30.2584728857, 
appTemp: 27.0739763543, barometer: 30.2721322622, cloudbase: 978.517865133, 
dateTime: 1549137313, delay: 5, dewpoint: 27.3045213934, ET: None, 
extraTemp1: 38.48, heatindex: 31.28, humidex: 31.28, inDewpoint: 
53.4656096097, inHumidity: 59.0, inTemp: 68.36, interval: 5, maxSolarRad: 
0.0, outHumidity: 85.0, outTemp: 31.28, outTempBatteryStatus: 0, pressure: 
30.1855532225, ptr: 20544, radiation: None, rain: 0.0, rainRate: 0, 
rainTotal: 77.73, rxCheckPercent: 100, status: 0, usUnits: 1, UV: None, 
windchill: 31.28, windDir: None, windGust: 1.56585929636, windrun: 
23.0591422571, windSpeed: 0.0
REC:2019-02-02 20:00:13 GMT (1549137613) altimeter: 30.2673513159, 
appTemp: 27.4779108554, barometer: 30.2809531191, cloudbase: 980.034404442, 
dateTime: 1549137613, delay: 5, dewpoint: 27.6578486205, ET: None, 
extraTemp1: 38.48, heatindex: 31.64, humidex: 31.64, inDewpoint: 
53.4656096097, inHumidity: 59.0, inTemp: 68.36, interval: 5, maxSolarRad: 
0.0, outHumidity: 85.0, outTemp: 31.64, outTempBatteryStatus: 0, pressure: 
30.1944122187, ptr: 20560, radiation: None, rain: 0.0, rainRate: 0, 
rainTotal: 77.73, rxCheckPercent: 100, status: 0, usUnits: 1, UV: None, 
windchill: 31.64, windDir: None, windGust: 1.56585929636, windrun: 
23.0591422571, windSpeed: 0.0
REC:2019-02-02 20:05:13 GMT (1549137913) altimeter: 30.2673513159, 
appTemp: 27.8461508, barometer: 30.2808896633, cloudbase: 1046.90658162, 
dateTime: 1549137913, delay: 5, dewpoint: 27.7236110409, ET: None, 
extraTemp1: 38.48, heatindex: 32.0, humidex: 32.0, inDewpoint: 
53.2969727299, inHumidity: 59.0, inTemp: 68.18, interval: 5, maxSolarRad: 
0.0, outHumidity: 84.0, outTemp: 32.0, outTempBatteryStatus: 0, pressure: 
30.1944122187, ptr: 20576, radiation: None, rain: 0.0, rainRate: 0, 
rainTotal: 77.73, rxCheckPercent: 100, status: 0, usUnits: 1, UV: None, 
windchill: 32.0, windDir: None, windGust: 0.67108282, windrun: 
23.0591422571, windSpeed: 0.0

Daypond.png attached.

Regards
John

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


Re: [weewx-user] Re: ExtraTemp1

2019-02-02 Thread Thomas Keffer
I have created an extension, FilePile ,
that automates a lot of this. You specify what unit system your incoming
data is in, and it will automatically convert it to the unit system used by
the incoming record.

Take a look at  the README and see if everything is clear.

-tk

On Sat, Feb 2, 2019 at 4:33 AM John Masters  wrote:

>
> Yes Folks,
>
> @Gary, that's explained a likely cause, thanks for taking the time to
> investigate. Something like the Mars Climate Orbiter, but a lot less
> critical!
>
> @tk, Yes, but i want to put to bed the idea that my temperature sensor is
> randomly switching from degrees_F to degrees_C by itself.
> The sensor is a  DS18B20 1wire connected to a remote RPi. It outputs a
> number which can be interpreted by humans to be a temperature reading. It
> is just a number, with no units attached.
> A script reads this number and inserts it into a MySQL database, which is
> read by php into a graph (see attached pondgraph.jpg). As you can see, the
> temperature is natively and continuously in degrees_C.
>
> The script also writes the number to a plain file, pond.txt, which is
> scp'd every 5 mins to /var/tmp/pond.txt on the Rpi that hosts weewx. It is
> only a number, with no formatting.
> pondservice.py then does it's thing with the number in pond.txt.
>
> When i initially saw that something was going wrong with the resulting
> extraTemp1, and that degrees_C was being interpreted as degrees_F, i wrote
> a conversion into my script so that the number inserted into pond.txt could
> be sent as degrees_F. All that means is that pond.txt contains e.g. instead
> of the number 10 (degrees_C), the number 50 (its Fahrenheit equivalent).
> It is only I who makes that change, by commenting out the conversion in my
> script. See the attached daypond.jpg
>
> Daypond shows pond temperature being sent as a degrees_F number (just a
> plain text number) up until point 1, when i restarted weewx a few times to
> capture the logs that i attached to my post last night, as @Andrew
> suggested.
> Point 2 shows where i commented out the conversion part of my script and
> sent pond temperature as a degrees_C number (again, just a plain text
> number, no units attached), and restarted weewx a couple of times to
> capture more logs, and then let it run like that for a while.
> Point 3 shows where i uncommented the conversion part of my script, and
> continued sending as a degrees_F value, with no restart.
> At no time did i change any other values or settings.
> Every time the file is scp'd there is an entry in the syslog on the remote
> RPi, and the values sent do not change from Degree_C to degrees_F unless i
> comment or uncomment the conversion line in my script,
>
> If i send pond.txt as degrees_F, there is an initial high reading where
> the Fahrenheit number is interpreted as degrees_C, but subsequent readings
> are converted and shown as degrees_C. (e.g. the number 50 in pond.txt is
> initially interpreted as 50 degrees_C in the REC packet, but subsequently
> converted to 10 degrees_C)
> If i send pond.txt as degrees_C, the number is interpreted as its
> Fahrenheit equivalent. (so if pond.txt contains the number 10, it is
> interpreted as 10 degrees_F)
>
> If you follow the Wiki https://github.com/weewx/weewx/wiki/add-sensor and
> install pondservice.py, and create /var/tmp/pond.txt and put any number in
> it, you should see the problem
>
> Phew, you'll all be sick of all this by now, but i hope i have made it
> more clear.
>
> Regards
> John
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [weewx-user] Re: ExtraTemp1

2019-02-01 Thread gjr80
Yes the rule of thumb is check your units before adding anything to a packet or 
record. I think the real catch here is as you pointed out, the apparent 
changing of the units by the driver. Do wonder how many folks have code such as 
this, safe enough I guess until the holes in the cheese align.

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


Re: [weewx-user] Re: ExtraTemp1

2019-02-01 Thread gjr80
Oh, and needless to say I really think we need to change that wiki post, even 
with the units warning you added Tom. Happy to deal with that when I am back on 
my PC.

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


Re: [weewx-user] Re: ExtraTemp1

2019-02-01 Thread gjr80
This has been puzzling me, in particular as it seems that as simplistic as 
pond.py is (ie it is not units aware) using extraTemp1 in either units is 
causing a conversion error. Now that we have some config details I think I am 
starting to understand what is happening. In a nutshell I think this is down to 
a lining up of the holes in the Swiss cheese; or in WeeWX terms, the way in 
which the fousb driver works, the use of software record generation and of 
course pond.py.

Boring technical discussion follows. The fousb driver produces a metric loop 
packet and archive record. In this case we are using software record generation 
so WeeWX accumulates the loop data to synthesise an archive record to which 
pond.py adds extraTemp1 before StdArchive saves the archive record to database. 
This works fine under steady state operation; metric loop packets are 
downloaded and accumulated but StdConvert kicks in before the loop packets are 
accumulated and the accumulated loop data is stored in the database units, in 
this case US customary. When an archive record is synthesised from the 
accumulated data it is in US customary units and pond.py adds extraTemp1 as F 
and the archive record is saved and all is good (we have units harmony). 
However, where a problem arises is when WeeWX starts up and historical records 
are downloaded from the station. In this case the driver provides the archive 
record and it is in metric units, next comes pond.py adding extraTemp1 as F. 
StdConvert then comes along sees the record is in metric and converts it to US 
customary and extraTemp1 is now wrong, we have units disharmony. This will be 
the case for all records downloaded from the station on startup, hence why it 
appears we have 1 or 2 bad records then all is good (as loop packets and 
software records kick in). Likewise if pond.py adds extraTemp1 in C we get unit 
problems again, but this time not with catch-up records but with steady state 
software generated archive records.

So what is the solution, I think here are two possibilities. Firstly, use a 
metric (or metricwx) database, something at uses the same temperature units 
that the fousb driver emits. Secondly, rework pond.py so that it checks the 
unit system (ie field 'usUnits') of the record it is augmenting and add 
extraTemp1 as C or F accordingly. This could be done a couple of ways, you 
could create a ValueHelper from the pond data and use its converter to convert 
based on the record usUnits field, or you could you could check usUnits and 
either directly or via the WeeWX unit conversion functions convert if necessary 
(personally I like the ValueHelper approach, seems more pythonic to me). Since 
pond.py will now be units aware I would also be having you external code that 
produces the data file produce extraTemp1 in that system native units, if 
pond.py is now units aware no point in doing extra, perhaps unneeded unit 
conversions. I would tend not to change the database units, that is too kludgy, 
to me the solution should not be tied to the database units.

I would offer some draft code, unfortunately I am on a mobile device and typing 
this post was about my limit :)

And finally, of course I could be completely wrong, though I am almost certain 
that the fousb driver operation is involved somehow.

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


Re: [weewx-user] Re: ExtraTemp1

2019-02-01 Thread Thomas Keffer
Well, it's possible that the unit system used by the records changes record
to record. Some weather stations do that. You'll have to check and correct
as necessary.

-tk



On Fri, Feb 1, 2019 at 1:11 PM John Masters  wrote:

> Ok tk, i will try again tomorrow - maybe sleep will help! Sorry for being
> a dozey old fool.
> I can only send the temp to weewx either as degrees_F or degrees_C.and
> have tried both, and have changed nothing else.
> There was a fabulous crescent moon with Jupiter and Venus in the black sky
> this morning. A wonderful sight.
> Regards
> John
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [weewx-user] Re: ExtraTemp1

2019-02-01 Thread John Masters
Ok tk, i will try again tomorrow - maybe sleep will help! Sorry for being a 
dozey old fool.
I can only send the temp to weewx either as degrees_F or degrees_C.and have 
tried both, and have changed nothing else.
There was a fabulous crescent moon with Jupiter and Venus in the black sky this 
morning. A wonderful sight.
Regards
John

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


Re: [weewx-user] Re: ExtraTemp1

2019-02-01 Thread Thomas Keffer
>
> I am trying! I thought you suggested i should send weewx the temperature
> in degrees_C. I have changed nothing else.
>

I am saying that whatever unit system you are using should match the unit
system in the record.

Its true i have been around the sun quite a few times. I also remember
> pounds shillings and pence!
>
>
Me too! Hell, I remember when Sweden used to drive on the left!

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


Re: [weewx-user] Re: ExtraTemp1

2019-02-01 Thread John Masters
I am trying! I thought you suggested i should send weewx the temperature in 
degrees_C. I have changed nothing else.
Its true i have been around the sun quite a few times. I also remember pounds 
shillings and pence!
regards
john

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


Re: [weewx-user] Re: ExtraTemp1

2019-02-01 Thread Thomas Keffer
Centigrade? You must be as old as I am! 

John, earlier you said the values in pond.txt were in Fahrenheit (for
example, this post
), but
clearly this one is not. It's in Celsius.

You need to step back and take a look at what you're doing. You have all
the information at hand, you just need to go through the data flow step by
step and make sure you know what unit system everything is in.

-tk

On Fri, Feb 1, 2019 at 12:24 PM John Masters  wrote:

> No tk, pond.txt contains 3.8 (centigrade), now weewx is ploting it as
> minus 15.8.(which is 3.8f converted to centigrade)
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [weewx-user] Re: ExtraTemp1

2019-02-01 Thread John Masters
No tk, pond.txt contains 3.8 (centigrade), now weewx is ploting it as minus 
15.8.(which is 3.8f converted to centigrade)

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


Re: [weewx-user] Re: ExtraTemp1

2019-02-01 Thread Thomas Keffer
Well, that's an improvement, but it looks like the second record got too
small a value: 3.8.

If you run with debug=1 and look in the log, it will show you what values
pond.py read from the file. Do they match your expectations?

-tk

On Fri, Feb 1, 2019 at 11:32 AM John Masters  wrote:

> OK, now i changed the pond.txt to Centigade values
>>>
>>
>
>
>> 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.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [weewx-user] Re: ExtraTemp1

2019-02-01 Thread Thomas Keffer
At this point, all I can do is repeat what I've already said: you must make
sure the unit system of the incoming value from pond.txt matches the unit
system in the record. The incoming value is in US Customary, but the record
is in metric.

-tk

On Fri, Feb 1, 2019 at 10:55 AM John Masters  wrote:

>
>
> I ran weewx as suggested and have attached the output etc.
>
> Now i can see in pond.py line 19 in my file reads: except
> Exception, e:
> Whereas in the Wiki it reads:   except
> Exception as e:
>
> Regards
> John
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [weewx-user] Re: ExtraTemp1

2019-02-01 Thread John Masters


I ran weewx as suggested and have attached the output etc.

Now i can see in pond.py line 19 in my file reads: except 
Exception, e:
Whereas in the Wiki it reads:   except 
Exception as e:

Regards
John

-- 
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.
For more options, visit https://groups.google.com/d/optout.
john@pyzero:/home/weewx $ sudo bin/weewxd weewx.conf 
REC:2019-02-01 17:16:28 GMT (1549041388) altimeter: 29.7760765334, appTemp: 
24.152200579, barometer: 29.7881493524, cloudbase: 2600.43703315, dateTime: 
1549041388, delay: 5, dewpoint: 27.5480770542, ET: None, extraTemp1: 100.94, 
heatindex: 38.66, humidex: 38.66, inDewpoint: 49.284396701, inHumidity: 45.0, 
inTemp: 71.78, interval: 5, maxSolarRad: 0.0, outHumidity: 64.0, outTemp: 
38.66, outTempBatteryStatus: 0, pressure: 29.7042144263, ptr: 15440, radiation: 
None, rain: None, rainRate: 0, rainTotal: 77.7, rxCheckPercent: 100, status: 0, 
usUnits: 1, UV: None, windchill: 29.1494772229, windDir: 45.0, windGust: 
23.4878894454, windrun: 58.7560739185, windSpeed: 18.3429231859
LOOP:   2019-02-01 17:16:32 GMT (1549041392) altimeter: 29.7760765334, appTemp: 
24.152200579, barometer: 29.7881493524, cloudbase: 2600.43703315, dateTime: 
1549041392, delay: 0, dewpoint: 27.5480770542, heatindex: 38.66, humidex: 
38.66, inDewpoint: 49.284396701, inHumidity: 45.0, inTemp: 71.78, maxSolarRad: 
0.0, outHumidity: 64.0, outTemp: 38.66, outTempBatteryStatus: 0, pressure: 
29.7042144263, ptr: 15456, radiation: None, rain: None, rainRate: 0, rainTotal: 
77.7, rxCheckPercent: 100, status: 0, usUnits: 1, UV: None, windchill: 
29.1494772229, windDir: 45.0, windGust: 23.4878894454, windSpeed: 18.3429231859
LOOP:   2019-02-01 17:17:38 GMT (1549041458) altimeter: 29.7790360301, appTemp: 
24.401157776, barometer: 29.7910803427, cloudbase: 2516.86684252, dateTime: 
1549041458, delay: 0, dewpoint: 28.0957858929, heatindex: 38.84, humidex: 
38.84, inDewpoint: 49.284396701, inHumidity: 45.0, inTemp: 71.78, maxSolarRad: 
0.0, outHumidity: 65.0, outTemp: 38.84, outTempBatteryStatus: 0, pressure: 
29.707167425, ptr: 15456, radiation: None, rain: 0.0, rainRate: 0, rainTotal: 
77.7, rxCheckPercent: 100, status: 0, usUnits: 1, UV: None, windchill: 
29.3839114107, windDir: 270.0, windGust: 22.8168068898, windSpeed: 18.3429231859
LOOP:   2019-02-01 17:18:44 GMT (1549041524) altimeter: 29.7790360301, appTemp: 
26.7449970505, barometer: 29.791050012, cloudbase: 2518.86449937, dateTime: 
1549041524, delay: 2, dewpoint: 28.2669962028, heatindex: 39.02, humidex: 
39.02, inDewpoint: 49.1212947842, inHumidity: 45.0, inTemp: 71.6, maxSolarRad: 
0.0, outHumidity: 65.0, outTemp: 39.02, outTempBatteryStatus: 0, pressure: 
29.707167425, ptr: 15456, radiation: None, rain: 0.0, rainRate: 0, rainTotal: 
77.7, rxCheckPercent: 100, status: 0, usUnits: 1, UV: None, windchill: 
30.7266618061, windDir: 0.0, windGust: 22.8168068898, windSpeed: 14.5401220376
LOOP:   2019-02-01 17:19:49 GMT (1549041589) altimeter: 29.7790360301, appTemp: 
25.4849970505, barometer: 29.791050012, cloudbase: 2518.86449937, dateTime: 
1549041589, delay: 2, dewpoint: 28.2669962028, heatindex: 39.02, humidex: 
39.02, inDewpoint: 49.1212947842, inHumidity: 45.0, inTemp: 71.6, maxSolarRad: 
0.0, outHumidity: 65.0, outTemp: 39.02, outTempBatteryStatus: 0, pressure: 
29.707167425, ptr: 15456, radiation: None, rain: 0.0, rainRate: 0, rainTotal: 
77.7, rxCheckPercent: 100, status: 0, usUnits: 1, UV: None, windchill: 
30.0488936445, windDir: 270.0, windGust: 19.6850882971, windSpeed: 16.7770638895
LOOP:   2019-02-01 17:20:55 GMT (1549041655) altimeter: 29.7790360301, appTemp: 
25.9889970505, barometer: 29.791050012, cloudbase: 2518.86449937, dateTime: 
1549041655, delay: 3, dewpoint: 28.2669962028, heatindex: 39.02, humidex: 
39.02, inDewpoint: 49.1212947842, inHumidity: 45.0, inTemp: 71.6, maxSolarRad: 
0.0, outHumidity: 65.0, outTemp: 39.02, outTempBatteryStatus: 0, pressure: 
29.707167425, ptr: 15456, radiation: None, rain: 0.0, rainRate: 0, rainTotal: 
77.7, rxCheckPercent: 100, status: 0, usUnits: 1, UV: None, windchill: 
30.3103169507, windDir: 270.0, windGust: 19.6850882971, windSpeed: 15.8822871488
REC:2019-02-01 17:20:00 GMT (1549041600) altimeter: 29.778296156, appTemp: 
25.195838114, barometer: 29.7903324298, cloudbase: 2538.7582186, dateTime: 
1549041600.0, delay: 1.0, dewpoint: 28.0444638381, ET: None, extraTemp1: 38.3, 
heatindex: 38.885, humidex: 38.885, inDewpoint: 49.2028457426, inHumidity: 
45.0, inTemp: 71.69, interval: 5, maxSolarRad: 0.0, outHumidity: 64.75, 
outTemp: 38.885, outTempBatteryStatus: 0.0, pressure: 29.7064291753, ptr: 
15456.0, radiation: None, rain: 0.0, rainRate: 0.0, rainTotal: 77.7, 
rxCheckPercent: 100.0, status: 0.0, usUnits: 1, UV: None, windchill: 
29.8272360211, 

Re: [weewx-user] Re: ExtraTemp1

2019-01-31 Thread John Masters
Thanks Andrew, will do so when i get back tonight

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


Re: [weewx-user] Re: ExtraTemp1

2019-01-31 Thread John Masters
Um, but firstly i tried sending centigrade values, which is what the sensor 
outputs natively, and got as per first post:
"Presently the file shows 4.8, whereas in Current conditions, the temp is 
displayed at -15.1."
-15.1 is 4.8 Fahrenheit

And then on changing the values in pond.txt to Fahrenheit the graph 
displays correctly, except for the first 2 reads when it displays 
Fahrenheit values as centigrade.
If i could change the units to Fahrengrade  or centiheit I would. The file 
value is just a number, no formatting or mention of units

That's why i was hoping to fix it with StdQC just to get rid of the two 
incorrect interpretations at weewx start.

Okay, so i just restarted weewx with the value 10 in pond.txt and here's 
the resulting graph, which also shows the earlier restart with 39.2 in the 
pond.txt
May i use the American expression "Go figure"?

[image: daypond.png]
Regards
John



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


Re: [weewx-user] Re: ExtraTemp1

2019-01-31 Thread Thomas Keffer
I've modified the Wiki .

John: StdQC will not help you here. You must make sure the units in
pond.txt matches the units used in the WeeWX records.

-tk

On Thu, Jan 31, 2019 at 6:11 AM John Masters  wrote:

> Thanks guys, i will handle it with stdQC and not dig too deep! What is
> curious to me is that after the initial two reads it works correctly
> without me changing anything.
> Tis a small thing in a big world.
> I might try the new beta. If anyone can break it, it'll be me! Oh no i
> hear you say.
> Regards
> John
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [weewx-user] Re: ExtraTemp1

2019-01-31 Thread John Masters
Thanks guys, i will handle it with stdQC and not dig too deep! What is curious 
to me is that after the initial two reads it works correctly without me 
changing anything.
Tis a small thing in a big world.
I might try the new beta. If anyone can break it, it'll be me! Oh no i hear you 
say.
Regards
John

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


Re: [weewx-user] Re: ExtraTemp1

2019-01-31 Thread gjr80
On Thursday, 31 January 2019 23:35:11 UTC+10, Thomas Keffer wrote:
>
> I don't know what is in "PondService",
>

It's in the wiki (as per link in John's first post), probably not the best 
example as there is no mention of properly handling units anywhere in the 
article. Another one to add to the list...

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


Re: [weewx-user] Re: ExtraTemp1

2019-01-31 Thread Thomas Keffer
I don't know what is in "PondService", but I suspect that it is adding your
pond temperature, which is in Fahrenheit, to a record, which is in Metric.
Your database is in US Customary, so WeeWX is dutifully converting the
record to US before putting it in the database.

(Note that 39.2 C is 102.56 F)

If you are going to add a measurement in US Customary to a record in
Metric, you need to convert it first.

-tk


On Thu, Jan 31, 2019 at 3:59 AM John Masters  wrote:

>
>
> Hi
> I decided to stop the data being transferred from the remote RPi, and to
> restart weewx with var/tmp/pond.txt containing a static value.
> To that effect i did the following on the Rpi to which the temperature
> sensor is connected (fishcam):
> john@fishcam:~ $ crontab -e, comment out scp
>
> Next i restarted weewx on the local RPi (pyzero), reading the pond.txt
> file first which now contains a static vaue:
> john@pyzero:~ $ cat /var/tmp/pond.txt
> 39.2
>
> john@pyzero:~ $ sudo /etc/init.d/weewx stop
> [sudo] password for john:
> [ ok ] Stopping weewx (via systemctl): weewx.service.
>
> Now delete out spurious data:
> john@pyzero:~ $ cp /home/weewx/archive/weewx.sdb /var/tmp/backup.sdb
> john@pyzero:~ $ echo "UPDATE archive SET extraTemp1=NULL WHERE
> (extraTemp1 > 50);" | sqlite3 /var/tmp/backup.sdb
> john@pyzero:~ $ sudo cp /var/tmp/backup.sdb /home/weewx/archive/weewx.sdb
>
> Now check for spurious data in database
> john@pyzero:~ $ echo "SELECT * FROM archive WHERE (extraTemp1 > 50);" |
> sqlite3 /home/weewx/archive/weewx.sdb
>
> Check pond.txt again
> john@pyzero:~ $ cat /var/tmp/pond.txt
> 39.2
>
> Startup weewx
> john@pyzero:~ $ sudo /etc/init.d/weewx start
> [ ok ] Starting weewx (via systemctl): weewx.service.
> john@pyzero:~ $
>
> Wait for Weewx
> <14>1 2019-01-31T11:31:43.903522+00:00 pyzero weewx 4139 - - ftpgenerator:
> ftp'd 42 files in 3.39 seconds
>
> Check pond.txt again:
> john@pyzero:~ $ cat /var/tmp/pond.txt
> 39.2
>
> Check database:
> echo "SELECT * FROM archive WHERE (extraTemp1 > 50);" | sqlite3
> /home/weewx/archive/weewx.sdb
>
> 1548933705|1|5|29.3238205905521|29.2405936225|29.3114340112887|70.7|35.06|48.0|76.0|10.7373208893087|90.0|15.8822871487691||0.0||28.2719345789057|27.1762465061561|35.06102.56|100.0|||0.0|
>
> 1548934005|1|5|29.3208288769195|29.23764062375|29.308474494934|70.7|35.24|48.0|77.0|9.17146159295115|135.0|15.8822871487691||0.0|0.0|28.7650466491527|28.1537770526488|35.24102.56|100.0|||0.0|
>
> There is the spike again!
> High Pond Temperature 39.2°C at 11:21
>
> Therefore the Fahrenheit data from pond.txt is displayed as a centigrade
> number when weewx initally reads the file pond.txt.
>
> Could it be the order of [[Services]]? In my weewx.conf data_services is
> second in the list:
>
>
> #   This section configures the internal weewx engine.
> [Engine]
>
>[[Services]]
> # This section specifies the services that should be run. They are
> # grouped by type, and the order of services within each group
> # determines the order in which the services will be run.
> prep_services = weewx.engine.StdTimeSynch
> data_services = user.pond.PondService
> process_services = weewx.engine.StdConvert,
> weewx.engine.StdCalibrate, weewx.engine.StdQC,
> weewx.wxservices.StdWXCalculate
> archive_services = weewx.engine.StdArchive
> restful_services = weewx.restx.StdStationRegistry,
> weewx.restx.StdWunderground, weewx.restx.StdPWSweather,
> weewx.restx.StdCWOP, weewx.restx.StdWOW, weewx.restx.StdAWEKAS
> report_services = weewx.engine.StdPrint, weewx.engine.StdReport
>
> Regards
> John
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [weewx-user] Re: ExtraTemp1

2019-01-31 Thread Andrew Milner
1.  Is your database US or METRIC or METRICWX??
2.  If you are using the unmodified ponds service then I think that the way 
it works is to assume the temperature in the file is the same units as 
specified by database type. ie it does no conversions on the data.

I am sure a conversion could be put into the pond service, but I do not 
know the format to do it!!  Someone else will have the answer I am sure

Since you are adding to an archive record then the units need to be correct 
before being inserted into the record by the servia

It looks to me as though the service will, if DEBUG is set to 1, log the 
value of the data read from the file before inserting into the record.  
Additionally running weewx directly from the command line instead of as a 
daemon will log the LOOP and REC packets and may help you to identify the 
problem.

As a simple 'check' you could do a temperature conversion yourself within 
the pondservice - it is not exactly a difficult piece of maths!!






On Thursday, 31 January 2019 13:58:58 UTC+2, John Masters wrote:
>
>
>
> Hi
> I decided to stop the data being transferred from the remote RPi, and to 
> restart weewx with var/tmp/pond.txt containing a static value.
> To that effect i did the following on the Rpi to which the temperature 
> sensor is connected (fishcam):
> john@fishcam:~ $ crontab -e, comment out scp
>
> Next i restarted weewx on the local RPi (pyzero), reading the pond.txt 
> file first which now contains a static vaue:
> john@pyzero:~ $ cat /var/tmp/pond.txt 
> 39.2
>
> john@pyzero:~ $ sudo /etc/init.d/weewx stop
> [sudo] password for john: 
> [ ok ] Stopping weewx (via systemctl): weewx.service.
>
> Now delete out spurious data:
> john@pyzero:~ $ cp /home/weewx/archive/weewx.sdb /var/tmp/backup.sdb
> john@pyzero:~ $ echo "UPDATE archive SET extraTemp1=NULL WHERE (extraTemp1 
> > 50);" | sqlite3 /var/tmp/backup.sdb
> john@pyzero:~ $ sudo cp /var/tmp/backup.sdb /home/weewx/archive/weewx.sdb
>
> Now check for spurious data in database
> john@pyzero:~ $ echo "SELECT * FROM archive WHERE (extraTemp1 > 50);" | 
> sqlite3 /home/weewx/archive/weewx.sdb 
>
> Check pond.txt again
> john@pyzero:~ $ cat /var/tmp/pond.txt 
> 39.2
>
> Startup weewx
> john@pyzero:~ $ sudo /etc/init.d/weewx start
> [ ok ] Starting weewx (via systemctl): weewx.service.
> john@pyzero:~ $ 
>
> Wait for Weewx
> <14>1 2019-01-31T11:31:43.903522+00:00 pyzero weewx 4139 - - ftpgenerator: 
> ftp'd 42 files in 3.39 seconds
>
> Check pond.txt again:
> john@pyzero:~ $ cat /var/tmp/pond.txt 
> 39.2
>
> Check database:
> echo "SELECT * FROM archive WHERE (extraTemp1 > 50);" | sqlite3 
> /home/weewx/archive/weewx.sdb 
>
> 1548933705|1|5|29.3238205905521|29.2405936225|29.3114340112887|70.7|35.06|48.0|76.0|10.7373208893087|90.0|15.8822871487691||0.0||28.2719345789057|27.1762465061561|35.06102.56|100.0|||0.0|
>
> 1548934005|1|5|29.3208288769195|29.23764062375|29.308474494934|70.7|35.24|48.0|77.0|9.17146159295115|135.0|15.8822871487691||0.0|0.0|28.7650466491527|28.1537770526488|35.24102.56|100.0|||0.0|
>
> There is the spike again!
> High Pond Temperature 39.2°C at 11:21
>
> Therefore the Fahrenheit data from pond.txt is displayed as a centigrade 
> number when weewx initally reads the file pond.txt.
>
> Could it be the order of [[Services]]? In my weewx.conf data_services is 
> second in the list:
>
>
> #   This section configures the internal weewx engine.
> [Engine]
>  
>[[Services]]
> # This section specifies the services that should be run. They are
> # grouped by type, and the order of services within each group
> # determines the order in which the services will be run.
> prep_services = weewx.engine.StdTimeSynch
> data_services = user.pond.PondService
> process_services = weewx.engine.StdConvert, 
> weewx.engine.StdCalibrate, weewx.engine.StdQC, 
> weewx.wxservices.StdWXCalculate
> archive_services = weewx.engine.StdArchive
> restful_services = weewx.restx.StdStationRegistry, 
> weewx.restx.StdWunderground, weewx.restx.StdPWSweather, 
> weewx.restx.StdCWOP, weewx.restx.StdWOW, weewx.restx.StdAWEKAS
> report_services = weewx.engine.StdPrint, weewx.engine.StdReport
>
> Regards
> John
>

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


Re: [weewx-user] Re: ExtraTemp1

2019-01-31 Thread John Masters


Hi
I decided to stop the data being transferred from the remote RPi, and to 
restart weewx with var/tmp/pond.txt containing a static value.
To that effect i did the following on the Rpi to which the temperature 
sensor is connected (fishcam):
john@fishcam:~ $ crontab -e, comment out scp

Next i restarted weewx on the local RPi (pyzero), reading the pond.txt file 
first which now contains a static vaue:
john@pyzero:~ $ cat /var/tmp/pond.txt 
39.2

john@pyzero:~ $ sudo /etc/init.d/weewx stop
[sudo] password for john: 
[ ok ] Stopping weewx (via systemctl): weewx.service.

Now delete out spurious data:
john@pyzero:~ $ cp /home/weewx/archive/weewx.sdb /var/tmp/backup.sdb
john@pyzero:~ $ echo "UPDATE archive SET extraTemp1=NULL WHERE (extraTemp1 
> 50);" | sqlite3 /var/tmp/backup.sdb
john@pyzero:~ $ sudo cp /var/tmp/backup.sdb /home/weewx/archive/weewx.sdb

Now check for spurious data in database
john@pyzero:~ $ echo "SELECT * FROM archive WHERE (extraTemp1 > 50);" | 
sqlite3 /home/weewx/archive/weewx.sdb 

Check pond.txt again
john@pyzero:~ $ cat /var/tmp/pond.txt 
39.2

Startup weewx
john@pyzero:~ $ sudo /etc/init.d/weewx start
[ ok ] Starting weewx (via systemctl): weewx.service.
john@pyzero:~ $ 

Wait for Weewx
<14>1 2019-01-31T11:31:43.903522+00:00 pyzero weewx 4139 - - ftpgenerator: 
ftp'd 42 files in 3.39 seconds

Check pond.txt again:
john@pyzero:~ $ cat /var/tmp/pond.txt 
39.2

Check database:
echo "SELECT * FROM archive WHERE (extraTemp1 > 50);" | sqlite3 
/home/weewx/archive/weewx.sdb 
1548933705|1|5|29.3238205905521|29.2405936225|29.3114340112887|70.7|35.06|48.0|76.0|10.7373208893087|90.0|15.8822871487691||0.0||28.2719345789057|27.1762465061561|35.06102.56|100.0|||0.0|
1548934005|1|5|29.3208288769195|29.23764062375|29.308474494934|70.7|35.24|48.0|77.0|9.17146159295115|135.0|15.8822871487691||0.0|0.0|28.7650466491527|28.1537770526488|35.24102.56|100.0|||0.0|

There is the spike again!
High Pond Temperature 39.2°C at 11:21

Therefore the Fahrenheit data from pond.txt is displayed as a centigrade 
number when weewx initally reads the file pond.txt.

Could it be the order of [[Services]]? In my weewx.conf data_services is 
second in the list:


#   This section configures the internal weewx engine.
[Engine]
 
   [[Services]]
# This section specifies the services that should be run. They are
# grouped by type, and the order of services within each group
# determines the order in which the services will be run.
prep_services = weewx.engine.StdTimeSynch
data_services = user.pond.PondService
process_services = weewx.engine.StdConvert, 
weewx.engine.StdCalibrate, weewx.engine.StdQC, 
weewx.wxservices.StdWXCalculate
archive_services = weewx.engine.StdArchive
restful_services = weewx.restx.StdStationRegistry, 
weewx.restx.StdWunderground, weewx.restx.StdPWSweather, 
weewx.restx.StdCWOP, weewx.restx.StdWOW, weewx.restx.StdAWEKAS
report_services = weewx.engine.StdPrint, weewx.engine.StdReport

Regards
John

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


Re: [weewx-user] Re: ExtraTemp1

2019-01-30 Thread John Masters
Sorry tk i am obviously not explaining it well. I shall start again tomorrow 
with a clear head.
Anyway, thanks so much for such a super software, and for supporting it so 
well. In my book, you are a real Star.
Regards
John

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


Re: [weewx-user] Re: ExtraTemp1

2019-01-30 Thread Thomas Keffer
You lost me. Is everything working now? Or, are you still having a problem?

If you're sure the data is OK on the remote RPi, and it's not OK in the
WeeWX database, then, obviously, it got corrupted somewhere along the way.

-tk



On Wed, Jan 30, 2019 at 3:04 PM John Masters  wrote:

> Ok, will implement StdQC.
>
> The 1-wire temperature sensor is connected to a remote RPI which logs the
> readings to a mysql database, and produces a graph (see below). That is all
> working without error.
> I use a cron job to convert to Fahrenheit and  write the temperature to a
> file pond.txt, and scp it to the pizero running weewx, at
> /var/tmp/pond.txt.
> The timecode is not sent to weewx at all, only the Temperature:
>
> john@pyzero:~ $ cat /var/tmp/pond.txt
> 39.74
>
> I copied the code from https://github.com/weewx/weewx/wiki/add-sensor
> and followed the instructions to enable the new service. Weewx reads the
> file and displays the results.
>
> The file pond.txt does not suddenly include spurious readings (as seen in
> the graph below which is created from the same data).
> However when i restart weewx it does not convert the content of the
> pond.txt file which is in Fahrenheit to Centigrade, but displays it as a
> centigrade value. Subsequent data is correctly converted.
>
> [image: Screenshot from 2019-01-30 22-43-38.png]
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

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


[weewx-user] Re: ExtraTemp1

2019-01-30 Thread John Masters
Ok, will implement StdQC.

The 1-wire temperature sensor is connected to a remote RPI which logs the 
readings to a mysql database, and produces a graph (see below). That is all 
working without error.
I use a cron job to convert to Fahrenheit and  write the temperature to a 
file pond.txt, and scp it to the pizero running weewx, at 
/var/tmp/pond.txt. 
The timecode is not sent to weewx at all, only the Temperature:

john@pyzero:~ $ cat /var/tmp/pond.txt 
39.74

I copied the code from https://github.com/weewx/weewx/wiki/add-sensor
and followed the instructions to enable the new service. Weewx reads the 
file and displays the results.

The file pond.txt does not suddenly include spurious readings (as seen in 
the graph below which is created from the same data).
However when i restart weewx it does not convert the content of the 
pond.txt file which is in Fahrenheit to Centigrade, but displays it as a 
centigrade value. Subsequent data is correctly converted.

[image: Screenshot from 2019-01-30 22-43-38.png]

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


Re: [weewx-user] Re: ExtraTemp1

2019-01-30 Thread Thomas Keffer
The timestamps for the high extraTemp1 values are 1548874319
and 1548874619. Unfortunately, you didn't include enough of the log to see
those timestamps, but they probably came right off your instrument. You are
adding bad values as fast as you are removing them.

You need to use the StdQC 
facility and, especially, figure out why your hardware is giving such
anomalous values.

-tk


On Wed, Jan 30, 2019 at 11:29 AM John Masters 
wrote:

>
>
> On Wednesday, January 30, 2019 at 7:18:34 PM UTC, John Masters wrote:
>>
>> Thanks for reply Tom,
>> I did this:
>> sudo /etc/init.d/weewx stop
>> cp /home/weewx/archive/weewx.sdb /var/tmp/backup.sdb
>> echo "UPDATE archive SET extraTemp1=NULL WHERE (extraTemp1 > 50);" |
>> sqlite3 /var/tmp/backup.sdb
>> sudo cp /var/tmp/backup.sdb /home/weewx/archive/weewx.sdb
>>  sudo /etc/init.d/weewx start
>> echo "SELECT * FROM archive WHERE (extraTemp1 > 50);" | sqlite3
>> /home/weewx/archive/weewx.sdb
>> no results found
>>
>> Wait for Weewx:
>>
>> Jan 30 18:57:03 pyzero weewx[1237]: restx: StationRegistry: Published
>> record 2019-01-30 18:51:59 GMT (1548874319)
>> Jan 30 19:00:20 pyzero weewx[1237]: manager: Added record 2019-01-30
>> 19:00:00 GMT (1548874800) to database 'weewx.sdb'
>> Jan 30 19:00:21 pyzero weewx[1237]: manager: Added record 2019-01-30
>> 19:00:00 GMT (1548874800) to daily summary in 'weewx.sdb'
>> Jan 30 19:00:44 pyzero weewx[1237]: cheetahgenerator: Generated 16 files
>> for report StandardReport in 22.80 seconds
>> Jan 30 19:00:58 pyzero weewx[1237]: imagegenerator: Generated 24 images
>> for StandardReport in 13.05 seconds
>> Jan 30 19:00:58 pyzero weewx[1237]: copygenerator: copied 14 files to
>> /home/weewx/public_html
>> Jan 30 19:01:02 pyzero weewx[1237]: ftpgenerator: ftp'd 54 files in 4.06
>> seconds
>>
>> echo "SELECT * FROM archive WHERE (extraTemp1 > 50);" | sqlite3
>> /home/weewx/archive/weewx.sdb
>>
>> 1548874319|1|5|29.7418113163833|29.65696644625|29.7287245690177|64.4|32.54|50.0|84.0|3.13171859271503|180.0|4.47388370387861||0.0||28.2528638899494|29.7479396035033|32.54102.884|100.0|||0.0|
>>
>> 1548874619|1|5|29.7507267496848|29.6658254425|29.7376030647443|64.04|32.36|51.0|84.0|3.13171859271503|180.0|3.80280114829682||0.0|0.0|28.0764477571856|29.5436989829887|32.36102.884|100.0|||0.0|
>>
>> The initial spike is showing again. This occurred originally before i
>> converted the data to Fahrenheit (see update to my original post).
>>
>> [image: Screenshot from 2019-01-30 19-12-48.png]
>>
>> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

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


[weewx-user] Re: ExtraTemp1

2019-01-30 Thread John Masters


On Wednesday, January 30, 2019 at 7:18:34 PM UTC, John Masters wrote:
>
> Thanks for reply Tom,
> I did this:
> sudo /etc/init.d/weewx stop
> cp /home/weewx/archive/weewx.sdb /var/tmp/backup.sdb
> echo "UPDATE archive SET extraTemp1=NULL WHERE (extraTemp1 > 50);" | 
> sqlite3 /var/tmp/backup.sdb
> sudo cp /var/tmp/backup.sdb /home/weewx/archive/weewx.sdb
>  sudo /etc/init.d/weewx start
> echo "SELECT * FROM archive WHERE (extraTemp1 > 50);" | sqlite3 
> /home/weewx/archive/weewx.sdb 
> no results found
>
> Wait for Weewx:
>
> Jan 30 18:57:03 pyzero weewx[1237]: restx: StationRegistry: Published 
> record 2019-01-30 18:51:59 GMT (1548874319)
> Jan 30 19:00:20 pyzero weewx[1237]: manager: Added record 2019-01-30 
> 19:00:00 GMT (1548874800) to database 'weewx.sdb'
> Jan 30 19:00:21 pyzero weewx[1237]: manager: Added record 2019-01-30 
> 19:00:00 GMT (1548874800) to daily summary in 'weewx.sdb'
> Jan 30 19:00:44 pyzero weewx[1237]: cheetahgenerator: Generated 16 files 
> for report StandardReport in 22.80 seconds
> Jan 30 19:00:58 pyzero weewx[1237]: imagegenerator: Generated 24 images 
> for StandardReport in 13.05 seconds
> Jan 30 19:00:58 pyzero weewx[1237]: copygenerator: copied 14 files to 
> /home/weewx/public_html
> Jan 30 19:01:02 pyzero weewx[1237]: ftpgenerator: ftp'd 54 files in 4.06 
> seconds
>
> echo "SELECT * FROM archive WHERE (extraTemp1 > 50);" | sqlite3 
> /home/weewx/archive/weewx.sdb 
>
> 1548874319|1|5|29.7418113163833|29.65696644625|29.7287245690177|64.4|32.54|50.0|84.0|3.13171859271503|180.0|4.47388370387861||0.0||28.2528638899494|29.7479396035033|32.54102.884|100.0|||0.0|
>
> 1548874619|1|5|29.7507267496848|29.6658254425|29.7376030647443|64.04|32.36|51.0|84.0|3.13171859271503|180.0|3.80280114829682||0.0|0.0|28.0764477571856|29.5436989829887|32.36102.884|100.0|||0.0|
>
> The initial spike is showing again. This occurred originally before i 
> converted the data to Fahrenheit (see update to my original post). 
>
> [image: Screenshot from 2019-01-30 19-12-48.png]
>
>

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


[weewx-user] Re: ExtraTemp1

2019-01-30 Thread John Masters
Thanks for reply Tom,
I did this:
sudo /etc/init.d/weewx stop
cp /home/weewx/archive/weewx.sdb /var/tmp/backup.sdb
echo "UPDATE archive SET extraTemp1=NULL WHERE (extraTemp1 > 50);" | 
sqlite3 /var/tmp/backup.sdb
sudo cp /var/tmp/backup.sdb /home/weewx/archive/weewx.sdb
 sudo /etc/init.d/weewx start
echo "SELECT * FROM archive WHERE (extraTemp1 > 50);" | sqlite3 
/home/weewx/archive/weewx.sdb 
no results found

Wait for Weewx:

Jan 30 18:57:03 pyzero weewx[1237]: restx: StationRegistry: Published 
record 2019-01-30 18:51:59 GMT (1548874319)
Jan 30 19:00:20 pyzero weewx[1237]: manager: Added record 2019-01-30 
19:00:00 GMT (1548874800) to database 'weewx.sdb'
Jan 30 19:00:21 pyzero weewx[1237]: manager: Added record 2019-01-30 
19:00:00 GMT (1548874800) to daily summary in 'weewx.sdb'
Jan 30 19:00:44 pyzero weewx[1237]: cheetahgenerator: Generated 16 files 
for report StandardReport in 22.80 seconds
Jan 30 19:00:58 pyzero weewx[1237]: imagegenerator: Generated 24 images for 
StandardReport in 13.05 seconds
Jan 30 19:00:58 pyzero weewx[1237]: copygenerator: copied 14 files to 
/home/weewx/public_html
Jan 30 19:01:02 pyzero weewx[1237]: ftpgenerator: ftp'd 54 files in 4.06 
seconds

echo "SELECT * FROM archive WHERE (extraTemp1 > 50);" | sqlite3 
/home/weewx/archive/weewx.sdb 
1548874319|1|5|29.7418113163833|29.65696644625|29.7287245690177|64.4|32.54|50.0|84.0|3.13171859271503|180.0|4.47388370387861||0.0||28.2528638899494|29.7479396035033|32.54102.884|100.0|||0.0|
1548874619|1|5|29.7507267496848|29.6658254425|29.7376030647443|64.04|32.36|51.0|84.0|3.13171859271503|180.0|3.80280114829682||0.0|0.0|28.0764477571856|29.5436989829887|32.36102.884|100.0|||0.0|

The initial spike is showing again. This occurred originally before i 
converted the data to Centigrade (see update to my original post). 

[image: Screenshot from 2019-01-30 19-12-48.png]

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


Re: [weewx-user] Re: ExtraTemp1

2019-01-30 Thread Thomas Keffer
The plot data are taken directly from the database, so there must still be
a bad point in there. To find, see the Wiki article *Clean up old 'bad'
data .*

-tk

On Wed, Jan 30, 2019 at 8:35 AM John Masters  wrote:

> Well, i found my mistake - Weewx was set to accept Fahrenheit units!
>
> I changed the script to convert the data to Fahrenheit before sending it,
> and now the extraTemp1 displays Pond Temperature correctly.
>
> Next i deleted out the spurious data from the database and restarted weewx
> (as per wiki). Fine, the old incorrect stuff has gone, but the first
> datapoint after starting weewx plots as 40 Centigrade. Subsequent data
> plots normally. I restarted again to be sure, and the same thing happened
> again.
> http://hybrasil.biz/weather/index.html
>
> Where should i look to stop that happening?
>
> Thanks
> John
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

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


[weewx-user] Re: ExtraTemp1

2019-01-30 Thread John Masters
Well, i found my mistake - Weewx was set to accept Fahrenheit units!

I changed the script to convert the data to Fahrenheit before sending it, 
and now the extraTemp1 displays Pond Temperature correctly.

Next i deleted out the spurious data from the database and restarted weewx 
(as per wiki). Fine, the old incorrect stuff has gone, but the first 
datapoint after starting weewx plots as 40 Centigrade. Subsequent data 
plots normally. I restarted again to be sure, and the same thing happened 
again.
http://hybrasil.biz/weather/index.html

Where should i look to stop that happening?

Thanks
John

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


[weewx-user] Re: ExtraTemp1

2018-12-29 Thread vince
On Saturday, December 29, 2018 at 4:39:17 PM UTC-8, Tom Robertson wrote:
>
> I have a Davis Vantage 2 with the extra sensor.  I am running weewx on a 
> RPI.  I see the extra temp sensor value show up in my Meteotemplate web 
> page so I know it is being sent.  When I look at the weex DB I see the 
> field for the ExtraTemp1 sensor but it is not being populated.
>
>
>
Query your archive table and see if it's perhaps being populated into a 
different field than extraTemp1.or run weewx interactively and look at 
the LOOP packets it's receiving and verify it that way.  Maybe it's going 
into extraTemp2 or extraTemp3 or extraTemp4

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


Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread Jens-Jørgen Kjærgaard
It works!
After running your pond.py for some hours, it works perfectly, the
corrections also!
Thank you for helping out in this to an amateur in python.

But I will have to use your pond.py after a future upgrade of weewx - or
will it be included?

Jens-Jørgen Kjærgaard
Tuenvej 818
9870 Sindal
+45 21204417
www.jensjk.dk

2018-05-06 16:53 GMT+02:00 Andrew Milner :

> try the attached version (after renaming it of course!!)
>
>
>
>
>
>
>
> On Sunday, 6 May 2018 17:04:09 UTC+3, Jens-Jørgen Kjærgaard wrote:
>>
>> Thank you for a elaborate and understandable answer.
>> However, I think I am beyond using either solution - as my knowledge of
>> python is a little less than basic :).
>>
>> For your info, I add my present weewx.conf, soetemp.py and pond.py
>>
>>
>>
>> Jens-Jørgen Kjærgaard
>> Tuenvej 818
>> 
>> 9870 Sindal
>> 
>> +45 21204417
>> www.jensjk.dk
>>
>> 2018-05-06 15:38 GMT+02:00 gjr80 :
>>
>>> Herein lies the problem of augmenting a loop packet or archive record
>>> when it is done 'on the cheap'. Each packet or record has a field, usUnits,
>>> that indicates the unit system used in the packet/record; in simple terms
>>> it tells us whether the temperature fields are F or C. The unit system used
>>> in a packet/record can vary for a number of reasons. The safe way to add
>>> obs to a packet/record is to check the usUnits field of the packet/record
>>> you are augmenting and make sure the obs you are adding to the
>>> packet/record is in the correct units. The cheap way to add an obs is to
>>> blindly add a field to the packet/record. This will work fine if the
>>> packet/record unit system happens to use the same units as the data you are
>>> adding. If this is not the case you tend to get nonsense data somewhere
>>> along the line as the data you added will be assumed to be in one
>>> particular unit when it is in fact in another unit and when a conversion
>>> occurs (and chances are a unit conversion will occur somewhere) it will be
>>> wrong.
>>>
>>> In this case your service is reading a temperature of 52.1 (I assume F)
>>> from a text file and adding it to the archive record. The fousb driver
>>> emits a metric packet, so the temperatures therein are in C, and extraTemp1
>>> is added as 52.1 and since it was added to a metric record it is now
>>> considered to be in C. Later, when the record is converted (in service
>>> StdConvert) to the unit system used by the database, in your case this is
>>> US customary which uses F for temperature, 52.1 is 'converted' to F. This
>>> results in extraTemp1 becoming 125.8F (52.1C converted to F). Now the
>>> StdCalibrate service comes along and applies any calibrations, in this case
>>> extraTemp1 is reduced by 20%, so extraTemp1 becomes 100.6. Now the QC
>>> limits are applied by service StdQC, and this is where you get the message
>>> about extraTemp1 breaking its limit.
>>>
>>> So how to fix, the elegant way is to recode pond.py to take note of the
>>> units of the record being augmented, converting the text file value
>>> accordingly then adding it to the record. The other approach is to either
>>> modify the code that writes the text file to write a value in C or modify
>>> pond.py to convert the text file temperature to C before adding it to the
>>> record. The first approach will be able to handle future changes (to code
>>> or hardware) but requires some python skills and weeWX knowledge. The
>>> latter approach is simpler and may not work in the future (perhaps changes
>>> to the weeWX code or you get a new station) but only requires some basic
>>> python knowledge and no understanding of weeWX.
>>>
>>> Gary
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "weewx-user" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>> pic/weewx-user/YVAkCwsY2S0/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> weewx-user+...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/to
> pic/weewx-user/YVAkCwsY2S0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread Andrew Milner
try the attached version (after renaming it of course!!)







On Sunday, 6 May 2018 17:04:09 UTC+3, Jens-Jørgen Kjærgaard wrote:
>
> Thank you for a elaborate and understandable answer.
> However, I think I am beyond using either solution - as my knowledge of 
> python is a little less than basic :).
>
> For your info, I add my present weewx.conf, soetemp.py and pond.py
>
>
>
> Jens-Jørgen Kjærgaard
> Tuenvej 818
> 9870 Sindal
> +45 21204417
> www.jensjk.dk
>
> 2018-05-06 15:38 GMT+02:00 gjr80 :
>
>> Herein lies the problem of augmenting a loop packet or archive record 
>> when it is done 'on the cheap'. Each packet or record has a field, usUnits, 
>> that indicates the unit system used in the packet/record; in simple terms 
>> it tells us whether the temperature fields are F or C. The unit system used 
>> in a packet/record can vary for a number of reasons. The safe way to add 
>> obs to a packet/record is to check the usUnits field of the packet/record 
>> you are augmenting and make sure the obs you are adding to the 
>> packet/record is in the correct units. The cheap way to add an obs is to 
>> blindly add a field to the packet/record. This will work fine if the 
>> packet/record unit system happens to use the same units as the data you are 
>> adding. If this is not the case you tend to get nonsense data somewhere 
>> along the line as the data you added will be assumed to be in one 
>> particular unit when it is in fact in another unit and when a conversion 
>> occurs (and chances are a unit conversion will occur somewhere) it will be 
>> wrong.
>>
>> In this case your service is reading a temperature of 52.1 (I assume F) 
>> from a text file and adding it to the archive record. The fousb driver 
>> emits a metric packet, so the temperatures therein are in C, and extraTemp1 
>> is added as 52.1 and since it was added to a metric record it is now 
>> considered to be in C. Later, when the record is converted (in service 
>> StdConvert) to the unit system used by the database, in your case this is 
>> US customary which uses F for temperature, 52.1 is 'converted' to F. This 
>> results in extraTemp1 becoming 125.8F (52.1C converted to F). Now the 
>> StdCalibrate service comes along and applies any calibrations, in this case 
>> extraTemp1 is reduced by 20%, so extraTemp1 becomes 100.6. Now the QC 
>> limits are applied by service StdQC, and this is where you get the message 
>> about extraTemp1 breaking its limit.
>>
>> So how to fix, the elegant way is to recode pond.py to take note of the 
>> units of the record being augmented, converting the text file value 
>> accordingly then adding it to the record. The other approach is to either 
>> modify the code that writes the text file to write a value in C or modify 
>> pond.py to convert the text file temperature to C before adding it to the 
>> record. The first approach will be able to handle future changes (to code 
>> or hardware) but requires some python skills and weeWX knowledge. The 
>> latter approach is simpler and may not work in the future (perhaps changes 
>> to the weeWX code or you get a new station) but only requires some basic 
>> python knowledge and no understanding of weeWX.
>>
>> Gary
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "weewx-user" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/weewx-user/YVAkCwsY2S0/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> weewx-user+...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

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


pond..py.new
Description: Binary data


Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread Jens-Jørgen Kjærgaard
Thank you for a elaborate and understandable answer.
However, I think I am beyond using either solution - as my knowledge of
python is a little less than basic :).

For your info, I add my present weewx.conf, soetemp.py and pond.py



Jens-Jørgen Kjærgaard
Tuenvej 818
9870 Sindal
+45 21204417
www.jensjk.dk

2018-05-06 15:38 GMT+02:00 gjr80 :

> Herein lies the problem of augmenting a loop packet or archive record when
> it is done 'on the cheap'. Each packet or record has a field, usUnits, that
> indicates the unit system used in the packet/record; in simple terms it
> tells us whether the temperature fields are F or C. The unit system used in
> a packet/record can vary for a number of reasons. The safe way to add obs
> to a packet/record is to check the usUnits field of the packet/record you
> are augmenting and make sure the obs you are adding to the packet/record is
> in the correct units. The cheap way to add an obs is to blindly add a field
> to the packet/record. This will work fine if the packet/record unit system
> happens to use the same units as the data you are adding. If this is not
> the case you tend to get nonsense data somewhere along the line as the data
> you added will be assumed to be in one particular unit when it is in fact
> in another unit and when a conversion occurs (and chances are a unit
> conversion will occur somewhere) it will be wrong.
>
> In this case your service is reading a temperature of 52.1 (I assume F)
> from a text file and adding it to the archive record. The fousb driver
> emits a metric packet, so the temperatures therein are in C, and extraTemp1
> is added as 52.1 and since it was added to a metric record it is now
> considered to be in C. Later, when the record is converted (in service
> StdConvert) to the unit system used by the database, in your case this is
> US customary which uses F for temperature, 52.1 is 'converted' to F. This
> results in extraTemp1 becoming 125.8F (52.1C converted to F). Now the
> StdCalibrate service comes along and applies any calibrations, in this case
> extraTemp1 is reduced by 20%, so extraTemp1 becomes 100.6. Now the QC
> limits are applied by service StdQC, and this is where you get the message
> about extraTemp1 breaking its limit.
>
> So how to fix, the elegant way is to recode pond.py to take note of the
> units of the record being augmented, converting the text file value
> accordingly then adding it to the record. The other approach is to either
> modify the code that writes the text file to write a value in C or modify
> pond.py to convert the text file temperature to C before adding it to the
> record. The first approach will be able to handle future changes (to code
> or hardware) but requires some python skills and weeWX knowledge. The
> latter approach is simpler and may not work in the future (perhaps changes
> to the weeWX code or you get a new station) but only requires some basic
> python knowledge and no understanding of weeWX.
>
> Gary
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/weewx-user/YVAkCwsY2S0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


weewx.conf
Description: Binary data
import syslog
import weewx
from weewx.wxengine import StdService

class PondService(StdService):
def __init__(self, engine, config_dict):
super(PondService, self).__init__(engine, config_dict)  
d = config_dict.get('PondService', {})
self.filename = d.get('filename', '/var/tmp/pond.txt')
syslog.syslog(syslog.LOG_INFO, "pond: using %s" % self.filename)
self.bind(weewx.NEW_LOOP_PACKET, self.read_file)

def read_file(self, event):
try:
with open(self.filename) as f:
value = f.readline()
syslog.syslog(syslog.LOG_DEBUG, "pond: found value of %s" % value)
event.packet['extraTemp1'] = float(value)
except Exception, e:
syslog.syslog(syslog.LOG_ERR, "pond: cannot read value: %s" % e)
#!/usr/bin/python
def gettemp(id):
  try:
mytemp = ''
filename = 'w1_slave'
f = open('/sys/bus/w1/devices/' + id + '/' + filename, 'r')
line = f.readline() # read 1st line
crc = line.rsplit(' ',1)
crc = crc[1].replace('\n', '')
if crc=='YES':
  line = f.readline() # read 2nd line
  mytemp = line.rsplit('t=',1)
else:
  mytemp = 9
f.close()
 
return int(mytemp[1])


  except:
return 

Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread gjr80
Herein lies the problem of augmenting a loop packet or archive record when it 
is done 'on the cheap'. Each packet or record has a field, usUnits, that 
indicates the unit system used in the packet/record; in simple terms it tells 
us whether the temperature fields are F or C. The unit system used in a 
packet/record can vary for a number of reasons. The safe way to add obs to a 
packet/record is to check the usUnits field of the packet/record you are 
augmenting and make sure the obs you are adding to the packet/record is in the 
correct units. The cheap way to add an obs is to blindly add a field to the 
packet/record. This will work fine if the packet/record unit system happens to 
use the same units as the data you are adding. If this is not the case you tend 
to get nonsense data somewhere along the line as the data you added will be 
assumed to be in one particular unit when it is in fact in another unit and 
when a conversion occurs (and chances are a unit conversion will occur 
somewhere) it will be wrong.

In this case your service is reading a temperature of 52.1 (I assume F) from a 
text file and adding it to the archive record. The fousb driver emits a metric 
packet, so the temperatures therein are in C, and extraTemp1 is added as 52.1 
and since it was added to a metric record it is now considered to be in C. 
Later, when the record is converted (in service StdConvert) to the unit system 
used by the database, in your case this is US customary which uses F for 
temperature, 52.1 is 'converted' to F. This results in extraTemp1 becoming 
125.8F (52.1C converted to F). Now the StdCalibrate service comes along and 
applies any calibrations, in this case extraTemp1 is reduced by 20%, so 
extraTemp1 becomes 100.6. Now the QC limits are applied by service StdQC, and 
this is where you get the message about extraTemp1 breaking its limit.

So how to fix, the elegant way is to recode pond.py to take note of the units 
of the record being augmented, converting the text file value accordingly then 
adding it to the record. The other approach is to either modify the code that 
writes the text file to write a value in C or modify pond.py to convert the 
text file temperature to C before adding it to the record. The first approach 
will be able to handle future changes (to code or hardware) but requires some 
python skills and weeWX knowledge. The latter approach is simpler and may not 
work in the future (perhaps changes to the weeWX code or you get a new station) 
but only requires some basic python knowledge and no understanding of weeWX.

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


Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread Jens-Jørgen Kjærgaard
/var/tmp/pond.txt is a simple txt file with 52.1 - nothing else. I tried
the change in pond.py from read() to readline (). Will come back with
result.
Omitting my limits of 30,80 gives 38.4 in the output - corresponding to 100
F. So where the 52.1 goes or comes from, I don't know.

Jens-Jørgen Kjærgaard
www.jensjk.dk

On Sun, 6 May 2018, 13:29 Andrew Milner, 
wrote:

> you could also try and change the read() in pond.py to readline() - would
> really like to know what is actually in the file / the format of the file
> that you are reading though!!
>
> in fact even the 52.1 is suspect - since 11.1 converts to 51.2 not 52.1!!
>
>
>
> On Sunday, 6 May 2018 13:34:06 UTC+3, Andrew Milner wrote:
>>
>> I'm pretty sure that is the reason, but not sure how to correct it!!
>>
>> the 52.1 is obviously a farenheit reading in the file - but what is
>> actually in /var/tmp/pond.txt??  Is there a newline or other data on the
>> end??
>>
>> I'm not too sure where the 100.624 is coming from at the moment
>>
>>
>>
>>
>>
>> On Sunday, 6 May 2018 13:01:31 UTC+3, Jens-Jørgen Kjærgaard wrote:
>>>
>>> I think some information may be in this from syslog:
>>>
>>> May  6 11:44:48 raspberrypi weewx[2073]: pond: found value of 52.1
>>> May  6 11:44:48 raspberrypi weewx[2073]: engine: 2018-05-06 11:44:48
>>> CEST (1525599888) LOOP value 'extraTemp1' 100.624 outside limits (30.0,
>>> 80.0)
>>> May  6 11:45:48 raspberrypi weewx[2073]: pond: found value of 52.1
>>> May  6 11:45:48 raspberrypi weewx[2073]: engine: 2018-05-06 11:45:49
>>> CEST (1525599949) LOOP value 'extraTemp1' 100.624 outside limits (30.0,
>>> 80.0)
>>> May  6 11:46:49 raspberrypi weewx[2073]: pond: found value of 52.1
>>> May  6 11:46:49 raspberrypi weewx[2073]: engine: 2018-05-06 11:46:49
>>> CEST (152569) LOOP value 'extraTemp1' 100.624 outside limits (30.0,
>>> 80.0)
>>>
>>> The value of 52.1 Fahrenheit is probably the read value from the sensor,
>>> 11.1 centigrades, but neither is outside my limits of 30 and 80 (and my
>>> correction of * 0.8 not applied either). Some C/F confusion, but that does
>>> not seem to be the full explanation?
>>>
>>>
>>> Jens-Jørgen Kjærgaard
>>> Tuenvej 818
>>> 9870 Sindal
>>> +45 21204417
>>> www.jensjk.dk
>>>
>>> 2018-05-06 11:51 GMT+02:00 Andrew Milner :
>>>
 Gary - I'm lost now.  Was my change not correct?? - or do you also have
 to add the field into the rec as well as the loop

 Jens - what do you see in LOOP and REC data if you run weewx directly
 from command line, rather than as a daemon?




 On Sunday, 6 May 2018 12:08:48 UTC+3, Jens-Jørgen Kjærgaard wrote:
>
> Did that - ufortunately, my lake temperature (extraTemp1) now shows up
> as N/A ?
>
> Jens-Jørgen Kjærgaard
> Tuenvej 818
> 
> 9870 Sindal
> 
> +45 21204417
> www.jensjk.dk
>
> 2018-05-06 9:29 GMT+02:00 Andrew Milner :
>
>> In pond.py
>>
>> change
>> self.bind(weewx.NEW_ARCHIVE_RECORD, self.read_file)
>> to
>> self.bind(weewx.NEW_LOOP_PACKET, self.read_file)
>>
>> and
>>
>> event.record['extraTemp1'] = float(value)
>> to
>> event.packet['extraTemp1'] = float(value)
>>
>> which will insert the pond temp into every loop packet and thence to
>> the record when generated
>>
>>
>>
>>
>>
>> On Sunday, 6 May 2018 10:19:17 UTC+3, Jens-Jørgen Kjærgaard wrote:
>>>
>>> These hasn't been modified by me, though:
>>>
>>> Jens-Jørgen Kjærgaard
>>> Tuenvej 818
>>> 
>>> 9870 Sindal
>>> 
>>> +45 21204417
>>> www.jensjk.dk
>>>
>>> 2018-05-06 8:50 GMT+02:00 Andrew Milner :
>>>
 yes I did indeed!! sorry - user/pond.py we need to see



 On Sunday, 6 May 2018 09:48:57 UTC+3, gjr80 wrote:
>
> I think you mean user/pond.py, PondService should be a class in
> user/pond.py.
>
> Gary
>
 --
 You received this message because you are subscribed to a topic in
 the Google Groups "weewx-user" group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/weewx-user/YVAkCwsY2S0/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to
 weewx-user+...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> --
>> You received this message because you are subscribed to a topic in
>> the Google Groups "weewx-user" group.
>> To unsubscribe from this topic, visit
>> 

Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread Andrew Milner
you could also try and change the read() in pond.py to readline() - would 
really like to know what is actually in the file / the format of the file 
that you are reading though!!

in fact even the 52.1 is suspect - since 11.1 converts to 51.2 not 52.1!!



On Sunday, 6 May 2018 13:34:06 UTC+3, Andrew Milner wrote:
>
> I'm pretty sure that is the reason, but not sure how to correct it!!
>
> the 52.1 is obviously a farenheit reading in the file - but what is 
> actually in /var/tmp/pond.txt??  Is there a newline or other data on the 
> end??
>
> I'm not too sure where the 100.624 is coming from at the moment
>
>
>
>   
>
> On Sunday, 6 May 2018 13:01:31 UTC+3, Jens-Jørgen Kjærgaard wrote:
>>
>> I think some information may be in this from syslog:
>>
>> May  6 11:44:48 raspberrypi weewx[2073]: pond: found value of 52.1
>> May  6 11:44:48 raspberrypi weewx[2073]: engine: 2018-05-06 11:44:48 CEST 
>> (1525599888) LOOP value 'extraTemp1' 100.624 outside limits (30.0, 80.0)
>> May  6 11:45:48 raspberrypi weewx[2073]: pond: found value of 52.1
>> May  6 11:45:48 raspberrypi weewx[2073]: engine: 2018-05-06 11:45:49 CEST 
>> (1525599949) LOOP value 'extraTemp1' 100.624 outside limits (30.0, 80.0)
>> May  6 11:46:49 raspberrypi weewx[2073]: pond: found value of 52.1
>> May  6 11:46:49 raspberrypi weewx[2073]: engine: 2018-05-06 11:46:49 CEST 
>> (152569) LOOP value 'extraTemp1' 100.624 outside limits (30.0, 80.0)
>>
>> The value of 52.1 Fahrenheit is probably the read value from the sensor, 
>> 11.1 centigrades, but neither is outside my limits of 30 and 80 (and my 
>> correction of * 0.8 not applied either). Some C/F confusion, but that does 
>> not seem to be the full explanation?
>>
>>
>> Jens-Jørgen Kjærgaard
>> Tuenvej 818
>> 9870 Sindal
>> +45 21204417
>> www.jensjk.dk
>>
>> 2018-05-06 11:51 GMT+02:00 Andrew Milner :
>>
>>> Gary - I'm lost now.  Was my change not correct?? - or do you also have 
>>> to add the field into the rec as well as the loop 
>>>
>>> Jens - what do you see in LOOP and REC data if you run weewx directly 
>>> from command line, rather than as a daemon?
>>>
>>>
>>>
>>>
>>> On Sunday, 6 May 2018 12:08:48 UTC+3, Jens-Jørgen Kjærgaard wrote:

 Did that - ufortunately, my lake temperature (extraTemp1) now shows up 
 as N/A ?

 Jens-Jørgen Kjærgaard
 Tuenvej 818 
 
 9870 Sindal 
 
 +45 21204417
 www.jensjk.dk

 2018-05-06 9:29 GMT+02:00 Andrew Milner :

> In pond.py
>
> change 
> self.bind(weewx.NEW_ARCHIVE_RECORD, self.read_file)
> to
> self.bind(weewx.NEW_LOOP_PACKET, self.read_file)
>
> and
>
> event.record['extraTemp1'] = float(value)
> to
> event.packet['extraTemp1'] = float(value)
>
> which will insert the pond temp into every loop packet and thence to 
> the record when generated
>
>
>
>
>
> On Sunday, 6 May 2018 10:19:17 UTC+3, Jens-Jørgen Kjærgaard wrote:
>>
>> These hasn't been modified by me, though:
>>
>> Jens-Jørgen Kjærgaard
>> Tuenvej 818 
>> 
>> 9870 Sindal 
>> 
>> +45 21204417
>> www.jensjk.dk
>>
>> 2018-05-06 8:50 GMT+02:00 Andrew Milner :
>>
>>> yes I did indeed!! sorry - user/pond.py we need to see
>>>
>>>
>>>
>>> On Sunday, 6 May 2018 09:48:57 UTC+3, gjr80 wrote:

 I think you mean user/pond.py, PondService should be a class in 
 user/pond.py.

 Gary

>>> -- 
>>> You received this message because you are subscribed to a topic in 
>>> the Google Groups "weewx-user" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/weewx-user/YVAkCwsY2S0/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to 
>>> weewx-user+...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> -- 
> You received this message because you are subscribed to a topic in the 
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/weewx-user/YVAkCwsY2S0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> weewx-user+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

 -- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "weewx-user" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/weewx-user/YVAkCwsY2S0/unsubscribe.
>>> To unsubscribe from this 

Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread Andrew Milner
you could also try and change the read() in pond.py to readline() - would 
really like to know what is actually in the file / the format of the file 
that you are reading though!!

On Sunday, 6 May 2018 13:34:06 UTC+3, Andrew Milner wrote:
>
> I'm pretty sure that is the reason, but not sure how to correct it!!
>
> the 52.1 is obviously a farenheit reading in the file - but what is 
> actually in /var/tmp/pond.txt??  Is there a newline or other data on the 
> end??
>
> I'm not too sure where the 100.624 is coming from at the moment
>
>
>
>   
>
> On Sunday, 6 May 2018 13:01:31 UTC+3, Jens-Jørgen Kjærgaard wrote:
>>
>> I think some information may be in this from syslog:
>>
>> May  6 11:44:48 raspberrypi weewx[2073]: pond: found value of 52.1
>> May  6 11:44:48 raspberrypi weewx[2073]: engine: 2018-05-06 11:44:48 CEST 
>> (1525599888) LOOP value 'extraTemp1' 100.624 outside limits (30.0, 80.0)
>> May  6 11:45:48 raspberrypi weewx[2073]: pond: found value of 52.1
>> May  6 11:45:48 raspberrypi weewx[2073]: engine: 2018-05-06 11:45:49 CEST 
>> (1525599949) LOOP value 'extraTemp1' 100.624 outside limits (30.0, 80.0)
>> May  6 11:46:49 raspberrypi weewx[2073]: pond: found value of 52.1
>> May  6 11:46:49 raspberrypi weewx[2073]: engine: 2018-05-06 11:46:49 CEST 
>> (152569) LOOP value 'extraTemp1' 100.624 outside limits (30.0, 80.0)
>>
>> The value of 52.1 Fahrenheit is probably the read value from the sensor, 
>> 11.1 centigrades, but neither is outside my limits of 30 and 80 (and my 
>> correction of * 0.8 not applied either). Some C/F confusion, but that does 
>> not seem to be the full explanation?
>>
>>
>> Jens-Jørgen Kjærgaard
>> Tuenvej 818
>> 9870 Sindal
>> +45 21204417
>> www.jensjk.dk
>>
>> 2018-05-06 11:51 GMT+02:00 Andrew Milner :
>>
>>> Gary - I'm lost now.  Was my change not correct?? - or do you also have 
>>> to add the field into the rec as well as the loop 
>>>
>>> Jens - what do you see in LOOP and REC data if you run weewx directly 
>>> from command line, rather than as a daemon?
>>>
>>>
>>>
>>>
>>> On Sunday, 6 May 2018 12:08:48 UTC+3, Jens-Jørgen Kjærgaard wrote:

 Did that - ufortunately, my lake temperature (extraTemp1) now shows up 
 as N/A ?

 Jens-Jørgen Kjærgaard
 Tuenvej 818 
 
 9870 Sindal 
 
 +45 21204417
 www.jensjk.dk

 2018-05-06 9:29 GMT+02:00 Andrew Milner :

> In pond.py
>
> change 
> self.bind(weewx.NEW_ARCHIVE_RECORD, self.read_file)
> to
> self.bind(weewx.NEW_LOOP_PACKET, self.read_file)
>
> and
>
> event.record['extraTemp1'] = float(value)
> to
> event.packet['extraTemp1'] = float(value)
>
> which will insert the pond temp into every loop packet and thence to 
> the record when generated
>
>
>
>
>
> On Sunday, 6 May 2018 10:19:17 UTC+3, Jens-Jørgen Kjærgaard wrote:
>>
>> These hasn't been modified by me, though:
>>
>> Jens-Jørgen Kjærgaard
>> Tuenvej 818 
>> 
>> 9870 Sindal 
>> 
>> +45 21204417
>> www.jensjk.dk
>>
>> 2018-05-06 8:50 GMT+02:00 Andrew Milner :
>>
>>> yes I did indeed!! sorry - user/pond.py we need to see
>>>
>>>
>>>
>>> On Sunday, 6 May 2018 09:48:57 UTC+3, gjr80 wrote:

 I think you mean user/pond.py, PondService should be a class in 
 user/pond.py.

 Gary

>>> -- 
>>> You received this message because you are subscribed to a topic in 
>>> the Google Groups "weewx-user" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/weewx-user/YVAkCwsY2S0/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to 
>>> weewx-user+...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> -- 
> You received this message because you are subscribed to a topic in the 
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/weewx-user/YVAkCwsY2S0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> weewx-user+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

 -- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "weewx-user" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/weewx-user/YVAkCwsY2S0/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> weewx-user+...@googlegroups.com.

Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread Andrew Milner
I'm pretty sure that is the reason, but not sure how to correct it!!

the 52.1 is obviously a farenheit reading in the file - but what is 
actually in /var/tmp/pond.txt??  Is there a newline or other data on the 
end??

I'm not too sure where the 100.624 is coming from at the moment



  

On Sunday, 6 May 2018 13:01:31 UTC+3, Jens-Jørgen Kjærgaard wrote:
>
> I think some information may be in this from syslog:
>
> May  6 11:44:48 raspberrypi weewx[2073]: pond: found value of 52.1
> May  6 11:44:48 raspberrypi weewx[2073]: engine: 2018-05-06 11:44:48 CEST 
> (1525599888) LOOP value 'extraTemp1' 100.624 outside limits (30.0, 80.0)
> May  6 11:45:48 raspberrypi weewx[2073]: pond: found value of 52.1
> May  6 11:45:48 raspberrypi weewx[2073]: engine: 2018-05-06 11:45:49 CEST 
> (1525599949) LOOP value 'extraTemp1' 100.624 outside limits (30.0, 80.0)
> May  6 11:46:49 raspberrypi weewx[2073]: pond: found value of 52.1
> May  6 11:46:49 raspberrypi weewx[2073]: engine: 2018-05-06 11:46:49 CEST 
> (152569) LOOP value 'extraTemp1' 100.624 outside limits (30.0, 80.0)
>
> The value of 52.1 Fahrenheit is probably the read value from the sensor, 
> 11.1 centigrades, but neither is outside my limits of 30 and 80 (and my 
> correction of * 0.8 not applied either). Some C/F confusion, but that does 
> not seem to be the full explanation?
>
>
> Jens-Jørgen Kjærgaard
> Tuenvej 818
> 9870 Sindal
> +45 21204417
> www.jensjk.dk
>
> 2018-05-06 11:51 GMT+02:00 Andrew Milner  >:
>
>> Gary - I'm lost now.  Was my change not correct?? - or do you also have 
>> to add the field into the rec as well as the loop 
>>
>> Jens - what do you see in LOOP and REC data if you run weewx directly 
>> from command line, rather than as a daemon?
>>
>>
>>
>>
>> On Sunday, 6 May 2018 12:08:48 UTC+3, Jens-Jørgen Kjærgaard wrote:
>>>
>>> Did that - ufortunately, my lake temperature (extraTemp1) now shows up 
>>> as N/A ?
>>>
>>> Jens-Jørgen Kjærgaard
>>> Tuenvej 818 
>>> 
>>> 9870 Sindal 
>>> 
>>> +45 21204417
>>> www.jensjk.dk
>>>
>>> 2018-05-06 9:29 GMT+02:00 Andrew Milner :
>>>
 In pond.py

 change 
 self.bind(weewx.NEW_ARCHIVE_RECORD, self.read_file)
 to
 self.bind(weewx.NEW_LOOP_PACKET, self.read_file)

 and

 event.record['extraTemp1'] = float(value)
 to
 event.packet['extraTemp1'] = float(value)

 which will insert the pond temp into every loop packet and thence to 
 the record when generated





 On Sunday, 6 May 2018 10:19:17 UTC+3, Jens-Jørgen Kjærgaard wrote:
>
> These hasn't been modified by me, though:
>
> Jens-Jørgen Kjærgaard
> Tuenvej 818 
> 
> 9870 Sindal 
> 
> +45 21204417
> www.jensjk.dk
>
> 2018-05-06 8:50 GMT+02:00 Andrew Milner :
>
>> yes I did indeed!! sorry - user/pond.py we need to see
>>
>>
>>
>> On Sunday, 6 May 2018 09:48:57 UTC+3, gjr80 wrote:
>>>
>>> I think you mean user/pond.py, PondService should be a class in 
>>> user/pond.py.
>>>
>>> Gary
>>>
>> -- 
>> You received this message because you are subscribed to a topic in 
>> the Google Groups "weewx-user" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/weewx-user/YVAkCwsY2S0/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> weewx-user+...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> -- 
 You received this message because you are subscribed to a topic in the 
 Google Groups "weewx-user" group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/weewx-user/YVAkCwsY2S0/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 weewx-user+...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "weewx-user" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/weewx-user/YVAkCwsY2S0/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> weewx-user+...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

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


Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread Jens-Jørgen Kjærgaard
I think some information may be in this from syslog:

May  6 11:44:48 raspberrypi weewx[2073]: pond: found value of 52.1
May  6 11:44:48 raspberrypi weewx[2073]: engine: 2018-05-06 11:44:48 CEST
(1525599888) LOOP value 'extraTemp1' 100.624 outside limits (30.0, 80.0)
May  6 11:45:48 raspberrypi weewx[2073]: pond: found value of 52.1
May  6 11:45:48 raspberrypi weewx[2073]: engine: 2018-05-06 11:45:49 CEST
(1525599949) LOOP value 'extraTemp1' 100.624 outside limits (30.0, 80.0)
May  6 11:46:49 raspberrypi weewx[2073]: pond: found value of 52.1
May  6 11:46:49 raspberrypi weewx[2073]: engine: 2018-05-06 11:46:49 CEST
(152569) LOOP value 'extraTemp1' 100.624 outside limits (30.0, 80.0)

The value of 52.1 Fahrenheit is probably the read value from the sensor,
11.1 centigrades, but neither is outside my limits of 30 and 80 (and my
correction of * 0.8 not applied either). Some C/F confusion, but that does
not seem to be the full explanation?


Jens-Jørgen Kjærgaard
Tuenvej 818
9870 Sindal
+45 21204417
www.jensjk.dk

2018-05-06 11:51 GMT+02:00 Andrew Milner :

> Gary - I'm lost now.  Was my change not correct?? - or do you also have to
> add the field into the rec as well as the loop
>
> Jens - what do you see in LOOP and REC data if you run weewx directly from
> command line, rather than as a daemon?
>
>
>
>
> On Sunday, 6 May 2018 12:08:48 UTC+3, Jens-Jørgen Kjærgaard wrote:
>>
>> Did that - ufortunately, my lake temperature (extraTemp1) now shows up as
>> N/A ?
>>
>> Jens-Jørgen Kjærgaard
>> Tuenvej 818
>> 
>> 9870 Sindal
>> 
>> +45 21204417
>> www.jensjk.dk
>>
>> 2018-05-06 9:29 GMT+02:00 Andrew Milner :
>>
>>> In pond.py
>>>
>>> change
>>> self.bind(weewx.NEW_ARCHIVE_RECORD, self.read_file)
>>> to
>>> self.bind(weewx.NEW_LOOP_PACKET, self.read_file)
>>>
>>> and
>>>
>>> event.record['extraTemp1'] = float(value)
>>> to
>>> event.packet['extraTemp1'] = float(value)
>>>
>>> which will insert the pond temp into every loop packet and thence to the
>>> record when generated
>>>
>>>
>>>
>>>
>>>
>>> On Sunday, 6 May 2018 10:19:17 UTC+3, Jens-Jørgen Kjærgaard wrote:

 These hasn't been modified by me, though:

 Jens-Jørgen Kjærgaard
 Tuenvej 818
 
 9870 Sindal
 
 +45 21204417
 www.jensjk.dk

 2018-05-06 8:50 GMT+02:00 Andrew Milner :

> yes I did indeed!! sorry - user/pond.py we need to see
>
>
>
> On Sunday, 6 May 2018 09:48:57 UTC+3, gjr80 wrote:
>>
>> I think you mean user/pond.py, PondService should be a class in
>> user/pond.py.
>>
>> Gary
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/to
> pic/weewx-user/YVAkCwsY2S0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> weewx-user+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

 --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "weewx-user" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>> pic/weewx-user/YVAkCwsY2S0/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> weewx-user+...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/weewx-user/YVAkCwsY2S0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread Andrew Milner
Gary - I'm lost now.  Was my change not correct?? - or do you also have to 
add the field into the rec as well as the loop 

Jens - what do you see in LOOP and REC data if you run weewx directly from 
command line, rather than as a daemon?




On Sunday, 6 May 2018 12:08:48 UTC+3, Jens-Jørgen Kjærgaard wrote:
>
> Did that - ufortunately, my lake temperature (extraTemp1) now shows up as 
> N/A ?
>
> Jens-Jørgen Kjærgaard
> Tuenvej 818
> 9870 Sindal
> +45 21204417
> www.jensjk.dk
>
> 2018-05-06 9:29 GMT+02:00 Andrew Milner  >:
>
>> In pond.py
>>
>> change 
>> self.bind(weewx.NEW_ARCHIVE_RECORD, self.read_file)
>> to
>> self.bind(weewx.NEW_LOOP_PACKET, self.read_file)
>>
>> and
>>
>> event.record['extraTemp1'] = float(value)
>> to
>> event.packet['extraTemp1'] = float(value)
>>
>> which will insert the pond temp into every loop packet and thence to the 
>> record when generated
>>
>>
>>
>>
>>
>> On Sunday, 6 May 2018 10:19:17 UTC+3, Jens-Jørgen Kjærgaard wrote:
>>>
>>> These hasn't been modified by me, though:
>>>
>>> Jens-Jørgen Kjærgaard
>>> Tuenvej 818 
>>> 
>>> 9870 Sindal 
>>> 
>>> +45 21204417
>>> www.jensjk.dk
>>>
>>> 2018-05-06 8:50 GMT+02:00 Andrew Milner :
>>>
 yes I did indeed!! sorry - user/pond.py we need to see



 On Sunday, 6 May 2018 09:48:57 UTC+3, gjr80 wrote:
>
> I think you mean user/pond.py, PondService should be a class in 
> user/pond.py.
>
> Gary
>
 -- 
 You received this message because you are subscribed to a topic in the 
 Google Groups "weewx-user" group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/weewx-user/YVAkCwsY2S0/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 weewx-user+...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "weewx-user" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/weewx-user/YVAkCwsY2S0/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> weewx-user+...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

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


Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread Jens-Jørgen Kjærgaard
Did that - ufortunately, my lake temperature (extraTemp1) now shows up as
N/A ?

Jens-Jørgen Kjærgaard
Tuenvej 818
9870 Sindal
+45 21204417
www.jensjk.dk

2018-05-06 9:29 GMT+02:00 Andrew Milner :

> In pond.py
>
> change
> self.bind(weewx.NEW_ARCHIVE_RECORD, self.read_file)
> to
> self.bind(weewx.NEW_LOOP_PACKET, self.read_file)
>
> and
>
> event.record['extraTemp1'] = float(value)
> to
> event.packet['extraTemp1'] = float(value)
>
> which will insert the pond temp into every loop packet and thence to the
> record when generated
>
>
>
>
>
> On Sunday, 6 May 2018 10:19:17 UTC+3, Jens-Jørgen Kjærgaard wrote:
>>
>> These hasn't been modified by me, though:
>>
>> Jens-Jørgen Kjærgaard
>> Tuenvej 818
>> 
>> 9870 Sindal
>> 
>> +45 21204417
>> www.jensjk.dk
>>
>> 2018-05-06 8:50 GMT+02:00 Andrew Milner :
>>
>>> yes I did indeed!! sorry - user/pond.py we need to see
>>>
>>>
>>>
>>> On Sunday, 6 May 2018 09:48:57 UTC+3, gjr80 wrote:

 I think you mean user/pond.py, PondService should be a class in
 user/pond.py.

 Gary

>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "weewx-user" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>> pic/weewx-user/YVAkCwsY2S0/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> weewx-user+...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/weewx-user/YVAkCwsY2S0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread Andrew Milner
In pond.py

change 
self.bind(weewx.NEW_ARCHIVE_RECORD, self.read_file)
to
self.bind(weewx.NEW_LOOP_PACKET, self.read_file)

and

event.record['extraTemp1'] = float(value)
to
event.packet['extraTemp1'] = float(value)

which will insert the pond temp into every loop packet and thence to the 
record when generated





On Sunday, 6 May 2018 10:19:17 UTC+3, Jens-Jørgen Kjærgaard wrote:
>
> These hasn't been modified by me, though:
>
> Jens-Jørgen Kjærgaard
> Tuenvej 818
> 9870 Sindal
> +45 21204417
> www.jensjk.dk
>
> 2018-05-06 8:50 GMT+02:00 Andrew Milner  >:
>
>> yes I did indeed!! sorry - user/pond.py we need to see
>>
>>
>>
>> On Sunday, 6 May 2018 09:48:57 UTC+3, gjr80 wrote:
>>>
>>> I think you mean user/pond.py, PondService should be a class in 
>>> user/pond.py.
>>>
>>> Gary
>>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "weewx-user" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/weewx-user/YVAkCwsY2S0/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> weewx-user+...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

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


Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread Jens-Jørgen Kjærgaard
These hasn't been modified by me, though:

Jens-Jørgen Kjærgaard
Tuenvej 818
9870 Sindal
+45 21204417
www.jensjk.dk

2018-05-06 8:50 GMT+02:00 Andrew Milner :

> yes I did indeed!! sorry - user/pond.py we need to see
>
>
>
> On Sunday, 6 May 2018 09:48:57 UTC+3, gjr80 wrote:
>>
>> I think you mean user/pond.py, PondService should be a class in
>> user/pond.py.
>>
>> Gary
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/weewx-user/YVAkCwsY2S0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.
import syslog
import weewx
from weewx.wxengine import StdService

class PondService(StdService):
def __init__(self, engine, config_dict):
super(PondService, self).__init__(engine, config_dict)  
d = config_dict.get('PondService', {})
self.filename = d.get('filename', '/var/tmp/pond.txt')
syslog.syslog(syslog.LOG_INFO, "pond: using %s" % self.filename)
self.bind(weewx.NEW_ARCHIVE_RECORD, self.read_file)

def read_file(self, event):
try:
with open(self.filename) as f:
value = f.read()
syslog.syslog(syslog.LOG_DEBUG, "pond: found value of %s" % value)
event.record['extraTemp1'] = float(value)
except Exception, e:
syslog.syslog(syslog.LOG_ERR, "pond: cannot read value: %s" % e)

pond.pyc
Description: application/python-bytecode


Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread Andrew Milner
yes I did indeed!! sorry - user/pond.py we need to see



On Sunday, 6 May 2018 09:48:57 UTC+3, gjr80 wrote:
>
> I think you mean user/pond.py, PondService should be a class in 
> user/pond.py.
>
> 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.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread gjr80
I think you mean user/pond.py, PondService should be a class in user/pond.py.

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


Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread Andrew Milner
gary - the .conf says software generation and I suspect the pondservice 
will be rec bound - hence the OP's problem.



On Sunday, 6 May 2018 09:46:34 UTC+3, Andrew Milner wrote:
>
> we need to see user/pond/pondservice.py also rather than soetemp.py
>
>
>
> On Sunday, 6 May 2018 09:40:32 UTC+3, Jens-Jørgen Kjærgaard wrote:
>>
>> Here they are:
>>
>> Jens-Jørgen Kjærgaard
>> Tuenvej 818
>> 9870 Sindal
>> +45 21204417
>> www.jensjk.dk
>>
>> 2018-05-06 8:31 GMT+02:00 gjr80 :
>>
>>> The correction is always applied to loop and only to archive when using 
>>> hardware record generation (otherwise you would correct twice). If the OP 
>>> is using hardware record generation and the pond service is loop based, 
>>> then yes that could cause the problem, but if that was the case I would not 
>>> expect to see any extraTemp1 data in the archive record.
>>>
>>> Jens-Jørgen. It might be worth posting your entire weewx.conf (with any 
>>> sensitive info such as passwords/user names removed). Also worth seeing the 
>>> file user/pond.py so we can see exactly what is being done by that service.
>>>
>>> Gary
>>>
>>> PS. There were some changes to the codebase not too long back to extract 
>>> whatever useful info could be extracted from the accumulators, that could 
>>> be doing something here, maybe not, would need to have a look at the code. 
>>> Tom would know off the top of his head I am sure.
>>>
>>>
>>> -- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "weewx-user" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/weewx-user/YVAkCwsY2S0/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> weewx-user+...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

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


Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread Andrew Milner
we need to see user/pond/pondservice.py also rather than soetemp.py



On Sunday, 6 May 2018 09:40:32 UTC+3, Jens-Jørgen Kjærgaard wrote:
>
> Here they are:
>
> Jens-Jørgen Kjærgaard
> Tuenvej 818
> 9870 Sindal
> +45 21204417
> www.jensjk.dk
>
> 2018-05-06 8:31 GMT+02:00 gjr80 :
>
>> The correction is always applied to loop and only to archive when using 
>> hardware record generation (otherwise you would correct twice). If the OP 
>> is using hardware record generation and the pond service is loop based, 
>> then yes that could cause the problem, but if that was the case I would not 
>> expect to see any extraTemp1 data in the archive record.
>>
>> Jens-Jørgen. It might be worth posting your entire weewx.conf (with any 
>> sensitive info such as passwords/user names removed). Also worth seeing the 
>> file user/pond.py so we can see exactly what is being done by that service.
>>
>> Gary
>>
>> PS. There were some changes to the codebase not too long back to extract 
>> whatever useful info could be extracted from the accumulators, that could 
>> be doing something here, maybe not, would need to have a look at the code. 
>> Tom would know off the top of his head I am sure.
>>
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "weewx-user" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/weewx-user/YVAkCwsY2S0/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> weewx-user+...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

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


Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread Jens-Jørgen Kjærgaard
Here they are:

Jens-Jørgen Kjærgaard
Tuenvej 818
9870 Sindal
+45 21204417
www.jensjk.dk

2018-05-06 8:31 GMT+02:00 gjr80 :

> The correction is always applied to loop and only to archive when using
> hardware record generation (otherwise you would correct twice). If the OP
> is using hardware record generation and the pond service is loop based,
> then yes that could cause the problem, but if that was the case I would not
> expect to see any extraTemp1 data in the archive record.
>
> Jens-Jørgen. It might be worth posting your entire weewx.conf (with any
> sensitive info such as passwords/user names removed). Also worth seeing the
> file user/pond.py so we can see exactly what is being done by that service.
>
> Gary
>
> PS. There were some changes to the codebase not too long back to extract
> whatever useful info could be extracted from the accumulators, that could
> be doing something here, maybe not, would need to have a look at the code.
> Tom would know off the top of his head I am sure.
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/weewx-user/YVAkCwsY2S0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.
#!/usr/bin/python
def gettemp(id):
  try:
mytemp = ''
filename = 'w1_slave'
f = open('/sys/bus/w1/devices/' + id + '/' + filename, 'r')
line = f.readline() # read 1st line
crc = line.rsplit(' ',1)
crc = crc[1].replace('\n', '')
if crc=='YES':
  line = f.readline() # read 2nd line
  mytemp = line.rsplit('t=',1)
else:
  mytemp = 9
f.close()
 
return int(mytemp[1])


  except:
return 9
 
if __name__ == '__main__':
 
  # Script has been called directly
  id = '28-031504aba7ff'
 # print '{:.3f}'.format(gettemp(id)/float(1000))
tpF = (((gettemp(id)) * 1.8) + 32000)
print '{:.1f}'.format(tpF/float(1000))


weewx.conf
Description: Binary data


Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread gjr80
The correction is always applied to loop and only to archive when using 
hardware record generation (otherwise you would correct twice). If the OP is 
using hardware record generation and the pond service is loop based, then yes 
that could cause the problem, but if that was the case I would not expect to 
see any extraTemp1 data in the archive record.

Jens-Jørgen. It might be worth posting your entire weewx.conf (with any 
sensitive info such as passwords/user names removed). Also worth seeing the 
file user/pond.py so we can see exactly what is being done by that service.

Gary

PS. There were some changes to the codebase not too long back to extract 
whatever useful info could be extracted from the accumulators, that could be 
doing something here, maybe not, would need to have a look at the code. Tom 
would know off the top of his head I am sure.


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


Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread Jens-Jørgen Kjærgaard
gjr80: yes, I have restarted several times.
Andrew: I don't know about loop or rec?

Jens-Jørgen Kjærgaard
Tuenvej 818
9870 Sindal
+45 21204417
www.jensjk.dk

2018-05-06 8:21 GMT+02:00 Andrew Milner :

> Just some thoughts
> a) Is pondtemp bound to loop or rec??
> b) Gary - is the correction applied to loop or rec packets? (It cannot be
> to both!!)  I suspect to loop, and I suspect pondtemp is bound to rec.
>
> just my suspicions ….
>
>
>
>
> On Sunday, 6 May 2018 08:52:34 UTC+3, gjr80 wrote:
>>
>> Yes that should cause a noticeable change. Just to check another obvious
>> one, you have restarted weeWX or done a config reload after making a change
>> to weewx.conf?
>>
>> Gary
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/weewx-user/YVAkCwsY2S0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-06 Thread Andrew Milner
Just some thoughts
a) Is pondtemp bound to loop or rec??
b) Gary - is the correction applied to loop or rec packets? (It cannot be 
to both!!)  I suspect to loop, and I suspect pondtemp is bound to rec.

just my suspicions ….




On Sunday, 6 May 2018 08:52:34 UTC+3, gjr80 wrote:
>
> Yes that should cause a noticeable change. Just to check another obvious 
> one, you have restarted weeWX or done a config reload after making a change 
> to weewx.conf?
>
> 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.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-05 Thread gjr80
Yes that should cause a noticeable change. Just to check another obvious one, 
you have restarted weeWX or done a config reload after making a change to 
weewx.conf?

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


[weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-05 Thread gjr80
I am guessing that user.pond.PondService is what is adding extraTemp1 to your 
data? If so there is no need to change anything, all would appear in the right 
order.

What diagnostics have you done to show it is not working, are you sure you are 
not looking at the already corrected value?

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


[weewx-user] Re: extraTemp1 doesn't allow Corrections?

2018-05-05 Thread Jens-Jørgen Kjærgaard
My [Engine] [[Services]]:

 prep_services = weewx.engine.StdTimeSynch
data_services = user.pond.PondService,
process_services = weewx.engine.StdConvert, 
weewx.engine.StdCalibrate, weewx.engine.StdQC, 
weewx.wxservices.StdWXCalculate
archive_services = weewx.engine.StdArchive
restful_services = weewx.restx.StdStationRegistry, 
weewx.restx.StdWunderground, weewx.restx.StdPWSweather, 
weewx.restx.StdCWOP, weewx.restx.StdWOW, weewx.restx.StdAWEKAS
report_services = weewx.engine.StdPrint, weewx.engine.StdReport

Should I change this?

søndag den 6. maj 2018 kl. 06.44.00 UTC+2 skrev gjr80:
>
> Hi,
>
> extraTemp1 should correct just like any other obs. One possible reason it 
> is not working is that service StdCalibrate runs before extraTemp1 is added 
> to your record/packets. How does weeWX receive extraTemp1, is it via a 
> driver, a service or some other means? Once we know that your [Engine] 
> [[Services]] stanza in weewx.conf will show us whether this is the problem. 
> You might want to post your [Engine] [[Services]] stanza.
>
> 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.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: extraTemp1 units wrong

2017-02-18 Thread Clay Jackson
Yeah, turns out the sensor is bad :-)  Called Acurite, I gave them the QC code 
and they said "We'll send you a new one"

Sent from my iPhone
Clay Jackson


> On Feb 18, 2017, at 7:35 AM, mwall  wrote:
> 
> 
> 
>> On Monday, February 13, 2017 at 7:14:55 PM UTC-5, Clay Jackson wrote:
>> Trying to use an Acurite Lightning Sensor in my greenhouse as extraTemp1. 
>> 
>>  
>> 
>> I changed all of .tmpl files from “Pond” to Grenhouse (did not change the 
>> var names) and the graph/texts are showing up fine; BUT., the units are 
>> wrong.  The sensor is reporting degrees F; but somewhere BEFORE it lands in 
>> the database (archive and extraTemp tables) the value (around 43 f) is 
>> getting converted as if it was centigrade (what’s stored in the database is 
>> around 109).
>> 
>>  
>> 
>> I looked in units.py and extraTemp1 is in the temperature group, which is 
>> set for degrees F.
>> 
>>  
>> 
>> Any suggestions on where to fix this?
>> 
> 
> clay,
> 
> did you figure this out?
> 
> you are probably inserting a value for temperature in F into a loop packet or 
> archive record whose unit system is METRIC or METRICWX
> 
> m 
> -- 
> 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.
> For more options, visit https://groups.google.com/d/optout.

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


[weewx-user] Re: extraTemp1 units wrong

2017-02-18 Thread mwall


On Monday, February 13, 2017 at 7:14:55 PM UTC-5, Clay Jackson wrote:
>
> Trying to use an Acurite Lightning Sensor in my greenhouse as extraTemp1.  
>
>  
>
> I changed all of .tmpl files from “Pond” to Grenhouse (did not change the 
> var names) and the graph/texts are showing up fine; BUT., the units are 
> wrong.  The sensor is reporting degrees F; but somewhere BEFORE it lands in 
> the database (archive and extraTemp tables) the value (around 43 f) is 
> getting converted as if it was centigrade (what’s stored in the database is 
> around 109).
>
>  
>
> I looked in units.py and extraTemp1 is in the temperature group, which is 
> set for degrees F.
>
>  
>
> Any suggestions on where to fix this?
>

clay,

did you figure this out?

you are probably inserting a value for temperature in F into a loop packet 
or archive record whose unit system is METRIC or METRICWX

m 

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