Re: [weewx-user] Re: Interceptor setup

2019-04-04 Thread Chotechai Piyavongsiri
 My 'live' weewx server ip is 192.168.2.3 (via wifi), my ObserverIP is 
192.168.2.122 (wired connect to router) and its destination server is 
192.168.2.3 port 55. Interceptor setting in weewx.conf:[Interceptor]
    # This section is for the network traffic interceptor driver.
    
    # The driver to use:
    driver = user.interceptor
    
    # Specify the hardware device to capture.  Options include:
    #   acurite-bridge - acurite internet bridge
    #   observer - fine offset WH2600/HP1000/HP1003, aka 'observer'
    #   lw30x - oregon scientific LW301/LW302
    #   lacrosse-bridge - lacrosse GW1000U/C84612 internet bridge
    device_type = observer
    port = 55
It has been working flawlessly.
My test weewx server ip is 192.168.2.11, wifi to router. I'm not sure with this 
kind of setup, how can I use Interceptor to sniff data from my ObserverIP (or 
from my live weewx server?).
Thanks
On ‎Friday‎, ‎5‎ ‎April‎ ‎2019‎ ‎02‎:‎51‎:‎57‎ ‎AM‎ ‎+07, Scott Grayban 
 wrote:  
 
 Post your settings.

On Thursday, April 4, 2019 at 3:48:06 AM UTC-7, bthoven wrote:
Hi m,That was what I have been trying to do, the sniff, without success. Could 
you suggest how should I set the sniff thing.
Now my ObserverIP has local ip 192.168.2.122. It directs the data to my live 
weewx 192.168.2.3 port 55 which runs Interceptor in listening mode.
Thanks
On Thu, 4 Apr 2019, 16:54 mwall,  wrote:

On Thursday, April 4, 2019 at 1:12:22 AM UTC-4, Chotechai Piyavongsiri wrote:
As I'm setting up and testing another weewx server and would like to receive 
live data from the same IP Observer without changing the destination IP/port, 
do you think your approach would allow two weewx servers to receive same live 
data transmitted from the same IP Observer?






you cannot have two instances of the interceptor in listen mode to the same 
station - the station can only talk to one server, whether it is wu or 
weewx-interceptor
however, you could have one weewx-interceptor instance in listen mode, then a 
second weewx-interceptor in sniff mode
the station communications with the first instance as it would to any server, 
and the second instance eavesdrops on the conversation
m 


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




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

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] weewx interceptor no data

2019-04-04 Thread 'Season Ticket' via weewx-user
I'm not able to see any data coming from my PWS.  I have a N23DQ  weather 
station,  console.  I can change the IP address from "www.wunderground.com" 
to my PI 3.  however weewx interceptor does nor receive any data.

I have tried tcpdump (see capture.png) 

I have tried the python script interceptor.py (see capture2.png)

but there is no log output.

When I change the console back to "www.wunderground.com" the data is 
received by wunderground ok.

I have tried interceptor config for listen mode and sniffing mode,  below 
is the config for sniffing

Are you able to offer any advice? 

[Interceptor]
# This section is for the network traffic interceptor driver.

# The driver to use:
driver = user.interceptor

# Specify the hardware device to capture.  Options include:
#   acurite-bridge - acurite internet bridge, smarthub, or access
#   observer - fine offset WH2600/HP1000/HP1003, ambient WS2902
#   lw30x - oregon scientific LW301/LW302
#   lacrosse-bridge - lacrosse GW1000U/C84612 internet bridge
#   wu-client - any hardware that uses the weather underground protocol
device_type = observer
# port = 08080
#address = 192.168.1.135
mode = sniff
iface = wlan0
pcap_filter = src 192.168.1.135 and dst port 80

-- 
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: Interceptor setup

2019-04-04 Thread Scott Grayban
Post your settings.

On Thursday, April 4, 2019 at 3:48:06 AM UTC-7, bthoven wrote:
>
> Hi m,
> That was what I have been trying to do, the sniff, without success. Could 
> you suggest how should I set the sniff thing.
>
> Now my ObserverIP has local ip 192.168.2.122. It directs the data to my 
> live weewx 192.168.2.3 port 55 which runs Interceptor in listening mode.
>
> Thanks
>
> On Thu, 4 Apr 2019, 16:54 mwall, > 
> wrote:
>
>> On Thursday, April 4, 2019 at 1:12:22 AM UTC-4, Chotechai Piyavongsiri 
>> wrote:
>>>
>>> As I'm setting up and testing another weewx server and would like to 
>>> receive live data from the same IP Observer without changing the 
>>> destination IP/port, do you think your approach would allow two weewx 
>>> servers to receive same live data transmitted from the same IP Observer?
>>>

