New driver for Ambient ObserverIP

1,987 views
Skip to first unread message

dkwm...@gmail.com

unread,
Apr 9, 2015, 2:31:58 PM4/9/15
to weewx-de...@googlegroups.com
I have written a driver for the Ambient ObserverIP which is included in three of Ambient's weather stations, the WS-1400-IP, WS-1200-IP and WS-1400-IP-WEATHERBRIDGE . I have been using the driver for about three months and thought I would make it available but wanted to get some insight as to how much work I should put in to making the one driver mode of operation user friendly.

The driver will operate in two modes. The first, which is much more straightforward, is the direct mode which communicates directly with the observerip. The problem with this is that the device provides 16 second averages and the polled data could be up to 16 seconds old. There is no way to tell. I know that by default weewx only saves 5 minute averages so having the data time shifted by up to 16 sec really does not matter that much. However it offends my sense of accuracy.

The second mode of operation which I would like some thoughts on is an indirect mode. The observerip is meant to update directly to Wunderground. The indirect mode intercepts those updates which are time stamped and uses that data. This, however, requires a local web server to receive the updates, and either the ability of the router to do destination NAT to direct the updates to the web server or the ability of the local DNS server/DNS proxy to direct rtupdate.wunderground.com to the IP address of the local web server. I have never used a consumer router without changing to open source software so I do not know in how many cases this would even be possible. So, I need to decide how much work to put in to documenting the setup for the indirect mode. Any thoughts on how worthwhile this mode would be for the general user base, or probably more precisely, users who may try weewx with one of these stations?

mwall

unread,
Apr 9, 2015, 10:15:20 PM4/9/15
to weewx-de...@googlegroups.com
On Thursday, April 9, 2015 at 2:31:58 PM UTC-4, David Malick wrote:
I have written a driver for the Ambient ObserverIP which is included in three of Ambient's weather stations, the WS-1400-IP, WS-1200-IP and WS-1400-IP-WEATHERBRIDGE . I have been using the driver for about three months and thought I would make it available but wanted to get some insight as to how much work I should put in to making the one driver mode of operation user friendly.


good stuff david!

do the two modes share much code?  you might want to publish two different drivers. 

post the driver here (or on github or whatever) and you'll probably get some users with hardware who can test it.  we can also do some basic code review.

when you feel it is stable, add an entry to the weewx wiki.  or consider adding it to weewx as a standard driver.

ambient seems to be pushing the ws1200/ws1400 as the successor to the 10x0/20x0/30x0 series.

m

David Malick

unread,
Apr 11, 2015, 2:14:25 AM4/11/15
to weewx-de...@googlegroups.com
The two modes share most of the code so maintaining two drivers would be great deal of extra work.

As of now the driver is on github at https://github.com/dkmcode/weewx-observerip. Any testing and code review people could do would be great. The driver class has bin very stable for me. I've been running it in indirect mode since February, 20 without issue. The configurator however is a work in progress. Need to decide what functionality it makes sense to keep since there is a web interface on the device that can do most of the same things.

BertSP

unread,
May 27, 2015, 11:52:15 AM5/27/15
to weewx-de...@googlegroups.com
David,
I am reading your post with interest but am a noob with WeeWx. I run a WS-1200IP and a meteobridge, with the IP sending to WU and the Meteobridge sending to CWOP. I have not had a chance to play with WeeWX yet and just looking under the hood. I know that meteobridge can execute scripts that will retrieve the data to a website ie.(http://xxx.xxx..com/upload.php?t=[th0temp-avg5]&h=[th0hum-avg5]&tmax=[th0temp-max5]&tmin=[th0temp-min5]&w=[wind0wind-avg5]&g=[wind0wind-max5]&p=[thb0press-avg5]&b=[wind0dir-avg5]&r=[rain0total-sumday]&rr=[rain0rate-avg5]&s=[sol0rad-avg5]&year=[YYYY]&month=[MM]&day=[DD]&hour=[hh]&minute=[mm]&seconds=[ss]. Can such a method be used by WeeWx, or is your driver similar to meteobridge's retrieval of the O-IP information. If I sound ignorant, its because I am. The only reason I am interested in WeeWX is that it allows you to calculate the different pressures individually and hopefully using custom code (for the SLP), as the Altimeter is well defined.

Doug Hall

unread,
Jul 20, 2015, 3:52:54 PM7/20/15
to weewx-de...@googlegroups.com
I've been away from this group and just discovered this post. I've been using weewx for about a year with an Ambient Weather WS-2095. The 2095 only lasted a year, and I'm not interested in putting any more money into that platform. I've read better things about the WS-1400-IP, but I was not initially interested since it only worked with WU. I'm definitely interested in this driver. David, are you still using this? Anyone else using the WS-1400-IP with David's driver? The way I read it weewx gets the wx info directly from the ObserverIP, and Weather Underground may (or may not?) be in the picture. Is this correct? I'm not particularly opposed to WU but I already have a linux box here at home that has been faithfully serving up weewx info for the last year. So I guess my question is this: when using this driver am I eliminating WU completely, or does the ObserverIP continue to send data there as well?

I've been holding off on ordering the 1400-IP but if it works smoothly with weewx I'll get one.

Regards,
Doug


On Thursday, April 9, 2015 at 2:31:58 PM UTC-4, David Malick wrote:

BertSP

unread,
Aug 28, 2015, 6:09:20 PM8/28/15
to weewx-development
Doug,

I have a WS-1200IP (similar to your future 1400) and am trying to get this Driver loaded and working. I am a Linux noob, and I cannot get help so far. If you do get your 1400, let me know how you made out with this driver and hopefully I can load mine up and get it working with your help. I am using the O-IP and Meteobridge now.

Guido Kwiczor

unread,
Sep 18, 2015, 3:24:43 AM9/18/15
to weewx-development
Hi

I have the WH2600, which also uses ObserverIP. Unfortunately i am not able to get the driver running. I tried it with weewx 3.2.1.. Is it right, that there is no "setup.py" method? I used "wee_extension", but it didn't work... . If anyone can show me the right direction, please let me know. Thanks in advance.
Guido

L'Oratge Benissa

unread,
Nov 10, 2015, 2:35:16 PM11/10/15
to weewx-development
Hi:

I have a WH-2600 runing under weewx v 3.2.0 with your driver for about one month. All works well but sometimes the driver stops working causing weewx also stops. This is the sysem log output:

Nov 10 18:48:36 radxa weewx[2201]: engine: Shutting down StdReport thread
Nov 10 18:48:36 radxa weewx[2201]: engine: Caught unrecoverable exception in engine:
Nov 10 18:48:36 radxa weewx[2201]:     ****  timed out
Nov 10 18:48:36 radxa weewx[2201]:     ****  Traceback (most recent call last):
Nov 10 18:48:36 radxa weewx[2201]:     ****    File "/usr/share/weewx/bin/weewx/engine.py", line 842, in main
Nov 10 18:48:36 radxa weewx[2201]:     ****      engine.run()
Nov 10 18:48:36 radxa weewx[2201]:     ****    File "/usr/share/weewx/bin/weewx/engine.py", line 182, in run
Nov 10 18:48:36 radxa weewx[2201]:     ****      for packet in self.console.genLoopPackets():
Nov 10 18:48:36 radxa weewx[2201]:     ****    File "/usr/share/weewx/bin/weewx/drivers/observerip.py", line 460, in genLoopPackets
Nov 10 18:48:36 radxa weewx[2201]:     ****      data = self.get_data_direct()
Nov 10 18:48:36 radxa weewx[2201]:     ****    File "/usr/share/weewx/bin/weewx/drivers/observerip.py", line 500, in get_data_direct
Nov 10 18:48:36 radxa weewx[2201]:     ****      data = self.obshardware.data()
Nov 10 18:48:36 radxa weewx[2201]:     ****    File "/usr/share/weewx/bin/weewx/drivers/observerip.py", line 279, in data
Nov 10 18:48:36 radxa weewx[2201]:     ****      return self.page_to_dict('http://%s/livedata.htm' % self.ipaddr())
Nov 10 18:48:36 radxa weewx[2201]:     ****    File "/usr/share/weewx/bin/weewx/drivers/observerip.py", line 185, in page_to_dict
Nov 10 18:48:36 radxa weewx[2201]:     ****      for line in response:
Nov 10 18:48:36 radxa weewx[2201]:     ****    File "/usr/lib/python2.7/socket.py", line 530, in next
Nov 10 18:48:36 radxa weewx[2201]:     ****      line = self.readline()
Nov 10 18:48:36 radxa weewx[2201]:     ****    File "/usr/lib/python2.7/socket.py", line 447, in readline
Nov 10 18:48:36 radxa weewx[2201]:     ****      data = self._sock.recv(self._rbufsize)
Nov 10 18:48:36 radxa weewx[2201]:     ****    File "/usr/lib/python2.7/httplib.py", line 573, in read
Nov 10 18:48:36 radxa weewx[2201]:     ****      s = self.fp.read(amt)
Nov 10 18:48:36 radxa weewx[2201]:     ****    File "/usr/lib/python2.7/socket.py", line 380, in read
Nov 10 18:48:36 radxa weewx[2201]:     ****      data = self._sock.recv(left)
Nov 10 18:48:36 radxa weewx[2201]:     ****  timeout: timed out
Nov 10 18:48:36 radxa weewx[2201]:     ****  Exiting.

I have a scritp in crontab checking every 6 minutes if weewx is runing ok and starting it again if it has stopped but I would like to fix the driver problem.

Could you help me, please. Thank you

mwall

unread,
Nov 12, 2015, 11:17:17 PM11/12/15
to weewx-development
On Tuesday, November 10, 2015 at 2:35:16 PM UTC-5, L'Oratge Benissa wrote:
I have a WH-2600 runing under weewx v 3.2.0 with your driver for about one month. All works well but sometimes the driver stops working causing weewx also stops. This is the sysem log output:
 
I have a scritp in crontab checking every 6 minutes if weewx is runing ok and starting it again if it has stopped but I would like to fix the driver problem.

Could you help me, please. Thank you

the driver needs a try block around the direct reads.  please try observerip.py from this repository:

https://github.com/matthewwall/weewx-observerip

warning! this is untested code (i do not have an observerip on which to test).

if that works maybe david could incorporate the changes into his master.

m

L'Oratge Benissa

unread,
Nov 14, 2015, 3:25:14 PM11/14/15
to weewx-development
It's the same as I thought. Since I've included the try block haven't had any failure. Anyway I think you've implemented more improvements, so I'll try your modified driver

ulises sanchez

unread,
Nov 16, 2015, 7:35:30 AM11/16/15
to weewx-development
 I have read the thread and I have followed the instructions on your web: the problem is that I don't know how to install the driver in py and I don't find clear information about the method.
would you mind uploading a step by step tutorial 'for dummies', I'd be eternally grateful.
thanks in advance.

mwall

unread,
Nov 16, 2015, 10:04:50 AM11/16/15
to weewx-development
On Monday, November 16, 2015 at 7:35:30 AM UTC-5, ulises sanchez wrote:

 I have read the thread and I have followed the instructions on your web: the problem is that I don't know how to install the driver in py and I don't find clear information about the method.
would you mind uploading a step by step tutorial 'for dummies', I'd be eternally grateful.
thanks in advance.

1) install weewx from .deb package.  choose the simulator as the driver. 

