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/CAPq0zEB9aUY9zcJC%2B3jN7wEKdS1uy20E3-FseN2zCqvcyawtJw%40mail.gmail.com.

Reply via email to