>> you cannot have two instances of the interceptor in listen mode to the 
>> same station - the station can only talk to one server, whether it is wu or 
>> weewx-interceptor
>>
>> however, you could have one weewx-interceptor instance in listen mode, 
>> then a second weewx-interceptor in sniff mode
>>
>> the station communications with the first instance as it would to any 
>> server, and the second instance eavesdrops on the conversation
>>
>> m 
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "weewx-user" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/weewx-user/bks8RhOINP4/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> weewx...@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] Exception error in module restx of version 3.9.1.

2019-04-04 Thread Luc Heijst
On Thursday, 4 April 2019 12:25:44 UTC-3, Thomas Keffer wrote:
>
> Interesting that the post to weather365 has a timestamp of 1554322200. Any 
> thoughts why the timestamp for the AWEKAS uploader would be different?
>

Tom,

I'm so sorry!

I just discovered that I copied accidently restx v4.0.0 to the v3.9.1 
environment. So all time we were looking at the wrong version.
Strange enough the 4.0.0 version of restx could run in the 3.9.1 
environment without (other) errors.

Sorry I have wasted your time.

Luc

-- 
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] Adding entries in skin.conf

2019-04-04 Thread Ha Ba
Hi everybody,

My weewx is installed with setup.py. Driver is te923.

I try to make some customizing in the skin.conf. I added extraTemp3 in 
[daytemp] and extraHumid3 in [dayhum]. I did this also for the week-, 
month- and year-entries.
Like this:

[[[daytemp]]]
yscale = None, None, 0.5
outTemp
extraTemp1
extraTemp2
extraTemp3

[[[dayhum]]]
outHumidity
extraHumid1
extraHumid2
extraHumid3

Then I stopped and started weewx and run wee_reports, but the output in the 
index.html didn't show the new entries.

My first question now is: Is that the right way to go?

regards, Hans


-- 
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.
###
# SEASONS SKIN CONFIGURATION FILE #
# Copyright (c) 2018 Tom Keffer  and Matthew Wall  #
# See the file LICENSE.txt for your rights.   #
###

skin_semantics = 2

###

# The following section is for any extra tags that you want to be available in 
the templates
[Extras]

# This radar image would be available as $Extras.radar_img
#radar_img = http://radar.weather.gov/ridge/lite/N0R/RTX_loop.gif
# This URL will be used as the image hyperlink:
#radar_url = 
http://radar.weather.gov/ridge/radar.php?product=NCR&rid=RTX&loop=yes

# Similar to radar, but for satellite image.
#satellite_img = 
http://images.intellicast.com/WxImages/SatelliteLoop/hipacsat_None_anim.gif
#satellite_url = 
http://images.intellicast.com/WxImages/SatelliteLoop/hipacsat_None_anim.gif

# To display a map, enter an API key for google maps
#google_maps_apikey = xxx

# If you have a Google Analytics ID, uncomment and edit the next line, and
# the analytics code will be included in your generated HTML files:
#googleAnalyticsId = UA-12345678-1

###

[Labels]

# Override some labels. No need to identify these as a "Battery"
# or "Voltage", because that is included in the template.
[[Generic]]
txBatteryStatus  = Transmitter
windBatteryStatus= Wind
rainBatteryStatus= Rain
outTempBatteryStatus = Outside Temperature
inTempBatteryStatus  = Inside Temperature
consBatteryVoltage   = Console
heatingVoltage   = Heating
supplyVoltage= Supply
referenceVoltage = Reference

# Some specialized labels
rain_today   = Rain Today
wind = Wind


###

# The CheetahGenerator creates files from templates.  This section
# specifies which files will be generated from which template.

[CheetahGenerator]

# Possible encodings are 'html_entities', 'utf8', or 'strict_ascii'
encoding = html_entities

[[SummaryByMonth]]
# Reports that summarize "by month"
[[[NOAA_month]]]
encoding = strict_ascii
template = NOAA/NOAA--MM.txt.tmpl

[[SummaryByYear]]
# Reports that summarize "by year"
[[[NOAA_year]]]
encoding = strict_ascii
template = NOAA/NOAA-.txt.tmpl

[[ToDate]]
# Reports that show statistics "to date", such as day-to-date,
# week-to-date, month-to-date, etc.
[[[index]]]
template = index.html.tmpl
[[[statistics]]]
template = statistics.html.tmpl
[[[telemetry]]]
template = telemetry.html.tmpl
[[[tabular]]]
template = tabular.html.tmpl
[[[celestial]]]
template = celestial.html.tmpl
# Uncomment the following to have WeeWX generate a celestial page 
only once an hour:
# stale_age = 3600
[[[RSS]]]
template = rss.xml.tmpl

###

# The CopyGenerator copies files from one location to another.

[CopyGenerator]