sudo dpkg -i weewx_X.Y.Z-R_all.deb

2) ensure that weewx is not running.

sudo /etc/init.d/weewx stop

3) clone the observerip repository

git clone https://github.com/matthewwall/weewx-observerip.git

4) run the extension installer

wee_extension --install weewx-observerip

5) select the observerip driver

wee_config --reconfigure --driver=user.observerip

6) start weewx

sudo /etc/init.d/weewx start

m

ulises sanchez

unread,
Nov 17, 2015, 1:43:46 PM11/17/15
to weewx-development
Thanks a lot, I am going to try it tomorrow. 

ulises sanchez

unread,
Nov 20, 2015, 4:06:33 AM11/20/15
to weewx-development
 Excuse me for the inconvenience, I have followed your indications but when I install the driver I always get the same error:
root@Molino1:/home/andres# wee_extension --install weewx-observerip
Request to install 'weewx-observerip'
Traceback (most recent call last):
  File "/usr/bin/wee_extension", line 83, in <module>
    main()
  File "/usr/bin/wee_extension", line 75, in main
    ext.install_extension(options.install)
  File "/usr/share/weewx/weecfg/extension.py", line 114, in install_extension
    self.install_from_dir(extension_path)
  File "/usr/share/weewx/weecfg/extension.py", line 169, in install_from_dir
    sys.exit("Unknown destination for file %s" % source_tuple)
TypeError: not all arguments converted during string formatting
I have tried your master driver, your clone driver... but I don't achieve that it works.
I will appreciate your help.
thanks
P.S. I need to install the driver for indirect mode?

mwall

unread,
Nov 20, 2015, 6:15:53 AM11/20/15
to weewx-development


On Friday, November 20, 2015 at 4:06:33 AM UTC-5, ulises sanchez wrote:
  File "/usr/share/weewx/weecfg/extension.py", line 169, in install_from_dir
    sys.exit("Unknown destination for file %s" % source_tuple)
TypeError: not all arguments converted during string formatting
I have tried your master driver, your clone driver... but I don't achieve that it works.
I will appreciate your help.
thanks
P.S. I need to install the driver for indirect mode?

please try pulling the latest weewx-observerip then do the 'sudo wee_extension --install ...' again.

there was a problem with the apache files in install.py and there was a syntax error in observerip.py

m

L'Oratge Benissa

unread,
Nov 20, 2015, 12:26:56 PM11/20/15
to weewx-development
Hi:

I've noticed that sometimes the ObserverIP enters in a rare state and doesn't receive neither indoor and outdoor units until it's manually rebooted.
Wondered if the driver reboot function has been tested and can be used to automatically reboot the ObserverIP when this failure is detected.

Thanks

ulises sanchez

unread,
Nov 21, 2015, 3:56:41 AM11/21/15
to weewx-development
I don't want to disturb more :)
I have followed your steps, now the driver seems to install well, but the page doesn't update I have read the weewx.conf and everything is correct.I don't know what I do badly.
at any way, thanks for your help 

L'Oratge Benissa

unread,
Nov 21, 2015, 4:15:23 AM11/21/15
to weewx-development
You should see in the system log the weewx messages. It should helps you to find the problem.

Try "cat /var/log/syslog | grep weewx" to see the last weewx messages.

ulises sanchez

unread,
Nov 21, 2015, 6:47:30 AM11/21/15
to weewx-development
I finally managed to install the driver :)
They were the units; I went to usr/share/weewx/user and I have modified the units to metric in observerip.py, although the measures aren't right at least I can receive data from observerip, now I will try to install in the synology.
thanks to everybody that helped me. 

L'Oratge Benissa

