Setting up my Raspberry Pi Zero W to work with my father's Acurite 5 in 1.

150 views
Skip to first unread message

Matthew Van Arsdale

unread,
Feb 27, 2020, 2:00:58 PM2/27/20
to weewx-user
I have been following this tutorial https://www.instructables.com/id/Acurite-5-in-1-Weather-Station-Using-a-Raspberry-P/ to get my father's weather station to report to weather underground. Somewhere along the process I installed the web server (apache2) for local hosting went through and configured the Weather underground station info in the weewx.config. When I have everything hooked up I then start Weewx and Apache2 and let it collect data for a bit (20-30 minutes). When I go to the local site that the Pi is hosting, I get the standard "this page is a place holder. If I try the localipaddress/weewx/ I get page does not exist error. Do I need to specify in the weewx.config where the site should be?  When I go to Weather underground and look at the station it says that it is offline. 

Any advice? 

vince

unread,
Feb 27, 2020, 2:45:09 PM2/27/20
to weewx-user
On Thursday, February 27, 2020 at 11:00:58 AM UTC-8, Matthew Van Arsdale wrote:
Do I need to specify in the weewx.config where the site should be?

Yes.   You need the webserver to look in a location weewx is writing its public_html tree to.

You can either edit weewx.conf to match your webserver config, or edit your webserver config to match weewx, or fake it with a symlink.

Matthew Van Arsdale

unread,
Feb 29, 2020, 11:22:22 PM2/29/20
to weewx-user
Thanks, I went in and changed what I thought was the correct files . I changed this in weewx config    

# Where the generated reports should go, relative to WEEWX_ROOT

    HTML_ROOT = /var/www/html/index.html


I then ran sudo tail -f /var/log/syslog

and got this: 


pi@raspberrypi:~ $ sudo tail -f /var/log/syslog

Mar  1 04:01:58 raspberrypi weewx[1185]:     ****      engine = engine_class(config_dict)

Mar  1 04:01:58 raspberrypi weewx[1185]:     ****    File "/usr/share/weewx/weewx/engine.py", line 75, in __init__

Mar  1 04:01:58 raspberrypi weewx[1185]:     ****      self.preLoadServices(config_dict)

Mar  1 04:01:58 raspberrypi weewx[1185]:     ****    File "/usr/share/weewx/weewx/engine.py", line 116, in preLoadServices

Mar  1 04:01:58 raspberrypi weewx[1185]:     ****      self.stn_info = weewx.station.StationInfo(self.console, **config_dict['Station'])

Mar  1 04:01:58 raspberrypi weewx[1185]:     ****    File "/usr/share/weewx/weewx/station.py", line 49, in __init__

Mar  1 04:01:58 raspberrypi weewx[1185]:     ****      self.latitude_f      = float(stn_dict['latitude'])

Mar  1 04:01:58 raspberrypi weewx[1185]:     ****  ValueError: invalid literal for float(): 43°26'55.2"N

Mar  1 04:01:58 raspberrypi weewx[1185]:     ****  Exiting.

Mar  1 04:17:01 raspberrypi CRON[1214]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)


What am I missing? 

Matthew Van Arsdale

unread,
Mar 1, 2020, 12:18:57 AM3/1/20
to weewx-user
I think I am making progress:

    # Where the generated reports should go, relative to WEEWX_ROOT

    HTML_ROOT = /var/www/weewx/index.html


I created a few different things thinking that might solve the problem, no luck. 


pi@raspberrypi:/var/www/html $ ls

index.html  weather  weewx



Fixed what I noticed to be wrong the latitude.



pi@raspberrypi:/var/www/html $ sudo tail -f /var/log/syslog

Mar  1 05:12:53 raspberrypi weewx[2449]:     ****    File "/usr/share/weewx/weewx/engine.py", line 888, in main

Mar  1 05:12:53 raspberrypi weewx[2449]:     ****      engine = engine_class(config_dict)

Mar  1 05:12:53 raspberrypi weewx[2449]:     ****    File "/usr/share/weewx/weewx/engine.py", line 75, in __init__

Mar  1 05:12:53 raspberrypi weewx[2449]:     ****      self.preLoadServices(config_dict)

Mar  1 05:12:53 raspberrypi weewx[2449]:     ****    File "/usr/share/weewx/weewx/engine.py", line 116, in preLoadServices

Mar  1 05:12:53 raspberrypi weewx[2449]:     ****      self.stn_info = weewx.station.StationInfo(self.console, **config_dict['Station'])

Mar  1 05:12:53 raspberrypi weewx[2449]:     ****    File "/usr/share/weewx/weewx/station.py", line 35, in __init__

Mar  1 05:12:53 raspberrypi weewx[2449]:     ****      self.altitude_vt = weewx.units.ValueTuple(float(altitude_t[0]), altitude_t[1], "group_altitude")

Mar  1 05:12:53 raspberrypi weewx[2449]:     ****  ValueError: invalid literal for float(): 623 feet

Mar  1 05:12:53 raspberrypi weewx[2449]:     ****  Exiting.



still having a problem with altitude. 

    # Altitude of the station, with unit it is in. This is downloaded from

    # from the station if the hardware supports it.

    altitude = 623 feet, 623 feet


Matthew Van Arsdale

unread,
Mar 1, 2020, 12:20:40 AM3/1/20
to weewx-user
When I navigate to http://192.168.1.31/weewx/index.html

Forbidden

You don't have permission to access this resource.


Apache/2.4.38 (Raspbian) Server at 192.168.1.31 Port 80

gjr80

unread,
Mar 1, 2020, 1:03:13 AM3/1/20
to weewx-user
Hi,

Re altitude the format for the altitude setting is:

altitude = value, unit

where unit is foot or meter. You will find in settings, units etc WeeWX use singular units; so foot not feet, meter not meters etc. In your case you want:

altitude = 623, foot

Gary

Matthew Van Arsdale

unread,
Mar 1, 2020, 10:37:01 AM3/1/20
to weewx-user
thank you, 

Now that thats fixed I'm having problems with weewx.html 

rich T

unread,
Mar 1, 2020, 10:53:05 AM3/1/20
to weewx-user
Are you still getting this error:


Forbidden

You don't have permission to access this resource.


Apache/2.4.38 (Raspbian) Server at 192.168.1.31 Port 80


Do you have the folding file in these folders:

/etc/apache2/conf-available/weewx.conf
/etc/apache2/conf-enabled/weewx.conf

This conf file should contain the following:

+++++++++++++++++++++++++++++++++++++++

Alias /weewx /home/weewx/public_html
<Directory /home/weewx/public_html>
  Options FollowSymlinks
  AllowOverride None
# for apache 2.2
  Order allow,deny
  Allow from all
# for apache 2.4
  Require all granted
</Directory>

+++++++++++++++++++++++++++++++++++++++++

If you need to update or add the files, need to restart apache server.

Matthew Van Arsdale

unread,
Mar 1, 2020, 6:01:37 PM3/1/20
to weewx-user
I did not have those folders, were they supposed to be created automatically somewhere or is the tutorial I'm following wrong?

Should my code be exactly  be under 
Alis  /weewx/home/weewx/public_html

If my Weewx directory is located in /etc/ ?

rich T

unread,
Mar 1, 2020, 6:18:45 PM3/1/20
to weewx-user
Check out the following link: http://www.weewx.com/docs/usersguide.htm , it gives information where all the files are located for different types of installations.

I used the "setup.py" method to install, so the apache information is for the setup.py  method.

p q

unread,
Mar 1, 2020, 6:58:32 PM3/1/20
to weewx...@googlegroups.com
When I set up my station, I had all kinds of trouble getting Apache to get the right rights and permissions. I ended up moving the weewx publichtml directory to where Apache worked rather than the other way around.

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/b931d10b-8348-4287-b07f-f1dab2166698%40googlegroups.com.


--
Peter Quinn
(415)794-2264
Reply all
Reply to author
Forward
0 new messages