# List of files to be copied only the first time the generator runs
copy_once = seasons.css, seasons.js, favicon.ico, font/*.woff, font/*.woff2

# List of files to be copied each time the generator runs
# copy_always = 


###

Re: [weewx-user] Exception error in module restx of version 3.9.1.

2019-04-04 Thread Thomas Keffer
Well, then it must be possibility #1: r['dateTime'] was a different value
than 1554322200.

Interesting that the post to weather365 has a timestamp of 1554322200. Any
thoughts why the timestamp for the AWEKAS uploader would be different?

-tk

On Thu, Apr 4, 2019 at 8:15 AM Luc Heijst  wrote:

> Tom,
>
> Below the data sent to weather365, just before the exception:
> It has time stamp 1554322200, so the record was stored in the database in
> time. Notice how few data is present (because NULL/None data is not send).
>
> raind=0.00
> txbattery=0
> soiltemp3=28.8
> datum=201904031710
> long=-55.21904
> rainh=0.00
> prec_time=60
> lat=5.82184
> et=0.01901
> alt=4.0
> relhum=66
> windrun=103.3
> utcstamp=1554322200
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Exception error in module restx of version 3.9.1.

2019-04-04 Thread Luc Heijst
Tom, 

Below the data sent to weather365, just before the exception:
It has time stamp 1554322200, so the record was stored in the database in 
time. Notice how few data is present (because NULL/None data is not send).

raind=0.00
txbattery=0
soiltemp3=28.8
datum=201904031710
long=-55.21904
rainh=0.00
prec_time=60
lat=5.82184
et=0.01901
alt=4.0
relhum=66
windrun=103.3
utcstamp=1554322200

-- 
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] New Station Setup suggestions?

2019-04-04 Thread Scott Muckleroy

Hello-  I have a Vantage Vue and will be receiving a WeatherLinkUSB 
tomorrow and I am trying to figure out what would be the best setup to 
accomplish the following:

1. real-time'ish WX data to web site and android cell phones using an app 
with high WAF.
2. MQTT WX data feed to MQTT broker.
3. Over 3 year of historical data.
4.  Update WeatherLink web site using the free WeatherLink service, not 
subscribing to Pro, etc. (plug-ins)
5.  Update public weather sites like wunderground, etc.
6. HomeSeer home automation integration. (MQTT I think..)


>From everything I have read it looks like WeeWx can do all of this but like 
everything it looks like there are several ways to skin this cat.

I have two VM's (Windows 10 and Linux Mint 19.1) running on a QNAP NAS that 
I can use for this setup, but obviously I can only attache the 
WeatherLinkUSB to one of the VM's.  Local MQTT server/broker running in 
docker container.

>From what I have read in the documentation and forums, it looks like I 
could either connect the WLUSB to the Window VM, install/configure 
WeatherLink and then have WeeWX pull Wx data from WeatherLink OR connect 
the WLUSB to the WeeWx server and just use it as the repository for 
everything?

Do most people with Davis Instruments station that have WeeWx also use the 
Davis WeatherLink site to upload data?

Our internet upload speed is very slow (3.5 down, .6 up) so I would like to 
limit the amount of data that is uploaded.

Thanks in advance for any advice or suggestions!

Scott

-- 
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] Exception error in module restx of version 3.9.1.

2019-04-04 Thread Luc Heijst
On Thursday, 4 April 2019 11:57:12 UTC-3, Thomas Keffer wrote:
>
> Well, then there are two possibilities:
> 1.  r['dateTime'] was a different value than 1554322200; or
> 2. There was some kind of delay getting the record into the database. The 
> AWEKAS code did its query before the record had appeared.
>

As you can see at the syslog below, record with time stamp 1554322200 is 
stored at 17:10:13, one second before the exception.

Apr  3 17:10:13 pi21 mstk[14530]: manager: Added record 2019-04-03 17:10:00 
-03 (1554322200) to database 'weewx_mstk'
Apr  3 17:10:14 pi21 mstk[14530]: manager: Added record 2019-04-03 17:10:00 
-03 (1554322200) to daily summary in 'weewx_mstk'
Apr  3 17:10:14 pi21 mstk[14530]: reportengine: Running reports for latest 
time in the database.
Apr  3 17:10:14 pi21 mstk[14530]: reportengine: Report 'SeasonsReport' not 
enabled. Skipping.
Apr  3 17:10:14 pi21 mstk[14530]: reportengine: Report 'SmartphoneReport' 
not enabled. Skipping.
Apr  3 17:10:14 pi21 mstk[14530]: reportengine: Report 'MobileReport' not 
enabled. Skipping.
Apr  3 17:10:14 pi21 mstk[14530]: reportengine: Report 'StandardReport' not 
enabled. Skipping.
Apr  3 17:10:14 pi21 mstk[14530]: reportengine: Running report 'mstkReport'
Apr  3 17:10:14 pi21 klim[13367]: KlimaLogg: RFComm: handleHistoryData: 
time=2019-04-03 17:10:00 this=17229 (0xf69a0) latest=17229 (0xf69a0) nrec=0
Apr  3 17:10:14 pi21 mstk[14530]: restx: Weather365: url: 
https://channel1.weather365.net/stations/index.php?soilmoisture3=200.0&raind=0.00&txbattery=0&soiltemp3=28.8&datum=201904031710&long=-55.21904&stationid=285CDPC186&rainh=0.00&prec_time=60&lat=5.82184&et=0.01901&alt=4.0&relhum=66&windrun=103.3&utcstamp=1554322200
Apr  3 17:10:14 pi21 mstk[14530]: restx: AWEKAS: Unexpected exception of 
type 
Apr  3 17:10:14 pi21 mstk[14530]: restx: Weather365: Data uploaded to 
https://channel1.weather365.net/stations/index.php is: 
(https://channel1.weather365.net/stations/index.php?soilmoisture3=200.0&raind=0.00&txbattery=0&soiltemp3=28.8&datum=201904031710&long=-55.21904&stationid=285CDPC186&rainh=0.00&prec_time=60&lat=5.82184&et=0.01901&alt=4.0&relhum=66&windrun=103.3&utcstamp=1554322200)
Apr  3 17:10:14 pi21 mstk[14530]: *** Traceback (most recent call last):
Apr  3 17:10:14 pi21 mstk[14530]: reportengine: Found configuration file 
/home/weewx/skins/mstk/skin.conf for report 'mstkReport'
Apr  3 17:10:14 pi21 mstk[14530]: ***   File 
"/home/weewx/bin/weewx/restx.py", line 350, in run_loop
Apr  3 17:10:14 pi21 mstk[14530]: *** self.process_record(_record, 
dbmanager)
Apr  3 17:10:14 pi21 mstk[14530]: restx: WeatherCloud: Unexpected exception 
of type 
Apr  3 17:10:14 pi21 mstk[14530]: ***   File 
"/home/weewx/bin/weewx/restx.py", line 1693, in process_record
Apr  3 17:10:14 pi21 mstk[14530]: *** r = self.get_record(record, 
dbmanager)
Apr  3 17:10:14 pi21 mstk[14530]: ***   File 
"/home/weewx/bin/weewx/restx.py", line 1689, in get_record
Apr  3 17:10:14 pi21 mstk[14530]: *** r['rainRate'] = rr[0]
Apr  3 17:10:14 pi21 mstk[14530]: *** TypeError: 'NoneType' object has no 
attribute '__getitem__'
Apr  3 17:10:14 pi21 mstk[14530]: restx: AWEKAS: Thread exiting. Reason: 
'NoneType' object has no attribute '__getitem__'
Apr  3 17:10:14 pi21 mstk[14530]: *** Traceback (most recent call last):
Apr  3 17:10:14 pi21 mstk[14530]: ***   File 
"/home/weewx/bin/weewx/restx.py", line 350, in run_loop
Apr  3 17:10:14 pi21 mstk[14530]: *** self.process_record(_record, 
dbmanager)
Apr  3 17:10:14 pi21 mstk[14530]: ***   File 
"/home/weewx/bin/user/wcloud.py", line 249, in process_record
Apr  3 17:10:14 pi21 mstk[14530]: *** r = self.get_record(record, dbm)
Apr  3 17:10:14 pi21 mstk[14530]: ***   File 
"/home/weewx/bin/user/wcloud.py", line 271, in get_record
Apr  3 17:10:14 pi21 mstk[14530]: *** if rec['windDir'] is not None:
Apr  3 17:10:14 pi21 mstk[14530]: *** KeyError: 'windDir'
Apr  3 17:10:14 pi21 mstk[14530]: restx: WeatherCloud: Thread exiting. 
Reason: 'windDir' 

-- 
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] Exception error in module restx of version 3.9.1.

2019-04-04 Thread Thomas Keffer
Well, then there are two possibilities:

1.  r['dateTime'] was a different value than 1554322200; or
2. There was some kind of delay getting the record into the database. The
AWEKAS code did its query before the record had appeared.

-tk

On Thu, Apr 4, 2019 at 7:51 AM Luc Heijst  wrote:

> On Thursday, 4 April 2019 11:21:08 UTC-3, Thomas Keffer wrote:
>>
>>  It is None because the record *was not in the database*. Why?
>>
>
> I don't agree: the record *is* in the database; these are the values:
>
> INSERT INTO `archive` (`dateTime`, `usUnits`, `interval`, `barometer`,
> `pressure`, `altimeter`, `inTemp`, `outTemp`, `inHumidity`, `outHumidity`,
> `windSpeed`, `windDir`, `windGust`, `windGustDir`, `rainRate`, `rain`,
> `dewpoint`, `windchill`, `heatindex`, `ET`, `radiation`, `UV`,
> `extraTemp1`, `extraTemp2`, `extraTemp3`, `soilTemp1`, `soilTemp2`,
> `soilTemp3`, `soilTemp4`, `leafTemp1`, `leafTemp2`, `extraHumid1`,
> `extraHumid2`, `soilMoist1`, `soilMoist2`, `soilMoist3`, `soilMoist4`,
> `leafWet1`, `leafWet2`, `rxCheckPercent`, `txBatteryStatus`,
> `consBatteryVoltage`, `hail`, `hailRate`, `heatingTemp`, `heatingVoltage`,
> `supplyVoltage`, `referenceVoltage`, `windBatteryStatus`,
> `rainBatteryStatus`, `outTempBatteryStatus`, `inTempBatteryStatus`,
> `cloudbase`, `humidex`, `appTemp`, `beaufort`, `windrun`, `maxSolarRad`)
> VALUES
> (1554322200, 16, 5, NULL, 1009.14, 1009.31912168591, 37.2, NULL, NULL,
> 65.8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> 0.00190080488960694, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> 28.8287556510223, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 200, NULL,
> NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0,
> NULL, NULL, NULL, NULL, NULL, NULL, 103.266753335247, 321.291353463412);
>
> The value of rainRate is NULL (sorry, I said before the value is None).
>
> Look at lines 278, 292, 310 in restx.py:
>   if _result is not None and _result[0] is not None:
>
> Should we not do here the same?
>   if rr is not None and rr[0] is not None:
>
> Luc
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Exception error in module restx of version 3.9.1.

2019-04-04 Thread Luc Heijst
On Thursday, 4 April 2019 11:21:08 UTC-3, Thomas Keffer wrote:
>
>  It is None because the record *was not in the database*. Why?
>

I don't agree: the record *is* in the database; these are the values:

INSERT INTO `archive` (`dateTime`, `usUnits`, `interval`, `barometer`, 
`pressure`, `altimeter`, `inTemp`, `outTemp`, `inHumidity`, `outHumidity`, 
`windSpeed`, `windDir`, `windGust`, `windGustDir`, `rainRate`, `rain`, 
`dewpoint`, `windchill`, `heatindex`, `ET`, `radiation`, `UV`, 
`extraTemp1`, `extraTemp2`, `extraTemp3`, `soilTemp1`, `soilTemp2`, 
`soilTemp3`, `soilTemp4`, `leafTemp1`, `leafTemp2`, `extraHumid1`, 
`extraHumid2`, `soilMoist1`, `soilMoist2`, `soilMoist3`, `soilMoist4`, 
`leafWet1`, `leafWet2`, `rxCheckPercent`, `txBatteryStatus`, 
`consBatteryVoltage`, `hail`, `hailRate`, `heatingTemp`, `heatingVoltage`, 
`supplyVoltage`, `referenceVoltage`, `windBatteryStatus`, 
`rainBatteryStatus`, `outTempBatteryStatus`, `inTempBatteryStatus`, 
`cloudbase`, `humidex`, `appTemp`, `beaufort`, `windrun`, `maxSolarRad`) 
VALUES
(1554322200, 16, 5, NULL, 1009.14, 1009.31912168591, 37.2, NULL, NULL, 
65.8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 
0.00190080488960694, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 
28.8287556510223, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 200, NULL, 
NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 
NULL, NULL, NULL, NULL, NULL, NULL, 103.266753335247, 321.291353463412);

The value of rainRate is NULL (sorry, I said before the value is None).

Look at lines 278, 292, 310 in restx.py:
  if _result is not None and _result[0] is not None:

Should we not do here the same?
  if rr is not None and rr[0] is not None:

Luc

-- 
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] Exception error in module restx of version 3.9.1.

2019-04-04 Thread Thomas Keffer
The error has everything to do with the database call.

The question is not why does rr[0] raise an exception, but *why is rr None
in the first place*? It is None because the record *was not in the database*.
Why?

-tk

On Thu, Apr 4, 2019 at 6:38 AM Luc Heijst  wrote:

> On Thursday, 4 April 2019 10:26:56 UTC-3, Thomas Keffer wrote:
>>
>> #2 is what is happening here.
>>
>
> Tom,
>
> The error has nothing to do with the database call. I agree: the value of
> rr is None.
>
> When an object is None you can't get any attributes from it, like rr[0],
> rr[1] etc.
> So the exception is complaining you want an attribute from a NoneType
> object
>
> Luc
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Exception error in module restx of version 3.9.1.

2019-04-04 Thread Luc Heijst
On Thursday, 4 April 2019 10:26:56 UTC-3, Thomas Keffer wrote:
>
> #2 is what is happening here.
>

Tom,

The error has nothing to do with the database call. I agree: the value of 
rr is None.

When an object is None you can't get any attributes from it, like rr[0], 
rr[1] etc.
So the exception is complaining you want an attribute from a NoneType object

Luc

-- 
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] Exception error in module restx of version 3.9.1.

2019-04-04 Thread Thomas Keffer
That's not the way the database manager works. There are three
possibilities:

1. 'rainRate' is not in the schema. Result: exception of type
weedb.OperationalError is raised.
2. 'rainRate' in the schema, but a record with the timestamp is not in the
database. Result: value 'None' is returned (rr = None)
3. 'rainRate' in the schema, and record with the right timestamp is in the
database. Result: rr[0] will hold the value of 'rainRate'. It could be
None, or it could be a floating point.

#2 is what is happening here.

On Thu, Apr 4, 2019 at 5:49 AM Luc Heijst  wrote:

> On Thursday, 4 April 2019 09:31:11 UTC-3, Thomas Keffer wrote:
>>
>> The problem here is that the record itself was not in the database.
>>
>
> I see it different.
> The value in the database is None because no loop value was received when
> the record was written.
> The value for rr is None.
> The exception says: TypeError: 'NoneType' object has no attribute
> '__getitem__'
> Thus: rr[0] throws an error.
> Solution [not tested]:
> try:
> rr = dbmanager.getSql('select rainRate from %s where
> dateTime=?' %
>   dbmanager.table_name, (r['dateTime'],))
> except weedb.OperationalError:
> pass
> else:
> if rr is not None:
> r['rainRate'] = rr[0]
> else:
> r['rainRate'] = None
> return r
>
>
> --
> 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] What does restx indicate insofar as forecast is concerned?

2019-04-04 Thread V. Kelly Bellis
After examining the syslog, looking for clues as to why XTide v2.15.2 
(alone and without the deprecated v2.13 on system) isn't working with 
forecast v3.4.0rc1, I keep seeing something like this:

restx: StationRegistry: wait interval (229800 < 604800) has not passed for 
record 2019-04-04 07:45:00 EDT (1554378300)

It typically appears (but not always) immediately following the XTide: 
running command, but wondered if that was due to thread sequencing rather 
than a broken record dictionary or something else.

I'm trying to understand if the bits related to restx might interfere or 
interact with the forecast extension; forecast.py

>From what little I understand, restx has its primary chores relating to 
publishing data to other sites; e.g. AWEKAS, WU, etc.

forecast.py v3.4.0rc1 - beginning at line 4026
# look for comma-delimited output.  we expect lines like this:
#   location,-MM-DD,HH:MM xM xxx,offset,description
# xtide replaces commas in the location with |
out = []
for line in p.stdout:
if line.count(',') == 4:
out.append(line)
else:
logdbg("%s: ignoring line: %s" % (XT_KEY, line))
if out:
logdbg("%s: got %d lines of output" % (XT_KEY, len(out)))
fields = out[0].split(',')
loc = fields[0].replace('|', ',')
loc = loc.replace(' - READ flaterco.com/pol.html', '')
if loc != location:
loginf("%s: location mismatch: '%s' != '%s'" %
   (XT_KEY, location, loc))
return out
loginf("%s: got no stinkin tidal events" % XT_KEY)

This leads to the the syslog line:
Apr  4 08:20:23 raspberrypi weewx[26067]: forecast: XTideThread: XTide: got 
no stinkin tidal events


Then the following bits from forecast.py v3.4.0rc1 - beginning at line 4047:

# we got no recognizable output, so try to make sense of any 
errors
err = []
preamble = True
for line in p.stderr:
if line.startswith('Indexing'):
preamble = False
if not line.startswith('Indexing') and not preamble:
line = line.rstrip()
err.append(line)
errmsg = ' '.join(err)
idx = errmsg.find('XTide Error:')
if idx >= 0:
errmsg = errmsg[idx:]
idx = errmsg.find('XTide Fatal Error:')
if idx >= 0:
errmsg = errmsg[idx:]
if len(errmsg):
logerr('%s: generate forecast failed: %s' % (XT_KEY, errmsg
))

return None
except OSError as e:
logerr('%s: generate forecast failed: %s' % (XT_KEY, e))
return None


The only XTide-related message in syslog subsequent to 'forecast: 
XTideThread: XTide: got no stinkin tidal events' is:
Apr  4 08:20:23 raspberrypi weewx[26067]: forecast: XTideThread: XTide: 
terminating thread


The python parts dealing with location may allow for all of the old 
unmaintained data that newer versions of XTide hasn't supported for many 
years. The reference in forecast.py is to the 15-year old Legal Notice for 
UK tide predictions (https://flaterco.com/pol.html).

As Dave Flater writes , "*Many data 
were purged after a legal threat from the U.K. Hydrographic Office (UKHO) 
in January 2001.  I ended maintenance of the non-U.S. data that replaced 
them for different reasons in early 2012.*"

The lengthy explanation by Mr. Flater that follows in his discussion is 
informative as to why for many years, only U.S. data is maintained by him, 
and that the scarcity of non-U.S. data is artificial. Still I wonder if 
this issue is possibly linked with forecast and XTide v2.15.2 got no 
stinkin tidal events on my RPi

-- 
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: Changes in skin.conf show no effect

2019-04-04 Thread Ha Ba
Forgot my logfile 

Am Donnerstag, 4. April 2019 14:42:38 UTC+2 schrieb Ha Ba:
>
> Hi everybody,
>
> My weewx is installed by setup.py. Working with driver te923.
>
> I edited the skin.conf file, added extraTemp3 and extraHumid3 to my 
> daily-, weekly-, monthly- yearly-graphs. 
>
> In my opinion I hadn't to do anything in the template.
>
> Then I 
> -stopped weewx
> -deleted the html- and png-files in /home/wwex/public_html
> -started weewx
> -run wee-reports.
>
> Unfortunately these changes had no effect on the index.html display, but 
> after I had problems with my installation.
>
> What else do I have to do to display the changes? 
>
> regards, Hans
>
> PS I edited skin.conf not for the first time, but I cannot comprehend why 
> these older changes came visible :(
>
>
>

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


mylog
Description: Binary data


Re: [weewx-user] Exception error in module restx of version 3.9.1.

2019-04-04 Thread Luc Heijst
On Thursday, 4 April 2019 09:48:59 UTC-3, Luc Heijst wrote:
>
> else:
> r['rainRate'] = None
>
Tom,
 
Leave these two lines out. We don't send  None value to AWEKAS.

Luc

-- 
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] Exception error in module restx of version 3.9.1.

2019-04-04 Thread Luc Heijst
On Thursday, 4 April 2019 09:31:11 UTC-3, Thomas Keffer wrote:
>
> The problem here is that the record itself was not in the database. 
>

I see it different.
The value in the database is None because no loop value was received when 
the record was written.
The value for rr is None.
The exception says: TypeError: 'NoneType' object has no attribute 
'__getitem__'
Thus: rr[0] throws an error.
Solution [not tested]:
try:
rr = dbmanager.getSql('select rainRate from %s where 
dateTime=?' %
  dbmanager.table_name, (r['dateTime'],))
except weedb.OperationalError:
pass
else:
if rr is not None:
r['rainRate'] = rr[0]
else:
r['rainRate'] = None
return r


-- 
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] Changes in skin.conf show no effect

2019-04-04 Thread Ha Ba
Hi everybody,

My weewx is installed by setup.py. Working with driver te923.

I edited the skin.conf file, added extraTemp3 and extraHumid3 to my daily-, 
weekly-, monthly- yearly-graphs. 

In my opinion I hadn't to do anything in the template.

Then I 
-stopped weewx
-deleted the html- and png-files in /home/wwex/public_html
-started weewx
-run wee-reports.

Unfortunately these changes had no effect on the index.html display, but 
after I had problems with my installation.

What else do I have to do to display the changes? 

regards, Hans

PS I edited skin.conf not for the first time, but I cannot comprehend why 
these older changes came visible :(


-- 
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.
###
# SEASONS SKIN CONFIGURATION FILE #
# Copyright (c) 2018 Tom Keffer  and Matthew Wall  #
# See the file LICENSE.txt for your rights.   #
###

skin_semantics = 2

###

# The following section is for any extra tags that you want to be available in 
the templates
[Extras]

# This radar image would be available as $Extras.radar_img
#radar_img = http://radar.weather.gov/ridge/lite/N0R/RTX_loop.gif
# This URL will be used as the image hyperlink:
#radar_url = 
http://radar.weather.gov/ridge/radar.php?product=NCR&rid=RTX&loop=yes

# Similar to radar, but for satellite image.
#satellite_img = 
http://images.intellicast.com/WxImages/SatelliteLoop/hipacsat_None_anim.gif
#satellite_url = 
http://images.intellicast.com/WxImages/SatelliteLoop/hipacsat_None_anim.gif

# To display a map, enter an API key for google maps
#google_maps_apikey = xxx

# If you have a Google Analytics ID, uncomment and edit the next line, and
# the analytics code will be included in your generated HTML files:
#googleAnalyticsId = UA-12345678-1

###

[Labels]

# Override some labels. No need to identify these as a "Battery"
# or "Voltage", because that is included in the template.
[[Generic]]
txBatteryStatus  = Transmitter
windBatteryStatus= Wind
rainBatteryStatus= Rain
outTempBatteryStatus = Outside Temperature
inTempBatteryStatus  = Inside Temperature
consBatteryVoltage   = Console
heatingVoltage   = Heating
supplyVoltage= Supply
referenceVoltage = Reference

# Some specialized labels
rain_today   = Rain Today
wind = Wind


###

# The CheetahGenerator creates files from templates.  This section
# specifies which files will be generated from which template.

[CheetahGenerator]

# Possible encodings are 'html_entities', 'utf8', or 'strict_ascii'
encoding = html_entities

[[SummaryByMonth]]
# Reports that summarize "by month"
[[[NOAA_month]]]
encoding = strict_ascii
template = NOAA/NOAA--MM.txt.tmpl

[[SummaryByYear]]
# Reports that summarize "by year"
[[[NOAA_year]]]
encoding = strict_ascii
template = NOAA/NOAA-.txt.tmpl

[[ToDate]]
# Reports that show statistics "to date", such as day-to-date,
# week-to-date, month-to-date, etc.
[[[index]]]
template = index.html.tmpl
[[[statistics]]]
template = statistics.html.tmpl
[[[telemetry]]]
template = telemetry.html.tmpl
[[[tabular]]]
template = tabular.html.tmpl
[[[celestial]]]
template = celestial.html.tmpl
# Uncomment the following to have WeeWX generate a celestial page 
only once an hour:
# stale_age = 3600
[[[RSS]]]
template = rss.xml.tmpl

###

# The CopyGenerator copies files from one location to another.

[CopyGenerator]

# List of files to be copied only the first time the generator runs
copy_once = seasons.css, seasons.js, favicon.ico, font/*.woff, font/*.woff2

# List of files to be copied each time the generator runs
# copy_always = 


###

# The ImageGenerator creates image plots of data.

[ImageGenerator]

# This section lists all the images 

Re: [weewx-user] Exception error in module restx of version 3.9.1.

2019-04-04 Thread Thomas Keffer
If a database record has a value of None for rainRate, that is no problem
at all. The problem here is that the record itself was not in the database.

For some reason, the AWEKAS uploader was trying to post a record that was
not in the database. Any insights why this would happen?

-tk

On Wed, Apr 3, 2019 at 7:31 PM Luc Heijst  wrote:

> On Wednesday, 3 April 2019 22:58:19 UTC-3, Thomas Keffer wrote:
>>
>> I don't understand why there would not be a record with the record's
>> timestamp in the database, but I added a check just in case.
>>
>
> Tom,
>
> Weewx with the meteostick driver was started seconds before the new
> archive period started.
> Several values in the database have value None, among others rainRate.
>
> BTW I have set rainRate calculations setr to hardware.
>
> [StdWXCalculate]
> [[Calculations]]
> rainRate = hardware
>
> Luc
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: Interceptor setup

2019-04-04 Thread bthoven
Hi m,
That was what I have been trying to do, the sniff, without success. Could
you suggest how should I set the sniff thing.

Now my ObserverIP has local ip 192.168.2.122. It directs the data to my
live weewx 192.168.2.3 port 55 which runs Interceptor in listening mode.

Thanks

On Thu, 4 Apr 2019, 16:54 mwall,  wrote:

> On Thursday, April 4, 2019 at 1:12:22 AM UTC-4, Chotechai Piyavongsiri
> wrote:
>>
>> As I'm setting up and testing another weewx server and would like to
>> receive live data from the same IP Observer without changing the
>> destination IP/port, do you think your approach would allow two weewx
>> servers to receive same live data transmitted from the same IP Observer?
>>
>>>
> you cannot have two instances of the interceptor in listen mode to the
> same station - the station can only talk to one server, whether it is wu or
> weewx-interceptor
>
> however, you could have one weewx-interceptor instance in listen mode,
> then a second weewx-interceptor in sniff mode
>
> the station communications with the first instance as it would to any
> server, and the second instance eavesdrops on the conversation
>
> m
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/weewx-user/bks8RhOINP4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: noaa dropdown not populated

2019-04-04 Thread Ferran Vidal Marginet
Hello,

I found the error in the end. It was in the file skin.conf and it wasn't 
related to the forecast modul at all. In the 'CheetahGenerator' I added an 
'Extras' tag and, I don't know why, is giving this error.
To correct, I've suppressed the 'Extras' tag and I've added the module 
'about_extended' to the 'ToDate' tag. Doing this the issue is solved.

[image: Clipboard01.png]

Thanks!
Ferran

El diumenge, 31 març de 2019 17:36:32 UTC+2, Ferran Vidal Marginet va 
escriure:
>
> Hello,
>
> I've made a little step on this.
> I've substituted the /season folder for the original one and the dropdown 
> is populated. So, I've reduced where to watch. The "error" should be 
> somewhere in the /season folder.
> I'll tell you.
> Thanks,
> Ferran
>

-- 
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: Interceptor setup

2019-04-04 Thread mwall
On Thursday, April 4, 2019 at 1:12:22 AM UTC-4, Chotechai Piyavongsiri 
wrote:
>
> As I'm setting up and testing another weewx server and would like to 
> receive live data from the same IP Observer without changing the 
> destination IP/port, do you think your approach would allow two weewx 
> servers to receive same live data transmitted from the same IP Observer?
>
>>
you cannot have two instances of the interceptor in listen mode to the same 
station - the station can only talk to one server, whether it is wu or 
weewx-interceptor

however, you could have one weewx-interceptor instance in listen mode, then 
a second weewx-interceptor in sniff mode

the station communications with the first instance as it would to any 
server, and the second instance eavesdrops on the conversation

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.