I was able to reproduce your error. It did work with v3.7. It appears that in my zeal to allow xtypes to be used in arbitrary plots, I broke something.
I've opened issue #761 <https://github.com/weewx/weewx/issues/761> to track. -tk On Tue, Mar 8, 2022 at 3:35 PM [email protected] <[email protected]> wrote: > Thanks > I won't pretend that I understood ........but it may help others. > It did give me a clue as to how to move forward a bit .....I think > I tried this .......and it worked ......an orange line at 4v .......1 step > forward > and telemetry display updates. > [[[dayvolt]]] > yscale = 3.6, 4.2, 0.1 > [[[[consBatteryVoltage]]]] > label = Transmitter battery > color = 0xb48242 # blue > # color = 0x4242b4 # red > > # place limit line on graph > [[[[voltMin]]]] > data_type = consBatteryVoltage - consBatteryVoltage + 4 > label = ' ' > color = orange > width = 1 > > but I want the limit at 3.7v ........so using the above > [[[dayvolt]]] > yscale = 3.6, 4.2, 0.1 > [[[[consBatteryVoltage]]]] > label = Transmitter battery > color = 0xb48242 # blue > # color = 0x4242b4 # red > > # place limit line on graph > [[[[voltMin]]]] > data_type = consBatteryVoltage - consBatteryVoltage + 3.7 > label = ' ' > color = orange > width = 1 > fail ....errors in the log .......places the orange line, but telemetry > page is now frozen > Mar 9 08:56:06 weatherstn weewx[14006] DEBUG weewx.reportengine: Found > configuration file /etc/weewx/skins/Seasons/skin.conf for report > 'SeasonsReport' > Mar 9 08:56:06 weatherstn weewx[14006] DEBUG user.MQTTSubscribe: (Driver) > data-> final loop packet is tele/weather-stn-sensor/STATE 2022-03-09 > 08:56:04 AEST (1646780164): 'batteryStatus1': '0.0', 'consBatteryVoltage': > '4.086810112', 'dateTime': '1646780164.264368', 'extraTemp1': '33.0', > 'signal1': '1515', 'signal2': '-34.0', 'supplyVoltage': '12.13632011', > 'txBatteryStatus': '0.0', 'usUnits': '17' > Mar 9 08:56:06 weatherstn weewx[14006] DEBUG weewx.cheetahgenerator: > Using search list ['weewx.cheetahgenerator.Almanac', > 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.DisplayOptions', > 'weewx.cheetahgenerator.Extras', 'weewx.cheetahgenerator.Gettext', > 'weewx.cheetahgenerator.JSONHelpers', 'weewx.cheetahgenerator.PlotInfo', > 'weewx.cheetahgenerator.SkinInfo', 'weewx.cheetahgenerator.Station', > 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo'] > Mar 9 08:56:06 weatherstn weewx[14006] DEBUG weewx.manager: Daily summary > version is 4.0 > Mar 9 08:56:06 weatherstn weewx[14006] ERROR weewx.cheetahgenerator: > Evaluation of template /etc/weewx/skins/Seasons/telemetry.html.tmpl failed. > Mar 9 08:56:06 weatherstn weewx[14006] ERROR weewx.cheetahgenerator: **** > Ignoring template /etc/weewx/skins/Seasons/telemetry.html.tmpl > Mar 9 08:56:06 weatherstn weewx[14006] ERROR weewx.cheetahgenerator: **** > Reason: cannot find 'has_data' while searching for 'year.consBatteryVoltage > - consBatteryVoltage + 3.7.has_data' > Mar 9 08:56:06 weatherstn weewx[14006] ERROR weewx.cheetahgenerator: **** > To debug, try inserting '#errorCatcher Echo' at top of template > Mar 9 08:56:06 weatherstn weewx[14006] INFO weewx.cheetahgenerator: > Generated 7 files for report SeasonsReport in 0.29 seconds > Mar 9 08:56:06 weatherstn weewx[14006] DEBUG weewx.manager: Daily summary > version is 4.0 > Mar 9 08:56:06 weatherstn weewx[14006] INFO weewx.imagegenerator: > Generated 19 images for report SeasonsReport in 0.23 seconds > Mar 9 08:56:06 weatherstn weewx[14006] INFO weewx.reportengine: Copied 0 > files to /var/www/html/weewx > Mar 9 08:56:06 weatherstn weewx[14006] DEBUG weewx.reportengine: Report > 'SmartphoneReport' not enabled. Skipping. > Mar 9 08:56:06 weatherstn weewx[14006] DEBUG weewx.reportengine: Report > 'MobileReport' not enabled. Skipping. > Mar 9 08:56:06 weatherstn weewx[14006] DEBUG weewx.reportengine: Report > 'StandardReport' not enabled. Skipping. > Mar 9 08:56:06 weatherstn weewx[14006] DEBUG weewx.reportengine: Report > 'FTP' not enabled. Skipping. > Mar 9 08:56:06 weatherstn weewx[14006] DEBUG weewx.reportengine: Report > 'RSYNC' not enabled. Skipping. > > I take it that it doesn't like 3.7 ..........I don't understand > why......... > the windspeed example is so easy and simple and works using a number with > a decimal point and no equation > should I place the number in quotes ? ...........is there a workaround ? > ............or this will never fly ? > thanks again > > > On Tuesday, 8 March 2022 at 22:56:57 UTC+10 [email protected] wrote: > >> You're right: it's not mentioned in the Customizing Guide, and it really >> should be. >> >> I've modified the guide to include a section about the topic. Hopefully >> it will help. *Including arbitrary expressions >> <https://weewx.com/docs/customizing.htm#arbitrary_expressions_in_plot>* >> >> >> On Mon, Mar 7, 2022 at 10:01 PM Ian Prescott <[email protected]> wrote: >> >>> Hi >>> Could somebody show me how to correctly display a limit / constant value >>> on a plot >>> some time ago I alerted to a post about how to show a constant value in >>> a plot. >>> I have searched but I haven't found the right words to find that post >>> again >>> but I copied it and use it in my skin.conf >>> [[[daywind]]] >>> # [[[[windSpeed]]]] >>> # [[[[windGust]]]] >>> >>> # place limit line on graph >>> [[[[windMax]]]] >>> # data_type = function | this >>> # label = ' ' | does >>> # function_definition = 10.5 | not >>> # function_type = windSpeed | work >>> # color = red >>> >>> data_type = 10.5 >>> label = ' ' >>> color = orange >>> width = 1 >>> [[[[windSpeed]]]] >>> color = 0xb48242 >>> [[[[windGust]]]] >>> color = 0x4242b4 >>> I think it is a useful feature for me and it displays an orange line at >>> 10.5 >>> BTW the red line does not show on the plot and no errors appear in the >>> log (debug=1) >>> see here at oxleyweather.ddnsfree.com >>> >>> Now I would like to display a constant value in another plot. >>> like this >>> [[[dayvolt]]] >>> yscale = 3.6, 4.2, 0.1 >>> [[[[consBatteryVoltage]]]] >>> label = Transmitter battery >>> color = 0xb48242 # blue >>> # color = 0x4242b4 # red >>> # place limit line on graph >>> [[[[voltMin]]]] >>> data_type = function >>> label = ' ' >>> function_definition = 3.7 >>> function_type = consBatteryVoltage >>> color = red >>> # width = 1 >>> But this doesn't show a red line, and there are no complaints in the log. >>> >>> However if I use the wind example I get errors in the log ......... >>> but not for the wind example ........only about the voltage limit >>> The Customization Guide under ImageGenerator doesn't give any details >>> Thanks >>> >>> Mar 8 15:46:17 weatherstn weewx[14006] INFO weewx.manager: Added record >>> 2022-03-08 15:45:00 AEST (1646718300) to database 'weewx.sdb' >>> Mar 8 15:46:17 weatherstn weewx[14006] INFO weewx.manager: Added record >>> 2022-03-08 15:45:00 AEST (1646718300) to daily summary in 'weewx.sdb' >>> Mar 8 15:46:17 weatherstn weewx[14006] DEBUG weewx.reportengine: >>> Running reports for latest time in the database. >>> Mar 8 15:46:17 weatherstn weewx[14006] DEBUG weewx.reportengine: >>> Running report 'SeasonsReport' >>> Mar 8 15:46:17 weatherstn weewx[14006] DEBUG weewx.restx: >>> StationRegistry: wait interval (91800 < 604800) has not passed for record >>> 2022-03-08 15:45:00 AEST (1646718300) >>> Mar 8 15:46:17 weatherstn weewx[14006] DEBUG weewx.reportengine: Found >>> configuration file /etc/weewx/skins/Seasons/skin.conf for report >>> 'SeasonsReport' >>> Mar 8 15:46:17 weatherstn weewx[14006] DEBUG weewx.cheetahgenerator: >>> Using search list ['weewx.cheetahgenerator.Almanac', >>> 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.DisplayOptions', >>> 'weewx.cheetahgenerator.Extras', 'weewx.cheetahgenerator.Gettext', >>> 'weewx.cheetahgenerator.JSONHelpers', 'weewx.cheetahgenerator.PlotInfo', >>> 'weewx.cheetahgenerator.SkinInfo', 'weewx.cheetahgenerator.Station', >>> 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo'] >>> Mar 8 15:46:17 weatherstn weewx[14006] DEBUG weewx.manager: Daily >>> summary version is 4.0 >>> Mar 8 15:46:17 weatherstn weewx[14006] ERROR weewx.cheetahgenerator: >>> Evaluation of template /etc/weewx/skins/Seasons/telemetry.html.tmpl failed. >>> Mar 8 15:46:17 weatherstn weewx[14006] ERROR weewx.cheetahgenerator: >>> **** Ignoring template /etc/weewx/skins/Seasons/telemetry.html.tmpl >>> Mar 8 15:46:17 weatherstn weewx[14006] ERROR weewx.cheetahgenerator: >>> **** Reason: cannot find 'has_data' while searching for 'year.3.7.has_data' >>> Mar 8 15:46:17 weatherstn weewx[14006] ERROR weewx.cheetahgenerator: >>> **** To debug, try inserting '#errorCatcher Echo' at top of template >>> Mar 8 15:46:17 weatherstn weewx[14006] INFO weewx.cheetahgenerator: >>> Generated 7 files for report SeasonsReport in 0.29 seconds >>> Mar 8 15:46:17 weatherstn weewx[14006] DEBUG weewx.manager: Daily >>> summary version is 4.0 >>> Mar 8 15:46:17 weatherstn weewx[14006] INFO weewx.imagegenerator: >>> Generated 19 images for report SeasonsReport in 0.23 seconds >>> Mar 8 15:46:17 weatherstn weewx[14006] INFO weewx.reportengine: Copied >>> 0 files to /var/www/html/weewx >>> Mar 8 15:46:17 weatherstn weewx[14006] DEBUG weewx.reportengine: Report >>> 'SmartphoneReport' not enabled. Skipping. >>> Mar 8 15:46:17 weatherstn weewx[14006] DEBUG weewx.reportengine: Report >>> 'MobileReport' not enabled. Skipping. >>> Mar 8 15:46:17 weatherstn weewx[14006] DEBUG weewx.reportengine: Report >>> 'StandardReport' not enabled. Skipping. >>> Mar 8 15:46:17 weatherstn weewx[14006] DEBUG weewx.reportengine: Report >>> 'FTP' not enabled. Skipping. >>> Mar 8 15:46:17 weatherstn weewx[14006] DEBUG weewx.reportengine: Report >>> 'RSYNC' not enabled. Skipping. >>> >>> -- >>> 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/CAN84nRuRrvwvW5zhONY4n%2B%2BydT74zUiuE%3DP6h9Ej3tdMXpeLRg%40mail.gmail.com >>> <https://groups.google.com/d/msgid/weewx-user/CAN84nRuRrvwvW5zhONY4n%2B%2BydT74zUiuE%3DP6h9Ej3tdMXpeLRg%40mail.gmail.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/66f61c5e-0f30-4edd-be61-85e468f968a8n%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/66f61c5e-0f30-4edd-be61-85e468f968a8n%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/CAPq0zECFKHtA4mFdX%2BTMKsto01-yZquYzF_j5N__mk2tvLoLgA%40mail.gmail.com.