unread,
Nov 21, 2015, 7:47:21 AM11/21/15
to weewx-development
You shouldn't modify the units in observerip.py!!!! You have to set the units to imperial in the observerip web interface and then, in weewx, set to metric if you wish to. Otherwise you will get wrong readings from the station.

ulises sanchez

unread,
Nov 21, 2015, 10:59:15 AM11/21/15
to weewx-development
One more time, thanks, It would have taken a week to find the error

Jerry Deibel

unread,
Dec 14, 2015, 12:54:16 PM12/14/15
to weewx-development
David,
I have Ambient WS-1400 IP and I am having a problem loading your ObserverIP driver.
I downloaded Weewx got it running with the Simulator and  displayed the Sim weather page then I STOPPED it.
I followed your procedure .....


1) install weewx from .deb package.  choose the simulator as the driver.   
sudo dpkg -i weewx_X.Y.Z-R_all.deb                            OK
2) ensure that weewx is not running.
sudo /etc/init.d/weewx stop                                   OK
3) clone the observerip repository
4) run the extension installer
wee_extension --install weewx-observerip                GET THE ERROR BELOW
5) select the observerip driver
wee_config --reconfigure --driver=user.observerip
6) start weewx
sudo /etc/init.d/weewx start

When I run #4  wee_extension --install weewx-observerip  I GET
jerry@jerry-Aspire-XC-603 ~/weewx-observerip $ wee_extension --install weewx-observerip

Request to install 'weewx-observerip'
Traceback (most recent call last):
  File "/usr/bin/wee_extension", line 83, in <module>
    main()
  File "/usr/bin/wee_extension", line 75, in main
    ext.install_extension(options.install)
  File "/usr/share/weewx/weecfg/extension.py", line 118, in install_extension
    raise InstallError("Extension '%s' not found." % extension_path)
weecfg.extension.InstallError: Extension 'weewx-observerip' not found.

I went to the weewx-observerip directory to run  the   "wee_extension --install weewx-observerip"
I have removed all the files and starting over to no avail.
Jerry 

mwall

unread,
Dec 14, 2015, 4:46:37 PM12/14/15
to weewx-development
On Monday, December 14, 2015 at 12:54:16 PM UTC-5, Jerry Deibel wrote:
I went to the weewx-observerip directory to run  the   "wee_extension --install weewx-observerip"

the '--install' option expects either a directory or a filename:

wee_extension --install /path/to/weewx-observerip

does not matter where you are when you invoke wee_extension, as long as the string you feed to '--install' resolves to a directory or file.

m

Jerry Deibel

unread,
Dec 14, 2015, 5:14:50 PM12/14/15
to weewx-development
David,
I thought I kinda of knew my way arouind linux (mint 17.1)
The ...git clone https://github.com/matthewwall/weewx-observerip.git
was placed in /home/jerry/weewx-observerip ( files are /bin /uti install.py etc etc..)
I then did.....
    wee-extension --install /jerry/weewx-obsereverip and I get

Request to install '/jerry/weewx-observerip'

Traceback (most recent call last):
  File "/usr/bin/wee_extension", line 83, in <module>
    main()
  File "/usr/bin/wee_extension", line 75, in main
    ext.install_extension(options.install)
  File "/usr/share/weewx/weecfg/extension.py", line 118, in install_extension
    raise InstallError("Extension '%s' not found." % extension_path)
weecfg.extension.InstallError: Extension '/jerry/weewx-observerip' not found.

What am I missing?  Where is the driver located?
Jerry

mwall

unread,
Dec 14, 2015, 5:27:51 PM12/14/15
to weewx-development
On Monday, December 14, 2015 at 5:14:50 PM UTC-5, Jerry Deibel wrote:
I thought I kinda of knew my way arouind linux (mint 17.1)
The ...git clone https://github.com/matthewwall/weewx-observerip.git
was placed in /home/jerry/weewx-observerip ( files are /bin /uti install.py etc etc..)
I then did.....
    wee-extension --install /jerry/weewx-obsereverip

wee_extension --install /home/jerry/weewx-observerip

or, if you are in the directory /home/jerry,

wee_extension --install weewx-observerip
 

Jerry Deibel

unread,
Dec 14, 2015, 6:17:55 PM12/14/15
to weewx-development
David,

I tried something else waiting for your reply.

I once again deleted everything (weewx).
I made a directory in my home directory      ..   weewx
I copied  this to it  weewx-observerip-master.tar.gz
MY COMMANDS and ERROR is...
jerry@jerry-Aspire-XC-603 ~/weewx $ wee_extension --install weewx-observerip-master.tar.gzRequest to install 'weewx-observerip-master.tar.gz'
Extracting from tarball weewx-observerip-master.tar.gz

Traceback (most recent call last):
  File "/usr/bin/wee_extension", line 83, in <module>
    main()
  File "/usr/bin/wee_extension", line 75, in main
    ext.install_extension(options.install)
  File "/usr/share/weewx/weecfg/extension.py", line 109, in install_extension
    self.install_from_dir(extension_dir)
  File "/usr/share/weewx/weecfg/extension.py", line 167, in install_from_dir
    shutil.copy(source_path, destination_path)
  File "/usr/lib/python2.7/shutil.py", line 119, in copy
    copyfile(src, dst)
  File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/usr/share/weewx/user/observerip.py'
 
PERMISSION DENIED ???

Any help?
Jerry


On Thursday, April 9, 2015 at 2:31:58 PM UTC-4, David Malick wrote:

mwall

unread,
Dec 14, 2015, 6:34:11 PM12/14/15
to weewx-development
On Monday, December 14, 2015 at 6:17:55 PM UTC-5, Jerry Deibel wrote:
IOError: [Errno 13] Permission denied: '/usr/share/weewx/user/observerip.py'
 
PERMISSION DENIED ???

you did a deb install, so the driver will end up in a directory owned by root.  so use sudo:

sudo wee_extension --install weewx-observerip-master.tar.gz

m

Jerry Deibel

unread,
Dec 15, 2015, 11:14:58 AM12/15/15
to weewx-development
Ok,  using sudo  wee_extension ........ worked,  BUT I did get this error....type error: not all string
arguments converted during string formatting.
Anyway ,  I continued on with the .......wee_config --reconfigure --driver=user.observerip
and the observerip was one of the options..  I selected it and restarted weewx and the data was on
the web page  (file:///var/www/weewx/index.html).
A question I have is how do I get the data to a web page that is allways updated.  The file:///var/ww ...etc is only updated
if I reload it.
I would like to see it in real time constantly being updated.
Also, weewx crashed in the middle of the night with the following error..
  Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]: engine: Shutting down StdReport thread
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]: engine: Caught unrecoverable exception in engine:
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****  could not convert string to float: ----
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****  Traceback (most recent call last):
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****    File "/usr/share/weewx/weewx/engine.py", line 848, in main
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****      engine.run()
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****    File "/usr/share/weewx/weewx/engine.py", line 182, in run
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****      for packet in self.console.genLoopPackets():
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****    File "/usr/share/weewx/user/observerip.py", line 464, in genLoopPackets
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****      packet.update(self.parse_page(data))
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****    File "/usr/share/weewx/user/observerip.py", line 511, in parse_page
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****      packet[obs] = self.map[obs][1](data[self.map[obs][0]])
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****    File "/usr/share/weewx/weeutil/weeutil.py", line 1109, in to_float
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****      return float(x) if x is not None else None
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****  ValueError: could not convert string to float: ----
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****  Exiting.

Convert string error almost like on the install of the driver????
I restarted it this morning and it is still running ok
Jerry



mwall

unread,
Dec 15, 2015, 11:33:13 AM12/15/15
to weewx-development
On Tuesday, December 15, 2015 at 11:14:58 AM UTC-5, Jerry Deibel wrote:
Ok,  using sudo  wee_extension ........ worked,  BUT I did get this error....type error: not all string
arguments converted during string formatting.

please copy/paste directly from the log.  paraphrasing is not helpful.

 
Anyway ,  I continued on with the .......wee_config --reconfigure --driver=user.observerip
and the observerip was one of the options..  I selected it and restarted weewx and the data was on
the web page  (file:///var/www/weewx/index.html).
A question I have is how do I get the data to a web page that is allways updated.  The file:///var/ww ...etc is only updated
if I reload it.
I would like to see it in real time constantly being updated.

install an extension such as meso-wx

or use the mqtt extension and write your own websocket subscriber.

m

mwall

unread,
Dec 17, 2015, 3:26:51 PM12/17/15
to weewx-development
On Tuesday, December 15, 2015 at 11:14:58 AM UTC-5, Jerry Deibel wrote:
Ok,  using sudo  wee_extension ........ worked,  BUT I did get this error....type error: not all string
arguments converted during string formatting.

this was an installer bug.  fixed at b38d1f05ab38f94797eb392b9b1fc63915b15cfa
 
Also, weewx crashed in the middle of the night with the following error..
  Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]: engine: Shutting down StdReport thread
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]: engine: Caught unrecoverable exception in engine:
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****  could not convert string to float: ----
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****  Traceback (most recent call last):
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****    File "/usr/share/weewx/weewx/engine.py", line 848, in main
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****      engine.run()
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****    File "/usr/share/weewx/weewx/engine.py", line 182, in run
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****      for packet in self.console.genLoopPackets():
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****    File "/usr/share/weewx/user/observerip.py", line 464, in genLoopPackets
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****      packet.update(self.parse_page(data))
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****    File "/usr/share/weewx/user/observerip.py", line 511, in parse_page
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****      packet[obs] = self.map[obs][1](data[self.map[obs][0]])
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****    File "/usr/share/weewx/weeutil/weeutil.py", line 1109, in to_float
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****      return float(x) if x is not None else None
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****  ValueError: could not convert string to float: ----
Dec 15 03:38:05 jerry-Aspire-XC-603 weewx[18282]:     ****  Exiting.
 
the observerip driver was not dealing with the case where a value in the web page is non-numeric, i.e., '----'

fixed in the observerip driver at 645d855435545e2271f81b7a3c715d8e29f65691 in driver version 0.5mw

m

Jerry Deibel

unread,
Dec 19, 2015, 4:55:12 PM12/19/15
to weewx-development
Is there a new driver to fix the installer bug?  I don't understand  ....fixed at b38d1f05ab38f94797eb392b9b1fc63915b15cfa
Where is it located as 
I reinstalled everything, but  got the same error message
which was   ......
Request to install 'weewx-observerip-master.tar.gz'
Extracting from tarball weewx-observerip-master.tar.gz
Traceback (most recent call last):
  File "/usr/bin/wee_extension", line 83, in <module>
    main()
  File "/usr/bin/wee_extension", line 75, in main
    ext.install_extension(options.install)
  File "/usr/share/weewx/weecfg/extension.py", line 109, in install_extension
    self.install_from_dir(extension_dir)
  File "/usr/share/weewx/weecfg/extension.py", line 171, in install_from_dir

    sys.exit("Unknown destination for file %s" % source_tuple)
TypeError: not all arguments converted during string formatting

Jerry

gjr80

unread,
Dec 19, 2015, 11:40:58 PM12/19/15
to weewx-development
Hi,

There are two changes going on here; firstly commit b38d1f05ab38f94797eb392b9b1fc63915b15cfa to the weewx/weewx repositry fixed a bug in the weewx extension installer (extension.py). Secondly, commit 645d855435545e2271f81b7a3c715d8e29f65691 to the mwall/weewx-observerip repositry fixed a bug in the observerip driver (observerip.py).

If you just re-downloaded the latest weewx tar.gz (3.3.1) (or used a previous download) and installed weewx again, then it will have used the old extension.py; commits are usually only rolled into the release packages each time a release is made, so commit
b38d1f05ab38f94797eb392b9b1fc63915b15cfa won't have made it into a release yet. The easiest way to use the updated extension.py is to obtain the updated extension.py from the weewx repositry here, copy it over the top of your existing extension.py (should be under the /home/weewx/bin/weecfg folder) and then install the extension. The safest way would be to clone the weewx repositry in case there were other dependencies, but probably overkill and unnecessarily complicated for this case.

To use the new observerip driver you will need to obtain it from the mwall/weewx-observerip repositry. One method is described at steps 2 to 6 (incl) here, another way, if the observerip driver is already installed and weewx configured to use it is to (1) stop weewx (2) copy the code from the mwall/weewx-observerip repositry here and paste it over the top of your existing observerip.py then (3) start weewx.

Gary

Kevin Fairhurst

unread,
Dec 31, 2015, 10:38:41 AM12/31/15
to weewx-development
Hello

Having today set up my new WH2600 I have been trying to set up weewx with the ObserverIP code on a CentOS 7 installation.

The first obstacle I was able to overcome. Using version 0.5mw of the driver, I had to make a small code change & add in a firewall rule to ensure that the driver was able to see the response from the weather station :

        sock = socket.socket(socket.AF_INET, # Internet

                             socket.SOCK_DGRAM) # UDP

        sock.bind( (udp_addr, self.UDP_PORT) )


I don't know if this was overkill, or if there is a better / more appropriate way to do this, but once I had done the above, the wee_device command worked, whereas beforehand it was giving the "Network probe failed" :)

However, i then get the following error when trying to start weewx with the ObserverIP driver :

Dec 31 15:35:09 CentOSVM systemd: Starting SYSV: start and stop the weewx weather system...

Dec 31 15:35:09 CentOSVM weewx[14531]: engine: Initializing weewx version 3.3.1

Dec 31 15:35:09 CentOSVM weewx[14531]: engine: Using Python 2.7.5 (default, Nov 20 2015, 02:00:19) #012[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]

Dec 31 15:35:09 CentOSVM weewx[14531]: engine: Platform Linux-3.10.0-327.3.1.el7.x86_64-x86_64-with-centos-7.2.1511-Core

Dec 31 15:35:09 CentOSVM weewx[14531]: engine: pid file is /var/run/weewx.pid

Dec 31 15:35:09 CentOSVM weewx[14535]: engine: Using configuration file /etc/weewx/weewx.conf

Dec 31 15:35:09 CentOSVM weewx[14535]: engine: Loading station type ObserverIP (user.observerip)

Dec 31 15:35:09 CentOSVM weewx: Starting weewx: [  OK  ]

Dec 31 15:35:09 CentOSVM systemd: Started SYSV: start and stop the weewx weather system.

Dec 31 15:35:09 CentOSVM weewx[14535]: observerip: version is 0.5mw

Dec 31 15:35:09 CentOSVM weewx[14535]: engine: Unable to load driver: string index out of range

Dec 31 15:35:09 CentOSVM weewx[14535]:    ****  Exiting...


I tried setting debug=1 but it didn't actually give any extra information on the error...

Thoughts / suggestions?

Cheers,

Kev

Mitch W4OA

unread,
Jan 3, 2016, 12:46:26 AM1/3/16
to weewx-development
Got my observerIP today, loaded my Raspberry Pi with weewx, installed mwall's driver, and my RPi is very happy!

Thanks to mwall for a job well done!

Mitch, W4OA

Justin Glass

unread,
Jan 6, 2016, 12:17:44 AM1/6/16
to weewx-development
Mirroring success with using this method as well! It took a while to get working because I changed the settings on the Observer to lux and that was throwing it off. 

One thing I am wondering though, I haven't bought any additional thermometers like the one included with the WS1400IP, but I'm planning on it to keep track of the temperatures in different parts of my house. The joys of living in a house 125 years old without central heat! I thought I saw somewhere that the WS1400IP supported up to 3, so 2 additional. Is support already built into the driver to keep up with the additional devices? 

mwall

unread,
Jan 6, 2016, 9:42:37 AM1/6/16
to weewx-development
On Sunday, January 3, 2016 at 12:46:26 AM UTC-5, Mitch W4OA wrote:
Got my observerIP today, loaded my Raspberry Pi with weewx, installed mwall's driver, and my RPi is very happy!

Thanks to mwall for a job well done!

mitch,

thank you for the kind words, but david malick did all the work on this driver.

i'm hoping that david will take my minor changes, consider pat's simplified version, and do a bit of polishing so we can add this driver to weewx core.

m

Justin Glass

unread,
Feb 8, 2016, 10:28:28 PM2/8/16
to weewx-development
Is there any issues with using this on newer firmware for the ObserverIP unit?

I had started out with 3.0.5, and was having issues with the unit locking up. Thinking (but not checking) that I needed a firmware update I flashed the latest on the website, which was 3.0.3. By looking at a screenshot I had done, I had seen that I accidentally went back a version or two on the firmware. So I went to the website and looked for the latest one, which should have been 3.0.5 since that's what my unit came with. I checked the directory and saw that there was a 3.0.7; since this wasn't on the main page but only found by looking in the directory for ObserverIP files, I emailed support and they did confirm it was safe to use for my unit (WS-1400-IP specifically).

Now when I start up WeeWx, I get an error message stating that:
 Unknown firmware version: ▒▒▒▒▒▒▒▒▒#001#007USA_v3.0.7.bin

I do believe it works since I get data from it after that message, but just thought I'd mention the updated file in case there are any newer features that aren't fully being used or anything; plus in case others wanted to try it as well since it's not easily found. 

blown46pwr

unread,
Jan 9, 2017, 8:44:53 PM1/9/17
to weewx-development
Hoping someone can help me with the observerIP driver. I followed the directions in this thread and it seemed to install fine. When I start weewx and watch the messages at tail -f /var/log/syslog, it reports in one of the lines "observerIP: Unknown firmware version:" then the next line says "import of driver failed: 'windDirOffset' (<type 'exceptions.KeyError'>)" and the next line "engine: Unable to load driver: 'windDirOffset'" then "**** Exiting..."

What does this mean and how do I fix it? The Wx station is a new Ambient Weather WS-0900-IP.

This is on Ubuntu 64 16.0.4 LTS running on a VM on my Win7_64 box. I am planning on running this on a RPi3 but am trying to figure it out on this setup before I tackle the rpi3 and whatever new problems on that.

mwall

unread,
Jan 9, 2017, 9:02:52 PM1/9/17
to weewx-development
On Monday, January 9, 2017 at 8:44:53 PM UTC-5, blown46pwr wrote:
Hoping someone can help me with the observerIP driver. I followed the directions in this thread and it seemed to install fine. When I start weewx and watch the messages at tail -f /var/log/syslog, it reports in one of the lines "observerIP: Unknown firmware version:" then the next line says "import of driver failed: 'windDirOffset' (<type 'exceptions.KeyError'>)" and the next line "engine: Unable to load driver: 'windDirOffset'" then "**** Exiting..."

What does this mean and how do I fix it? The Wx station is a new Ambient Weather WS-0900-IP.

which observerip driver are you using?  the one from github.com/dkmcode?  github.com/matthewwall?  github.com/poblabs?

which configuration are you trying to use?  screen scraping?  driver-as-listener?  driver-as-sniffer?  driver-as-client?  something else?

the wiki explains some of the differences:

https://github.com/weewx/weewx/wiki/observer

m

blown46pwr

unread,
Jan 9, 2017, 9:12:19 PM1/9/17
to weewx-development
I used this procedure and the files located at the links there:


1) install weewx from .deb package.  choose the simulator as the driver. 

sudo dpkg -i weewx_X.Y.Z-R_all.deb

2) ensure that weewx is not running.

sudo /etc/init.d/weewx stop

3) clone the observerip repository

git clone https://github.com/matthewwall/weewx-observerip.git

4) run the extension installer

wee_extension --install weewx-observerip

5) select the observerip driver

wee_config --reconfigure --driver=user.observerip

6) start weewx

sudo /etc/init.d/weewx start

m

blown46pwr

unread,
Jan 9, 2017, 9:15:19 PM1/9/17
to weewx-development
Quick update.

I edited the weewx.conf file and remarked out sensors that my WS-0900-IP does not have, like solar. It then choked telling me it was expecting a value of "0" (zero) but it found a 2. So I edited the weewx.conf file again with the offsets in my ObserverIP. Now it appears to run but the index.html is still showing it is using the simulator.


On Monday, January 9, 2017 at 9:02:52 PM UTC-5, mwall wrote:

mwall

unread,
Jan 9, 2017, 9:18:16 PM1/9/17
to weewx-development
On Monday, January 9, 2017 at 9:15:19 PM UTC-5, blown46pwr wrote:
I edited the weewx.conf file and remarked out sensors that my WS-0900-IP does not have, like solar. It then choked telling me it was expecting a value of "0" (zero) but it found a 2. So I edited the weewx.conf file again with the offsets in my ObserverIP. Now it appears to run but the index.html is still showing it is using the simulator.

please post your weewx.conf file - be sure to remove any passwords before posting.

also, when you get a failure, please post the text from the failure instead of describing it.

m

blown46pwr

unread,
Jan 9, 2017, 9:26:08 PM1/9/17
to weewx-development
Sorry, my ubuntu was not logged into google so I could not copy and paste the text. Now I am logged into google with the ubuntu VM. Here's the conf file text.

# WEEWX CONFIGURATION FILE
#
# Copyright (c) 2009-2015 Tom Keffer <tke...@gmail.com>
# See the file LICENSE.txt for your rights.

##############################################################################

# This section is for general configuration information.

# Set to 1 for extra debug info, otherwise comment it out or set to zero
debug = 0

# Root directory of the weewx data file hierarchy for this station
WEEWX_ROOT = /

# How long to wait before timing out a socket (FTP, HTTP) connection
socket_timeout = 20

# Do not modify this. It is used when installing and updating weewx.
version = 3.6.2

##############################################################################

#   This section is for information about the station.

[Station]
   
    # Description of the station location
    location = "Alma, MI"
   
    # Latitude and longitude in decimal degrees
    latitude = 43.379
    longitude = -84.686
   
    # Altitude of the station, with unit it is in. This is downloaded from
    # from the station if the hardware supports it.
    altitude = 777, foot
   
    # 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 = ObserverIP
   
    # If you have a website, you may specify an URL
    #station_url = http://www.example.com
   
    # The start of the rain year (1=January; 10=October, etc.). This is
    # downloaded from the station if the hardware supports it.
    rain_year_start = 1
   
    # Start of week (0=Monday, 6=Sunday)
    week_start = 6

##############################################################################

[Simulator]
    # This section is for the weewx weather station simulator
   
    # The time (in seconds) between LOOP packets.
    loop_interval = 2.5
   
    # The simulator mode can be either 'simulator' or 'generator'.
    # Real-time simulator. Sleep between each LOOP packet.
    mode = simulator
    # Generator.  Emit LOOP packets as fast as possible (useful for testing).
    #mode = generator
   
    # The start time. If not specified, the default is to use the present time.
    #start = 2011-01-01 00:00
   
    # The driver to use:
    driver = weewx.drivers.simulator

