Belchertown and Tempest battery voltage

308 views
Skip to first unread message

Dan Roman

unread,
Mar 25, 2023, 8:06:29 PM3/25/23
to weewx-user
I've been running stock Weewx for about a year and finally got around to trying other skins.  First one I tried is Belchertown and I like it a lot.  I have most things working but when I tried to update about.inc to display the Tempest battery voltage the same way I added it to the Seasons skin, it does not seem to work.  Do I need to do something differently?  Below is what I added to sensors.inc in the Seasons skin.  I copied and pasted it into about.inc and it does not display anything.

I did a little digging around in the Seasons skin to see if anything in the configuration was different and needed to be added to the configuration of Belchertown but did not see anything obvious.

Thanks!

## Modified battery code for Tempest
#def get_battery_status($x)
  #set $y = "{:.2f}".format($x)
  #if $x >= 2.455
    <span class="status_ok">OK - $y</span>
  #else
    #if $x >= 2.41
      <span class="status_low">LOW - mode 1 - $y</span>
    #else
      #if $x >= 2.39
        <span class="status_low">LOW - mode 2 - $y</span>
      #else
        <span class="status_low">LOW - mode 3 - $y</span>
      #end if
    #end if
  #end if
#end def

vince

unread,
Mar 25, 2023, 9:51:25 PM3/25/23
to weewx-user
You need to actually call the get_battery_status() routine too...

Take a look at what the Seasons skin does...

Wayne Rademacher

unread,
Mar 27, 2023, 3:54:39 PM3/27/23
to weewx-user
Dan,
I have a Tempest and the Belchertown skin.   

All I did to get to display battery voltage was place the "windBatteryStatus" variable in the station observations string.  I also added "luminosity" to the string.  To use luminosity (Brightness) you will need to change the sensor map title from luxXX to luminosity.   I included both the Station Observation string and my sensor map for your reference.  Btw, you can also change the sensor titles in the weewx.conf  file.

Wayne

station_observations = "barometer","dewpoint","outHumidity","rain", "luminosity", "UV", "cloud_cover", "windBatteryStatus"

[[sensor_map]]
        outTemp = air_temperature.ST-00105xxx.obs_st
        outHumidity = relative_humidity.ST-00105xxx.obs_st
        pressure = station_pressure.ST-00105xxx.obs_st
        lightning_strikes = lightning_strike_count.ST-00105xxx.obs_st
        avg_distance = lightning_strike_avg_distance.ST-00105xxx.obs_st
        outTempBatteryStatus = battery.ST-00105xxx.obs_st
        windSpeed = wind_speed.ST-00105xxx.rapid_wind
        windDir = wind_direction.ST-00105xxx.rapid_wind
        luminosity = illuminance.ST-00105xxx.obs_st
        UV = uv.ST-00105xxx.obs_st
        rain = rain_accumulated.ST-00105xxx.obs_st
        windBatteryStatus = battery.ST-00105xxx.obs_st
        radiation = solar_radiation.ST-00105xxx.obs_st
        lightningXXX = distance.ST-00105xxx.evt_strike
        lightningYYY = energy.ST-00105xxx.evt_strike
        radiation = solar_radiation.ST-00105xxx.obs_st
        lightningXXX = distance.ST-00105xxx.evt_strike
        lightningYYY = energy.ST-001056xxx.evt_strike

Dan Roman

unread,
Mar 28, 2023, 10:36:51 PM3/28/23
to weewx...@googlegroups.com
Thanks Wayne, very helpful.  I had made some progress but this sped things up for me.  I have been slowly learning more about custom configuring weewx and its skins.  Info is out there, depending on what you are looking for it can be scattered.  My next step is to figure out how to change the number of decimal points displayed for the battery voltage and to get the lightning strike count working.  

I added lightning_strikes to the Belchertown observation list but right now it is displaying "Invalid observation".  Not sure if this is because there are no thunderstorms or if there is a problem with the reading.  I'll wait until I get a thunderstorm and see what is displayed.  I would like to dig into the code and figure out if I can change "Invalid observation" to "No lightning detected today" or something like that.  Not sure it if is in the skin or weewx but greping around should find it.

Thanks again for your help.

Dan


--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/huVKwO86oqs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/693d4ce5-5196-47f9-ac10-0b2c8525ebcbn%40googlegroups.com.


--
Dan Roman
 
Message has been deleted
Message has been deleted

Dan Roman

unread,
Apr 1, 2023, 2:59:46 PM4/1/23
to weewx...@googlegroups.com
Yes Wayne, thanks again.  I've got my brightness and battery voltage displaying properly and well formatted using the Belchertown skin.  We had a thunderstorm this morning but the lightning reading still was not working.  I've removed that observation until I can figure out how to display the number of lightning strikes for the current day.  Some of the information gleaned from the luminosity and battery measurements may help me figure out lightning.

I think besides working on lightning I am going to look at how to add data like battery or lightning to the weewx database and playing around with adding more graphs to Belchertown.


On Wed, Mar 29, 2023 at 7:54 PM Wayne Rademacher <jordanmac...@gmail.com> wrote:
Dan,

We solved the decimal point issue..... 

Check out the conversation:  
How do I change the number of displayed decimal places?

Wayne



--
Dan Roman
 

Alex Chaney

unread,
Jun 18, 2023, 9:47:07 AM6/18/23
to weewx-user
Dan,

Did you happen to figure out how to get the  lightning_strikes to display properly?  I am currently going through the same.

Dan Roman

unread,
Jun 18, 2023, 9:55:45 PM6/18/23
to weewx...@googlegroups.com
Hi Alex,

No, I did not figure out how to get it to work.  I saved a few threads that I think might help out, but I have not had a chance to work on it to try to figure it out yet.

Dan




--
Dan Roman
 
Reply all
Reply to author
Forward
0 new messages