Observation Types

115 views
Skip to first unread message

Craig Young

unread,
Sep 13, 2023, 6:51:17 AM9/13/23
to weewx-user
Where can I find the list of observation types?  I am writing a new driver for my hardware and need to map the physical data to the corresponding observation types to create the loop packet.

Craig

matthew wall

unread,
Sep 13, 2023, 7:07:28 AM9/13/23
to weewx-user
On Wednesday, September 13, 2023 at 6:51:17 AM UTC-4 craig.y...@gmail.com wrote:
Where can I find the list of observation types? 

within the driver code, use names that match whatever the hardware uses. then you can map those onto the weewx observation types when you generate a LOOP or ARCHIVE dict.  for example, the hardware documentation might use 'inside_temperature', but the weewx equivalent is 'inTemp'.

the weewx observation types are defined by the database schema. 'wview_extended' is the default schema, but weewx also ships with the legacy 'wview' and 'wview_small' schemas.


you can see what other drivers have done by browsing the 'Station data' section for each driver in the hardware guide:


for power/solar/battery monitoring, or hardware that emits observations that are not easily mapped to the weather-based schemas, it is typical to ship a bespoke schema with the driver.

 

Craig Young

unread,
Sep 13, 2023, 3:55:44 PM9/13/23
to weewx-user
Thanks Matthew, I understand now.  I also did some reading of the 'customization' section in the wiki and it ties together nicely with what you have posted.  So my next step is to setup the database, load all of my archive data and then update the driver to match the schema.
Craig

Karen K

unread,
Sep 13, 2023, 4:21:08 PM9/13/23
to weewx-user
I would suggest to look into obs_group_dict in /usr/share/weewx/weewx/units.py for a list of pre-defined observation types and their unit groups.

Craig Young

unread,
Sep 13, 2023, 4:35:09 PM9/13/23
to weewx-user
Thanks Karen, that is an incredibly useful document.

Craig
Reply all
Reply to author
Forward
0 new messages