##############################################################################

[Vantage]
    # This section is for the Davis Vantage series of weather stations.
   
    # Connection type: serial or ethernet
    #  serial (the classic VantagePro)
    #  ethernet (the WeatherLinkIP)
    type = ethernet
   
    # If the connection type is serial, a port must be specified:
    #   Debian, Ubuntu, Redhat, Fedora, and SuSE:
    #     /dev/ttyUSB0 is a common USB port name
    #     /dev/ttyS0   is a common serial port name
    #   BSD:
    #     /dev/cuaU0   is a common serial port name
    port = /dev/ttyUSB0
   
    # If the connection type is ethernet, an IP Address/hostname is required:
    host = 192.168.1.3
   
    ######################################################
    # The rest of this section rarely needs any attention.
    # You can safely leave it "as is."
    ######################################################
   
    # Serial baud rate (usually 19200)
    baudrate = 19200
   
    # TCP port (when using the WeatherLinkIP)
    tcp_port = 22222
   
    # TCP send delay (when using the WeatherLinkIP):
    tcp_send_delay = 0.5
   
    # The id of your ISS station (usually 1). If you use a wind meter connected
    # to a anemometer transmitter kit, use its id
    iss_id = 1
   
    # How long to wait for a response from the station before giving up (in
    # seconds; must be greater than 2)
    timeout = 4
   
    # How long to wait before trying again (in seconds)
    wait_before_retry = 1.2
   
    # How many times to try before giving up:
    max_tries = 4
   
    # The driver to use:
    driver = weewx.drivers.vantage

##############################################################################

#   This section is for uploading data to Internet sites

[StdRESTful]
   
    [[StationRegistry]]
        # To register this weather station with weewx, set this to true
        register_this_station = false
   
    [[AWEKAS]]
        # This section is for configuring posts to AWEKAS.
       
        # If you wish to do this, set the option 'enable' to true,
        # and specify a username and password.
        enable = false
        username = replace_me
        password = replace_me
   
    [[CWOP]]
        # This section is for configuring posts to CWOP.
       
        # If you wish to do this, set the option 'enable' to true,
        # and specify the station ID (e.g., CW1234).
        enable = false
        station = replace_me
   
    # If this is an APRS (radio amateur) station, uncomment
    # the following and replace with a passcode (e.g., 12345).
    #passcode = replace_me (APRS stations only)
   
    [[PWSweather]]
        # This section is for configuring posts to PWSweather.com.
       
        # If you wish to do this, set the option 'enable' to true,
        # and specify a station and password.
        enable = false
        station = replace_me
        password = replace_me
   
    [[WOW]]
        # This section is for configuring posts to WOW.
       
        # If you wish to do this, set the option 'enable' to true,
        # and specify a station and password.
        enable = false
        station = replace_me
        password = replace_me
   
    [[Wunderground]]
        # This section is for configuring posts to the Weather Underground.
       
        # If you wish to do this, set the option 'enable' to true,
        # and specify a station (e.g., 'KORHOODR3') and password.
        enable = false
        station = replace_me
        password = replace_me
       
        # Set the following to True to have weewx use the WU "Rapidfire"
        # protocol. Not all hardware can support it. See the User's Guide.
        rapidfire = False

##############################################################################

#   This section specifies what reports, using which skins, to generate.

[StdReport]
   
    # Where the skins reside, relative to WEEWX_ROOT
    SKIN_ROOT = /etc/weewx/skins
   
    # Where the generated reports should go, relative to WEEWX_ROOT
    HTML_ROOT = /var/www/html/weewx
   
    # The database binding indicates which data should be used in reports.
    data_binding = wx_binding
   
    # Each of the following subsections defines a report that will be run.
   
    [[StandardReport]]
        # See the customizing guide to change the units, plot types and line
        # colors, modify the fonts, display additional sensor data, and other
        # customizations. Many of those changes can be made here by overriding
        # parameters, or by modifying templates within the skin itself.
       
        # The StandardReport uses the 'Standard' skin, which contains the
        # images, templates and plots for the report.
        skin = Standard
        [[[Units]]]
            [[[[Groups]]]]
                group_altitude = foot
                group_speed2 = mile_per_hour2
                group_pressure = inHg
                group_rain = inch
                group_rainrate = inch_per_hour
                group_temperature = degree_F
                group_degree_day = degree_F_day
                group_speed = mile_per_hour
   
    [[FTP]]
        # FTP'ing the results to a webserver is treated as just another report,
        # albeit one with an unusual report generator!
        skin = Ftp
       
        # If you wish to use FTP, uncomment and fill out the next four lines.
        #user = replace with the ftp username
        #password = replace with the ftp password
        #server = replace with the ftp server name, e.g, www.threefools.org
        #path = replace with the ftp destination directory (e.g., /weather)
       
        # Set to True for an FTP over TLS (FTPS) connection. Not all servers
        # support this.
        secure_ftp = False
       
        # To upload files from something other than what HTML_ROOT is set
        # to above, specify a different HTML_ROOT here.
        #HTML_ROOT = /var/www/html/weewx
       
        # Most FTP servers use port 21
        port = 21
       
        # Set to 1 to use passive mode, zero for active mode
        passive = 1
   
    [[RSYNC]]
        # rsync'ing to a webserver is treated as just another report
        skin = Rsync
       
        # If you wish to use rsync, you must configure passwordless ssh using
        # public/private key authentication from the user account that weewx
        # runs as to the user account on the remote machine where the files
        # will be copied.
        #
        # The following three lines determine where files will be sent.
        #server = replace with the rsync server name, e.g, www.threefools.org
        #path = replace with the rsync destination directory (e.g., /weather)
        #user = replace with the rsync username
       
        # Rsync can be configured to remove files from the remote server if
        # they don't exist under HTML_ROOT locally. USE WITH CAUTION: if you
        # make a mistake in the remote path, you could could unintentionally
        # cause unrelated files to be deleted. Set to 1 to enable remote file
        # deletion, zero to allow files to accumulate remotely.
        delete = 0

##############################################################################

#   This service acts as a filter, converting the unit system coming from
#   the hardware to a unit system in the database.

[StdConvert]
   
    # The target_unit affects only the unit system in the database. Once
    # chosen it cannot be changed without converting the entire database.
    # Modification of target_unit after starting weewx will result in
    # corrupt data - the database will contain a mix of US and METRIC data.
    #
    # The value of target_unit does not affect the unit system for
    # reporting - reports can display US, Metric, or any combination of units.
    #
    # In most cases, target_unit should be left as the default: US
    #
    # In particular, those migrating from a standard wview installation
    # should use US since that is what the wview database contains.
   
    # DO NOT MODIFY THIS VALUE UNLESS YOU KNOW WHAT YOU ARE DOING!
    target_unit = US    # Options are 'US', 'METRICWX', or 'METRIC'

##############################################################################

#   This section can adjust data using calibration expressions.

[StdCalibrate]
   
    [[Corrections]]
        # For each type, an arbitrary calibration expression can be given.
        # It should be in the units defined in the StdConvert section.
        # Example:
        foo = foo + 0.2

##############################################################################

#   This section is for quality control checks. If units are not specified,
#   values must be in the units defined in the StdConvert section.

[StdQC]
   
    [[MinMax]]
        barometer = 26, 32.5, inHg
        outTemp = -40, 120, degree_F
        inTemp = 10, 120, degree_F
        outHumidity = 0, 100
        inHumidity = 0, 100
        windSpeed = 0, 120, mile_per_hour
        pressure = 24, 34.5, inHg

