Now it works :) Many MANY thanks for you help and time you give me to fix this!
*Connectivity* WiFi Signal 58 dB Outdoor Module Signal 65 dB Anemometer Signal 67 dB Rain Gauge Signal 63 dB *Battery Status* Anemometer Battery 94% Rain Gauge Battery 100% Outdoor Module Battery 93% lördag 16 januari 2021 kl. 08:21:49 UTC+1 skrev gjr80: > Ah, that was my mistake, I deleted a few lines I should not have. Try this > sensors.txt; same deal, download, rename and save as > /etc/weewx/skins/Seasons/sensors.inc. No need to restart WeeWx this time, > just wait for the report cycle to complete. > > Gary > > On Saturday, 16 January 2021 at 16:52:28 UTC+10 johansso...@outlook.com > wrote: > >> i think it works now. >> I dont know what i did but i use the early sensor.inc code you gave me >> and the readings is now this >> >> Connectivity >> WiFi Signal >> (57 dB) >> Outdoor Module Signal >> (66 dB) >> Anemometer Signal >> (69 dB) >> Rain Gauge Signal >> (62 dB) >> >> Battery Status >> Anemometer Battery >> (95%) >> Rain Gauge Battery >> (100%) >> Outdoor Module Battery >> (93%) >> >> lördag 16 januari 2021 kl. 07:35:56 UTC+1 skrev Rebecka Johansson: >> >>> I do as you described :) >>> >>> But got errors after i replaced the new sensors.inc code >>> >>> The log error shows this >>> >>> "Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> Generate failed with exception '<class 'Cheetah.Parser.ParseError'>' >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** Ignoring template /etc/weewx/skins/Seasons/index.html.tmpl >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** Reason: #012#012Some #directives are missing their corresponding #end >>> ___ tag: if, if#012Line 153, column 7 in file >>> /etc/weewx/skins/Seasons/sensors.inc#012#012Line|Cheetah >>> Code#012----|-------------------------------------------------------------#012150 >>> >>> | </div>#012151 |#012152 |</div>#012153 |#end if#012 ^ >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** Traceback (most recent call last): >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 323, in >>> generate >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** unicode_string = compiled_template.respond() >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** File "_etc_weewx_skins_Seasons_index_html_tmpl.py", line 225, in >>> respond >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** File "/usr/lib/python3/dist-packages/Cheetah/Template.py", line >>> 1685, in _handleCheetahInclude >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** file=file) >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** File "/usr/lib/python3/dist-packages/Cheetah/Template.py", line >>> 775, in compile >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** compiler.compile() >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** File "/usr/lib/python3/dist-packages/Cheetah/Compiler.py", line >>> 1799, in compile >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** self._parser.parse() >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** File "/usr/lib/python3/dist-packages/Cheetah/Parser.py", line 1554, >>> in parse >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** self.assertEmptyOpenDirectivesStack() >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** File "/usr/lib/python3/dist-packages/Cheetah/Parser.py", line 2778, >>> in assertEmptyOpenDirectivesStack >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** raise ParseError(self, msg=errorMsg) >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** Cheetah.Parser.ParseError: >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** Some #directives are missing their corresponding #end ___ tag: if, if >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** Line 153, column 7 in file /etc/weewx/skins/Seasons/sensors.inc >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** Line|Cheetah Code >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** ----|------------------------------------------------------------- >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** 150 | </div> >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** 151 | >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** 152 |</div> >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** 153 |#end if >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** ^ >>> Jan 16 07:33:21 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> Generate failed with exception '<class 'Cheetah.Parser.ParseError'>' >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** Ignoring template /etc/weewx/skins/Seasons/telemetry.html.tmpl >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** Reason: #012#012Some #directives are missing their corresponding #end >>> ___ tag: if, if#012Line 153, column 7 in file >>> /etc/weewx/skins/Seasons/sensors.inc#012#012Line|Cheetah >>> Code#012----|-------------------------------------------------------------#012150 >>> >>> | </div>#012151 |#012152 |</div>#012153 |#end if#012 ^ >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** Traceback (most recent call last): >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 323, in >>> generate >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** unicode_string = compiled_template.respond() >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** File "_etc_weewx_skins_Seasons_telemetry_html_tmpl.py", line 195, >>> in respond >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** File "/usr/lib/python3/dist-packages/Cheetah/Template.py", line >>> 1685, in _handleCheetahInclude >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** file=file) >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** File "/usr/lib/python3/dist-packages/Cheetah/Template.py", line >>> 775, in compile >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** compiler.compile() >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** File "/usr/lib/python3/dist-packages/Cheetah/Compiler.py", line >>> 1799, in compile >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** self._parser.parse() >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** File "/usr/lib/python3/dist-packages/Cheetah/Parser.py", line 1554, >>> in parse >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** self.assertEmptyOpenDirectivesStack() >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** File "/usr/lib/python3/dist-packages/Cheetah/Parser.py", line 2778, >>> in assertEmptyOpenDirectivesStack >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** raise ParseError(self, msg=errorMsg) >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** Cheetah.Parser.ParseError: >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** Some #directives are missing their corresponding #end ___ tag: if, if >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** Line 153, column 7 in file /etc/weewx/skins/Seasons/sensors.inc >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** Line|Cheetah Code >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** ----|------------------------------------------------------------- >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** 150 | </div> >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** 151 | >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** 152 |</div> >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** 153 |#end if >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** ^ >>> Jan 16 07:33:22 Raspi wee_reports[12432] ERROR weewx.cheetahgenerator: >>> **** >>> " >>> >>> lördag 16 januari 2021 kl. 06:59:41 UTC+1 skrev gjr80: >>> >>>> On Saturday, 16 January 2021 at 14:28:48 UTC+10 johansso...@outlook.com >>>> wrote: >>>> >>>>> Thank for answer and your will to help me! >>>>> >>>> Im new on Netatmo and its more advanced to code haha. >>>>> Sorry for late answere i think the county time differens between us. >>>>> Clock is early in the morning now in sweden 05:40 AM >>>>> >>>> >>>> No problems, you have more netatmo experience than I! We do have a time >>>> difference, I am nine hours ahead of you I believe, mid-afternoon here now >>>> as I write this. >>>> >>>> >>>>> I know battery_vp is from old firmware and battery_percent is the >>>>> newer firmware. >>>>> The work with formatting its something i havent learn yet and its take >>>>> time because my dyslexia and concentration because adhd. >>>>> But thanks to you because you describe in the way i understand very >>>>> well. >>>>> >>>> >>>> You are welcome. >>>> >>>> I have thinking on what i want in the reading and i wanted to have just >>>>> the percentage. >>>>> So as example from your tex above i want the readings to "Anemometer >>>>> Battery 95%" >>>>> >>>> >>>> OK, that makes it easy, just a couple more things to do. We need to >>>> modify sensors.inc again and then we need to tell WeeWX how to >>>> interpret the xxxBatteryStatus and xxx_rf_status fields. I have >>>> attached a new copy of sensors.inc, again it is actually sensors.txt >>>> due to Google Groups limitations, just download it, rename it to >>>> sensors.inc and use it to replace your existing >>>> /etc/weewx/skins/Seasons/sensors.inc. That will now give you just the >>>> percentages for battery status and just the numbers for rf status, >>>> something like: >>>> >>>> Anemometer Battery 95.000000 >>>> Anemometer Signal 86.000000 >>>> >>>> Still not formatted correctly and with no % symbol. >>>> >>>> Reading a bit more about the netatmo system it seems the rf signal >>>> level values are RSSI (received signal strength indicator) values in >>>> decibels (dB). Again your choice how you want to present them, you can >>>> present them as just a number, eg: >>>> >>>> Anemometer Signal 86 >>>> >>>> or as a dB value eg: >>>> >>>> Anemometer Signal 86dB >>>> >>>> Once you have decided hold on to that thought as we will use it shortly. >>>> >>>> To get the numbers formatted correctly we need to tell WeeWX how to >>>> interpret the xxxBatteryStatus and xxx_rf_status fields and we do that by >>>> adding a few lines of code to /usr/share/weewx/user/extensions.py. To >>>> make the changes to /usr/share/weewx/user/extensions.py: >>>> >>>> 1. open /usr/share/weewx/user/extensions.py in a text editor >>>> >>>> 2. add the following lines to the bottom of the file: >>>> >>>> import weewx.units >>>> weewx.units.obs_group_dict['windBatteryStatus'] = 'group_percent' >>>> weewx.units.obs_group_dict['rainBatteryStatus'] = 'group_percent' >>>> weewx.units.obs_group_dict['outTempBatteryStatus'] = 'group_percent' >>>> >>>> 3. if you want to display the rf signal status as just plain numbers >>>> add the following lines: >>>> >>>> weewx.units.obs_group_dict['signal1'] = 'group_count' >>>> weewx.units.obs_group_dict['signal2'] = 'group_count' >>>> weewx.units.obs_group_dict['signal3'] = 'group_count' >>>> weewx.units.obs_group_dict['signal4'] = 'group_count' >>>> >>>> 4. if you want to display the rf signal status as decibels (with a dB >>>> unit label) add the following lines: >>>> >>>> weewx.units.obs_group_dict['signal1'] = 'group_db' >>>> weewx.units.obs_group_dict['signal2'] = 'group_db' >>>> weewx.units.obs_group_dict['signal3'] = 'group_db' >>>> weewx.units.obs_group_dict['signal4'] = 'group_db' >>>> >>>> Make sure you do just one or the other of 3. and 4., don't add both. >>>> >>>> 5. save extensions.py >>>> >>>> That is all though this time you will need to restart WeeWX for the >>>> changes in extensions.py to take effect. After you have restarted >>>> WeeWX once the next report cycle completes you should see the sensor panel >>>> on the Seasons home page updated accordingly. If the display is not as you >>>> expect or something goes wrong post back here with details. >>>> >>>> About the Belchertown i will try fix that on my own. >>>>> I have learn a little about sensor readings thanks to you! Its just >>>>> the formatting now :) >>>>> >>>> >>>> The Belchertown skin is quite popular and lots of folks here are >>>> familiar with it and have customised it (unfortunately I am not one them). >>>> If you get stuck with Belchertown open a new thread with your questions >>>> and >>>> I am sure someone will help you. >>>> >>>> Gary >>>> >>>> >>> -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/53de69e4-da2d-4600-9c77-2d054e33f35an%40googlegroups.com.