Author Topic: WH2900 & WeeWX on RBPi - trouble with Interceptor driver configuration  (Read 1958 times)

0 Members and 1 Guest are viewing this topic.

Offline flygpagen

  • Member
  • *
  • Posts: 29
Hello all,

I am new to the PWS world, but I have been running two RBPi's collecting data to FR24, FlightAware and other services for a couple of years, one at my local flying club airfield. I bought a FO WH2900 (branded "ProTech Weather Station Nordic Pro") last week and am currently trying it out at home. Using the WS View app I have succesfully configured it to my wifi and it is reporting as it should to ecowitt.net and Wunderground. The devices seemingly is a default WH2900 with no modifications except the name on the box. It is sold & bought in Sweden.

I'd like to use WeeWX on one of the RBPi's to expand the usability so I have installed it, discovered the problem with RBPi's lack of hardware clock, fixed that, and tried the simulator driver. All worked fine. My problem begins when I use the Interceptor driver to collect data from the WH2900 on the same network. Using WS View I set up a custom service with Ecowitt protocol, server IP is the IP of the RBPi and port 8001. Since the custom service use the EW protocol I figure the device_type for the interceptor driver should be the ecowitt-client, but when I put that in the weewx.conf I get a strange response from the webserver, just a blank page with the following data;

Code: [Select]
{"errcode":"0","errmsg":"ok","UTC_offset":"-18000"}
When I google that I find a piece of text from the code of the interceptor.py on github saying that this is the response from the ecowitt.net server, see lines 2259-2274 on https://github.com/matthewwall/weewx-interceptor/blob/master/bin/user/interceptor.py

When I view the system log as the docs says, I can see that weewx service is working, f. ex.;
Code: [Select]
Jan 21 11:45:38 mooPi weewx[30797] INFO weewx.manager: Added record 2021-01-21 11:45:00 CET (1611225900) to database 'weewx.sdb'
Jan 21 11:45:38 mooPi weewx[30797] INFO weewx.manager: Added record 2021-01-21 11:45:00 CET (1611225900) to daily summary in 'weewx.sdb'
Jan 21 11:45:40 mooPi weewx[30797] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 1.72 seconds
Jan 21 11:45:41 mooPi weewx[30797] INFO weewx.imagegenerator: Generated 15 images for report SeasonsReport in 1.08 seconds
Jan 21 11:45:41 mooPi weewx[30797] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx

...and in the weewx.conf right now very few parameters are set up for the station, only;
Code: [Select]
[Interceptor]
driver = user.interceptor
...
device_type = ecowitt-client

I do not know if I have configured the weewx.conf wrong, or if maybe my network & open ports are set up wrong? My skills in Raspbian are limited but I can follow instructions and do a bit of tinkering. I have not found an answer in this forum. Any input is highly appreciated!