##############################################################################

#   This section controls the origin of derived values.

[StdWXCalculate]
   
    [[Calculations]]
        # Derived quantities are calculated by this service. Possible values are:
        #  hardware        - use the value provided by hardware
        #  software        - use the value calculated by weewx
        #  prefer_hardware - use value provide by hardware if available,
        #                      otherwise use value calculated by weewx
       
        pressure = prefer_hardware
        barometer = prefer_hardware
        altimeter = prefer_hardware
        windchill = prefer_hardware
        heatindex = prefer_hardware
        dewpoint = prefer_hardware
        inDewpoint = prefer_hardware
        rainRate = prefer_hardware

##############################################################################

#   For hardware that supports it, this section controls how often the
#   onboard clock gets updated.

[StdTimeSynch]
   
    # How often to check the weather station clock for drift (in seconds)
    clock_check = 14400
   
    # How much it can drift before we will correct it (in seconds)
    max_drift = 5

##############################################################################

#   This section is for configuring the archive service.

[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 = 300
   
    # If possible, new archive records are downloaded from the station
    # hardware. If the hardware does not support this, then new archive
    # records will be generated in software.
    # Set the following to "software" to force software record generation.
    record_generation = hardware
   
    # Whether to include LOOP data in hi/low statistics
    loop_hilo = True
   
    # The data binding used to save archive records
    data_binding = wx_binding

##############################################################################

#   This section binds a data store to a database.

[DataBindings]
   
    [[wx_binding]]
        # The database must match one of the sections in [Databases].
        # This is likely to be the only option you would want to change.
        database = archive_sqlite
        # The name of the table within the database
        table_name = archive
        # The manager handles aggregation of data for historical summaries
        manager = weewx.wxmanager.WXDaySummaryManager
        # The schema defines the structure of the database.
        # It is *only* used when the database is created.
        schema = schemas.wview.schema

##############################################################################

#   This section defines various databases.

[Databases]
   
    # A SQLite database is simply a single file
    [[archive_sqlite]]
        database_type = SQLite
        database_name = weewx.sdb
   
    # MySQL
    [[archive_mysql]]
        database_type = MySQL
        database_name = weewx

##############################################################################

#   This section defines defaults for the different types of databases.

[DatabaseTypes]
   
    # Defaults for SQLite databases
    [[SQLite]]
        driver = weedb.sqlite
        # Directory in which the database files are located
        SQLITE_ROOT = /var/lib/weewx
   
    # Defaults for MySQL databases
    [[MySQL]]
        driver = weedb.mysql
        # The host where the database is located
        host = localhost
        # The user name for logging in to the host
        user = weewx
        # The password for the user name
        password = weewx

##############################################################################

#   This section configures the internal weewx engine.

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

##############################################################################

[ObserverIP]
    # This section is for the weewx ObserverIP driver
   
    # hostname - hostname or IP address of the ObserverIP, not required
   
    # mode determines the method for obtaining data from the station
    #        direct   - communicate directly with the station
    #       indirect - get station data from the CGI intermediary
    mode = direct
   
    # poll_interval
    #    mode = direct   - The time (in seconds) between LOOP packets (should be 16)
    #    mode = indirect - Time to wait for new packet ( 17 is a good value)
    poll_interval = 16
   
    # dup_interval
    #    mode = direct   - time to wait if there is an error getting a packet
    #    mode = indirect - subsequent time to wait if new packet has not arived after poll_interval
    dup_interval = 2
   
    # xferfile
    #    mode = direct   - unused
    #    mode = indirect - file where the CGI script puts the data from the observerip
    xferfile = /path/to/transfer/file
   
    # retry_wait - time to wait after failed network attempt
   
    # check_calibration - make sure the station calibration is as expected
    check_calibration = true
   
    # set_calibration - set calibration in station if it is not as expected
    #                   only meaningful if check_calibration is true
    set_calibration = false
   
    # The driver to use:
    driver = user.observerip
    direct = true
   
    # The calibration the driver expects from the station, only useful
    # if check_calibration is set. Items that are not set, are not checked.
    [[calibration]]
        RainGain = 1.00
        #windDirOffset = 0
        inHumiOffset = 2
        AbsOffset = 0.00
        #UVGain = 1.00
        #SolarGain = 1.00
        WindGain = 1.25
        # RelOffset should be set to 0 in indirect mode
        RelOffset = 0.81
        #luxwm2 = 126.7
        outHumiOffset = 0
        outTempOffset = 0.0
        inTempOffset = 0.0

blown46pwr

unread,
Jan 9, 2017, 9:29:55 PM1/9/17
to weewx-development
Now the only questionable message I get is this: observerip: packet missing UV but it is running. However the index.html file is still loading the simulator information.

mwall

unread,
Jan 9, 2017, 9:40:50 PM1/9/17
to weewx-development
On Monday, January 9, 2017 at 9:29:55 PM UTC-5, blown46pwr wrote:
Now the only questionable message I get is this: observerip: packet missing UV but it is running. However the index.html file is still loading the simulator information.

apparently the web page on your station does not contain a 'UV' item, or at least not a 'UV' item that the driver expects.

in method 'parse_page', change lines starting at 532 from this:

                    logdbg("packet missing %s" % obs)
                    packet = dict()

to this:

                    logdbg("packet missing %s" % obs)

(you want to delete the packet=dict() line)

then restart weewx.

fyi, the screen-scraping approach is brittle - there is a good chance it will stop working when the station updates its firmware.

if you post 10 or 15 captures, we might be able to make the scraper more robust.  use a web browser to look at the weather station, then do a 'save' in your web browser.  save as a single text file.  do that 10 or 15 times over the course of an hour.  then zip them up and post to this thread.

m

blown46pwr

unread,
Jan 9, 2017, 9:52:15 PM1/9/17
to weewx-development
Thanks for helping.

Which file am I supposed to edit? I do not see "logdbg" in the config file and it only goes to line 506?

mwall

unread,
Jan 9, 2017, 9:57:23 PM1/9/17
to weewx-development


On Monday, January 9, 2017 at 9:52:15 PM UTC-5, blown46pwr wrote:
Thanks for helping.

Which file am I supposed to edit? I do not see "logdbg" in the config file and it only goes to line 506?


modify the driver file user/observerip.py.  and i mistyped.  it should be this:

                    loginf("packet missing %s" % obs)
                    packet = dict()


to this:

                    logdbg("packet missing %s" % obs)

changing from 'loginf' to 'logdbg' will eliminate all the whining about no UV sensor data.  removing the 'packet = dict()' line will make it so failure to get data from a single sensor will not cause you to lose all data.

m

blown46pwr

unread,
Jan 9, 2017, 10:10:35 PM1/9/17
to weewx-development
I edited it to this:

def parse_page(self, data):
        packet = dict()
        if data is not None:
            packet['usUnits'] = weewx.US
            for obs in self.map:
                try:

                    packet[obs] = self.map[obs][1](data[self.map[obs][0]])
                except KeyError:

                    logdbg("packet missing %s" % obs)
                    break

but after starting weewx it is reporting

Jan  9 22:08:16 ubuntu64server weewx[3188]: observerip: packet missing UV
Jan  9 22:09:00 ubuntu64server weewx[3188]: message repeated 16 times: [ observerip: packet missing UV]
Jan  9 22:09:01 ubuntu64server CRON[3222]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && /usr/lib/php/sessionclean)
Jan  9 22:09:02 ubuntu64server weewx[3188]: observerip: packet missing UV

