[weewx-user] Re: use Weewx on raspberry

2018-12-08 Thread Pat
I do not have this weather station so I have copied and pasted your python3 
file to a format that WeeWX should understand. There will be bugs since I 
have no way to test it :)

*I invite others* lurking here to review and update anything obvious as 
well - for sanity's sake. I've commented the code with some questions *which 
input from others here* could be valuable in finishing the driver. 

To install: 

   1. Copy the attached byows.py to your bin/user folder
   2. Copy the dependency files from your python folder to bin/user 
   otherwise the script won't start.
  1. Such as wind_direction_byo_5.py, and any bme280 files. 
   3. Copy this section to the bottom of weewx.conf. (there are no driver 
   options yet, that might come in future) - I named it BYOWS for "Bring Your 
   Own Weather Station"

[BYOWS]
# This section is for the Raspberry Pi Bring Your Own Weather Station 
driver.

# The driver to use
driver = user.byows

Restart weewx

Check syslog with sudo tail -f /var/log/syslog -n 100 and see what errors 
come up and paste them here. 



On Saturday, December 8, 2018 at 3:02:38 PM UTC-5, Patrick Tranchant wrote:
>
> Yes it is good
>
> On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>>
>> hello I am a newbie from France ( sorry for my english )
>>
>> I want to use weewx on a raspberry with a weather station built by myself 
>> (view on Magpi)
>> I don't see my station on your website to configure :
>>
>> Weather Station Hardware Comparison: I don't found my weather station.
>> Do you have a solution or how to configure Weewx
>>
>> thank you for your help
>>
>> Patrick
>>
>

-- 
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
# Copyright 2018 Pat O'Brien https://obrienlabs.net
#
# This driver takes the sensors used in the Raspberry Pi
# build your own weather station project and converts it
# into a format that can be used with weewx.
#
# The Raspberry Pi project can be found here:
# https://projects.raspberrypi.org/en/projects/build-your-own-weather-station
#

from gpiozero import Button
import time
import math
import bme280_sensor_2
import wind_direction_byo_5
import statistics
import ds18b20_therm
import datetime
import syslog

import weedb
import weewx.drivers
import weeutil.weeutil
import weewx.wxformulas

temp_probe = ds18b20_therm.DS18B20()

wind_speed_sensor = Button(5)
wind_speed_sensor.when_pressed = BYOWS.spin # is this a valid call for the below class function?

rain_sensor = Button(6)
rain_sensor.when_pressed = BYOWS.bucket_tipped # is this a valid call for the below class function?

def logmsg(dst, msg):
syslog.syslog(dst, 'BYOWS: %s' % msg)

def loginf(msg):
logmsg(syslog.LOG_INFO, msg)

def logerror(msg):
logmsg(syslog.LOG_ERROR, msg)

def logdebug(msg):
logmsg(syslog.LOG_DEBUG, msg)

def loader(config_dict, engine):
station = BYOWS(**config_dict['BYOWS'])
return station

class BYOWS(weewx.drivers.AbstractDevice):
""" Driver for the Raspberry Pi Bring Your Own Weather Station. """

def __init__(self, **stn_dict) :
""" Initialize object. """
self.station_hardware = stn_dict.get('hardware')
# TODO CONVERT TO WEEWX OPTIONS?
self.interval = 60 # Measurements recorded every 1 minute
self.wind_count = 0 # Counts how many half-rotations
self.radius_cm = 9.0 # Radius of your anemometer
self.wind_interval = 5 # How often (secs) to sample speed
self.wind_gust = 0
self.cm_in_a_km = 10.0
self.secs_in_an_hour = 3600
self.adjustment = 1.18
self.bucket_size = 0.2794 # mm
self.rain_count = 0
self.store_speeds = []
self.store_directions = []


def hardware_name(self):
return self.station_hardware

# Every half-rotations, add 1 to count
def spin(self):
self.wind_count = self.wind_count + 1
#print("spin" + str(self.wind_count))

def calculate_speed(self, time_sec):
circumference_cm = (2 * math.pi) * self.radius_cm
rotations = self.wind_count / 2.0

# Calculate distance travelled by a cup in km
dist_km = (circumference_cm * rotations) / self.cm_in_a_km

# Speed = distance / time
km_per_sec = dist_km / time_sec
km_per_hour = km_per_sec * self.secs_in_an_hour

# Calculate Speed
final_speed = km_per_hour * self.adjustment
   
return final_speed

def bucket_tipped(self):
self.rain_count = self.rain_count + 1
#print (self.rain_count * self.bucket_size)

def reset_rainfall(self):
self.rain_count = 0

def reset_wind(self):
global self.wind_count

[weewx-user] Re: Belchertown Skin 0.8.1 released

2018-12-08 Thread Pat
Glad to hear all the positive feedback! All your sites look great - but I 
could be biased :) 

On Saturday, December 8, 2018 at 4:58:00 PM UTC-5, Alan Bryant wrote:
>
> Pat,
>
> Just wanted to say thanks! I have mine up and running, minus the logo and 
> about page. https://weather.bryantgeeks.com/.
>
> Great skin and I am loving having such an easy and beautiful view of my 
> weather data.
>
> Alan Bryant
>
> On Friday, December 7, 2018 at 4:12:23 PM UTC-6, Pat wrote:
>>
>> The last thread was getting a bit long. So I've started a new one. 
>>
>> Belchertown Skin 0.8.1 has been released which fixes a couple of bugs. 
>> See the release notes, and install instructions here:
>>
>> https://github.com/poblabs/weewx-belchertown/releases
>>
>>
>>

-- 
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: weewx on Hyper-V

2018-12-08 Thread vince
On Saturday, December 8, 2018 at 2:21:07 PM UTC-8, Sebastian Zitzl wrote:
>
> I run weewx for almost two years now on a small embedded computer. At the 
> moment i'm thinking about if it is possible and recommended to run the 
> debian OS on a Hyper-V Host instead of the embedded pc. Does somebody has 
> any experience on running a virtualized weewx? A virtualized debian is not 
> the problem, but the USB connection which has to be passed through might 
> be. 
>
 
>

It's been done before with both Docker and VirtualBox.  Do a little 
searching of the group archives here.

As you mentioned, the issue is how to get the host USB to pass through the 
VM, which is not a weewx-specific question.  I'd suggest searching the 
Reddit groups and product forums for whatever virtualization or container 
software you want to use.  Those guys tend to do this stuff all the time in 
hooking up extra storage or devices to their VMs or containers.


-- 
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] weewx on Hyper-V

2018-12-08 Thread Sebastian Zitzl
Hello,

I run weewx for almost two years now on a small embedded computer. At the 
moment i'm thinking about if it is possible and recommended to run the debian 
OS on a Hyper-V Host instead of the embedded pc. Does somebody has any 
experience on running a virtualized weewx? A virtualized debian is not the 
problem, but the USB connection which has to be passed through might be.

Sebastian

-- 
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: Belchertown Skin 0.8.1 released

2018-12-08 Thread Alan Bryant
Pat,

Just wanted to say thanks! I have mine up and running, minus the logo and 
about page. https://weather.bryantgeeks.com/.

Great skin and I am loving having such an easy and beautiful view of my 
weather data.

Alan Bryant

