xtype tag

104 views
Skip to first unread message

bwal...@gmail.com

unread,
Dec 17, 2020, 11:41:34 AM12/17/20
to weewx-user
Hi
i made a xtype extension for a wetbulp temperaur. this worsks fine with the $current tag and the image generator.

with tag $day.wetbulp_t.min the chetagenerator rise no error but whrites  $day.wetbulp_t.min    in the file...

do i have do add wetbulp_t in database for get this to work?

gjr80

unread,
Dec 17, 2020, 2:37:57 PM12/17/20
to weewx-user
Hi,

When you wrote your xtype extension what methods did you implement? Did you implement get_aggregate()?

Gary

bwal...@gmail.com

unread,
Dec 17, 2020, 3:14:05 PM12/17/20
to weewx-user
No, i just adjustet the vaporpressure.py example.

But i see what you mean, i have to calculate it by my own, this means i have to load all data for a day and calculate it.
im not shure i can do this.
i quess its easyer and better to do this in the database. 

wetbulp.py

Tom Keffer

unread,
Dec 17, 2020, 3:24:40 PM12/17/20
to weewx-user
Calculating aggregates for non-linear functions is not easy. For example, it's not obvious which combinations of temperature and humidity will result in the lowest wet bulb temperature for the day. It can be done by taking partial derivates of temperature and humidity, setting to zero, then solving for T and R.

Easier to put it in the database.

--
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/c9c7b1eb-6979-4c74-b8d9-36522dc99a49n%40googlegroups.com.

gjr80

unread,
Dec 17, 2020, 3:26:28 PM12/17/20
to weewx-user
Yes, that will be it. Loading and calculating for a day will be straightforward, though it will involve a lot of complex calculations being done each time you call the aggregate (and this will occur each time you run the report, so potentially every archive interval minutes). On the other hand, adding wet bulb to the database will involve one complex calculation every archive interval and any time you use an aggregate it is a simple hit on the database. In this case I think it may be better to add wet bulb to the database.

Gary

bwal...@gmail.com

unread,
Dec 17, 2020, 4:09:09 PM12/17/20
to weewx-user
thank you, i will do this in database.

Meteo Oberwallis

unread,
Oct 29, 2023, 5:57:50 AM10/29/23
to weewx-user
Hello everyone
I have implemented the wetbulp.py file in my weewx. But now I have noticed that after creating the column in the database, the value is not saved. Could it be that this line is missing in "wetbulb.py"? If so, what would it have to look like for it to work?
Thx
wetbulp.py

Tom Keffer

unread,
Oct 29, 2023, 7:23:38 AM10/29/23
to weewx...@googlegroups.com
If you followed the directions at the top of your file, you're almost there. Now you need to make sure your new type is put in the archive record. Do this by adding it to the list of types under [StdWXCalculate]:

[StdWXCalculate]
    [[Calculations]]
        # How to calculate derived quantities.  Possible values are:
        #  hardware        - use the value provided by hardware
        #  software        - use the value calculated by weewx
        #  prefer_hardware - use value provide by hardware if available,
        #                      otherwise use value calculated by weewx
       
        wetbulb_t = software
        ...

For details, see the section Including in loop packets and archive records in the wiki entry.

One other thing: the spelling is "wetbulb", not "wetbulp".


--
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.

Karen K

unread,
Nov 1, 2023, 7:02:14 AM11/1/23
to weewx-user
And according to units.py the observation type wetbulb temperature is called outWetbulb and not wetbulb_t.

Consider that in MQTT output the underscore is used to separate the observation type name from the unit name. 

Reply all
Reply to author
Forward
0 new messages