blown46pwr

unread,
Jan 9, 2017, 10:13:31 PM1/9/17
to weewx-development
The web page is still loading as simulator.

Appreciate the help. Have to go to bed. Will tackle more tomorrow. Thanks!

mwall

unread,
Jan 9, 2017, 10:37:10 PM1/9/17
to weewx-development
On Monday, January 9, 2017 at 10:13:31 PM UTC-5, blown46pwr wrote:
The web page is still loading as simulator.

you need to remove the 'break' line too.

better yet, do some captures of the web page and post them, then i can ensure that the driver works with them.

the code could be consolidated and simplified quite a bit, but i would need the output from the station to do it right.

m

mwall

unread,
Jan 10, 2017, 8:16:38 AM1/10/17
to weewx-development
On Monday, January 9, 2017 at 10:13:31 PM UTC-5, blown46pwr wrote:
The web page is still loading as simulator.

Appreciate the help. Have to go to bed. Will tackle more tomorrow. Thanks!

please try pulling the latest from github (driver version 0.6), then try again.

m

blown46pwr

unread,
Jan 12, 2017, 9:00:21 PM1/12/17
to weewx-development
Sorry I haven't responded in a couple of days. I finally received my rpi3 and have been getting used to it.

To make a long story short: I installed weewx as per the previously posted method and it seems to be running without errors. It also generated all the graphs and stuff in var/www/html/weewx and now I need to figure out how to turn on access to that directory from another computer.

Thanks for the help.

blown46pwr

unread,
Jan 12, 2017, 9:02:24 PM1/12/17
to weewx-development
Oops, looks like my rpi3 is set to UTC time so my graphs all have the incorrect time, LOL. If it's not one thing it's another.

blown46pwr

unread,
Jan 12, 2017, 9:25:50 PM1/12/17
to weewx-development
OK I got the time figured out, but I noticed that the wind direction is showing N/A instead of west or 270.

blown46pwr

unread,
Jan 12, 2017, 10:36:54 PM1/12/17
to weewx-development
Only thing left to figure out is the wind direction.

TIA

mwall

unread,
Jan 13, 2017, 12:33:57 AM1/13/17
to weewx-development
On Thursday, January 12, 2017 at 10:36:54 PM UTC-5, blown46pwr wrote:
Only thing left to figure out is the wind direction.

please connect to your weather station with a web browser using this url:

http://XXX/weather.htm

where XXX is the ip address of the weather station.  then save the file and post it here.

m

blown46pwr

unread,
Jan 16, 2017, 12:19:01 PM1/16/17
to weewx-development
Sorry, I have been ill. Still a bit under the weather.

The file weather.htm does not exist. I am getting

Not Found

The requested URL /weewx/weather.htm was not found on this server.


Apache/2.4.10 (Raspbian) Server at 192.168.1.16 Port 80

blown46pwr

unread,
Jan 16, 2017, 12:24:42 PM1/16/17
to weewx-development

mwall

unread,
Jan 16, 2017, 12:30:29 PM1/16/17
to weewx-development


On Monday, January 16, 2017 at 12:24:42 PM UTC-5, blown46pwr wrote:

that is the page generated by weewx.

we need the page that you get when you connect to the observer.

http://XXX/weather.htm

XXX is the ip address or hostname of the weather station, not the computer running weewx.

m

blown46pwr

unread,
Jan 16, 2017, 1:25:42 PM1/16/17
to weewx-development
ah, understood. give me a few

blown46pwr

unread,
Jan 16, 2017, 1:27:40 PM1/16/17
to weewx-development
mine does not have a weather.htm page.


  ambient weather observerIP 3.1

Version:3.1.0
Live Data
Receiver Time:
Indoor Sensor ID and Battery
Outdoor Sensor ID and Battery
Sensor Array ID and Battery
Indoor Temperature
Indoor Humidity
Absolute Pressure
Relative Pressure
Outdoor Temperature
Outdoor Humidity
Wind Direction
Wind Speed
Wind Gust
Hourly Rain Rate
Daily Rain
Weekly Rain
Monthly Rain
Yearly Rain
 

 


blown46pwr

unread,
Jan 16, 2017, 1:28:31 PM1/16/17
to weewx-development
Calibration page looks like this

Calibration
Wind Speed Gain

Range: 0.10 to 5.00 Default: 1.00
Rain Gain

Range: 0.10 to 5.00 Default: 1.00
Indoor Temperature Offset

Range: -10C/-18F to 10C/18F Default: 0.0
Indoor Humidity Offset

Range: -50 to 50 Default: 0
Absolute Pressure Offset

Range: -800hpa/-23.62inhg/-601.50mmhg to 800hpa/23.62inhg/601.50mmhg Default: 0.00
Relative Pressure Offset

Range: -800hpa/-23.62inhg/-601.50mmhg to 800hpa/23.62inhg/601.50mmhg Default: 0.00
Outdoor Temperature Offset

Range: -10C/-18F to 10C/18F Default: 0.0
Outdoor Humidity Offset

Range: -50 to 50 Default: 0

blown46pwr

unread,
Jan 16, 2017, 1:33:25 PM1/16/17
to weewx-development
I stand corrected, it does have a weather.htm page but that is for the wunderground login username and password.

blown46pwr

unread,
Jan 16, 2017, 1:46:17 PM1/16/17
to weewx-development
I also noticed the barometer reading that is reported by weewx is a little high. Is that the observerip driver or a weewx setting?

Thanks

mwall

unread,
Jan 16, 2017, 1:47:45 PM1/16/17
to weewx-development
so it looks like there are 4 approaches to getting data:

1) get the livedata.htm page then parse it for values

2) use raw udp/tcp sockets to find the station then query it for data

3) sniff network traffic (requires the station to be sending to wunderground)

4) listen for network traffic (requires the station to be sending to wunderground, plus a dns or http redirect)

option (2) will be the most robust and would work out-of-the-box with minimal configuration.  i'm trying to do this with weewx-observer, but without the hardware it has been slow going.  i think aussisusan has been running one of these for awhile.

david malick's observerip (and my weewx-observerip fork of david's work) uses option (1) and option (4) as 'direct' and 'indirect'.  david's indirect expects a php or other proxy to write the data to file, then the driver reads from file.

the weewx-interceptor driver does option (3) or option (4) directly (no intermediate php or files)

i'd like to see aussisusan's implementation get polished up then put into weewx core so everything will work out-of-the-box with no configuration required.

so this is for the fine offset hp1000 hardware (wifi console sends data).  does anyone know if it will work with the fine offset wh2600 bridge (the little black translucent box with little finger of an antenna sticking up)?

m

mwall

unread,
Jan 16, 2017, 2:02:50 PM1/16/17
to weewx-development
On Monday, January 16, 2017 at 1:46:17 PM UTC-5, blown46pwr wrote:
I also noticed the barometer reading that is reported by weewx is a little high. Is that the observerip driver or a weewx setting?

it might be a pressure/barometer/altimeter issue:

https://github.com/weewx/weewx/wiki/Barometer,-pressure,-and-altimeter

what is your altitude?

the observerip definitely has a bug - it uses 'pressure' when reading the 'AbsPress' but also uses 'pressure' when reading 'baromin'

m

blown46pwr

unread,
Jan 16, 2017, 2:14:14 PM1/16/17
to weewx-development
I am at 777 feet ASL. I used the NOAA formula to convert my barometer offset from the absolute pressure reported by my WS-0900-IP station. The offset I've been using seems to track the barometer reported by the local airport nearby.
Reply all
Reply to author
Forward
0 new messages