Closed PilotBob42 closed 2 years ago
1) There is no set install path as it depends on the Linux distribution and the installation method (deb, rpm, setup.py). 2) You need to confirm that python3 is correctly configured on your system.
If you're using a deb based install, the paths are here: http://www.weewx.com/docs/debian.htm#:~:text=www/html/weewx-,Layout,-The%20installation%20will
If setup.py, see here: http://www.weewx.com/docs/setup.htm#:~:text=init.d/weewx-,Layout,-The%20installation%20will
I still don't know which path on either of those pages you are saying is the correct path to put the ambientweatherapi.py? I installed weewx via apt (deb based) so the first link would be applicable for my install. I assume you are referring to one of the paths in the "layout" section at the bottom, but which one? "Utilities" would be the only one that makes sense, but the directory listed isn't really a directory since it contains a wildcard. I currently have ambientweatherapi.py in /usr/bin and the service isn't finding it. Am I supposed to put in /usr/bin as wee_ambientweatherapi.py?
The installation will result in the following layout:
executable: | /usr/bin/weewxd |
---|---|
configuration file: | /etc/weewx/weewx.conf |
skins and templates: | /etc/weewx/skins |
sqlite databases: | /var/lib/weewx/ |
generated web pages and images: | /var/www/html/weewx/ |
documentation: | /usr/share/doc/weewx/ |
examples: | /usr/share/doc/weewx/examples/ |
utilities: | /usr/bin/wee_* |
Does your install have a /usr/share/weewx/user
directory?
Yes, that was it, thank you. /usr/share/weewx/user
is where it needed to be. Since I had installed weewx via apt there were a few more steps for me to get it to work. First, I had to make it executable with a chmod 775 /usr/share/weewx/user/ambientweatherapi.py
. Then, since the weewx package makes you pick a device on install (I had picked simulator), I had to do a reconfigure by sudo wee_config --reconfigure
and then answer the prompts again to get it to start using the user.ambientweatherapi
driver instead of the simulator. Then, once more into the weewx.conf file to insert my API and App API keys and make any other needed changes. Lastly, restarted the service and waited a few minutes for it to start picking up data from my station. Which it finally did successfully.
Resolved.
In the README, the following bit is frustratingly unhelpful. The provided link does nothing to help the user understand where exactly the ambientweatherapi.py should be copied. I'm on Linux Mint 20.3 Una (Ubuntu 20.04 "focal" base), where exactly should I place the ambientweatherapi.py file such that WeeWX will find it? I have confirmed that this is my issue as WeeWX is reporting "ModuleNotFoundError: No module named 'user.ambientweatherapi'"
"2. Copy bin/user/ambientweatherapi.py to the bin/user directory. The directory location depends on your install type. See here for more informaiton."