-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some of the RESTful uploaders need updating to include additional fields #615
Comments
@tkeffer. I have added support for soil moisture and soil temperature to the WOW uploader and have created new branch I have implemented a default of Would appreciate you having a look at the changes in |
I wonder if we need something like the sensor maps that the drivers use? It's a common pattern in the uploaders. For example, the
We would still need something to specify the formatting (e.g.,
would override the default that |
Yes, that was what was going through my mind when I did WOW. I had something like the following in mind:
Map entries are additive, well additive in as much as they don’t define the entire map but rather alter existing entries or add new. A map entry with no source would be used to remove an existing entry. No |
As a test case I have been updating the WOW uploader to use the following format:
Have a couple of implementation issues that depend on the behaviour we want:
|
There's a pattern I've been using for situations like this. Take a look in
Then, in the WOW uploader: merge_dict = get_site_dict(
config_dict, 'WOW', 'station', 'password')
if merge_dict is None:
return
_ambient_dict = ConfigObj(StringIO(DEFAULTS_INI), encoding='utf-8')['StdRESTful']['WOW']
_ambient_dict.merge(merge_dict) I'm sure I screwed something up. In particular, I'm not sure how the merge in the last line would react to being fed a subsection. Hopefully you get the idea.
|
Thanks, that makes sense. |
From my abbreviated testing this morning it seems to work as you describe. Did not strike any issue with the merge being fed a subsection, rather the problem is that |
That looks good! A few (trivial) suggestions:
|
Have you considered storing this in a db table and using db tables for this metadata? |
A fair question. Off the top of my head, here are some reasons:
|
Think that was a hangover of the old and the new. Will fix.
Thanks for pointing that out, I hadn’t noticed, still had the old syslog approach in my mind. Think I have a few (well a lot of) log statements to fix across numerous repos.
Think this might be a timing issue, branched off development and committed before 4.2.0 merges occurred. Yesterday I merged in development and that picked up a pile of (4.2.0) commits but I may not have committed since. Will check. |
@tkeffer. Refactoring WU and I see that |
Oh, and yes I hadn't pushed, should be up to date with development now. |
There's a commit four years ago that explicitly addresses the formatting of indoor humidity: d29eba5 It seems to be there to address this email thread: https://groups.google.com/g/weewx-user/c/R71L5gLs1EM/m/kQFP005IAQAJ It's possible we could send all numbers without zero padding, but I don't think we should mess with something that is working. |
Another WU quirk/vagary, should have known. Will leave well enough alone. |
The widely used MQTT uploader extension uses a slightly different mapping. It names the section by the WeeWX observation type name and uses an entry "name" to set the external field name. So it could be confusing to the user if for some uploaders the WeeWX name is the section and the external name is the config entry, and for other uploaders it is the opposite way. The superior section is called Example of MQTT configuration snippet:
|
Thanks, I need to get my head back around the RESTful uploaders but that won’t be until after 4.6.0 is released. I will keep this in mind. |
This issue is stale because it has been open for 180 days with no activity. It will be closed in 28 days. |
This issue was closed because it has been inactive for 28 days since being marked as stale. |
A number of the services supported by the WeeWX RESTful uploaders have further developed since the respective WeeWX uploader was first written/last updated. Consequently some uploaders do not support some fields now supported by the services; for example, WOW now accepts soil moisture and soil temperature. In addition, the AWEKAS uploader was based upon the AWEKAS API v2 but the AWEKAS API is now at v4.
Whilst the uploaders continue to work with the mainstream observations some users are now looking to be able to upload the more recently supported observations.
This issue was highlighted in this weewx-user thread.
The text was updated successfully, but these errors were encountered: