How to setup the Low Battery Alarm

38 views
Skip to first unread message

Francis

unread,
Apr 7, 2026, 10:06:36 AM (4 days ago) Apr 7
to weewx-user
I cannot believe I am having so much trouble setting up the lowBattery.py with alarm.py so I get an email when a battery is low!
I have searched this forum and the internet, but I cannot find instructions on exactly how to set this up.
I have been using weewx for many years. I have been using Linux for probably 25 years. I have LOTS of Raspberry Pis of all sorts checking this and that, I also program in Python a good bit.
I have a Davis Vantage Pro 2 with a Pi4 running weewx version 5.2.0-1 installed using the package manager.
I have the Wind Sensor on Station 3 and the ISS on Station 2.
Reading the alarm.py and lowBattery.py files I thought I had to put these files into this folder: /usr/share/weewx/user
This did not work with error: ModuleNotFoundError: No module named 'user.lowBattery'
I reported this on the GitHub page as an issue when I should have reported here. I was not aware there was a group here. 
It was suggested I put the user folder in the same folder as the weewx.conf file which I have done.
I added this  report_services = weewx.engine.StdPrint, weewx.engine.StdReport, user.lowBattery.BatteryAlarm to the [Engine] section of the config file.
My alarm.py is the same as the example in the lowBattery.py file but obvoiusly I have changed the mailing info to suit my network.
I still get the error when I start weewx. Please see the attached file
Clearly I am not understanding where to place the two files in a system which used the Package Manager to install weewx.
Also what battery-flags should I include and where?
Also what value should I use to trigger the alarm?
weewx_error.txt

Tom Keffer

unread,
Apr 7, 2026, 10:25:01 AM (4 days ago) Apr 7
to weewx...@googlegroups.com
With V5.0, the user folder has moved from /usr/share/weewx/user to /etc/weewx/bin/user. Note the 'bin' in the path. See the Upgrade Guide section New location for user directory

--
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 visit https://groups.google.com/d/msgid/weewx-user/ede6de1a-e213-49f2-938b-0d5b0cde9d94n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages