Hi Gary, Wow... This was so generous of you to provide, thank you! I followed your instructions and it worked perfectly. At first I left the extra sensor entries in the "sensors.inc" file, but when the report ran it generated the following error(s).
Aug 13 23:11:01 myweewx weewx[24594] DEBUG weewx.reportengine: Running > reports for latest time in the database. Aug 13 23:11:01 myweewx weewx[24594] DEBUG weewx.reportengine: Running > report 'SeasonsReport' Aug 13 23:11:01 myweewx weewx[24594] DEBUG weewx.reportengine: Found > configuration file /home/weewx/skins/Seasons/skin.conf for report > 'SeasonsReport' Aug 13 23:11:01 myweewx weewx[24594] DEBUG weewx.cheetahgenerator: Using > search list ['weewx.cheetahgenerator.Almanac', > 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', > 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', > 'weewx.cheetahgenerator.Extras'] Aug 13 23:11:01 myweewx weewx[24594] DEBUG weewx.manager: Daily summary > version is 2.0 Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: Generate > failed with exception '<class 'TypeError'>' Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > Ignoring template /home/weewx/skins/Seasons/index.html.tmpl Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > Reason: 'UnknownType' object is not subscriptable Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > Traceback (most recent call last): Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > File "/home/weewx/bin/weewx/cheetahgenerator.py", line 322, in generate Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > unicode_string = compiled_template.respond() Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > File "_home_weewx_skins_Seasons_index_html_tmpl.py", line 225, in respond > Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > File "/usr/lib/python3/dist-packages/Cheetah/Template.py", line 1708, in > _handleCheetahInclude Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > self._CHEETAH__cheetahIncludes[_includeID].respond(trans) Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > File "_home_weewx_skins_Seasons_sensors_inc.py", line 325, in respond > Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > File "/home/weewx/bin/weewx/units.py", line 1083, in raw Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > return self._raw_value_tuple[0] Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > File "/home/weewx/bin/weewx/units.py", line 1106, in _raw_value_tuple Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > vtx = self.converter.convert(self.value_t) Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > File "/home/weewx/bin/weewx/units.py", line 889, in convert Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > if val_t[1] is None and val_t[2] is None: Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > TypeError: 'UnknownType' object is not subscriptable Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: Generate > failed with exception '<class 'TypeError'>' Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > Ignoring template /home/weewx/skins/Seasons/telemetry.html.tmpl Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > Reason: 'UnknownType' object is not subscriptable Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > Traceback (most recent call last): Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > File "/home/weewx/bin/weewx/cheetahgenerator.py", line 322, in generate Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > unicode_string = compiled_template.respond() Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > File "_home_weewx_skins_Seasons_telemetry_html_tmpl.py", line 195, in > respond > Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > File "/usr/lib/python3/dist-packages/Cheetah/Template.py", line 1708, in > _handleCheetahInclude Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > self._CHEETAH__cheetahIncludes[_includeID].respond(trans) Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > File "_home_weewx_skins_Seasons_sensors_inc.py", line 325, in respond > Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > File "/home/weewx/bin/weewx/units.py", line 1083, in raw Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > return self._raw_value_tuple[0] Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > File "/home/weewx/bin/weewx/units.py", line 1106, in _raw_value_tuple Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > vtx = self.converter.convert(self.value_t) Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > File "/home/weewx/bin/weewx/units.py", line 889, in convert Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > if val_t[1] is None and val_t[2] is None: Aug 13 23:11:01 myweewx weewx[24594] ERROR weewx.cheetahgenerator: **** > TypeError: 'UnknownType' object is not subscriptable Aug 13 23:11:01 myweewx weewx[24594] INFO weewx.cheetahgenerator: Generated > 6 files for report SeasonsReport in 0.25 seconds Aug 13 23:11:01 myweewx weewx[24594] DEBUG weewx.manager: Daily summary > version is 2.0 Aug 13 23:11:01 myweewx weewx[24594] INFO weewx.imagegenerator: Generated > 15 images for report SeasonsReport in 0.17 seconds Aug 13 23:11:01 myweewx weewx[24594] INFO weewx.reportengine: Copied 0 > files to /home/weewx/public_html Aug 13 23:11:01 myweewx weewx[24594] DEBUG weewx.reportengine: Report > 'SmartphoneReport' not enabled. Skipping. Aug 13 23:11:01 myweewx weewx[24594] DEBUG weewx.reportengine: Report > 'MobileReport' not enabled. Skipping. Aug 13 23:11:01 myweewx weewx[24594] DEBUG weewx.reportengine: Report > 'StandardReport' not enabled. Skipping. Aug 13 23:11:01 myweewx weewx[24594] DEBUG weewx.reportengine: Report 'FTP' > not enabled. Skipping. Aug 13 23:11:01 myweewx weewx[24594] DEBUG weewx.reportengine: Report > 'RSYNC' not enabled. Skipping. But once I cleaned up the "sensors.inc" file to only include the sensors that are actually connecting, it worked beautifully. Aug 13 23:16:02 myweewx weewx[24594] DEBUG weewx.reportengine: Running reports for latest time in the database. Aug 13 23:16:02 myweewx weewx[24594] DEBUG weewx.reportengine: Running report 'SeasonsReport' Aug 13 23:16:02 myweewx weewx[24594] DEBUG weewx.reportengine: Found configuration file /home/weewx/skins/Seasons/skin.conf for report 'SeasonsReport' Aug 13 23:16:02 myweewx weewx[24594] DEBUG weewx.cheetahgenerator: Using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras'] Aug 13 23:16:02 myweewx weewx[24594] DEBUG weewx.manager: Daily summary version is 2.0 Aug 13 23:16:02 myweewx weewx[24594] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 0.28 seconds Aug 13 23:16:02 myweewx weewx[24594] DEBUG weewx.manager: Daily summary version is 2.0 Aug 13 23:16:02 myweewx weewx[24594] INFO weewx.imagegenerator: Generated 15 images for report SeasonsReport in 0.17 seconds Aug 13 23:16:02 myweewx weewx[24594] INFO weewx.reportengine: Copied 0 files to /home/weewx/public_html Aug 13 23:16:02 myweewx weewx[24594] DEBUG weewx.reportengine: Report 'SmartphoneReport' not enabled. Skipping. Aug 13 23:16:02 myweewx weewx[24594] DEBUG weewx.reportengine: Report 'MobileReport' not enabled. Skipping. Aug 13 23:16:02 myweewx weewx[24594] DEBUG weewx.reportengine: Report 'StandardReport' not enabled. Skipping. Aug 13 23:16:02 myweewx weewx[24594] DEBUG weewx.reportengine: Report 'FTP' not enabled. Skipping. Aug 13 23:16:02 myweewx weewx[24594] DEBUG weewx.reportengine: Report 'RSYNC' not enabled. Skipping. Aug 13 23:17:01 myweewx CRON[24631]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) Thanks again for your efforts, and very nice work! Rob On Thu, Aug 13, 2020 at 1:45 AM gjr80 <[email protected]> wrote: > Hi, > > You are correct in that sensors.inc needs to be modified and you probably > want to add a few entries to the Seasons skin.conf or weewx.conf as well. > I have included a modified sensors.inc > <https://github.com/gjr80/weewx-gw1000/tree/master/supplementary/skins/Seasons> > in the GW100 driver repo on GitHub. To modify Seasons to display GW100 > sensor battery states: > > 1. move aside your existing skins/Seasons/sensor.inc by renaming it to > sensors_orig.inc. For setup.py installs: > > $ sudo mv /home/weewx/skins/Seasons/sensors.inc /home/weewx/skins/Seasons/ > sensors_orig.inc > > or for package installs: > > $ sudo mv /etc/weewx/skins/Seasons/sensors.inc /home/weewx/skins/Seasons/ > sensors_orig.inc > > 2. download sensors.inc from the GW1000 driver GitHub repo, for setup.py > installs: > > $ wget -P /home/weewx/skins/Seasons https:// > raw.githubusercontent.com/gjr80/weewx-gw1000/master/supplementary/skins/Seasons/sensors.inc > > or for package installs: > > $ wget -P /etc/weewx/skins/Seasons https:// > raw.githubusercontent.com/gjr80/weewx-gw1000/master/supplementary/skins/Seasons/sensors.inc > > 3. edit sensors.inc and make the necessary changes to $sensor_batt_data > to reflect the sensors connected to your GW1000. There are comments towards > the top of the file that describe how to make the changes. > > 4. edit Seasons/skin.conf and if required add suitable descriptive names > for each sensor state field under the [Labels] [[Generic]] stanza. These > labels are the text that will appear for each sensor battery state entry in > the Sensor Status panel. For example: > > [Labels] > > # Override some labels. No need to identify these as a "Battery" > # or "Voltage", because that is included in the template. > [[Generic]] > .... > wh31_ch1_batt = Garage (WH31) > wh31_ch2_batt = Kitche (WH31) > wh41_ch1_batt = Dining (WH41) > wh51_ch1_batt = Front Garden (WH51) > wh51_ch3_batt = Flower Bed (WH51) > wh57_batt = Lightning (WH57) > > You could also place these entries in weewx.conf under [StdReport] > [[SeasonsReport]] [[Labels]]] [[[[Generic]]]]. The choice is yours, arguably > weewx.conf is upgrade safe but it is highly unlikely that a WeeWX upgrade > will make destructive changes to Seasons skin.conf. > > 5. On the next report cycle provided you have sensor battery state data in > your archive record it should be included in the Seasons main page Sensor > Status panel. Note you may have to refresh the page. > > Gary > > > > > On Wednesday, 12 August 2020 00:15:33 UTC+10, Blaze wrote: >> >> Hi, >> >> How do I show the battery status for my Ecowitt weather sensors? This is >> a default install running on "Ubuntu 20.04.1 LTS". I installed WeeWx using >> the setup.py, with Apache2, WeeWx v4.1.1 and the new GW1000 driver >> (gw1000-0.1.0b10.tar.gz). As you can see below I am getting the data, but >> I don't understand how to get battery status to show on my page. I assume I >> need to modify the "/home/weewx/skins/Seasons/sensors.inc" file, but I'm >> not sure what I would need to add or change. Can someone give me pointers? >> >> Aug 10 03:05:25 myweewx weewx[14186] DEBUG gw1000: user.gw1000: Filtered >> parsed data: {'intemp': 21.5, 'inhumid': 54, 'absbarometer': 985.8, >> 'relbarometer': 985.8, 'outtemp': 24.0, 'outhumid': 80, 'soilmoist1': 53, >> 'soilmoist2': 37, 'soilmoist3': 47, 'soilmoist4': 59, 'temp1': 19.3, >> 'humid1': 59, 'wh26_batt': 0, 'wh31_ch1_batt': 0, 'wh51_ch1_batt': 0, >> 'wh51_ch2_batt': 0, 'wh51_ch3_batt': 0, 'wh51_ch4_batt': 0, >> 'wh51_ch5_batt': 0, 'datetime': 1597028725} >> Aug 10 03:05:25 myweewx weewx[14186] DEBUG gw1000: user.gw1000: Next >> update in 60 seconds >> Aug 10 03:05:25 myweewx weewx[14186] DEBUG gw1000: user.gw1000: Augmented >> packet: {'dateTime': 1597028725, 'usUnits': 17, 'inTemp': 21.5, 'outTemp': >> 24.0, 'inHumidity': 54, 'outHumidity': 80, 'pressure': 985.8, >> 'relbarometer': 985.8, 'extraTemp1': 19.3, 'extraHumid1': 59, 'soilMoist1': >> 53, 'soilMoist2': 37, 'soilMoist3': 47, 'soilMoist4': 59, 'wh26_batt': 0, >> 'wh31_ch1_batt': 0, 'wh51_ch1_batt': 0, 'wh51_ch2_batt': 0, >> 'wh51_ch3_batt': 0, 'wh51_ch4_batt': 0, 'wh51_ch5_batt': 0} >> >> Thanks! >> Rob >> > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/103277e3-c643-4a6a-b540-9435f7bceda7o%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/103277e3-c643-4a6a-b540-9435f7bceda7o%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAHmVY1cKvgnE15c9BndvO8g4E3Zgck1TETXZ6WODafbCHaayeg%40mail.gmail.com.