On Friday, December 7, 2018 at 4:12:23 PM UTC-6, Pat wrote:
>
> The last thread was getting a bit long. So I've started a new one. 
>
> Belchertown Skin 0.8.1 has been released which fixes a couple of bugs. See 
> the release notes, and install instructions here:
>
> https://github.com/poblabs/weewx-belchertown/releases
>
>
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Pat
Can you explain the difference between Ground Temperature and Ambient 
Temperature with this station?


On Saturday, December 8, 2018 at 2:42:10 PM UTC-5, Patrick Tranchant wrote:
>
> thanks to you
> I can wait for you or someone other
>
> have a good evening
>
> Patrick
>
> On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>>
>> hello I am a newbie from France ( sorry for my english )
>>
>> I want to use weewx on a raspberry with a weather station built by myself 
>> (view on Magpi)
>> I don't see my station on your website to configure :
>>
>> Weather Station Hardware Comparison: I don't found my weather station.
>> Do you have a solution or how to configure Weewx
>>
>> thank you for your help
>>
>> Patrick
>>
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Patrick Tranchant
Yes it is good

On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>
> hello I am a newbie from France ( sorry for my english )
>
> I want to use weewx on a raspberry with a weather station built by myself 
> (view on Magpi)
> I don't see my station on your website to configure :
>
> Weather Station Hardware Comparison: I don't found my weather station.
> Do you have a solution or how to configure Weewx
>
> thank you for your help
>
> Patrick
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Pat
Ok, so Ambient Temperature would be the outTemp observation. 

Is your DS18b2 in the soil? 


On Saturday, December 8, 2018 at 2:58:29 PM UTC-5, Patrick Tranchant wrote:
>
>
>
> the ground temperature (in french temperature du sol)  is with a DS18b2 
> sensor and the Ambient teperature is with BME280 sensor ( in french 
> temperature de l'air)
>
> Patrick
>
> On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>>
>> hello I am a newbie from France ( sorry for my english )
>>
>> I want to use weewx on a raspberry with a weather station built by myself 
>> (view on Magpi)
>> I don't see my station on your website to configure :
>>
>> Weather Station Hardware Comparison: I don't found my weather station.
>> Do you have a solution or how to configure Weewx
>>
>> thank you for your help
>>
>> Patrick
>>
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Patrick Tranchant


the ground temperature (in french temperature du sol)  is with a DS18b2 
sensor and the Ambient teperature is with BME280 sensor ( in french 
temperature de l'air)

Patrick

On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>
> hello I am a newbie from France ( sorry for my english )
>
> I want to use weewx on a raspberry with a weather station built by myself 
> (view on Magpi)
> I don't see my station on your website to configure :
>
> Weather Station Hardware Comparison: I don't found my weather station.
> Do you have a solution or how to configure Weewx
>
> thank you for your help
>
> Patrick
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Patrick Tranchant
thanks to you
I can wait for you or someone other

have a good evening

Patrick

On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>
> hello I am a newbie from France ( sorry for my english )
>
> I want to use weewx on a raspberry with a weather station built by myself 
> (view on Magpi)
> I don't see my station on your website to configure :
>
> Weather Station Hardware Comparison: I don't found my weather station.
> Do you have a solution or how to configure Weewx
>
> thank you for your help
>
> Patrick
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Pat
Writing a driver isn't a fast process and takes a lot of testing. I don't 
have your weather station so it might take a while to get it accurate. 

I don't have a lot of time left for today and won't be available tomorrow, 
but I can try an initial attempt. Unless someone else reading this wants to 
try it out too :) 



On Saturday, December 8, 2018 at 2:31:51 PM UTC-5, Patrick Tranchant wrote:
>
> Yes 
> on the same raspberry
>
> Patrick
>
> On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>>
>> hello I am a newbie from France ( sorry for my english )
>>
>> I want to use weewx on a raspberry with a weather station built by myself 
>> (view on Magpi)
>> I don't see my station on your website to configure :
>>
>> Weather Station Hardware Comparison: I don't found my weather station.
>> Do you have a solution or how to configure Weewx
>>
>> thank you for your help
>>
>> Patrick
>>
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Patrick Tranchant
Yes 
on the same raspberry

Patrick

On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>
> hello I am a newbie from France ( sorry for my english )
>
> I want to use weewx on a raspberry with a weather station built by myself 
> (view on Magpi)
> I don't see my station on your website to configure :
>
> Weather Station Hardware Comparison: I don't found my weather station.
> Do you have a solution or how to configure Weewx
>
> thank you for your help
>
> Patrick
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Pat
If you want to use WeeWX, we will have to convert this python3 script into 
a weewx driver. 

Then you would let WeeWX handle everything and you would get updates on a 
website. 


On Saturday, December 8, 2018 at 2:26:59 PM UTC-5, Patrick Tranchant wrote:
>
> an other measure
>
> *Wind direction: 180.0 / Wind speed: 0.0 / Wind gust: 0.0 / Rainfall: 0.0 
> / Humidity: 48.59056071006303 / Pressure: 992.0321939541822 / Ambient 
> Temperature: 20.324745389912277 / Ground Temperature: 17.812;*
>
> On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>>
>> hello I am a newbie from France ( sorry for my english )
>>
>> I want to use weewx on a raspberry with a weather station built by myself 
>> (view on Magpi)
>> I don't see my station on your website to configure :
>>
>> Weather Station Hardware Comparison: I don't found my weather station.
>> Do you have a solution or how to configure Weewx
>>
>> thank you for your help
>>
>> Patrick
>>
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Patrick Tranchant
an other measure

*Wind direction: 180.0 / Wind speed: 0.0 / Wind gust: 0.0 / Rainfall: 0.0 / 
Humidity: 48.59056071006303 / Pressure: 992.0321939541822 / Ambient 
Temperature: 20.324745389912277 / Ground Temperature: 17.812;*

On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>
> hello I am a newbie from France ( sorry for my english )
>
> I want to use weewx on a raspberry with a weather station built by myself 
> (view on Magpi)
> I don't see my station on your website to configure :
>
> Weather Station Hardware Comparison: I don't found my weather station.
> Do you have a solution or how to configure Weewx
>
> thank you for your help
>
> Patrick
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Patrick Tranchant
watch the datas , displayed on my screen

*Wind direction: 0.0 / Wind speed: 2.882624887969079 / Wind gust: 
4.083718591289529 / Rainfall: 3.3528 / Humidity: 49.045477937775004 / 
Pressure: 992.038277081991 / Ambient Temperature: 20.20529098296538 / 
Ground Temperature: 17.687;*

Patrick

On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>
> hello I am a newbie from France ( sorry for my english )
>
> I want to use weewx on a raspberry with a weather station built by myself 
> (view on Magpi)
> I don't see my station on your website to configure :
>
> Weather Station Hardware Comparison: I don't found my weather station.
> Do you have a solution or how to configure Weewx
>
> thank you for your help
>
> Patrick
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Patrick Tranchant
yes on the same PI

On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>
> hello I am a newbie from France ( sorry for my english )
>
> I want to use weewx on a raspberry with a weather station built by myself 
> (view on Magpi)
> I don't see my station on your website to configure :
>
> Weather Station Hardware Comparison: I don't found my weather station.
> Do you have a solution or how to configure Weewx
>
> thank you for your help
>
> Patrick
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Pat
Thanks. 

Where do you plan to run WeeWX? 

on the same Raspberry Pi?


On Saturday, December 8, 2018 at 2:14:01 PM UTC-5, Patrick Tranchant wrote:
>
> ok I give you the scripts
> in attach file
> The main script is weather_station_BYO_10.py
> thank you 
>
> patrick
>
> On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>>
>> hello I am a newbie from France ( sorry for my english )
>>
>> I want to use weewx on a raspberry with a weather station built by myself 
>> (view on Magpi)
>> I don't see my station on your website to configure :
>>
>> Weather Station Hardware Comparison: I don't found my weather station.
>> Do you have a solution or how to configure Weewx
>>
>> thank you for your help
>>
>> Patrick
>>
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Patrick Tranchant
ok I give you the scripts
in attach file
The main script is weather_station_BYO_10.py
thank you 

patrick

On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>
> hello I am a newbie from France ( sorry for my english )
>
> I want to use weewx on a raspberry with a weather station built by myself 
> (view on Magpi)
> I don't see my station on your website to configure :
>
> Weather Station Hardware Comparison: I don't found my weather station.
> Do you have a solution or how to configure Weewx
>
> thank you for your help
>
> Patrick
>

-- 
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 math
from gpiozero import MCP3008
import time
adc = MCP3008(channel=0)
count = 0
values = []
volts = {0.4: 0.0,
 1.4: 22.5,
 1.2: 45.0,
 2.8: 67.5,
 2.7: 90.0,
 2.9: 112.5,
 2.2: 135.0,
 2.5: 157.5,
 1.8: 180.0,
 2.0: 202.5,
 0.7: 225.0,
 0.8: 247.5,
 0.1: 270.0,
 0.3: 292.5,
 0.2: 315.0,
 0.6: 337.5}


def get_average(angles):
sin_sum = 0.0
cos_sum = 0.0

for angle in angles:
r = math.radians(angle)
sin_sum += math.sin(r)
cos_sum += math.cos(r)

flen = float(len(angles))
s = sin_sum / flen
c = cos_sum / flen
arc = math.degrees(math.atan(s / c))
average = 0.0

if s > 0 and c > 0:
average = arc
elif c < 0:
average = arc + 180
elif s < 0 and c > 0:
average = arc + 360

return 0.0 if average == 360 else average

def get_value(length=5):
data = []
print("Measuring wind direction for %d seconds..." % length)
start_time = time.time()
while time.time() - start_time <= length:
wind =round(adc.value*3.3,1)
if not wind in volts: # keep only good measurements
print('unknown value ' + str(wind))
else:
data.append(volts[wind])

return get_average(data)



#while True:
#wind =round(adc.value*3.3,1)
#if not wind in volts:
#print('unknown value' + str(wind) + ' ' + str(volts[wind]))
#else:
#print('found ' + str(wind) + ' ' + str(volts[wind]))



import bme280
import smbus2
from time import sleep

port = 1
address = 0x76 
bus = smbus2.SMBus(port)

bme280.load_calibration_params(bus,address)

def read_all():
bme280_data = bme280.sample(bus,address)
return bme280_data.humidity, bme280_data.pressure, bme280_data.temperature
from gpiozero import Button
import time
import math
import bme280_sensor_2
import wind_direction_byo_5
import statistics
import ds18b20_therm
import datetime
import database

wind_count = 0	  # Counts how many half-rotations
radius_cm = 9.0  # Radius of your anemometer
wind_interval = 5 # Hox often (secs) to sample speed
interval = 300 # measurements recorded every 5 minutes
CM_IN_A_KM = 10.0
SECS_IN_AN_HOUR = 3600
ADJUSTMENT = 1.18
BUCKET_SIZE = 0.2794
rain_count = 0
gust = 0
store_speeds = []
store_directions = []


# Every half-rotations, add 1 to count
def spin():
global wind_count
wind_count = wind_count + 1
#print("spin" + str(wind_count))


def calculate_speed(time_sec):
global wind_count
global gust
circumference_cm = (2 * math.pi) * radius_cm
rotations = wind_count / 2.0

# Calculate distance travelled by a cup in km
dist_km = (circumference_cm * rotations) / CM_IN_A_KM

# Speed = distance / time
km_per_sec = dist_km / time_sec
km_per_hour = km_per_sec * SECS_IN_AN_HOUR

# Calculate Speed
final_speed = km_per_hour * ADJUSTMENT
   
return final_speed

def bucket_tipped():
global rain_count
rain_count = rain_count + 1
#print (rain_count * BUCKET_SIZE)

def reset_rainfall():
global rain_count
rain_count = 0

def reset_wind():
global wind_count
wind_count = 0

def reset_gust():
global gust
gust = 0

wind_speed_sensor = Button(5)
wind_speed_sensor.when_pressed = spin
temp_probe = ds18b20_therm.DS18B20()

rain_sensor = Button(6)
rain_sensor.when_pressed = bucket_tipped

db = database.weather_database()

while True:
start_time = time.time()
while time.time() - start_time <= interval:
wind_start_time = time.time()
reset_wind()
while time.time() - wind_start_time <= wind_interval:
store_directions.append(wind_direction_byo_5.get_value())

final_speed = calculate_speed(wind_interval)# Add this speed to the list
store_speeds.append(final_speed)
wind_average = wind_direction_byo_5.get_average(store_directions)
wind_gust = max(store_speeds)
wind_speed = statistics.mean(store_speeds)
rainfall = rain_count * 

[weewx-user] Re: use Weewx on raspberry

2018-12-08 Thread Pat
I followed your link, which brought me to GitHub. There are a lot of 
scripts there. 

If you can share your python3 script that will help. 


On Saturday, December 8, 2018 at 2:00:39 PM UTC-5, Patrick Tranchant wrote:
>
> I use a script on python3
> I follow this link for the built of my weather Station
> I can give you the final script
>
> patrick
>
> On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>>
>> hello I am a newbie from France ( sorry for my english )
>>
>> I want to use weewx on a raspberry with a weather station built by myself 
>> (view on Magpi)
>> I don't see my station on your website to configure :
>>
>> Weather Station Hardware Comparison: I don't found my weather station.
>> Do you have a solution or how to configure Weewx
>>
>> thank you for your help
>>
>> Patrick
>>
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Patrick Tranchant
I use a script on python3
I follow this link for the built of my weather Station
I can give you the final script

patrick

On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>
> hello I am a newbie from France ( sorry for my english )
>
> I want to use weewx on a raspberry with a weather station built by myself 
> (view on Magpi)
> I don't see my station on your website to configure :
>
> Weather Station Hardware Comparison: I don't found my weather station.
> Do you have a solution or how to configure Weewx
>
> thank you for your help
>
> Patrick
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Pat
How do you run the weather station? What file do you run? 
log_all_sensors.py?

On Saturday, December 8, 2018 at 1:48:20 PM UTC-5, Patrick Tranchant wrote:
>
> hello Pat
>
> I have already my BYO weather station, it works good
> it displays the data from sensors , they are stocked in MariaDB
> the datas are display just in text mode.
>
> thanks
> Patrick
>
> On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>>
>> hello I am a newbie from France ( sorry for my english )
>>
>> I want to use weewx on a raspberry with a weather station built by myself 
>> (view on Magpi)
>> I don't see my station on your website to configure :
>>
>> Weather Station Hardware Comparison: I don't found my weather station.
>> Do you have a solution or how to configure Weewx
>>
>> thank you for your help
>>
>> Patrick
>>
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Patrick Tranchant
hello Pat

I have already my BYO weather station, it works good
it displays the data from sensors , they are stocked in MariaDB
the datas are display just in text mode.

thanks
Patrick

On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>
> hello I am a newbie from France ( sorry for my english )
>
> I want to use weewx on a raspberry with a weather station built by myself 
> (view on Magpi)
> I don't see my station on your website to configure :
>
> Weather Station Hardware Comparison: I don't found my weather station.
> Do you have a solution or how to configure Weewx
>
> thank you for your help
>
> Patrick
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Pat
Have you built the weather station yet? Is it giving you a reading of the 
sensors?

On Saturday, December 8, 2018 at 12:30:23 PM UTC-5, Patrick Tranchant wrote:
>
> thank you Rich
> I go to try to read your solution.
> thank
>
> patrick
>
> Le sam. 8 déc. 2018 à 18:26, rich T > a 
> écrit :
>
>> Patrick
>>
>> If you don't want to try to write a driver, another option might be:
>>
>> Weather Station > Node Red > MQTT > Weewx
>>
>> 1. Your weather station interfaces Node Red via the Raspberry GPIOs.
>> 2. Add the data to MQTT broker. (there is some programming that needs to 
>> done to get and add the data)
>> 3. Using the Weewx MQTT extension, subscribe to broker. (there is 
>> some configuring that needs to be done)
>>
>> Rich
>>
>> On Saturday, December 8, 2018 at 11:58:47 AM UTC-5, Patrick Tranchant 
>> wrote:
>>
>>>
>>>
>>> On Saturday, December 8, 2018 at 5:19:28 PM UTC+1, Patrick Tranchant 
>>> wrote:

 it's me again
 the communication between Weewx and my BYO weather station must be done 
 with the GPIO of Raspberry
 I think you know it.

 Patrick

 On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant 
 wrote:
>
> hello I am a newbie from France ( sorry for my english )
>
> I want to use weewx on a raspberry with a weather station built by 
> myself (view on Magpi)
> I don't see my station on your website to configure :
>
> Weather Station Hardware Comparison: I don't found my weather station.
> Do you have a solution or how to configure Weewx
>
> thank you for your help
>
> Patrick
>
 -- 
>> 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.


Re: [weewx-user] Re: use Weewx on raspberry

2018-12-08 Thread Patrick Tranchant
thank you Rich
I go to try to read your solution.
thank

patrick

Le sam. 8 déc. 2018 à 18:26, rich T  a écrit :

> Patrick
>
> If you don't want to try to write a driver, another option might be:
>
> Weather Station > Node Red > MQTT > Weewx
>
> 1. Your weather station interfaces Node Red via the Raspberry GPIOs.
> 2. Add the data to MQTT broker. (there is some programming that needs to
> done to get and add the data)
> 3. Using the Weewx MQTT extension, subscribe to broker. (there is
> some configuring that needs to be done)
>
> Rich
>
> On Saturday, December 8, 2018 at 11:58:47 AM UTC-5, Patrick Tranchant
> wrote:
>
>>
>>
>> On Saturday, December 8, 2018 at 5:19:28 PM UTC+1, Patrick Tranchant
>> wrote:
>>>
>>> it's me again
>>> the communication between Weewx and my BYO weather station must be done
>>> with the GPIO of Raspberry
>>> I think you know it.
>>>
>>> Patrick
>>>
>>> On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant
>>> wrote:

 hello I am a newbie from France ( sorry for my english )

 I want to use weewx on a raspberry with a weather station built by
 myself (view on Magpi)
 I don't see my station on your website to configure :

 Weather Station Hardware Comparison: I don't found my weather station.
 Do you have a solution or how to configure Weewx

 thank you for your help

 Patrick

>>> --
> 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: use Weewx on raspberry

2018-12-08 Thread rich T
Patrick

If you don't want to try to write a driver, another option might be:

Weather Station > Node Red > MQTT > Weewx

1. Your weather station interfaces Node Red via the Raspberry GPIOs.
2. Add the data to MQTT broker. (there is some programming that needs to 
done to get and add the data)
3. Using the Weewx MQTT extension, subscribe to broker. (there is 
some configuring that needs to be done)

Rich

On Saturday, December 8, 2018 at 11:58:47 AM UTC-5, Patrick Tranchant wrote:

>
>
> On Saturday, December 8, 2018 at 5:19:28 PM UTC+1, Patrick Tranchant wrote:
>>
>> it's me again
>> the communication between Weewx and my BYO weather station must be done 
>> with the GPIO of Raspberry
>> I think you know it.
>>
>> Patrick
>>
>> On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant 
>> wrote:
>>>
>>> hello I am a newbie from France ( sorry for my english )
>>>
>>> I want to use weewx on a raspberry with a weather station built by 
>>> myself (view on Magpi)
>>> I don't see my station on your website to configure :
>>>
>>> Weather Station Hardware Comparison: I don't found my weather station.
>>> Do you have a solution or how to configure Weewx
>>>
>>> thank you for your help
>>>
>>> Patrick
>>>
>>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Thomas Keffer
Sorry. There is no driver available.

-tk

On Sat, Dec 8, 2018 at 8:56 AM Patrick Tranchant  wrote:

> hello Thomas
> whaouh
> I'm not a developer, let alone a programmer
>
> It is going to be difficult for me
> thanks
>
> Patrick
>
> On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>>
>> hello I am a newbie from France ( sorry for my english )
>>
>> I want to use weewx on a raspberry with a weather station built by myself
>> (view on Magpi)
>> I don't see my station on your website to configure :
>>
>> Weather Station Hardware Comparison: I don't found my weather station.
>> Do you have a solution or how to configure Weewx
>>
>> thank you for your help
>>
>> Patrick
>>
> --
> 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: use Weewx on raspberry

2018-12-08 Thread Patrick Tranchant


On Saturday, December 8, 2018 at 5:19:28 PM UTC+1, Patrick Tranchant wrote:
>
> it's me again
> the communication between Weewx and my BYO weather station must be done 
> with the GPIO of Raspberry
> I think you know it.
>
> Patrick
>
> On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>>
>> hello I am a newbie from France ( sorry for my english )
>>
>> I want to use weewx on a raspberry with a weather station built by myself 
>> (view on Magpi)
>> I don't see my station on your website to configure :
>>
>> Weather Station Hardware Comparison: I don't found my weather station.
>> Do you have a solution or how to configure Weewx
>>
>> thank you for your help
>>
>> Patrick
>>
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Patrick Tranchant
hello Thomas
whaouh
I'm not a developer, let alone a programmer

It is going to be difficult for me
thanks

Patrick

On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>
> hello I am a newbie from France ( sorry for my english )
>
> I want to use weewx on a raspberry with a weather station built by myself 
> (view on Magpi)
> I don't see my station on your website to configure :
>
> Weather Station Hardware Comparison: I don't found my weather station.
> Do you have a solution or how to configure Weewx
>
> thank you for your help
>
> Patrick
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Patrick Tranchant
hello Thomas
General guidelines 
   
   - The driver should emit data as it receives it from the hardware (no 
   caching).
   - The driver should emit only data it receives from the hardware (no 
   "filling in the gaps").
   - The driver should not modify the data unless the modification is 
   directly related to the hardware (*e.g.*, decoding a hardware-specific 
   sensor value).
   - If the hardware flags "bad data", then the driver should emit a null 
   value for that datum (Python None). 
   - The driver should not calculate any derived variables (such as 
   dewpoint). The service StdWXService will do that. 
   - However, if the hardware emits a derived variable, then the driver 
   should emit it.


On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>
> hello I am a newbie from France ( sorry for my english )
>
> I want to use weewx on a raspberry with a weather station built by myself 
> (view on Magpi)
> I don't see my station on your website to configure :
>
> Weather Station Hardware Comparison: I don't found my weather station.
> Do you have a solution or how to configure Weewx
>
> thank you for your help
>
> Patrick
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Thomas Keffer
Hello, Patrick

Je ne suis au courant d'aucun pilote périphérique pour WeeWX qui
fonctionnerait avec la station météo "Build your own" Raspberry Pi que vous
avez liée. Je ne trouve pas non plus de référence dans l'archive weewx-user.

Donc, vous devrez écrire le pilote !

Les instructions figurent dans le Customizing Guide, dans la section *Porting
to new hardware *.

-tk

On Sat, Dec 8, 2018 at 8:19 AM Patrick Tranchant  wrote:

> it's me again
> the communication between Weewx and my BYP weather station must be done
> with the GPIO of Raspberry
> I think you know it.
>
> Patrick
>
> On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>>
>> hello I am a newbie from France ( sorry for my english )
>>
>> I want to use weewx on a raspberry with a weather station built by myself
>> (view on Magpi)
>> I don't see my station on your website to configure :
>>
>> Weather Station Hardware Comparison: I don't found my weather station.
>> Do you have a solution or how to configure Weewx
>>
>> thank you for your help
>>
>> Patrick
>>
> --
> 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: use Weewx on raspberry

2018-12-08 Thread Patrick Tranchant
it's me again
the communication between Weewx and my BYP weather station must be done 
with the GPIO of Raspberry
I think you know it.

Patrick

On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>
> hello I am a newbie from France ( sorry for my english )
>
> I want to use weewx on a raspberry with a weather station built by myself 
> (view on Magpi)
> I don't see my station on your website to configure :
>
> Weather Station Hardware Comparison: I don't found my weather station.
> Do you have a solution or how to configure Weewx
>
> thank you for your help
>
> Patrick
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread Patrick Tranchant
hi
thank you for your response

follow this link , this is my weather station : 
https://projects.raspberrypi.org/en/projects/build-your-own-weather-station

patrick

On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote:
>
> hello I am a newbie from France ( sorry for my english )
>
> I want to use weewx on a raspberry with a weather station built by myself 
> (view on Magpi)
> I don't see my station on your website to configure :
>
> Weather Station Hardware Comparison: I don't found my weather station.
> Do you have a solution or how to configure Weewx
>
> thank you for your help
>
> Patrick
>

-- 
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: use Weewx on raspberry

2018-12-08 Thread rich T
Patrick

We need additional information about the weather station you built.

Rich

On Saturday, December 8, 2018 at 9:40:43 AM UTC-5, Patrick Tranchant wrote:

> hello I am a newbie from France ( sorry for my english )
>
> I want to use weewx on a raspberry with a weather station built by myself 
> (view on Magpi)
> I don't see my station on your website to configure :
>
> Weather Station Hardware Comparison: I don't found my weather station.
> Do you have a solution or how to configure Weewx
>
> thank you for your help
>
> Patrick
>

-- 
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] use Weewx on raspberry

2018-12-08 Thread Patrick Tranchant
hello I am a newbie from France ( sorry for my english )

I want to use weewx on a raspberry with a weather station built by myself 
(view on Magpi)
I don't see my station on your website to configure :

Weather Station Hardware Comparison: I don't found my weather station.
Do you have a solution or how to configure Weewx

thank you for your help

Patrick

-- 
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: Local File report different to FTP'd report - slightly

2018-12-08 Thread Andrew Milner
if you specify the full url of the page it should force a reload from the 
website and bypass the cache - the same as doing ctrl reload versus just 
reload



On Saturday, 8 December 2018 13:21:42 UTC+2, Rob Field wrote:
>
> Or not.
> I had been googling how to get the browser to bypass its cache.
> Auto refresh works.. but it's no different to pressing the 'reload this 
> page'. 
> It still uses the cached data if the graphic file 'appears' identical. 
> There is clearly something else needed and there are various opinions as 
> to the best way to do this.
> I'm using the standard template right now - maybe some of the other 
> templates overcome this .. anyone?
>
> On Saturday, 8 December 2018 10:05:24 UTC, Andrew Milner wrote:
>>
>> 1. It's just you
>> 2. Google for auto refresh web page
>> 3. Add to template(s):
>>
>>
>> 
>>
>> This will refresh page every after 5 seconds.
>>
>>
>>
>>
>>
>>
>> On Saturday, 8 December 2018 11:24:17 UTC+2, Rob Field wrote:
>>>
>>>  Adding to this...
>>> If I view the page source and look at the section calling the images ( 
>>> SEE SECTION BELOW )
>>> Clicking on the image initially shows the cached image , doing a refresh 
>>> shows the updated 'unshown' image.
>>> So there needs to be a way to tell the browser to reload all the images 
>>> without the viewer having to type in anything special, or the image 
>>> generator itself is perhaps missing something to indicate to browsers that 
>>> it's been updated. 
>>> Any ideas or clues. Is this just me?
>>>
>>> 
>>> http://www.spider-e.com/rob2/daytempdew.png>" 
>>> alt="temperatures" />
>>> http://www.spider-e.com/rob2/daytempchill.png>" alt="heatchill" />
>>> http://www.spider-e.com/rob2/dayhumidity.png>" 
>>> alt="outside humidity" />
>>> http://www.spider-e.com/rob2/dayrain.png>" alt="
>>> rain" />
>>> http://www.spider-e.com/rob2/daywind.png>" alt="
>>> wind" />
>>> http://www.spider-e.com/rob2/daybarometer.png>" alt="barometer"/>
>>> http://www.spider-e.com/rob2/daywinddir.png>" 
>>> alt="Hi Wind" />
>>> http://www.spider-e.com/rob2/dayinside.png>" 
>>> alt="Inside" />
>>> http://www.spider-e.com/rob2/daywindvec.png>" 
>>> alt="Wind Vector" />
>>>  
>>>
>>>
>>>
>>> On Friday, 7 December 2018 21:07:41 UTC, Rob Field wrote:

 The answer appears to be the cache in chrome. Although the report time 
 was being updated correctly, the images were not. When viewing the ftp'd 
 data on a different computer that hadn't accessed the web page before, the 
 results were as expected. Having cleared the browsers cache, all reports 
 were then as expected.
 I don't know how the cache works but it seems that the changes made and 
 published in the report are not sufficient to get the browser to 
 completely 
 reload the published form.
 Check out the two page images attached, they have different heading 
 times, but the graphs are stamped with the same older time. ( the time 
 just 
 after the cache was cleared ).
 This would seem to be an inherent problem rather than caused by me 
 changing a text string. ( Perhaps ?) Although others must be getting 
 correct updates I presume, so perhaps something else is needed to force a 
 full browser reload  upon each refresh.




 On Thursday, 6 December 2018 23:30:26 UTC, gjr80 wrote:
>
> On thinking some more the situation you describe does not exactly fit 
> with the default weeWX image generation times but it may be part of the 
> issue. Do force regeneration of the image files as I suggested and then 
> have another look at things, at least that will take one variable out of 
> the equation. If there are still issues copies of what you see locally 
> and 
> remotely would help.
>
> Gary
>
> On Friday, 7 December 2018 09:23:52 UTC+10, gjr80 wrote:
>>
>> Hi,
>>
>> By default year images are only generated once per day, month every 
>> three hours, week every one hour and day every report cycle. After you 
>> make 
>> a config change try deleting all of the week, month and year images (or 
>> for 
>> that matter all the images) to force them all to be regenerated on the 
>> next 
>> report cycle.
>>
>> Gary
>>
>> On Friday, 7 December 2018 09:11:23 UTC+10, Rob Field wrote:
>>>
>>> I'm customising the report and database to include a different type 
>>> of measurement. In this instance it would be pH value.
>>> Since this is all new I'm making small changes and observing the 
>>> results , first plan to simply change the Wind Chill Graph to show 'pH'
>>> I've successfully? removed 'heat index' text and replaced it with 
>>> 'pH' in the database and also in the standard skin.conf.
>>> Running the simulator as a test works - I think I changed the 
>>> simulator to output 'pH' but there's an interesting difference between 
>>> what 
>>> I see when viewing 

[weewx-user] Re: Belchertown Skin 0.8.1 released

2018-12-08 Thread Chris Plant
Just upgraded to 0.8.1!  So easy, except having to put all my 
customizations back in since I didn't do that on the last upgrade!  I would 
definitely recommend putting the skin customizations in the weewx.conf 
file!  lol  KWIMOSIN10 Weather 

On Friday, December 7, 2018 at 4:12:23 PM UTC-6, Pat wrote:
>
> The last thread was getting a bit long. So I've started a new one. 
>
> Belchertown Skin 0.8.1 has been released which fixes a couple of bugs. See 
> the release notes, and install instructions here:
>
> https://github.com/poblabs/weewx-belchertown/releases
>
>
>

-- 
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: Belchertown Skin 0.8.1 released

2018-12-08 Thread Philip Kutzenco
Also upgraded and working great (wx.kutzenco.com).
phil

On Friday, December 7, 2018 at 9:46:05 PM UTC-5, Colin Larsen wrote:
>
> Upgraded 41south.net.nz 
> 
>  
> and working great. In my footer I've added the version and updated date 
> just for reference.
>
> Colin
>
> On Sat, 8 Dec 2018, 12:25 Hector Valenzuela   wrote:
>
>> I installed version 0.1.  I'll have to try another version
>>
>> El viernes, 7 de diciembre de 2018, 15:12:23 (UTC-7), Pat escribió:
>>>
>>> The last thread was getting a bit long. So I've started a new one. 
>>>
>>> Belchertown Skin 0.8.1 has been released which fixes a couple of bugs. 
>>> See the release notes, and install instructions here:
>>>
>>> https://github.com/poblabs/weewx-belchertown/releases
>>>
>>>
>>> -- 
>> 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.


[weewx-user] Re: Local File report different to FTP'd report - slightly

2018-12-08 Thread Rob Field
Or not.
I had been googling how to get the browser to bypass its cache.
Auto refresh works.. but it's no different to pressing the 'reload this 
page'. 
It still uses the cached data if the graphic file 'appears' identical. 
There is clearly something else needed and there are various opinions as to 
the best way to do this.
I'm using the standard template right now - maybe some of the other 
templates overcome this .. anyone?

On Saturday, 8 December 2018 10:05:24 UTC, Andrew Milner wrote:
>
> 1. It's just you
> 2. Google for auto refresh web page
> 3. Add to template(s):
>
>
> 
>
> This will refresh page every after 5 seconds.
>
>
>
>
>
>
> On Saturday, 8 December 2018 11:24:17 UTC+2, Rob Field wrote:
>>
>>  Adding to this...
>> If I view the page source and look at the section calling the images ( 
>> SEE SECTION BELOW )
>> Clicking on the image initially shows the cached image , doing a refresh 
>> shows the updated 'unshown' image.
>> So there needs to be a way to tell the browser to reload all the images 
>> without the viewer having to type in anything special, or the image 
>> generator itself is perhaps missing something to indicate to browsers that 
>> it's been updated. 
>> Any ideas or clues. Is this just me?
>>
>> 
>> http://www.spider-e.com/rob2/daytempdew.png>" 
>> alt="temperatures" />
>> http://www.spider-e.com/rob2/daytempchill.png>" alt="heatchill" />
>> http://www.spider-e.com/rob2/dayhumidity.png>" 
>> alt="outside humidity" />
>> http://www.spider-e.com/rob2/dayrain.png>" alt="
>> rain" />
>> http://www.spider-e.com/rob2/daywind.png>" alt="
>> wind" />
>> http://www.spider-e.com/rob2/daybarometer.png>" alt="barometer"/>
>> http://www.spider-e.com/rob2/daywinddir.png>" 
>> alt="Hi Wind" />
>> http://www.spider-e.com/rob2/dayinside.png>" alt
>> ="Inside" />
>> http://www.spider-e.com/rob2/daywindvec.png>" 
>> alt="Wind Vector" />
>>  
>>
>>
>>
>> On Friday, 7 December 2018 21:07:41 UTC, Rob Field wrote:
>>>
>>> The answer appears to be the cache in chrome. Although the report time 
>>> was being updated correctly, the images were not. When viewing the ftp'd 
>>> data on a different computer that hadn't accessed the web page before, the 
>>> results were as expected. Having cleared the browsers cache, all reports 
>>> were then as expected.
>>> I don't know how the cache works but it seems that the changes made and 
>>> published in the report are not sufficient to get the browser to completely 
>>> reload the published form.
>>> Check out the two page images attached, they have different heading 
>>> times, but the graphs are stamped with the same older time. ( the time just 
>>> after the cache was cleared ).
>>> This would seem to be an inherent problem rather than caused by me 
>>> changing a text string. ( Perhaps ?) Although others must be getting 
>>> correct updates I presume, so perhaps something else is needed to force a 
>>> full browser reload  upon each refresh.
>>>
>>>
>>>
>>>
>>> On Thursday, 6 December 2018 23:30:26 UTC, gjr80 wrote:

 On thinking some more the situation you describe does not exactly fit 
 with the default weeWX image generation times but it may be part of the 
 issue. Do force regeneration of the image files as I suggested and then 
 have another look at things, at least that will take one variable out of 
 the equation. If there are still issues copies of what you see locally and 
 remotely would help.

 Gary

 On Friday, 7 December 2018 09:23:52 UTC+10, gjr80 wrote:
>
> Hi,
>
> By default year images are only generated once per day, month every 
> three hours, week every one hour and day every report cycle. After you 
> make 
> a config change try deleting all of the week, month and year images (or 
> for 
> that matter all the images) to force them all to be regenerated on the 
> next 
> report cycle.
>
> Gary
>
> On Friday, 7 December 2018 09:11:23 UTC+10, Rob Field wrote:
>>
>> I'm customising the report and database to include a different type 
>> of measurement. In this instance it would be pH value.
>> Since this is all new I'm making small changes and observing the 
>> results , first plan to simply change the Wind Chill Graph to show 'pH'
>> I've successfully? removed 'heat index' text and replaced it with 
>> 'pH' in the database and also in the standard skin.conf.
>> Running the simulator as a test works - I think I changed the 
>> simulator to output 'pH' but there's an interesting difference between 
>> what 
>> I see when viewing the output using file:///var/www/html/weewx/ and when 
>> I 
>> view the report on a cloud web page that it gets sent to.
>> On the 'file' view I still see the text 'Heat Image' after the 'Wind 
>> Chill' graph on the yearly plot but on all others I see  'pH' as 
>> anticipated.
>> From the Web view, I still see 'Heat Index' after 'Wind Chill' 

[weewx-user] Re: Local File report different to FTP'd report - slightly

2018-12-08 Thread Rob Field
 I knew it was just me ..  :)


On Saturday, 8 December 2018 10:05:24 UTC, Andrew Milner wrote:
>
> 1. It's just you
> 2. Google for auto refresh web page
> 3. Add to template(s):
>
>
> 
>
> This will refresh page every after 5 seconds.
>
>
>
>
>
>
> On Saturday, 8 December 2018 11:24:17 UTC+2, Rob Field wrote:
>>
>>  Adding to this...
>> If I view the page source and look at the section calling the images ( 
>> SEE SECTION BELOW )
>> Clicking on the image initially shows the cached image , doing a refresh 
>> shows the updated 'unshown' image.
>> So there needs to be a way to tell the browser to reload all the images 
>> without the viewer having to type in anything special, or the image 
>> generator itself is perhaps missing something to indicate to browsers that 
>> it's been updated. 
>> Any ideas or clues. Is this just me?
>>
>> 
>> http://www.spider-e.com/rob2/daytempdew.png>" 
>> alt="temperatures" />
>> http://www.spider-e.com/rob2/daytempchill.png>" alt="heatchill" />
>> http://www.spider-e.com/rob2/dayhumidity.png>" 
>> alt="outside humidity" />
>> http://www.spider-e.com/rob2/dayrain.png>" alt="
>> rain" />
>> http://www.spider-e.com/rob2/daywind.png>" alt="
>> wind" />
>> http://www.spider-e.com/rob2/daybarometer.png>" alt="barometer"/>
>> http://www.spider-e.com/rob2/daywinddir.png>" 
>> alt="Hi Wind" />
>> http://www.spider-e.com/rob2/dayinside.png>" alt
>> ="Inside" />
>> http://www.spider-e.com/rob2/daywindvec.png>" 
>> alt="Wind Vector" />
>>  
>>
>>
>>
>> On Friday, 7 December 2018 21:07:41 UTC, Rob Field wrote:
>>>
>>> The answer appears to be the cache in chrome. Although the report time 
>>> was being updated correctly, the images were not. When viewing the ftp'd 
>>> data on a different computer that hadn't accessed the web page before, the 
>>> results were as expected. Having cleared the browsers cache, all reports 
>>> were then as expected.
>>> I don't know how the cache works but it seems that the changes made and 
>>> published in the report are not sufficient to get the browser to completely 
>>> reload the published form.
>>> Check out the two page images attached, they have different heading 
>>> times, but the graphs are stamped with the same older time. ( the time just 
>>> after the cache was cleared ).
>>> This would seem to be an inherent problem rather than caused by me 
>>> changing a text string. ( Perhaps ?) Although others must be getting 
>>> correct updates I presume, so perhaps something else is needed to force a 
>>> full browser reload  upon each refresh.
>>>
>>>
>>>
>>>
>>> On Thursday, 6 December 2018 23:30:26 UTC, gjr80 wrote:

 On thinking some more the situation you describe does not exactly fit 
 with the default weeWX image generation times but it may be part of the 
 issue. Do force regeneration of the image files as I suggested and then 
 have another look at things, at least that will take one variable out of 
 the equation. If there are still issues copies of what you see locally and 
 remotely would help.

 Gary

 On Friday, 7 December 2018 09:23:52 UTC+10, gjr80 wrote:
>
> Hi,
>
> By default year images are only generated once per day, month every 
> three hours, week every one hour and day every report cycle. After you 
> make 
> a config change try deleting all of the week, month and year images (or 
> for 
> that matter all the images) to force them all to be regenerated on the 
> next 
> report cycle.
>
> Gary
>
> On Friday, 7 December 2018 09:11:23 UTC+10, Rob Field wrote:
>>
>> I'm customising the report and database to include a different type 
>> of measurement. In this instance it would be pH value.
>> Since this is all new I'm making small changes and observing the 
>> results , first plan to simply change the Wind Chill Graph to show 'pH'
>> I've successfully? removed 'heat index' text and replaced it with 
>> 'pH' in the database and also in the standard skin.conf.
>> Running the simulator as a test works - I think I changed the 
>> simulator to output 'pH' but there's an interesting difference between 
>> what 
>> I see when viewing the output using file:///var/www/html/weewx/ and when 
>> I 
>> view the report on a cloud web page that it gets sent to.
>> On the 'file' view I still see the text 'Heat Image' after the 'Wind 
>> Chill' graph on the yearly plot but on all others I see  'pH' as 
>> anticipated.
>> From the Web view, I still see 'Heat Index' after 'Wind Chill' on all 
>> reports EXCEPT the monthly one.
>> I've not changed anything in the Template - just the skin.conf. 
>> Regardless of me even doing it correctly I would have thought the local 
>> and 
>> web report should be the same.. everything else matches including the 
>> data 
>> time stamp so I know that both are being regenerated - just they don't 
>> match.

[weewx-user] Re: Local File report different to FTP'd report - slightly

2018-12-08 Thread Andrew Milner
1. It's just you
2. Google for auto refresh web page
3. Add to template(s):




This will refresh page every after 5 seconds.






On Saturday, 8 December 2018 11:24:17 UTC+2, Rob Field wrote:
>
>  Adding to this...
> If I view the page source and look at the section calling the images ( SEE 
> SECTION BELOW )
> Clicking on the image initially shows the cached image , doing a refresh 
> shows the updated 'unshown' image.
> So there needs to be a way to tell the browser to reload all the images 
> without the viewer having to type in anything special, or the image 
> generator itself is perhaps missing something to indicate to browsers that 
> it's been updated. 
> Any ideas or clues. Is this just me?
>
> 
> http://www.spider-e.com/rob2/daytempdew.png>" 
> alt="temperatures" />
> http://www.spider-e.com/rob2/daytempchill.png>" 
> alt="heatchill" />
> http://www.spider-e.com/rob2/dayhumidity.png>" 
> alt="outside humidity" />
> http://www.spider-e.com/rob2/dayrain.png>" alt="
> rain" />
> http://www.spider-e.com/rob2/daywind.png>" alt="
> wind" />
> http://www.spider-e.com/rob2/daybarometer.png>" 
> alt="barometer"/>
> http://www.spider-e.com/rob2/daywinddir.png>" 
> alt="Hi Wind" />
> http://www.spider-e.com/rob2/dayinside.png>" alt
> ="Inside" />
> http://www.spider-e.com/rob2/daywindvec.png>" 
> alt="Wind Vector" />
>  
>
>
>
> On Friday, 7 December 2018 21:07:41 UTC, Rob Field wrote:
>>
>> The answer appears to be the cache in chrome. Although the report time 
>> was being updated correctly, the images were not. When viewing the ftp'd 
>> data on a different computer that hadn't accessed the web page before, the 
>> results were as expected. Having cleared the browsers cache, all reports 
>> were then as expected.
>> I don't know how the cache works but it seems that the changes made and 
>> published in the report are not sufficient to get the browser to completely 
>> reload the published form.
>> Check out the two page images attached, they have different heading 
>> times, but the graphs are stamped with the same older time. ( the time just 
>> after the cache was cleared ).
>> This would seem to be an inherent problem rather than caused by me 
>> changing a text string. ( Perhaps ?) Although others must be getting 
>> correct updates I presume, so perhaps something else is needed to force a 
>> full browser reload  upon each refresh.
>>
>>
>>
>>
>> On Thursday, 6 December 2018 23:30:26 UTC, gjr80 wrote:
>>>
>>> On thinking some more the situation you describe does not exactly fit 
>>> with the default weeWX image generation times but it may be part of the 
>>> issue. Do force regeneration of the image files as I suggested and then 
>>> have another look at things, at least that will take one variable out of 
>>> the equation. If there are still issues copies of what you see locally and 
>>> remotely would help.
>>>
>>> Gary
>>>
>>> On Friday, 7 December 2018 09:23:52 UTC+10, gjr80 wrote:

 Hi,

 By default year images are only generated once per day, month every 
 three hours, week every one hour and day every report cycle. After you 
 make 
 a config change try deleting all of the week, month and year images (or 
 for 
 that matter all the images) to force them all to be regenerated on the 
 next 
 report cycle.

 Gary

 On Friday, 7 December 2018 09:11:23 UTC+10, Rob Field wrote:
