[weewx-user] Re: weewx 3.8.0 on stretch not outputting pressure

2017-12-10 Thread Antony K.
...
.
...

Dec 10 12:16:30 ayresboys weewx[373]: engine: Finished loading service 
weewx.engine.StdReport
Dec 10 12:16:30 ayresboys weewx[373]: engine: Starting up weewx version 
3.7.1
Dec 10 12:16:30 ayresboys weewx[373]: engine: Station does not support 
reading the time
Dec 10 12:16:30 ayresboys weewx[373]: ws28xx: MainThread: Scanning 
historical records
Dec 10 12:16:30 ayresboys weewx[373]: manager: Daily summary version is 2.0
Dec 10 12:16:30 ayresboys weewx[373]: manager: Daily summary version is 2.0
Dec 10 12:16:30 ayresboys weewx[373]: manager: Daily summary version is 2.0
Dec 10 12:17:30 ayresboys weewx[373]: ws28xx: MainThread: Scanned 0 
records: current=None latest=None remaining=None

--
-

Is this WeeWX version 3.8.0 or 3.7.1?

-- 
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 3.8.0 on stretch not outputting pressure

2017-12-10 Thread Antony K.
...
.
...
Dec 10 12:16:30 ayresboys weewx[373]: engine: Finished loading service 
weewx.engine.StdReport
Dec 10 12:16:30 ayresboys weewx[373]: engine: Starting up weewx version 
3.7.1
Dec 10 12:16:30 ayresboys weewx[373]: engine: Station does not support 
reading the time
Dec 10 12:16:30 ayresboys weewx[373]: ws28xx: MainThread: Scanning 
historical records
Dec 10 12:16:30 ayresboys weewx[373]: manager: Daily summary version is 2.0
Dec 10 12:16:30 ayresboys weewx[373]: manager: Daily summary version is 2.0
Dec 10 12:16:30 ayresboys weewx[373]: manager: Daily summary version is 2.0
Dec 10 12:17:30 ayresboys weewx[373]: ws28xx: MainThread: Scanned 0 
records: current=None latest=None remaining=None

---

This is WeeWX version 3.8.0 or 3.7.1?

-- 
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: Last WMR-300 driver hangs my raspberry

2017-12-10 Thread mwall
On Saturday, December 9, 2017 at 11:23:35 AM UTC-5, Alberto Sánchez wrote:
>
> I had the same problem with the same consequences:
>
> engine: Shutting down StdReport thread
> Dec  8 02:15:55 raspberrypi weewx[830]: engine: Caught WeeWxIOError: 
> unknown packet type c0: c0 41 24 92 00 00 00 00 00 00 00 00 00 00 00 00 00 
> 00 00 00 c8 32 02 92 58 00 04 80 bc 5c 00 00 58 bb 86 80 00 00 00 00 00 02 
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> Dec  8 02:15:55 raspberrypi weewx[830]:   Waiting 60 seconds then 
> retrying... 
>

the driver is reporting an unhandled packet type of 'c0'. but this should 
not halt weewx.

do you get this while the station is starting up (i.e., when it is reading 
historical data)?  or does it happen after historical data have been read?

after that log message, does weewx continue, or does it shut down?

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.


[weewx-user] Re: weewx 3.8.0 on stretch not outputting pressure

2017-12-10 Thread mwall
On Sunday, December 10, 2017 at 4:16:23 PM UTC-5, Gene Matthews wrote:
>
> Everything is working properly except there is no pressure being reported
> by the software in uploads to PWS, APRS and FTP, nor in the generated html 
> files.
>

gene,

run weewx directly (not as a daemon) then post the LOOP and REC data

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.


[weewx-user] weewx 3.8.0 on stretch not outputting pressure

2017-12-10 Thread Gene Matthews
I have Weewx 3.8.0 running on a Pi with Raspbian Stretch

http://ayresboys.homeunix.net/weewx/ and 
http://ayresboys.homeunix.net/ss/

I hope I am just missing something and I am not wasting your time. Any help 
is appreciated and I hope I have included enough
info to help figure it out. Thanks.

Everything is working properly except there is no pressure being reported
by the software in uploads to PWS, APRS and FTP, nor in the generated html 
files.

The station is reporting the pressure as shown below.

gene@ayresboys:~ $ sudo /usr/bin/wee_device --current
Using configuration file /etc/weewx/weewx.conf
Using WS28xx driver version 0.35 (weewx.drivers.ws28xx)
Querying the station for current weather data...
dateTime: 2017-12-10 12:05:39 PST (1512936339)
inHumidity: 54
inTemp: 13.8
inTempBatteryStatus: 0
outHumidity: 88
outTemp: 4.1
outTempBatteryStatus: 0
pressure: 1028.1
rain: None
rainBatteryStatus: 0
rainRate: 0.0
rxCheckPercent: 100
usUnits: 16
windBatteryStatus: 0
windDir: 247
windGust: 2.16
windGustDir: 247
windSpeed: 1.8

I have changed the [[StdQC]] limits for pressure and the reported pressure 
is clearly
within these limits.

syslog after restart:
gene@ayresboys:~ $ sudo tail -50 /var/log/syslog |  grep weewx
Dec 10 12:16:29 ayresboys weewx[373]: engine: Loading service 
weewx.engine.StdConvert
Dec 10 12:16:29 ayresboys weewx[373]: engine: StdConvert target unit is 0x1
Dec 10 12:16:29 ayresboys weewx[373]: engine: Finished loading service 
weewx.engine.StdConvert
Dec 10 12:16:29 ayresboys weewx[373]: engine: Loading service 
weewx.engine.StdCalibrate
Dec 10 12:16:29 ayresboys weewx[373]: engine: Finished loading service 
weewx.engine.StdCalibrate
Dec 10 12:16:29 ayresboys weewx[373]: engine: Loading service 
weewx.engine.StdQC
Dec 10 12:16:29 ayresboys weewx[373]: engine: Finished loading service 
weewx.engine.StdQC
Dec 10 12:16:29 ayresboys weewx[373]: engine: Loading service 
weewx.wxservices.StdWXCalculate
Dec 10 12:16:29 ayresboys weewx[373]: wxcalculate: The following values 
will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, 
dewpoint=prefer_hardware, appTemp=prefer_hardware, 
rainRate=prefer_hardware, windrun=prefer_hardware, 
heatindex=prefer_hardware, maxSolarRad=prefer_hardware, 
humidex=prefer_hardware, pressure=software, inDewpoint=prefer_hardware, 
ET=prefer_hardware, altimeter=software, cloudbase=prefer_hardware
Dec 10 12:16:29 ayresboys weewx[373]: wxcalculate: The following algorithms 
will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
Dec 10 12:16:29 ayresboys weewx[373]: engine: Finished loading service 
weewx.wxservices.StdWXCalculate
Dec 10 12:16:29 ayresboys weewx[373]: engine: Loading service 
weewx.engine.StdArchive
Dec 10 12:16:29 ayresboys weewx[373]: engine: Archive will use data binding 
wx_binding
Dec 10 12:16:29 ayresboys weewx[373]: engine: Record generation will be 
attempted in 'hardware'
Dec 10 12:16:29 ayresboys weewx[373]: engine: Using archive interval of 900 
seconds (specified in weewx configuration)
Dec 10 12:16:29 ayresboys weewx[373]: engine: Use LOOP data in hi/low 
calculations: 1
Dec 10 12:16:29 ayresboys weewx[373]: manager: Daily summary version is 2.0
Dec 10 12:16:29 ayresboys weewx[373]: engine: Using binding 'wx_binding' to 
database 'weewx.sdb'
Dec 10 12:16:29 ayresboys weewx[373]: manager: Starting backfill of daily 
summaries
Dec 10 12:16:29 ayresboys weewx[373]: engine: Finished loading service 
weewx.engine.StdArchive
Dec 10 12:16:29 ayresboys weewx[373]: engine: Loading service 
weewx.restx.StdStationRegistry
Dec 10 12:16:30 ayresboys weewx[373]: restx: StationRegistry: Station will 
be registered.
Dec 10 12:16:30 ayresboys weewx[373]: engine: Finished loading service 
weewx.restx.StdStationRegistry
Dec 10 12:16:30 ayresboys weewx[373]: engine: Loading service 
weewx.restx.StdWunderground
Dec 10 12:16:30 ayresboys weewx[373]: restx: Wunderground-PWS: Data for 
station KWAENUMC25 will be posted
Dec 10 12:16:30 ayresboys weewx[373]: engine: Finished loading service 
weewx.restx.StdWunderground
Dec 10 12:16:30 ayresboys weewx[373]: engine: Loading service 
weewx.restx.StdPWSweather
Dec 10 12:16:30 ayresboys weewx[373]: restx: PWSWeather: Data for station 
KWAENUM25 will be posted
Dec 10 12:16:30 ayresboys weewx[373]: engine: Finished loading service 
weewx.restx.StdPWSweather
Dec 10 12:16:30 ayresboys weewx[373]: engine: Loading service 
weewx.restx.StdCWOP
Dec 10 12:16:30 ayresboys weewx[373]: restx: CWOP: Data for station EW9275 
will be posted
Dec 10 12:16:30 ayresboys weewx[373]: engine: Finished loading service 
weewx.restx.StdCWOP
Dec 10 12:16:30 ayresboys weewx[373]: engine: Loading service 
weewx.restx.StdWOW
Dec 10 12:16:30 ayresboys weewx[373]: restx: WOW: Posting not enabled.
Dec 10 12:16:30 ayresboys weewx[373]: engine: Finished loading service 
weewx.restx.StdWOW
Dec 10 12:16:30 ayresboys weewx[373]: engine: Loading service 
weewx.restx.StdAWEKAS
Dec 10 12:16:30 ayresboys weewx[373]: restx: AWEKAS

[weewx-user] Re: Using WeatherLink driver i have empty graphs.

2017-12-10 Thread mwall
ruben,

it looks like you are getting bad data from weatherlink.  you should 
inspect your weatherlink data to see if all of it is corrupt or if only 
some of it has problems.

it might be only the historical data that are bad, or only a portion of the 
historical data.

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.


[weewx-user] Re: weewx.com bad Station Registry database?

2017-12-10 Thread mwall
today i did another manual intervention on the station map database.  the 
index had become corrupted.  still not sure what the root cause is of the 
corruption.  the initial failures in august seem to have been caused by 
something godaddy did in their file system/server transition.  i suspect 
that the more recent failures were because i did not fully cleanse the 
database of the side effects of the august failures.

my original intent was to change to mysql so that any future file system 
disruption from godaddy would not affect us.

however, the database only has a few thousand records, so i would rather 
not switch over to mysql without knowing for certain the root cause.

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.


[weewx-user] Re: i'get a brocken picture

2017-12-10 Thread Andrew Milner
I would prefer to see what skin is actually being used before downloading 
and using another one.  It is much better to work out what is actually 
wrong rather than just go thrashing about editing and changing things with 
no foundation, thought or good reason!!

Slow and steady wins the day usually.




On Sunday, 10 December 2017 16:18:36 UTC+2, Antony K. wrote:

> Ι recommend to replace skin.conf with a new one but this is a risk.
>
> If Andrew agree with that, download the attachment file skin.conf
>
> Open the terminal and type:
>
> sudo /etc/init.d/weewx stop
>
> sudo cp -f /home/*username*/Downloads/skin.conf 
> /home/weewx/skins/Standard/skin.conf
>
> sudo /etc/init.d/weewx start
>
>
> *username*=your name in home directory.
>

-- 
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 is daylight? Issue 276 is materialized.

2017-12-10 Thread Antony K.
Thank you for the easiest way, I will try it!

-- 
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: i'get a brocken picture

2017-12-10 Thread Andrew Milner
Without seeing the skin.conf it is not possible to say if the 'fix' is to 
add the plot as suggested by Antony or change a plot name as you may 
actually have outHumidity in a plot but not under a plot called dayhumidity 
- which is the name the html file expects.

