Graphics with calculation of data of the database

136 views
Skip to first unread message

Mic G77

unread,
Jun 4, 2019, 4:03:22 PM6/4/19
to weewx-user
Hello,
i've been looking for a way to produce graph with data calculated from the database.
I Finally find a solution. So I share it with you.

This is an exemple :

        [[[dayPoid]]]
            yscale = None, None, None
            [[[[extraTemp2]]]]
            [[[[extraTest]]]]
                data_type = 18.3+0.03*extraHumid2

In this case, i'm able to see a graph of the function : 18.3 +0.03extraHumid2.
I hope it could help.



Thomas Keffer

unread,
Jun 4, 2019, 5:31:52 PM6/4/19
to weewx...@googlegroups.com
That is very clever! It occurs to me you could probably combine SQL data types. It doesn’t have to be just one type.

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/5689249a-ef2b-4c38-ad2a-72a1a2b643dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
-tk

Christian Nimmervoll

unread,
Jun 8, 2019, 8:27:09 AM6/8/19
to weewx-user
Thanks for posting.
Maybe this will important some day for me.  :)

Mic G77

unread,
May 18, 2020, 3:31:29 PM5/18/20
to weewx-user
Hello,

Last weekend, I moved from weewx3.8 to weewx4.0 and I'm not any more able to produce graph with data calculated from the database.
If someone can help....

Thank you in advance.




Le mardi 4 juin 2019 23:31:52 UTC+2, Thomas Keffer a écrit :
That is very clever! It occurs to me you could probably combine SQL data types. It doesn’t have to be just one type.
On Tue, Jun 4, 2019 at 1:03 PM Mic G77 <micg...@gmail.com> wrote:
Hello,
i've been looking for a way to produce graph with data calculated from the database.
I Finally find a solution. So I share it with you.

This is an exemple :

        [[[dayPoid]]]
            yscale = None, None, None
            [[[[extraTemp2]]]]
            [[[[extraTest]]]]
                data_type = 18.3+0.03*extraHumid2

In this case, i'm able to see a graph of the function : 18.3 +0.03extraHumid2.
I hope it could help.



--
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...@googlegroups.com.
--
-tk

Tom Keffer

unread,
May 18, 2020, 4:25:10 PM5/18/20
to weewx-user
This trick worked by using an expression in the SQL SELECT statement. Unfortunately, that ability got lost in V4.0. 

Nevertheless, there's no good reason why it should not be allowed. Commit e76e374 brings this ability back. Give it a try. Swap your version of xtypes.py (probably located in either /usr/share/weewx/weewx/xtypes.py or /home/weewx/bin/weewx/xtypes.py) with this one. Let me know how it goes.

-tk


To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/eab7c178-93f5-4ccc-accc-d83c818a285b%40googlegroups.com.

Mic G77

unread,
May 19, 2020, 2:11:31 PM5/19/20
to weewx-user
Thank you very much for your availability and your  answer
It works !
Reply all
Reply to author
Forward
0 new messages