Thanks!
« Last Edit: January 21, 2021, 05:51:55 AM by flygpagen »

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3325
Re: WH2900 & WeeWX on RBPi - trouble with Interceptor driver configuration
« Reply #1 on: January 21, 2021, 12:50:15 PM »
At first glance the weewx  messages in the syslog look fine.
You seem to have a webserver issue.
If I understand your question properly, you fail to get the data displayed on the screen when entering the URL http://your-ip-of-the-Rpi/weewx
correct ? (or did you enter: http://your-ip:8001/weewx ? that won't work usually)
Your webserver  - if you have installed one at all, what you have to, otherwise you cannot receive anything in your browser - should provide at least some response when you enter
http://your-ip-of-the-RPi/weewx

what's the response ?

Your web server should listen at port 80 (default http port) and will forward your request to /var/www/weewx/html

Then, if you have a look into the directory /var/www/html/weewx on Raspbian, e.g. with the file manager, you should see a lot of files, graphics files, ending in .png and starting day.....png, week....png, month ....png and year....png there which have been created by weewx (by the Cheetah-generator) as your syslog entry says - 15 images
Do you see them there ? - they should have a similar timestamp as the "archived data" - added record .... to weewx.sdb

Also the port number is only for the communication between your console and weewx - it has nothing to do with you reading the data into the web interface (weewx term: skin)

Your interceptor stanza in weewx.conf should look like
[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
    #   ecowitt-client - any hardware that uses the ecowitt protocol
    #   wu-client - any hardware that uses the weather underground protocol

    device_type = ecowitt-client
    port=8001
----------------
because you say you have entered port # 8001 in the WSView app - and the IP of your RPi

and your station stanza should look like (the sequence in weewx.conf is reverse - 1st station, 2nd Interceptor)
---------------
[Station]
   
    # Description of the station location
    location = "your location"
   
    # Latitude in decimal degrees. Negative for southern hemisphere
    latitude = xx.xxxx
    # Longitude in decimal degrees. Negative for western hemisphere.
    longitude = x.xxxx
   
    # Altitude of the station, with unit it is in. This is downloaded from
    # from the station if the hardware supports it.
    altitude = xxx meter
   
    # Set to type of station hardware. There must be a corresponding stanza
    # in this file with a 'driver' parameter indicating the driver to be used.
    station_type = Interceptor
« Last Edit: January 21, 2021, 12:59:46 PM by Gyvate »
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline flygpagen

  • Member
  • *
  • Posts: 29
Re: WH2900 & WeeWX on RBPi - trouble with Interceptor driver configuration
« Reply #2 on: January 21, 2021, 03:08:35 PM »
Hello Gyvate,

Thanks for your reply! Indeed it was, partly, a web server issue. During my trials I had by mistake added Apache as webserver to the RBPi besides Lighttpd. #-o This caused all manners of errors, also on my instances of FR24 and PiAware. Now this is sorted mostly and then I see the WeeWX interface when I go to (local IP) 192.168.0.108/weewx.

sudo tail -f /var/log/syslog now shows WeeWX generating files and copying them to the right location. The .conf is set up as suggested and in the network I added a rule to forward traffic on port 8001 to the RBPi, I disabled that rule (in "Virtual server", Dlink mesh system with somewhat limited possibilities) during the trials and then WeeWX didn't generate anything so it seems that traffic didn't reach the RBPi? The problem that remains is that even though I can see files being generated and copied, WeeWX web interface doesn't update...

WH2900 plus a RBPi on the same network must be a quite common setup. Do I need to create rules for forwarding of the data from the PWS to the RBPi or does it suffice that they both are on the same network?

Code: [Select]
● weewx.service - LSB: weewx weather system
   Loaded: loaded (/etc/init.d/weewx; generated; vendor preset: enabled)
   Active: active (running) since Thu 2021-01-21 19:28:19 CET; 1h 48min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 10068 ExecStop=/etc/init.d/weewx stop (code=exited, status=0/SUCCESS)
  Process: 17237 ExecReload=/etc/init.d/weewx reload (code=exited, status=0/SUCCESS)
  Process: 10134 ExecStart=/etc/init.d/weewx start (code=exited, status=0/SUCCESS)
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/weewx.service
           └─10150 python2 /usr/share/weewx/weewxd --daemon --pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf

jan 21 20:24:55 mooPi python2[10150]: weewx[10150] INFO weewx.restx: CWOP: Posting not enabled.
jan 21 20:24:55 mooPi python2[10150]: weewx[10150] INFO weewx.restx: WOW: Posting not enabled.
jan 21 20:24:55 mooPi python2[10150]: weewx[10150] INFO weewx.restx: AWEKAS: Posting not enabled.
jan 21 20:24:55 mooPi python2[10150]: weewx[10150] INFO __main__: Starting up weewx version 4.3.0
jan 21 20:24:55 mooPi python2[10150]: weewx[10150] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
jan 21 20:24:55 mooPi python2[10150]: weewx[10150] INFO weewx.manager: Starting backfill of daily summaries
jan 21 20:24:55 mooPi python2[10150]: weewx[10150] INFO weewx.engine: Starting main packet loop.
jan 21 20:48:57 mooPi python2[10150]: weewx[10150] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 4.99 seconds
jan 21 20:48:59 mooPi python2[10150]: weewx[10150] INFO weewx.imagegenerator: Generated 15 images for report SeasonsReport in 1.23 seconds
jan 21 20:48:59 mooPi python2[10150]: weewx[10150] INFO weewx.reportengine: Copied 5 files to /var/www/html/weewx
« Last Edit: January 21, 2021, 03:17:41 PM by flygpagen »

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3325
Re: WH2900 & WeeWX on RBPi - trouble with Interceptor driver configuration
« Reply #3 on: January 21, 2021, 03:22:59 PM »
Hello Gyvate,

Thanks for your reply! Indeed it was, partly, a web server issue. During my trials I had by mistake added Apache as webserver to the RBPi besides Lighttpd. #-o This caused all manners of errors, also on my instances of FR24 and PiAware. Now this is sorted mostly and then I see the WeeWX interface when I go to (local IP) 192.168.0.108/weewx.

sudo tail -f /var/log/syslog now shows WeeWX generating files and copying them to the right location. The .conf is set up as suggested and in the network I added a rule to forward traffic on port 8001 to the RBPi, I disabled that rule (in "Virtual server", Dlink mesh system with somewhat limited possibilities) during the trials and then WeeWX didn't generate anything so it seems that traffic didn't reach the RBPi? The problem that remains is that even though I can see files being generated and copied, WeeWX web interface doesn't update...

WH2900 plus a RBPi on the same network must be a quite common setup. Do I need to create rules for forwarding of the data from the PWS to the RBPi or does it suffice that they both are on the same network?
Being in the same subnet should be enough. If this doesn't work, you have some unusual network configuration. Mesh networks can be tricky though; I've seen several hints in this direction here in the forum.

Maybe your Apache is still playing tricks on you (I mean it does what it has been configured for, but if this is what was intended is a different question ... 8-) ).
There should be a file named index.html in the /var/www/weewx/html directory - maybe you need to call it explicitly (http://192.168.0.108/weewx/index.html) ?
What does the weewx.conf say about HTML root ?
Is /var/www/html the html root directory for Apache ? If not you won't get it.
Or for some reason the /var/www/weewx/html directory has not the proper read permissions, so Apache cannot read from there.
ls -l /var/www/weewx/html shows what ?
when you look at the .png files created by the Cheetah-generator, do they show actual data ?
Maybe it's just some Simulator junk being created.

have you activated the station properly ?

# -----------------start of weewx.conf excerpt ----------------------------
[Station]
   
    # Description of the station location
    location = "xxxxxxxxxxxx"
   
    # Latitude in decimal degrees. Negative for southern hemisphere
    latitude = xx.xxxx
    # Longitude in decimal degrees. Negative for western hemisphere.
    longitude = x.xxxx
   
    # Altitude of the station, with unit it is in. This is downloaded from
    # from the station if the hardware supports it.
    altitude = xxx, meter
   
    # Set to type of station hardware. There must be a corresponding stanza
    # in this file with a 'driver' parameter indicating the driver to be used.
    # station_type = Interceptor
    station_type = GW1000    # must be "GW1000" not "gw1000" !!!!
# -----------------end of weewx.conf excerpt ----------------------------

what do you get when you enter at the command line prompt:
PYTHONPATH=/usr/share/weewx python -m user.gw1000 --test-driver   ??


Do you have a stanza in the weewx.conf that reads
# ----------------start of weewx.conf excerpt ----------------------------
[GW1000]
    driver = user.gw1000

    ip_address = xxx.xxx.x.xx   #your GW1000 IP address; only necessary if you have more than one GW1000 active
    poll_interval = 15               #15 seconds, but could be anything between 1 and 300+; I think default is 30 ...
# -----------------end of weewx.conf excerpt ----------------------------

update/correction:
that GW1000 driver thing was out of context - confused this thread with another similar one
but the principle applies: the station type has to be assigned properly in the [station] stanza, and for the driver there has to be a properly filled in driver stanza - here [Interceptor]

« Last Edit: January 22, 2021, 05:31:37 PM by Gyvate »
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline flygpagen

  • Member
  • *
  • Posts: 29
Re: WH2900 & WeeWX on RBPi - trouble with Interceptor driver configuration
« Reply #4 on: January 22, 2021, 12:16:36 PM »
Hi!

Server (Lighttpd) is fine. Apache2 is gone. It's public here: http://81.26.248.120/weewx/
The strange thing is that it has been updated a couple of times, but with several hours between. Syslog shows that weewx has run twice today, at 13:42 and 16:30. But only then. And "0 files copied"
Code: [Select]
Jan 22 13:42:04 mooPi weewx[522] INFO weewx.manager: Added record 2021-01-22 03:15:00 CET (1611281700) to database 'weewx.sdb'
Jan 22 13:42:04 mooPi weewx[522] INFO weewx.manager: Added record 2021-01-22 03:15:00 CET (1611281700) to daily summary in 'weewx.sdb'
Jan 22 13:42:05 mooPi weewx[522] INFO weewx.engine: Garbage collected 3578 objects in 0.04 seconds
Jan 22 13:42:06 mooPi weewx[522] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 1.70 seconds
Jan 22 13:42:12 mooPi weewx[522] INFO weewx.imagegenerator: Generated 30 images for report SeasonsReport in 5.59 seconds
Jan 22 13:42:12 mooPi weewx[522] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx

ls -l shows;
Code: [Select]
-rw-r--r-- 1 root root  2170 jan 22 16:30 celestial.html
-rw-r--r-- 1 root root  5913 jan 22 16:30 daybarometer.png
-rw-r--r-- 1 root root  6042 jan 22 16:30 dayhumin.png
-rw-r--r-- 1 root root  5533 jan 22 16:30 dayhum.png
-rw-r--r-- 1 root root  6035 jan 22 16:30 dayradiation.png
-rw-r--r-- 1 root root  6233 jan 22 16:30 dayrain.png
-rw-r--r-- 1 root root  6292 jan 22 16:30 dayrx.png
-rw-r--r-- 1 root root  7611 jan 22 16:30 daytempdew.png
-rw-r--r-- 1 root root  6592 jan 22 16:30 daytempfeel.png
-rw-r--r-- 1 root root  6211 jan 22 16:30 daytempin.png
-rw-r--r-- 1 root root  8216 jan 22 16:30 daytemp.png
-rw-r--r-- 1 root root  5304 jan 22 16:30 dayuv.png
-rw-r--r-- 1 root root  6010 jan 22 16:30 daywinddir.png
-rw-r--r-- 1 root root  7538 jan 22 16:30 daywind.png
-rw-r--r-- 1 root root  6588 jan 22 16:30 daywindvec.png
-rw-r--r-- 1 root root 11165 jan 22 16:30 dayvolt.png
-rw-r--r-- 1 root root  1150 jan 21 21:20 favicon.ico
drwxr-xr-x 2 root root  4096 jan 20 18:35 font
-rw-r--r-- 1 root root 18003 jan 22 16:30 index.html
-rw-r--r-- 1 root root  8090 jan 22 13:42 monthbarometer.png
-rw-r--r-- 1 root root  6977 jan 22 13:42 monthhumin.png
-rw-r--r-- 1 root root  7429 jan 22 13:42 monthhum.png
-rw-r--r-- 1 root root  5918 jan 22 13:42 monthradiation.png
-rw-r--r-- 1 root root  6071 jan 22 13:42 monthrain.png
-rw-r--r-- 1 root root  5997 jan 22 13:42 monthrx.png
-rw-r--r-- 1 root root  7728 jan 22 13:42 monthtempdew.png
-rw-r--r-- 1 root root  7556 jan 22 13:42 monthtempfeel.png
-rw-r--r-- 1 root root  7391 jan 22 13:42 monthtempin.png
-rw-r--r-- 1 root root  8086 jan 22 13:42 monthtemp.png
-rw-r--r-- 1 root root  5188 jan 22 13:42 monthuv.png
-rw-r--r-- 1 root root  6590 jan 22 13:42 monthwinddir.png
-rw-r--r-- 1 root root  8339 jan 22 13:42 monthwind.png
-rw-r--r-- 1 root root  7618 jan 22 13:42 monthwindvec.png
-rw-r--r-- 1 root root 12303 jan 22 13:42 monthvolt.png
drwxr-xr-x 2 root root  4096 jan 22 16:30 NOAA
-rw-r--r-- 1 root root  5901 jan 22 16:30 rss.xml
-rw-r--r-- 1 root root  5106 jan 21 21:20 seasons.css
-rw-r--r-- 1 root root  6272 jan 21 21:20 seasons.js
-rw-r--r-- 1 root root 11799 jan 22 16:30 statistics.html
-rw-r--r-- 1 root root  1331 jan 22 16:30 tabular.html
-rw-r--r-- 1 root root  2985 jan 22 16:30 telemetry.html
-rw-r--r-- 1 root root  6261 jan 22 16:30 weekbarometer.png
-rw-r--r-- 1 root root  6868 jan 22 16:30 weekhumin.png
-rw-r--r-- 1 root root  7494 jan 22 16:30 weekhum.png
-rw-r--r-- 1 root root  6214 jan 22 16:31 weekradiation.png
-rw-r--r-- 1 root root  6361 jan 22 16:30 weekrain.png
-rw-r--r-- 1 root root  6119 jan 22 16:31 weekrx.png
-rw-r--r-- 1 root root  7360 jan 22 16:30 weektempdew.png
-rw-r--r-- 1 root root  7591 jan 22 16:30 weektempfeel.png
-rw-r--r-- 1 root root  7224 jan 22 16:30 weektempin.png
-rw-r--r-- 1 root root  8371 jan 22 16:30 weektemp.png
-rw-r--r-- 1 root root  5487 jan 22 16:31 weekuv.png
-rw-r--r-- 1 root root  6283 jan 22 16:30 weekwinddir.png
-rw-r--r-- 1 root root  8230 jan 22 16:30 weekwind.png
-rw-r--r-- 1 root root  7351 jan 22 16:31 weekwindvec.png
-rw-r--r-- 1 root root 12189 jan 22 16:31 weekvolt.png
-rw-r--r-- 1 root root  5839 jan 21 22:08 yearbarometer.png
-rw-r--r-- 1 root root  6259 jan 21 22:09 yearhumin.png
-rw-r--r-- 1 root root  5938 jan 21 22:09 yearhum.png
-rw-r--r-- 1 root root  5299 jan 21 22:09 yearradiation.png
-rw-r--r-- 1 root root  5874 jan 21 22:09 yearrain.png
-rw-r--r-- 1 root root  5352 jan 21 22:09 yearrx.png
-rw-r--r-- 1 root root  7104 jan 21 22:08 yeartempdew.png
-rw-r--r-- 1 root root  7212 jan 21 22:08 yeartempfeel.png
-rw-r--r-- 1 root root  6696 jan 21 22:08 yeartempin.png
-rw-r--r-- 1 root root  7470 jan 21 22:09 yeartemp.png
-rw-r--r-- 1 root root  4554 jan 21 22:09 yearuv.png
-rw-r--r-- 1 root root  6059 jan 21 22:09 yearwinddir.png
-rw-r--r-- 1 root root  8271 jan 21 22:09 yearwind.png
-rw-r--r-- 1 root root  6714 jan 21 22:09 yearwindvec.png
-rw-r--r-- 1 root root 11194 jan 21 22:09 yearvolt.png

Debug Python...
Code: [Select]
PYTHONPATH=/usr/share/weewx python -m user.interceptor --debug
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/share/weewx/user/interceptor.py", line 2664, in <module>
    address=options.addr, port=options.port)
  File "/usr/share/weewx/user/interceptor.py", line 1002, in __init__
    AcuriteBridge.Parser(), handler=AcuriteBridge.Handler, **stn_dict)
  File "/usr/share/weewx/user/interceptor.py", line 429, in __init__
    self._server = Consumer.TCPServer(address, port, handler)
  File "/usr/share/weewx/user/interceptor.py", line 584, in __init__
    TCPServer.__init__(self, (address, int(port)), handler)
  File "/usr/lib/python2.7/SocketServer.py", line 417, in __init__
    self.server_bind()
  File "/usr/lib/python2.7/SocketServer.py", line 431, in server_bind
    self.socket.bind(self.server_address)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use

sudo netstat -nlp | grep 8001 shows it being used by Python, if I stop Weewx then the port is free so there is no conflict there.

Regarding GW1000 I have not that driver installed at all. So I guess that is not an issue?
I'm confused. Godbless it's Friday!  \:D/
« Last Edit: January 22, 2021, 12:40:06 PM by flygpagen »

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3325
Re: WH2900 & WeeWX on RBPi - trouble with Interceptor driver configuration
« Reply #5 on: January 22, 2021, 05:58:48 PM »
Hi!

Server (Lighttpd) is fine. Apache2 is gone. It's public here: http://81.26.248.120/weewx/
The strange thing is that it has been updated a couple of times, but with several hours between. Syslog shows that weewx has run twice today, at 13:42 and 16:30. But only then. And "0 files copied"
Code: [Select]
Jan 22 13:42:04 mooPi weewx[522] INFO weewx.manager: Added record 2021-01-22 03:15:00 CET (1611281700) to database 'weewx.sdb'
Jan 22 13:42:04 mooPi weewx[522] INFO weewx.manager: Added record 2021-01-22 03:15:00 CET (1611281700) to daily summary in 'weewx.sdb'
Jan 22 13:42:05 mooPi weewx[522] INFO weewx.engine: Garbage collected 3578 objects in 0.04 seconds
Jan 22 13:42:06 mooPi weewx[522] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 1.70 seconds
Jan 22 13:42:12 mooPi weewx[522] INFO weewx.imagegenerator: Generated 30 images for report SeasonsReport in 5.59 seconds
Jan 22 13:42:12 mooPi weewx[522] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx
so weewx is writing/archiving something into the database. what this something is is still to be verified.
what does weewex.conf say regarding the archiving interval ?

[StdArchive]
   
    # If the station hardware supports data logging then the archive interval
    # will be downloaded from the station. Otherwise, specify it (in seconds).
    archive_interval = nr-of-seconds
data will be archived according to this number
if the number is 300, the interval is every 5 minutes etc.

the very first time all .png files are created at the same time: day...., week...., month..., year....png
the day.....png are updated every archiving interval
the week.....png are updated every hour
the month.....png are updated every full three hours
the year.....png are updated every full 12 hours
the week....png are created every full three hours

so that's still as expected

however there should be graphs painted corresponding to the archiving interval - at least for the day to begin with - and that's not the case (yet)
probably the driver doesn't provide data, or the data doesn't arrive at the server (RPi)
Quote
ls -l shows;
Code: [Select]
-rw-r--r-- 1 root root  2170 jan 22 16:30 celestial.html
-rw-r--r-- 1 root root  5913 jan 22 16:30 daybarometer.png
-rw-r--r-- 1 root root  6042 jan 22 16:30 dayhumin.png
-rw-r--r-- 1 root root  5533 jan 22 16:30 dayhum.png
-rw-r--r-- 1 root root  6035 jan 22 16:30 dayradiation.png
-rw-r--r-- 1 root root  6233 jan 22 16:30 dayrain.png
-rw-r--r-- 1 root root  6292 jan 22 16:30 dayrx.png
-rw-r--r-- 1 root root  7611 jan 22 16:30 daytempdew.png
-rw-r--r-- 1 root root  6592 jan 22 16:30 daytempfeel.png
-rw-r--r-- 1 root root  6211 jan 22 16:30 daytempin.png
-rw-r--r-- 1 root root  8216 jan 22 16:30 daytemp.png
-rw-r--r-- 1 root root  5304 jan 22 16:30 dayuv.png
-rw-r--r-- 1 root root  6010 jan 22 16:30 daywinddir.png
-rw-r--r-- 1 root root  7538 jan 22 16:30 daywind.png
-rw-r--r-- 1 root root  6588 jan 22 16:30 daywindvec.png
-rw-r--r-- 1 root root 11165 jan 22 16:30 dayvolt.png
-rw-r--r-- 1 root root  1150 jan 21 21:20 favicon.ico
drwxr-xr-x 2 root root  4096 jan 20 18:35 font
-rw-r--r-- 1 root root 18003 jan 22 16:30 index.html
-rw-r--r-- 1 root root  8090 jan 22 13:42 monthbarometer.png
-rw-r--r-- 1 root root  6977 jan 22 13:42 monthhumin.png
-rw-r--r-- 1 root root  7429 jan 22 13:42 monthhum.png
-rw-r--r-- 1 root root  5918 jan 22 13:42 monthradiation.png
-rw-r--r-- 1 root root  6071 jan 22 13:42 monthrain.png
-rw-r--r-- 1 root root  5997 jan 22 13:42 monthrx.png
-rw-r--r-- 1 root root  7728 jan 22 13:42 monthtempdew.png
-rw-r--r-- 1 root root  7556 jan 22 13:42 monthtempfeel.png
-rw-r--r-- 1 root root  7391 jan 22 13:42 monthtempin.png
-rw-r--r-- 1 root root  8086 jan 22 13:42 monthtemp.png
-rw-r--r-- 1 root root  5188 jan 22 13:42 monthuv.png
-rw-r--r-- 1 root root  6590 jan 22 13:42 monthwinddir.png
-rw-r--r-- 1 root root  8339 jan 22 13:42 monthwind.png
-rw-r--r-- 1 root root  7618 jan 22 13:42 monthwindvec.png
-rw-r--r-- 1 root root 12303 jan 22 13:42 monthvolt.png
drwxr-xr-x 2 root root  4096 jan 22 16:30 NOAA
-rw-r--r-- 1 root root  5901 jan 22 16:30 rss.xml
-rw-r--r-- 1 root root  5106 jan 21 21:20 seasons.css
-rw-r--r-- 1 root root  6272 jan 21 21:20 seasons.js
-rw-r--r-- 1 root root 11799 jan 22 16:30 statistics.html
-rw-r--r-- 1 root root  1331 jan 22 16:30 tabular.html
-rw-r--r-- 1 root root  2985 jan 22 16:30 telemetry.html
-rw-r--r-- 1 root root  6261 jan 22 16:30 weekbarometer.png
-rw-r--r-- 1 root root  6868 jan 22 16:30 weekhumin.png
-rw-r--r-- 1 root root  7494 jan 22 16:30 weekhum.png
-rw-r--r-- 1 root root  6214 jan 22 16:31 weekradiation.png
-rw-r--r-- 1 root root  6361 jan 22 16:30 weekrain.png
-rw-r--r-- 1 root root  6119 jan 22 16:31 weekrx.png
-rw-r--r-- 1 root root  7360 jan 22 16:30 weektempdew.png
-rw-r--r-- 1 root root  7591 jan 22 16:30 weektempfeel.png
-rw-r--r-- 1 root root  7224 jan 22 16:30 weektempin.png
-rw-r--r-- 1 root root  8371 jan 22 16:30 weektemp.png
-rw-r--r-- 1 root root  5487 jan 22 16:31 weekuv.png
-rw-r--r-- 1 root root  6283 jan 22 16:30 weekwinddir.png
-rw-r--r-- 1 root root  8230 jan 22 16:30 weekwind.png
-rw-r--r-- 1 root root  7351 jan 22 16:31 weekwindvec.png
-rw-r--r-- 1 root root 12189 jan 22 16:31 weekvolt.png
-rw-r--r-- 1 root root  5839 jan 21 22:08 yearbarometer.png
-rw-r--r-- 1 root root  6259 jan 21 22:09 yearhumin.png
-rw-r--r-- 1 root root  5938 jan 21 22:09 yearhum.png
-rw-r--r-- 1 root root  5299 jan 21 22:09 yearradiation.png
-rw-r--r-- 1 root root  5874 jan 21 22:09 yearrain.png
-rw-r--r-- 1 root root  5352 jan 21 22:09 yearrx.png
-rw-r--r-- 1 root root  7104 jan 21 22:08 yeartempdew.png
-rw-r--r-- 1 root root  7212 jan 21 22:08 yeartempfeel.png
-rw-r--r-- 1 root root  6696 jan 21 22:08 yeartempin.png
-rw-r--r-- 1 root root  7470 jan 21 22:09 yeartemp.png
-rw-r--r-- 1 root root  4554 jan 21 22:09 yearuv.png
-rw-r--r-- 1 root root  6059 jan 21 22:09 yearwinddir.png
-rw-r--r-- 1 root root  8271 jan 21 22:09 yearwind.png
-rw-r--r-- 1 root root  6714 jan 21 22:09 yearwindvec.png
-rw-r--r-- 1 root root 11194 jan 21 22:09 yearvolt.png
that's all ok so far - see remarks above
Quote
Debug Python...
Code: [Select]
PYTHONPATH=/usr/share/weewx python -m user.interceptor --debug
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/share/weewx/user/interceptor.py", line 2664, in <module>
    address=options.addr, port=options.port)
  File "/usr/share/weewx/user/interceptor.py", line 1002, in __init__
    AcuriteBridge.Parser(), handler=AcuriteBridge.Handler, **stn_dict)
  File "/usr/share/weewx/user/interceptor.py", line 429, in __init__
    self._server = Consumer.TCPServer(address, port, handler)
  File "/usr/share/weewx/user/interceptor.py", line 584, in __init__
    TCPServer.__init__(self, (address, int(port)), handler)
  File "/usr/lib/python2.7/SocketServer.py", line 417, in __init__
    self.server_bind()
  File "/usr/lib/python2.7/SocketServer.py", line 431, in server_bind
    self.socket.bind(self.server_address)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use
two possibilities:
a) you are using the wrong command / python version
try using python2 or python3 instead of just python in the command line
if the output doesn't change, the last line of the message should be taken more serious -
it then indicates that there is a conflict with another application listening at the same port your console sends its data to
you can change your port in WSView to 8000 and in weewx.conf accordingly.

Quote
sudo netstat -nlp | grep 8001 shows it being used by Python, if I stop Weewx then the port is free so there is no conflict there.

Regarding GW1000 I have not that driver installed at all. So I guess that is not an issue?
I'm confused. Godbless it's Friday!  \:D/
the GW1000 remark was posted in the wrong thread - I made a corresponding remark at the bottom of the post

would you mind sending 4 things

a) the syslog for a period of one hour after the weewx restart
sudo /etc/init.d/weewx restart
b) your weewx.conf
need to see if all stanzas have been filled in properly
c) your weewx.sdb (rename it to weewx.sdb.doc or weewx.doc or create a zip file, otherwise the forum software will not accept the upload) - for location see weewx.conf [DatabaseTypes] stanza
usually /var/lib/weewx
then I can check the content and maybe backtrace from there what's wrong
d) a screen copy of your WSView setup page for custom server/Customized
« Last Edit: January 22, 2021, 06:05:55 PM by Gyvate »
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline flygpagen

  • Member
  • *
  • Posts: 29
Re: WH2900 & WeeWX on RBPi - trouble with Interceptor driver configuration
« Reply #6 on: January 23, 2021, 07:24:12 AM »
Hi!

First of all, thanks for all your effort Gyvate!

All requested attachments are provided here. The syslog is from yesterday, I did a reload and then let things be for the evening. I've changed the port in the settings and in VS view and the effect is the same so only WeeWX using it as far as I can tell.

 [ You are not allowed to view attachments ]
« Last Edit: January 23, 2021, 07:27:03 AM by flygpagen »

Offline flygpagen

  • Member
  • *
  • Posts: 29
Re: WH2900 & WeeWX on RBPi - trouble with Interceptor driver configuration
« Reply #7 on: January 23, 2021, 12:59:38 PM »
Dunno if this helps but I queried the station as a GW1000 (I have got the impression that when setting up the custom service in WS View the station acts as a GW1000 would?). This is the response;

Code: [Select]
sudo PYTHONPATH=/usr/share/weewx python2 -m user.interceptor --test-gw1000u-response
ts: 1611424627
serial: 0000000000000000
server: box.weatherdirect.com
ping_interval: 240
brightness: 4
sensor_interval: 1
history_interval: 1
last_address: 0
gateway_reg_response: 00 00 00 00 00 00 00 00 62 6f 78 2e 77 65 61 74 68 65 72 64 69 72 65 63 74 2e 63 6f 6d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 62 6f 78 2e 77 65 61 74 68 65 72 64 69 72 65 63 74 2e 63 6f 6d 00 62 6f 78 2e 77 65 61 74 68 65 72 64 69 72 65 63 74 2e 63 6f 6d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff
gateway_ping_response: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f0
station_reg_response: 01 00 00 00 00 00 00 00 00 00 30 00 0f 00 00 00 0f 00 00 00 77 00 0e ff 18 57 07 23 01 21 53 07 03 00 00 00 07 f2
station_ping_response: 01 00 00 00 00 00 00 00 00 00 32 00 0b 00 00 00 0f 00 00 00 00 00 00 00 18 57 07 23 01 21 53 01 03 00 00 00 01 66

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3325
Re: WH2900 & WeeWX on RBPi - trouble with Interceptor driver configuration
« Reply #8 on: January 24, 2021, 12:51:52 PM »
we continued working "offline" and the issue was finally discovered -
the entry
[Interceptor]
    # The driver to use:
    driver = user.interceptor

    device_type = ecowitt-client
    port = 8010
    iface = wlan0

did the job - weewx needed to be told on which of the two network interfaces of the RPi to listen for the WH2900 console postings.
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline flygpagen

  • Member
  • *
  • Posts: 29
Re: WH2900 & WeeWX on RBPi - trouble with Interceptor driver configuration
« Reply #9 on: January 24, 2021, 02:34:38 PM »
Indeed it was solved and the snippet above did the trick - note that the port is what I use, it can be anything of your choice that is not occupied by another service. During the trials I did a number of different configuration changes and tried out several tools, among them TCPFlow that allows you to see realtime traffic on a givet port, with this I could see what effect different settings in WS View had on the data sent from the station.

This was a problem that I maybe could have solved if I'd had more knowledge of Linux, but I don't. A huge thank you to Gyvate for all his time and effort in solving this!  =D&gt; There will be more to follow.

 

anything