>
> I'm customising the report and database to include a different type of 
> measurement. In this instance it would be pH value.
> Since this is all new I'm making small changes and observing the 
> results , first plan to simply change the Wind Chill Graph to show 'pH'
> I've successfully? removed 'heat index' text and replaced it with 'pH' 
> in the database and also in the standard skin.conf.
> Running the simulator as a test works - I think I changed the 
> simulator to output 'pH' but there's an interesting difference between 
> what 
> I see when viewing the output using file:///var/www/html/weewx/ and when 
> I 
> view the report on a cloud web page that it gets sent to.
> On the 'file' view I still see the text 'Heat Image' after the 'Wind 
> Chill' graph on the yearly plot but on all others I see  'pH' as 
> anticipated.
> From the Web view, I still see 'Heat Index' after 'Wind Chill' on all 
> reports EXCEPT the monthly one.
> I've not changed anything in the Template - just the skin.conf. 
> Regardless of me even doing it correctly I would have thought the local 
> and 
> web report should be the same.. everything else matches including the 
> data 
> time stamp so I know that both are being regenerated - just they don't 
> match.
>
> Attached image shows what I get ( want) , but not consistent, and 
> skin.con has no text 'Heat Index' in it at all. I could be from the 
> template,  but even so I haven't changed that at all.
> I've 

[weewx-user] Re: Local File report different to FTP'd report - slightly

2018-12-08 Thread Rob Field
 Adding to this...
If I view the page source and look at the section calling the images ( SEE 
SECTION BELOW )
Clicking on the image initially shows the cached image , doing a refresh 
shows the updated 'unshown' image.
So there needs to be a way to tell the browser to reload all the images 
without the viewer having to type in anything special, or the image 
generator itself is perhaps missing something to indicate to browsers that 
it's been updated. 
Any ideas or clues. Is this just me?


http://www.spider-e.com/rob2/daytempdew.png>" alt
="temperatures" />
http://www.spider-e.com/rob2/daytempchill.png>" 
alt="heatchill" />
http://www.spider-e.com/rob2/dayhumidity.png>" 
alt="outside humidity" />
http://www.spider-e.com/rob2/dayrain.png>" alt="rain" 
/>
http://www.spider-e.com/rob2/daywind.png>" alt="wind" 
/>
http://www.spider-e.com/rob2/daybarometer.png>" 
alt="barometer"/>
http://www.spider-e.com/rob2/daywinddir.png>" alt
="Hi Wind" />
http://www.spider-e.com/rob2/dayinside.png>" alt="
Inside" />
http://www.spider-e.com/rob2/daywindvec.png>" alt
="Wind Vector" />
 



On Friday, 7 December 2018 21:07:41 UTC, Rob Field wrote:
>
> The answer appears to be the cache in chrome. Although the report time was 
> being updated correctly, the images were not. When viewing the ftp'd data 
> on a different computer that hadn't accessed the web page before, the 
> results were as expected. Having cleared the browsers cache, all reports 
> were then as expected.
> I don't know how the cache works but it seems that the changes made and 
> published in the report are not sufficient to get the browser to completely 
> reload the published form.
> Check out the two page images attached, they have different heading times, 
> but the graphs are stamped with the same older time. ( the time just after 
> the cache was cleared ).
> This would seem to be an inherent problem rather than caused by me 
> changing a text string. ( Perhaps ?) Although others must be getting 
> correct updates I presume, so perhaps something else is needed to force a 
> full browser reload  upon each refresh.
>
>
>
>
> On Thursday, 6 December 2018 23:30:26 UTC, gjr80 wrote:
>>
>> On thinking some more the situation you describe does not exactly fit 
>> with the default weeWX image generation times but it may be part of the 
>> issue. Do force regeneration of the image files as I suggested and then 
>> have another look at things, at least that will take one variable out of 
>> the equation. If there are still issues copies of what you see locally and 
>> remotely would help.
>>
>> Gary
>>
>> On Friday, 7 December 2018 09:23:52 UTC+10, gjr80 wrote:
>>>
>>> Hi,
>>>
>>> By default year images are only generated once per day, month every 
>>> three hours, week every one hour and day every report cycle. After you make 
>>> a config change try deleting all of the week, month and year images (or for 
>>> that matter all the images) to force them all to be regenerated on the next 
>>> report cycle.
>>>
>>> Gary
>>>
>>> On Friday, 7 December 2018 09:11:23 UTC+10, Rob Field wrote:

 I'm customising the report and database to include a different type of 
 measurement. In this instance it would be pH value.
 Since this is all new I'm making small changes and observing the 
 results , first plan to simply change the Wind Chill Graph to show 'pH'
 I've successfully? removed 'heat index' text and replaced it with 'pH' 
 in the database and also in the standard skin.conf.
 Running the simulator as a test works - I think I changed the simulator 
 to output 'pH' but there's an interesting difference between what I see 
 when viewing the output using file:///var/www/html/weewx/ and when I view 
 the report on a cloud web page that it gets sent to.
 On the 'file' view I still see the text 'Heat Image' after the 'Wind 
 Chill' graph on the yearly plot but on all others I see  'pH' as 
 anticipated.
 From the Web view, I still see 'Heat Index' after 'Wind Chill' on all 
 reports EXCEPT the monthly one.
 I've not changed anything in the Template - just the skin.conf. 
 Regardless of me even doing it correctly I would have thought the local 
 and 
 web report should be the same.. everything else matches including the data 
 time stamp so I know that both are being regenerated - just they don't 
 match.

 Attached image shows what I get ( want) , but not consistent, and 
 skin.con has no text 'Heat Index' in it at all. I could be from the 
 template,  but even so I haven't changed that at all.
 I've read through much of the docs, but can't find anything that 
 explains all the skin.conf  [[  ]]   [[[   ]]] brackets clearly enough for 
 me to know what to do with out actually doing something and see.



-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving