weewx-Weather34 installation questions

488 views
Skip to first unread message

ExprmntAl

unread,
Sep 6, 2020, 12:14:16 AM9/6/20
to weewx-user
In the installation instructions for weewx-Weather34 it says:

"This installation guide assumes that you are already reasonably familiar with WeeWX and that it is already installed on your computer along with a webserver, php and curl."

The Apache2 webserver is installed as part of the weewx installation, but how do I know if php and curl are installed?  Is there an easy way to check this?  If I don't have these what is the best way to install them?

Also, later in the instation instructions it says:

"IMPORTANT. After installing PHP please make sure you install all the PHP modules appropriate for your version of PHP. Failure to due so may mean that forecasts and current conditions fail to update. This is an example for PHP7.3 modules on a Debian based distribution: -
sudo apt-get install php-cli php-fpm php-json php-sqlite3 php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath sudo apt-get install libapache2-mod-php sudo a2enmod php7.3 sudo systemctl restart apache2"

How do I determine what version of PHP I have and once I know that, how do I ensure that I have installed the right modules for that version?  I did the "Debian based distribution" when I installed weewx.

steeple ian

unread,
Sep 6, 2020, 2:08:04 AM9/6/20
to weewx...@googlegroups.com
Hi,
I assume you are running a Debian based OS, Raspberry Pi OS or Ubuntu perhaps?
IM

--
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/45e32d75-b870-4ab3-9c2c-4bec28a611b7n%40googlegroups.com.

steeple ian

unread,
Sep 6, 2020, 2:26:30 AM9/6/20
to weewx...@googlegroups.com
To determine the versions of Apache and PHP installed: -

From the command line run: -

apachectl -v
php -v


IM


ExprmntAl

unread,
Sep 6, 2020, 9:44:10 AM9/6/20
to weewx-user
Ian, I should have noted that I'm running on a Raspberry Pi 4 with the full version of the Raspberry Pi OS.  Weewx has been running fine for over a month using the weatherflow extension (Tempest).  At this point I haven't installed anything else and have been using the seasons skin.  I wanted to start playing around with Belchertown and Weather34 now that I have gotten my feet wet.

I had tried the "php -v" command already but it did not work and returned "command not found".  Here is what I get when I run the two commands:

pi@raspberrypi:~ $ apachectl -v
bash: apachectl: command not found
pi@raspberrypi:~ $ sudo apachectl -v
sudo: apachectl: command not found
pi@raspberrypi:~ $ php -v
bash: php: command not found
pi@raspberrypi:~ $ sudo php -v
sudo: php: command not found
pi@raspberrypi:~ $ 

Also, what about curl?  

steeple ian

unread,
Sep 6, 2020, 10:03:54 AM9/6/20
to weewx...@googlegroups.com
OK,

I also have the Seasons and Belchertown skin installed as well as my own Weather34.

I would go ahead and install Apache2, PHP7.x and the PHP libraries. When you install the libraries you should pick up things like curl along the way.

Then install Weather34 following the instructions carefully.

Belchertown is also very well documented and is straightforward to install. Some people have a problem setting up MQTT but again I found it straight forward to setup my own server on my own Pi. There is excellent support from Pat and Belchertown users if you get into trouble.

IM

ExprmntAl

unread,
Sep 6, 2020, 10:42:00 AM9/6/20
to weewx-user
I was under the impression that Apache2 was installed as part of the weewx installation already.  I am concerned that I will break something if I just start installing things without understanding them fully if they are already installed.  So if I  install Apache2, PHP7.x and the PHP libraries as you suggest, is there a chance I will break what is already working (in the case of Apache2 if it is already installed)?  

Is there a good tutorial somewhere for these installations?  There seem to be a number of versions of PHP which is also confusing.

steep...@gmail.com

unread,
Sep 6, 2020, 11:22:49 AM9/6/20
to weewx...@googlegroups.com

No you need to install it. Have a look here http://weewx.com/docs/usersguide.htm#integrating_with_webserver

 

This is a distillation of the instructions to install Apache and PHP and associated libraries: -

 

sudo apt update
 
sudo apt install apache2
 
sudo apt-get install php
 
sudo apt-get install php-cli php-fpm php-json php-sqlite3 php-zip php-gd  php-mbstring php-curl php-xml php-pear php-bcmath
 
sudo apt-get install libapache2-mod-php
 
sudo a2enmod php7.3
 
sudo systemctl restart apache2
 
IM.
 
 

 

 

Sent from Mail for Windows 10

p q

unread,
Sep 6, 2020, 12:51:57 PM9/6/20
to weewx...@googlegroups.com
If you're worried about breaking something, you might set yourself up with a virtual machine to do your development work on (using the simulator station) and then transfer what works over to your real machine. 



--
Peter Quinn
(415)794-2264

ExprmntAl

unread,
Sep 6, 2020, 2:57:27 PM9/6/20
to weewx-user
That sounds a bit complicated for me.  I did however image my SD card in case something went terribly wrong (which it didn't) so I could revert back to where I started.

ExprmntAl

unread,
Sep 6, 2020, 3:02:35 PM9/6/20
to weewx-user
OK, thanks for all the detailed help Ian.  I ran all of the commands and there don't seem to be any ill effects on weewx so far.  One of the commands probably wasn't needed though  (see below) but other than that it went off without a hitch.  

pi@raspberrypi:~ $ sudo a2enmod php7.3
Considering dependency mpm_prefork for php7.3:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php7.3:
Module php7.3 already enabled

Now its on to trying the weewx-Weather34 install.  

ExprmntAl

unread,
Sep 6, 2020, 3:24:53 PM9/6/20
to weewx-user
OK, I installed PeEphem per the instructions and that went normally.  Then tried rest of the installation and ran into trouble when running the installation for weewx-Weather34 per the 3 commands below:

 cd weewx-Weather34 
 sudo python w34_installer.py  

The first 2 commands ran fine but the third command came up with an error (see below):

pi@raspberrypi:~ $ sudo git clone https://github.com/steepleian/weewx-Weather34.git
Cloning into 'weewx-Weather34'...
remote: Enumerating objects: 734, done.
remote: Counting objects: 100% (734/734), done.
remote: Compressing objects: 100% (726/726), done.
remote: Total 734 (delta 241), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (734/734), 3.44 MiB | 1.13 MiB/s, done.
Resolving deltas: 100% (241/241), done.
pi@raspberrypi:~ $ cd weewx-Weather34
pi@raspberrypi:~/weewx-Weather34 $ sudo python w34_installer.py
Traceback (most recent call last):
  File "w34_installer.py", line 2, in <module>
    from configobj import ConfigObj
ImportError: No module named configobj

Any ideas?

ExprmntAl

unread,
Sep 7, 2020, 6:12:44 PM9/7/20
to weewx-user
Tried the rest of the installation and ran into trouble when running the installer for weewx-Weather34 per the 3 commands below:

 cd weewx-Weather34 
 sudo python w34_installer.py  

The first 2 commands ran fine but the third command came up with an error (see below):

pi@raspberrypi:~ $ sudo git clone https://github.com/steepleian/weewx-Weather34.git
Cloning into 'weewx-Weather34'...
remote: Enumerating objects: 734, done.
remote: Counting objects: 100% (734/734), done.
remote: Compressing objects: 100% (726/726), done.
remote: Total 734 (delta 241), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (734/734), 3.44 MiB | 1.13 MiB/s, done.
Resolving deltas: 100% (241/241), done.
pi@raspberrypi:~ $ cd weewx-Weather34
pi@raspberrypi:~/weewx-Weather34 $ sudo python w34_installer.py
Traceback (most recent call last):
  File "w34_installer.py", line 2, in <module>
    from configobj import ConfigObj
ImportError: No module named configobj

Any ideas on why this error is happening?

On Sunday, September 6, 2020 at 10:22:49 AM UTC-5 steep...@gmail.com wrote:

vince

unread,
Sep 7, 2020, 6:18:50 PM9/7/20
to weewx-user
On Monday, September 7, 2020 at 3:12:44 PM UTC-7, ExprmntAl wrote:
ImportError: No module named configobj

Any ideas on why this error is happening?



Yes, you did not install the configobj module per the weewx prerequisites.
 

ExprmntAl

unread,
Sep 7, 2020, 9:48:41 PM9/7/20
to weewx-user
I didn't see this installation mentioned anywhere in the weewx-Weather34 installation instructions "https://github.com/steepleian/weewx-Weather34/blob/master/INSTALLATION_GUIDE.md", and I have had weewx running for over a month with no issues so I'm not sure how I would know about this.  

Are the instructions on how to install this (configobj) available somewhere else?  I'm very grateful to Ian for helping me work through this installation step by step and it looks like I am getting closer to the end so I'm appreciative to anyone who is willing to help.

Cheers,

Allan

vince

unread,
Sep 7, 2020, 9:57:26 PM9/7/20
to weewx-user
On Monday, September 7, 2020 at 6:48:41 PM UTC-7, ExprmntAl wrote:
I didn't see this installation mentioned anywhere in the weewx-Weather34 installation instructions "https://github.com/steepleian/weewx-Weather34/blob/master/INSTALLATION_GUIDE.md", and I have had weewx running for over a month with no issues so I'm not sure how I would know about this.  

Are the instructions on how to install this (configobj) available somewhere else?  I'm very grateful to Ian for helping me work through this installation step by step and it looks like I am getting closer to the end so I'm appreciative to anyone who is willing to help.



I was referring to the weewx installation procedure - pick your method at http://weewx.com/docs/usersguide.htm#installing depending on how you installed it.    I have no idea what is (or is not) in Ian's guide for his specific software.

steeple ian

unread,
Sep 8, 2020, 2:56:15 AM9/8/20
to weewx...@googlegroups.com
Allan,

You are correct that there are no specific instructions about configobj in the Weather34 installation guide. It should have been installed when you installed WeeWX. That is what Vince was referring to.

Given that you have determined that configobj is present but you are still getting that error it could be that you have the wrong version. 

During the W34 install process the installer asks you to confirm your Python version and your WeeWX installation method. Last evening I was able to replicate the error by choosing the wrong Python type.

I have just skimmed back through this thread. Can you confirm how you installed WeeWX in the first instance DEB (packaged) or setup.py?

Ian







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

ExprmntAl

unread,
Sep 8, 2020, 6:50:22 AM9/8/20
to weewx-user
I installed weewx using the "DEB (packaged)" installation in late July and it has been running since then and populating the seasons skin from my Tempest weather station.  I have also installed the WeatherFlow extension to work with the Tempest.  Below is the version from the weewx.conf file.

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

How can I determine that "configobj" is installed normally?

vince

unread,
Sep 8, 2020, 12:58:02 PM9/8/20
to weewx-user
On Tuesday, September 8, 2020 at 3:50:22 AM UTC-7, ExprmntAl wrote:
How can I determine that "configobj" is installed normally?


It could have been installed via dpkg or pip or pip3, and you might have python2 'and' python3 installed on your system, so you need to check 3 ways.

dpkg -l   | grep -i configobj
pip list  | grep -i configobj
pip3 list | grep -i configobj

You need configobj to be installed to match up with the python your weewx (and perhaps the extension) use.

ExprmntAl

unread,
Sep 8, 2020, 3:50:16 PM9/8/20
to weewx-user
OK Vince, thanks for helping me.  Here is what I got.

pi@raspberrypi:~ $ dpkg -l   | grep -i configobj
ii  python3-configobj                     5.0.6-3                                all          simple but powerful config file reader and writer for Python 3
pi@raspberrypi:~ $ pip list  | grep -i configobj
configobj         5.0.6
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
pi@raspberrypi:~ $ pip3 list | grep -i configobj
configobj         5.0.6
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
pi@raspberrypi:~ $

vince

unread,
Sep 8, 2020, 4:08:44 PM9/8/20
to weewx-user
On Tuesday, September 8, 2020 at 12:50:16 PM UTC-7, ExprmntAl wrote:
OK Vince, thanks for helping me.  Here is what I got.

pi@raspberrypi:~ $ dpkg -l   | grep -i configobj
ii  python3-configobj                     5.0.6-3                                all          simple but powerful config file reader and writer for Python 3
pi@raspberrypi:~ $ pip list  | grep -i configobj
configobj         5.0.6
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
pi@raspberrypi:~ $ pip3 list | grep -i configobj
configobj         5.0.6
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.


wow - you have it from a package (python3), from pip (python3), and from pip (python2)

So it's definitely there....meaning it's a weather34 thing I *think* at this point.

Tom Keffer

unread,
Sep 8, 2020, 6:29:17 PM9/8/20
to weewx-user
Maybe.  Mr AI's response shows that configobj was installed for python 3, but not necessarily python 2. And... we don't know what version of python is being used, because we have not seen a log.

Stop weewxd, set debug=1, restart weewxd. Post the log from startup through the first reporting cycle.

-tk

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

ExprmntAl

unread,
Sep 8, 2020, 8:11:30 PM9/8/20
to weewx-user
Ok TK, here is the Syslog with Debug = 1 from startup through the first reporting cycle.

pi@raspberrypi:~ $ sudo /etc/init.d/weewx stop
[ ok ] Stopping weewx (via systemctl): weewx.service.
pi@raspberrypi:~ $ sudo /etc/init.d/weewx start
[ ok ] Starting weewx (via systemctl): weewx.service.
pi@raspberrypi:~ $ tail -f /var/log/syslog
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Loading service weewx.engine.StdPrint
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Finished loading service weewx.engine.StdPrint
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Loading service weewx.engine.StdReport
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Finished loading service weewx.engine.StdReport
Sep  8 19:04:13 raspberrypi weewx[15908] INFO __main__: Starting up weewx version 4.1.1
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Station does not support reading the time
Sep  8 19:04:13 raspberrypi weewx[15908] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
Sep  8 19:04:13 raspberrypi weewx[15908] INFO weewx.manager: Starting backfill of daily summaries
Sep  8 19:04:13 raspberrypi weewx[15908] INFO weewx.engine: Starting main packet loop.
Sep  8 19:04:13 raspberrypi /weewxd: weatherflowudp: MainThread: Listening for UDP broadcasts to IP address <broadcast> on port 50222, with timeout 90 and share_socket True...
Sep  8 19:04:40 raspberrypi dhcpcd[410]: wlan0: Router Advertisement from fe80::9610:3eff:fe86:b14b
Sep  8 19:05:26 raspberrypi weewx[15908] INFO weewx.manager: Added record 2020-09-08 19:05:00 CDT (1599609900) to database 'weewx.sdb'
Sep  8 19:05:26 raspberrypi weewx[15908] INFO weewx.manager: Added record 2020-09-08 19:05:00 CDT (1599609900) to daily summary in 'weewx.sdb'
Sep  8 19:05:27 raspberrypi weewx[15908] DEBUG weewx.reportengine: Running reports for latest time in the database.
Sep  8 19:05:27 raspberrypi /weewxd: weatherflowudp: MainThread: Listening for UDP broadcasts to IP address <broadcast> on port 50222, with timeout 90 and share_socket True...
Sep  8 19:05:27 raspberrypi weewx[15908] DEBUG weewx.reportengine: Running report 'SeasonsReport'
Sep  8 19:05:27 raspberrypi weewx[15908] DEBUG weewx.reportengine: Found configuration file /etc/weewx/skins/Seasons/skin.conf for report 'SeasonsReport'
Sep  8 19:05:27 raspberrypi weewx[15908] DEBUG weewx.cheetahgenerator: Using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras']
Sep  8 19:05:27 raspberrypi weewx[15908] DEBUG weewx.manager: Daily summary version is 2.0
Sep  8 19:05:29 raspberrypi weewx[15908] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 1.94 seconds
Sep  8 19:05:29 raspberrypi weewx[15908] DEBUG weewx.manager: Daily summary version is 2.0
Sep  8 19:05:31 raspberrypi weewx[15908] INFO weewx.imagegenerator: Generated 30 images for report SeasonsReport in 2.72 seconds
Sep  8 19:05:31 raspberrypi weewx[15908] INFO weewx.reportengine: Copied 5 files to /var/www/html/weewx
Sep  8 19:05:31 raspberrypi weewx[15908] DEBUG weewx.reportengine: Report 'SmartphoneReport' not enabled. Skipping.
Sep  8 19:05:31 raspberrypi weewx[15908] DEBUG weewx.reportengine: Report 'MobileReport' not enabled. Skipping.
Sep  8 19:05:31 raspberrypi weewx[15908] DEBUG weewx.reportengine: Report 'StandardReport' not enabled. Skipping.
Sep  8 19:05:31 raspberrypi weewx[15908] DEBUG weewx.reportengine: Report 'FTP' not enabled. Skipping.
Sep  8 19:05:31 raspberrypi weewx[15908] DEBUG weewx.reportengine: Report 'RSYNC' not enabled. Skipping.
Sep  8 19:06:11 raspberrypi dhcpcd[410]: wlan0: Router Advertisement from fe80::9610:3eff:fe86:b14b

Tom Keffer

unread,
Sep 8, 2020, 9:29:34 PM9/8/20
to weewx-user
You missed the early parts of the startup, when it would tell us what version of Python is being used.

It's OK to use tail -f, but you've got to use it before starting up weewxd, not afterwards.

-tk

ExprmntAl

unread,
Sep 8, 2020, 9:38:51 PM9/8/20
to weewx-user
Appologies TK.  Here is the log capturing the weewx start as well.

Sep  8 19:00:10 raspberrypi dbus-daemon[14817]: [session uid=0 pid=14814] Activating service name='ca.desrt.dconf' requested by ':1.0' (uid=0 pid=14807 comm="mousepad ")
Sep  8 19:00:10 raspberrypi dbus-daemon[14817]: [session uid=0 pid=14814] Successfully activated service 'ca.desrt.dconf'
Sep  8 19:00:16 raspberrypi dbus-daemon[385]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.87' (uid=0 pid=14807 comm="mousepad ")
Sep  8 19:00:16 raspberrypi systemd[1]: Starting Hostname Service...
Sep  8 19:00:16 raspberrypi dbus-daemon[385]: [system] Successfully activated service 'org.freedesktop.hostname1'
Sep  8 19:00:16 raspberrypi systemd[1]: Started Hostname Service.
Sep  8 19:00:46 raspberrypi systemd[1]: systemd-hostnamed.service: Succeeded.
Sep  8 19:00:52 raspberrypi dhcpcd[410]: wlan0: Router Advertisement from fe80::9610:3eff:fe86:b14b
Sep  8 19:02:58 raspberrypi dhcpcd[410]: wlan0: Router Advertisement from fe80::9610:3eff:fe86:b14b
Sep  8 19:04:12 raspberrypi systemd[1]: Starting LSB: weewx weather system...
Sep  8 19:04:13 raspberrypi weewx[15900] INFO __main__: Initializing weewx version 4.1.1
Sep  8 19:04:13 raspberrypi weewx[15900] INFO __main__: Using Python 3.7.3 (default, Jul 25 2020, 13:03:44) #012[GCC 8.3.0]
Sep  8 19:04:13 raspberrypi weewx[15900] INFO __main__: Platform Linux-5.4.51-v7l+-armv7l-with-debian-10.4
Sep  8 19:04:13 raspberrypi weewx[15900] INFO __main__: Locale is 'en_US.UTF-8'
Sep  8 19:04:13 raspberrypi weewx[15900] INFO __main__: PID file is /var/run/weewx.pid
Sep  8 19:04:13 raspberrypi weewx[15908] INFO __main__: Using configuration file /etc/weewx/weewx.conf
Sep  8 19:04:13 raspberrypi weewx[15908] INFO __main__: Debug is 1
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG __main__: Initializing engine
Sep  8 19:04:13 raspberrypi weewx[15908] INFO weewx.engine: Loading station type WeatherFlowUDP (user.weatherflowudp)
Sep  8 19:04:13 raspberrypi weewx[15887]: Starting weewx weather system: weewx.
Sep  8 19:04:13 raspberrypi systemd[1]: Started LSB: weewx weather system.
Sep  8 19:04:13 raspberrypi /weewxd: weatherflowudp: MainThread: driver version is 1.10
Sep  8 19:04:13 raspberrypi /weewxd: weatherflowudp: MainThread: sensor map is {'outTemp': 'air_temperature.ST-00015273.obs_st', 'outHumidity': 'relative_humidity.ST-00015273.obs_st', 'pressure': 'station_pressure.ST-00015273.obs_st', 'outTempBatteryStatus': 'battery.ST-00015273.obs_st', 'windSpeed': 'wind_speed.ST-00015273.rapid_wind', 'windDir': 'wind_direction.ST-00015273.rapid_wind', 'UV': 'uv.ST-00015273.obs_st', 'rain': 'rain_accumulated.ST-00015273.obs_st', 'windBatteryStatus': 'battery.ST-00015273.obs_st', 'radiation': 'solar_radiation.ST-00015273.obs_st'}
Sep  8 19:04:13 raspberrypi /weewxd: weatherflowudp: MainThread: *** Sensor names per packet type
Sep  8 19:04:13 raspberrypi /weewxd: weatherflowudp: MainThread: packet obs_air: ('time_epoch', 'station_pressure', 'air_temperature', 'relative_humidity', 'lightning_strike_count', 'lightning_strike_avg_distance', 'battery', 'report_interval')
Sep  8 19:04:13 raspberrypi /weewxd: weatherflowudp: MainThread: packet obs_sky: ('time_epoch', 'illuminance', 'uv', 'rain_accumulated', 'wind_lull', 'wind_avg', 'wind_gust', 'wind_direction', 'battery', 'report_interval', 'solar_radiation', 'local_day_rain_accumulation', 'precipitation_type', 'wind_sample_interval')
Sep  8 19:04:13 raspberrypi /weewxd: weatherflowudp: MainThread: packet rapid_wind: ('time_epoch', 'wind_speed', 'wind_direction')
Sep  8 19:04:13 raspberrypi /weewxd: weatherflowudp: MainThread: packet evt_precip: time_epoch
Sep  8 19:04:13 raspberrypi /weewxd: weatherflowudp: MainThread: packet evt_strike: ('time_epoch', 'distance', 'energy')
Sep  8 19:04:13 raspberrypi /weewxd: weatherflowudp: MainThread: packet obs_st: ('time_epoch', 'wind_lull', 'wind_avg', 'wind_gust', 'wind_direction', 'wind_sample_interval', 'station_pressure', 'air_temperature', 'relative_humidity', 'illuminance', 'uv', 'solar_radiation', 'rain_accumulated', 'precipitation_type', 'lightning_strike_avg_distance', 'lightning_strike_count', 'battery', 'report_interval')
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Loading service weewx.engine.StdTimeSynch
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Finished loading service weewx.engine.StdTimeSynch
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Loading service weewx.engine.StdConvert
Sep  8 19:04:13 raspberrypi weewx[15908] INFO weewx.engine: StdConvert target unit is 0x1
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Finished loading service weewx.engine.StdConvert
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Loading service weewx.engine.StdCalibrate
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Finished loading service weewx.engine.StdCalibrate
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Loading service weewx.engine.StdQC
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Finished loading service weewx.engine.StdQC
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Loading service weewx.wxservices.StdWXCalculate
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.manager: Daily summary version is 2.0
Sep  8 19:04:13 raspberrypi weewx[15908] INFO weewx.wxservices: The following values will be calculated: pressure=prefer_hardware, altimeter=prefer_hardware, appTemp=prefer_hardware, barometer=prefer_hardware, beaufort=prefer_hardware, cloudbase=prefer_hardware, dewpoint=prefer_hardware, ET=prefer_hardware, heatindex=prefer_hardware, humidex=prefer_hardware, inDewpoint=prefer_hardware, maxSolarRad=prefer_hardware, rainRate=prefer_hardware, windchill=prefer_hardware, windrun=prefer_hardware
Sep  8 19:04:13 raspberrypi weewx[15908] INFO weewx.wxservices: The following algorithms will be used for calculations: altimeter=aaASOS, maxSolarRad=RS
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Finished loading service weewx.wxservices.StdWXCalculate
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Loading service weewx.engine.StdArchive
Sep  8 19:04:13 raspberrypi weewx[15908] INFO weewx.engine: Archive will use data binding wx_binding
Sep  8 19:04:13 raspberrypi weewx[15908] INFO weewx.engine: Record generation will be attempted in 'hardware'
Sep  8 19:04:13 raspberrypi weewx[15908] INFO weewx.engine: Using archive interval of 300 seconds (specified in weewx configuration)
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Use LOOP data in hi/low calculations: 1
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Finished loading service weewx.engine.StdArchive
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Loading service weewx.restx.StdStationRegistry
Sep  8 19:04:13 raspberrypi weewx[15908] INFO weewx.restx: StationRegistry: Registration not requested.
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Finished loading service weewx.restx.StdStationRegistry
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Loading service weewx.restx.StdWunderground
Sep  8 19:04:13 raspberrypi weewx[15908] INFO weewx.restx: Wunderground: Posting not enabled.
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Finished loading service weewx.restx.StdWunderground
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Loading service weewx.restx.StdPWSweather
Sep  8 19:04:13 raspberrypi weewx[15908] INFO weewx.restx: PWSweather: Posting not enabled.
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Finished loading service weewx.restx.StdPWSweather
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Loading service weewx.restx.StdCWOP
Sep  8 19:04:13 raspberrypi weewx[15908] INFO weewx.restx: CWOP: Posting not enabled.
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Finished loading service weewx.restx.StdCWOP
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Loading service weewx.restx.StdWOW
Sep  8 19:04:13 raspberrypi weewx[15908] INFO weewx.restx: WOW: Posting not enabled.
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Finished loading service weewx.restx.StdWOW
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Loading service weewx.restx.StdAWEKAS
Sep  8 19:04:13 raspberrypi weewx[15908] INFO weewx.restx: AWEKAS: Posting not enabled.
Sep  8 19:04:13 raspberrypi weewx[15908] DEBUG weewx.engine: Finished loading service weewx.restx.StdAWEKAS
Sep  8 19:07:39 raspberrypi dhcpcd[410]: wlan0: Router Advertisement from fe80::9610:3eff:fe86:b14b

Tom Keffer

unread,
Sep 9, 2020, 6:33:30 AM9/9/20
to weewx-user
So, weewxd is using python3, and configobj is definitely installed under python3. 

This is probably a simple case of configobj being installed under Python 3, but not Python 2. Looking back in this thread, the original problem was probably caused by using  the wrong version of Python. Try this:

sudo python3 w34_installer.py

-tk

ExprmntAl

unread,
Sep 9, 2020, 7:54:09 AM9/9/20
to weewx-user
That seems to have done it! 

pi@raspberrypi:~ $ cd weewx-Weather34
pi@raspberrypi:~/weewx-Weather34 $ sudo python3 w34_installer.py
!!! THIS INSTALL IS USING PYTHON VERSION 3.7.3 IS THIS CORRECT? (Yes/No)
Install will continue with Python Version 3.7.3
1 -> macos.conf
2 -> packaged.conf
3 -> setup_py.conf
Enter the NUMBER of the installer config file 2
Installer Config file packaged.conf was chosen.
Updating weewx config
Done!
pi@raspberrypi:~/weewx-Weather34 $

Another stupid question:  Looking at the files generated in the /var/www/html/weewx/weather34 directory.  They are all .php files.  For some reason the Chrome browser on the RPi doesn't recognize those files.  Is there something that needs to be done to get these PHP files to open in the browser?  Ian walked me through the installation of PHP and all its libraries prior up at the top of this thread and I thought that that would configure the browser for PHP as well.

steeple ian

unread,
Sep 9, 2020, 9:56:49 AM9/9/20
to weewx...@googlegroups.com
Allan,

Just to make sure php is installed: -

sudo apt install php -y


steeple ian

unread,
Sep 9, 2020, 10:01:45 AM9/9/20
to weewx...@googlegroups.com
Tom,

Thanks for resolving this. I was pretty sure what the problem was but could not get it across in the way you could.

IM

On Wed, 9 Sep 2020 at 12:54, ExprmntAl <72604...@compuserve.com> wrote:

ExprmntAl

unread,
Sep 9, 2020, 1:59:36 PM9/9/20
to weewx-user
PHP is installed for sure see below.  You had me install it before getting to the weewx-Weather34 installation.  I assumed that with PHP installed, that anything *.php would open similar to a *.html file in the Chromium browser.  Is this correct?

pi@raspberrypi:~/weewx-Weather34 $ php -v
PHP 7.3.19-1~deb10u1 (cli) (built: Jul  5 2020 06:46:45) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.19, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.19-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies
pi@raspberrypi:~/weewx-Weather34 $

ExprmntAl

unread,
Sep 9, 2020, 8:25:37 PM9/9/20
to weewx-user
UPDATE:

I tried accessing the Weather34 index.php file via both the Edge and IE browsers on a Windows 10 machine on the same network as the RPi and it works fine using the address:

http://192.168.1.145/weewx/weather34/index.php (where 192.168.1.145 is the RPi local address).  The sensor data from my Tempest is displayed including the rapid fire wind values using this method.

I have tried a number of variations of addresses that work with my seasons skin using the weather34 html directory, but I still can't get the Chromium Browser on the RPi to open the index.php file for some reason though.

The seasons skin file is accessed by putting "file:///var/www/html/weewx/index.html" into the Chromium browser on the RPi and this works normally.  It would follow that to access the Weather34 skin I would use "file:///var/www/html/weewx/weather34/index.php".  This starts downloading the file instead of rendering the skin.

Does Chromium need to be configured in some way on the RPi to render php files?

rich T

unread,
Sep 9, 2020, 9:00:56 PM9/9/20
to weewx-user

"Does Chromium need to be configured in some way on the RPi to render php files?" This might be your answer: https://www.raspberrypi.org/forums/viewtopic.php?t=270383#p1640747

steeple ian

unread,
Sep 10, 2020, 2:33:00 AM9/10/20
to weewx...@googlegroups.com
Allan,

You may have missed this part of the instructions which would make sense with what Rich T has suggested: -

sudo a2enmod php7.3
sudo systemctl restart apache2

steeple ian

unread,
Sep 10, 2020, 2:37:21 AM9/10/20
to weewx...@googlegroups.com
Sorry I missed a line: -

sudo apt-get install libapache2-mod-php before running the next two lines

sudo a2enmod php7.3
sudo systemctl restart apache2

ExprmntAl

unread,
Sep 10, 2020, 6:28:32 AM9/10/20
to weewx-user
Tried your suggestion and still no go.  See below.

pi@raspberrypi:~ $ sudo apt-get install libapache2-mod-php
Reading package lists... Done
Building dependency tree
Reading state information... Done
libapache2-mod-php is already the newest version (2:7.3+69).
The following packages were automatically installed and are no longer required:
  libexiv2-14 libgfortran3 libgmime-2.6-0 libncurses5 libssl1.0.2 rpi-eeprom-images
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@raspberrypi:~ $ sudo a2enmod php7.3
Considering dependency mpm_prefork for php7.3:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php7.3:
Module php7.3 already enabled
pi@raspberrypi:~ $ sudo systemctl restart apache2
pi@raspberrypi:~ $                 

This is how I am entering the address in Chromium on the RPi.

file://www/html/weewx/weather34/index.php

The address "file://www/html/weewx/index.html" seams to work fine for the seasons skin so I have been going off the assumption that a similar address format to the php file should work as well but when I click enter, it just downloads the index.php file instead of opening it in the browser.

Glenn McKechnie

unread,
Sep 10, 2020, 7:06:56 AM9/10/20
to weewx...@googlegroups.com
On 10/09/2020, ExprmntAl <72604...@compuserve.com> wrote:
> Tried your suggestion and still no go. See below.
>
> *pi@raspberrypi:~ $ sudo apt-get install libapache2-mod-php*
> *Reading package lists... Done*
> *Building dependency tree*
> *Reading state information... Done*
> *libapache2-mod-php is already the newest version (2:7.3+69).*
> *The following packages were automatically installed and are no longer
> required:*
> * libexiv2-14 libgfortran3 libgmime-2.6-0 libncurses5 libssl1.0.2
> rpi-eeprom-images*
> *Use 'sudo apt autoremove' to remove them.*
> *0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.*
> *pi@raspberrypi:~ $ sudo a2enmod php7.3*
> *Considering dependency mpm_prefork for php7.3:*
> *Considering conflict mpm_event for mpm_prefork:*
> *Considering conflict mpm_worker for mpm_prefork:*
> *Module mpm_prefork already enabled*
> *Considering conflict php5 for php7.3:*
> *Module php7.3 already enabled*
> *pi@raspberrypi:~ $ sudo systemctl restart apache2*
> *pi@raspberrypi:~ $ *

Everything you have done above allows a php file to be executed by
your webserver and therefore the html content generated and displayed
in the browser that views it.

> This is how I am entering the address in Chromium on the RPi.
>
> file://www/html/weewx/weather34/index.php

That's never going to work.

When you use the file:// method of browser access you are accessing
the file via your filesystem. You are bypassing the php interpreter
that you installed on your webserver. The browser does not know what
to do with it, so it displays it (the php contents) Nothing gets
executed. Nothing has been converted to html.

You need to access that file via
http://your_web_server_with_php_enabled/weewx/weather34/index.php

> The address "file://www/html/weewx/index.html" seams to work fine for the
> seasons skin so I have been going off the assumption that a similar address

It's a html file, the browser knows what to do with html. It displays it.

> format to the php file should work as well but when I click enter, it just
> downloads the index.php file instead of opening it in the browser.

Yep, that's exactly what it will do - no interpreter is available. No
html is generated. Access it via your webserver and you will get the
html page it generates.

--


Cheers
Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie

ExprmntAl

unread,
Sep 10, 2020, 8:36:58 AM9/10/20
to weewx-user
Hi Glen.  Thanks for trying to help me out.   
Can you give me an example of what this would look like?  I don't know what to use for the "your_web_server_with_php_enabled" portion of the address.  Though I didn't mention it, I have tried "http://www/html/weewx/weather34/index.php" in Chromium on the RPi and this did not work either.  

Andrew Milner

unread,
Sep 10, 2020, 8:47:40 AM9/10/20
to weewx-user
try the ip address of the php enabled web server if it is local on your network or the external URL to the web host if extenal

ExprmntAl

unread,
Sep 10, 2020, 9:41:35 AM9/10/20
to weewx-user
That was it!!!  The magic address was:

http://192.168.1.145/weewx/weather34/index.php  where "192.168.1.145" is the local url to the web host.

I can now access it via VNC Viewer from outside my network and on all devices on my local network as well this way.  I didn't realize that I would have to use the same local webhost address on the RPi itself.

Thanks so much for the help Andrew!  I'm a happy camper now!!!
Reply all
Reply to author
Forward
0 new messages