As Antony has pointed out the humidity plot for weekly, and ALL plots for 
monthly and yearly are also missing - and the cause will no doubt be the 
same for all - once it is identified!!



On Sunday, 10 December 2017 15:01:53 UTC+2, Antony K. wrote:

> In
>
> https://www.port-x.de/WetterData/month.html
>
> and
>
> https://www.port-x.de/WetterData/year.html
>
> there is a problem with all images.
>

-- 
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: i'get a brocken picture

2017-12-10 Thread Antony K.
In

https://www.port-x.de/WetterData/month.html

and

https://www.port-x.de/WetterData/year.html

there is a problem with all images.

-- 
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: i'get a brocken picture

2017-12-10 Thread Antony K.
In

https://www.port-x.de/WetterData/month.html

there is a problem with all images.

-- 
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: i'get a brocken picture

2017-12-10 Thread Antony K.
In terminal type this:

sudo nano /home/weewx/skins/Standard/skin.conf

Add between daytempchill and dayrain the dayhumidity parameter ( *bold *)

=

[[[daytempchill]]] 
 windchill 
 heatindex 

*[[[dayhumidity]]]* 
* outHumidity* 


[[[dayrain]]] 
 # Make sure the y-axis increment is at least 0.02 for the rain plot 
 yscale = None, None, 0.02 
 plot_type = bar 
 rain 
 aggregate_type = sum 
 aggregate_interval = 3600 
 label = Rain (hourly total)

=

Press Ctrl+O to save it.
Press Ctrl+X to exit.

In terminal now type
sudo /etc/init.d/weewx restart

Done!!!

-- 
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: i'get a brocken picture

2017-12-10 Thread Andrew Milner
If you attached .conf, the skin.conf and perhaps the log we may be able to 
pinpoint the problem.  

The chances are that you have called the plot something different in 
skin.conf and not dayhumidity which is the filename the html page is 
expecting.



On Sunday, 10 December 2017 14:23:27 UTC+2, The Bee Keeper wrote:

> Hello, 
>
> i'dont know ... I get always this result. https://www.port-x.de/WetterData
> there is a problem with *outHumidity *how I can fix this?
>
> my someone have the same Problem  
>
> thx for Help, 
> Mario
>

-- 
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: i'get a brocken picture

2017-12-10 Thread Antony K.
In terminal type this:

sudo nano /home/weewx/skins/Standard/index.html.tmpl

Add this between temperature and wind chill:




*   Outside Humidity   $current.outHumidity*

Press Ctrl+O to Save it
Press Ctrl+X to Exit from editor

In terminal
sudo /etc/init.d/weewx restart

Done!!!

-- 
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] i'get a brocken picture

2017-12-10 Thread The Bee Keeper
Hello, 

i'dont know ... I get always this result. https://www.port-x.de/WetterData
there is a problem with *outHumidity *how I can fix this?

my someone have the same Problem  

thx for Help, 
Mario

-- 
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] Weewx is daylight? Issue 276 is materialized.

2017-12-10 Thread Thomas Keffer
It occurs to me this can easily be done within the templates. For example,
near the top of index.html.tmpl, put (NOT TESTED):

#set isDaylight = lambda t: $almanac.sun.rise.raw < t < $almanac.sun.set.raw


Now you can say things like:


#if $isDaylight($current.dateTime.raw)

  It is daylight

#else

  Still dark

#end if


No search list extension necessary.


-tk

On Sun, Dec 10, 2017 at 5:21 AM, Antony K. 
wrote:

> This issue was raised because I ask in a post if Weewx can return true if
> it is day, or false if it is night. I was tempted by Mr. Tom Keffer to
> write a script named daylight.py because he told me this is done
> voluntarily and suggested I do it, so I did.
>
> The script ( attachment daylight.py ) is in 3 phases.
>
> 1) Parse sunrise and sunset time from Weewx and check if the content is a
> time format in this form,
> for example:
>
> 00:00
> 12:00am 12:00AM
> 12:00 am 12:00 AM
> 12:00pm 12:00PM
> 12:00 pm 12:00 PM
>
> If nothing applies from the above return N/A.
>
> 2) If the time is in 12hr mode convert it to 24hr.
>
> 3) Check if it is night or day using sunrise, sunset and current time.
>
> The problem is that I'm not familiar with weewx development, how will I
> incorporate and register this script to Weewx so by importing sunrise and
> sunset time and giving $current.isDaylight tag, return true or false.
>
> --
> 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] Weewx is daylight? Issue 276 is materialized.

2017-12-10 Thread Antony K.
This issue was raised because I ask in a post if Weewx can return true if 
it is day, or false if it is night. I was tempted by Mr. Tom Keffer to 
write a script named daylight.py because he told me this is done 
voluntarily and suggested I do it, so I did.

The script ( attachment daylight.py ) is in 3 phases.

1) Parse sunrise and sunset time from Weewx and check if the content is a 
time format in this form,
for example:

00:00
12:00am 12:00AM
12:00 am 12:00 AM
12:00pm 12:00PM
12:00 pm 12:00 PM

If nothing applies from the above return N/A.

2) If the time is in 12hr mode convert it to 24hr.

3) Check if it is night or day using sunrise, sunset and current time.

The problem is that I'm not familiar with weewx development, how will I 
incorporate and register this script to Weewx so by importing sunrise and 
sunset time and giving $current.isDaylight tag, return true or false.

-- 
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/env python
#
# This script was developed by Antonis Katsonis
#
"""Returns true if it is day, or false if it is night"""

import time
import re


sunriseTime = '--:--' # weewx sunrise
sunsetTime = '--:--' # weewx sunset


def convertTime(timeIn):
 if not timeIn.replace(':', '').isdigit():
 hour = timeIn.split(':')[0]
 minute = timeIn.split(':')[1].replace(' ', '').replace('AM', '').replace('PM', '')
 ampm = re.search('AM$|PM$', timeIn).group()

 if hour == 12 and ampm == 'AM':
 return '00:' + minute
 elif hour == 12 and ampm == 'PM':
   return '12:' + minute
 elif ampm == 'PM':
   return str(int(hour) + 12) + minute
 else:
 return timeIn
 else:
 return timeIn

def isDayTime(sunrise, sunset):
 sunrise = convertTime(sunrise.upper())
 sunset = convertTime(sunset.upper())
 currentTime = time.strftime("%H%M")
 sunrise = sunrise.replace(':', '')
 sunset = sunset.replace(':', '')
 if sunrise == sunset or sunrise > sunset:
 return 'N/A'
 elif currentTime >= sunrise and currentTime < sunset:
   return 'true'
 else:
 return 'false'

try:
if time.strptime(sunriseTime, '%H:%M') and time.strptime(sunsetTime, '%H:%M'):
format1 = True
except:
   format1 = False
try:
if time.strptime(sunriseTime, '%I:%M%p') and time.strptime(sunsetTime, '%I:%M%p'):
format2 = True
except:
   format2 = False
try:
if time.strptime(sunriseTime, '%I:%M %p') and time.strptime(sunsetTime, '%I:%M %p'):
format3 = True
except:
   format3 = False

if format1 or format2 or format3:
print isDayTime(sunriseTime, sunsetTime)
else:
print 'N/A'


[weewx-user] Weewx is daylight? Issue 276 is materialized.

2017-12-10 Thread Antony K.
This issue was raised because I ask in a post if Weewx can return true if 
it is day, or false if it is night. I was tempted by Mr. Tom Keffer to 
write a script named daylight.py because he told me this is done 
voluntarily and suggested I do it, so I did.

The script ( attachment daylight.py ) is in 3 phases.

1) Parse sunrise and sunset time from Weewx and check if the content is a 
time format in this form,
for example:

00:00
12:00am 12:00AM
12:00 am 12:00 AM
12:00pm 12:00PM
12:00 pm 12:00 PM

If nothing applies from the above return N/A.

2)If the time is in 12hr mode convert it to 24hr.

3)Check if it is night or day using sunrise, sunset and current time.

The problem is that I'm not familiar with weewx development, how will I 
incorporate and register this script to Weewx so by importing sunrise and 
sunset time and giving $current.isDaylight tag, return true or false.

-- 
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/env python
#
# This script was developed by Antonis Katsonis
#
"""Returns true if it is day, or false if it is night"""

import time
import re


sunriseTime = '--:--' # weewx sunrise
sunsetTime = '--:--' # weewx sunset


def convertTime(timeIn):
 if not timeIn.replace(':', '').isdigit():
 hour = timeIn.split(':')[0]
 minute = timeIn.split(':')[1].replace(' ', '').replace('AM', '').replace('PM', '')
 ampm = re.search('AM$|PM$', timeIn).group()

 if hour == 12 and ampm == 'AM':
 return '00:' + minute
 elif hour == 12 and ampm == 'PM':
   return '12:' + minute
 elif ampm == 'PM':
   return str(int(hour) + 12) + minute
 else:
 return timeIn
 else:
 return timeIn

def isDayTime(sunrise, sunset):
 sunrise = convertTime(sunrise.upper())
 sunset = convertTime(sunset.upper())
 currentTime = time.strftime("%H%M")
 sunrise = sunrise.replace(':', '')
 sunset = sunset.replace(':', '')
 if sunrise == sunset or sunrise > sunset:
 return 'N/A'
 elif currentTime >= sunrise and currentTime < sunset:
   return 'true'
 else:
 return 'false'

try:
if time.strptime(sunriseTime, '%H:%M') and time.strptime(sunsetTime, '%H:%M'):
format1 = True
except:
   format1 = False
try:
if time.strptime(sunriseTime, '%I:%M%p') and time.strptime(sunsetTime, '%I:%M%p'):
format2 = True
except:
   format2 = False
try:
if time.strptime(sunriseTime, '%I:%M %p') and time.strptime(sunsetTime, '%I:%M %p'):
format3 = True
except:
   format3 = False

if format1 or format2 or format3:
print isDayTime(sunriseTime, sunsetTime)
else:
print 'N/A'


[weewx-user] Re: Why are my daily graphs from different dates?

2017-12-10 Thread Max G
After some thinking on how to fix this...

I am using squid3 on the network...

Modifying the squid.conf, like so, fixes this issue:

acl local_server dst 192.168.1.0/24
cache deny local_server


-- 
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] How to use the Interceptor driver to receive data from the VH2600 station?

2017-12-10 Thread Francesco Scaramella
How to set weewx. conf in sniff mode to read data from VH2600 Station? I 
used the well-known driver reported in this address 
https://github.com/matthewwall/weewx-interceptor and it's all good until I 
septum the driver in listening mode and on the station I tell the IP 
address of the device where weewx is installed, but if I have to set weewx 
in sniffer mode I can not in any way to make dialogue weewx with the 
station. Can you give me an example of setting that will work well? From 
the log it seems that the driver does not work due to an error in the 
driver intercetor.py thing that I think unlikely...

Grazie a chi saprà darmi un aiuto!!

-- 
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: Why are my daily graphs from different dates?

2017-12-10 Thread Andrew Milner
Not sure what I 'fixed' - but at least have shown you that weewx seems to 
have generated the right .png files, with the latest dates and times - even 
if they may not be in the right place!!

You may still have issues with the web server and/or the browser and/or 
copying the generated files to the web server which delivers the pages - 
but these should be relatively easy to find and fix - if indeed any such 
issues actually exist!!



On Sunday, 10 December 2017 09:51:52 UTC+2, Max G wrote:

> Well Andrew, you fixed it!
>
> Thank you very much!!
> this was it... loaded the index.html in a different browser, which never 
> had these files; all there, latest files.
>
>
> 
>
>
>
> Thank you all for bearing with me.
>
> In any case, the last update, and this must have been my fault, changed 
> some conf file, which I have fixed now, by comparing it to an older version 
> and updating it accordingly.
>

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