I’m pretty sure you also need this 
https://github.com/weewx/weewx/wiki/Accumulators
But, I will shut up and let the experts answer.

On Wednesday, 1 July 2020 14:23:48 UTC-4, Earl Baugh wrote:
>
> Yes, I've read 
> 1) http://www.weewx.com/docs/customizing.htm#Adding_2nd_source
> and 
> 2)http://www.weewx.com/docs/customizing.htm#add_archive_type 
>
>
> From the combined two sections, I can see how to add the columns.
> However, it wasn't clear what f I need to write code like listed in 
> Adding_2nd_source.
>
> That section shows a function : download_total_power()
> which magically gets the reading of the current total power ever used.
> That's what I wasn't sure about.   
>
> From what I'm reading between the lines here, it seems that I'm hearing 
> that if I can generated a LOOP record for say H2.
> If I just add columns (as per the add_archive_type) it will get 
> "automagically" mapped?
>
> Currently I output records like this : 
> {"dateTime":1593627602,"extraTemp1":78.818}
>
> For a new gas record I'd output a record like this 
> {"dateTime":1593627602,"h2":.0002} (for whatever value I have)
>
> That plus what's in the add_archive_type link is all that's required?
>
> Earl
>
>
> On Wednesday, July 1, 2020 at 2:05:44 PM UTC-4 [email protected] wrote:
>
>> This is what I was thinking needs to be done to accumulate loop data into 
>> archive data
>> https://github.com/weewx/weewx/wiki/Accumulators
>> rich
>>
>> On Wednesday, 1 July 2020 14:02:22 UTC-4, Rich Bell wrote:
>>>
>>> Woops, my bad... I think I remember there might bevanother step to tell 
>>> WeeWX to put it in the archive record.I’ll do a bit more research
>>> rich
>>>
>>> On Wednesday, 1 July 2020 13:54:37 UTC-4, Rich Bell wrote:
>>>>
>>>> Earl,
>>>> I’ll take a first crack at this, and the WeeWX experts can clarify/help 
>>>> as needed. WeeWX really does all the heavily lifting. Whatever name/values 
>>>> are in the loop data that MQTTSubscribe generates will be accumulated into 
>>>> an archive record. You should see this happening if you run WeeWX from the 
>>>> command line.
>>>> But, if the name is not known to WeeWX, it will not be added to the 
>>>> database. Note, I’ve never done this, but I’d start by reading this 
>>>> http://weewx.com/docs/customizing.htm#add_archive_type
>>>>
>>>> rich
>>>>
>>>> On Wednesday, 1 July 2020 13:32:33 UTC-4, Earl Baugh wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> I'm new to weewx and would like to add some additional data being 
>>>>> collected by some gas sensors that I have installed at my house (they 
>>>>> help 
>>>>> track gases that some other data sites track as part of pollution 
>>>>> tracking)
>>>>>
>>>>> I read the section on Adding a Second Datasource, but that doesn't 
>>>>> quite match my use case.    I'm feeding all data into the system via the 
>>>>> WeeWX-MQTTSubscribe <https://github.com/bellrichm/WeeWX-MQTTSubscribe> 
>>>>> add on.  I have an outside program that is pulling data from the sensors 
>>>>> periodically and then posting it to MQTT, and the WeeWX-MQTTSubscribe 
>>>>> ingests the data turning in into LOOP records (at least that's my current 
>>>>> level of understanding... I'm only on day 3 here with weewx...)
>>>>>
>>>>> This works fine for the data that maps to existing fields.  However, I 
>>>>> also gather data on C2H5OH, C3H8, C4H10, CH4 and H2.... (the quality of 
>>>>> which I am still assessing, but it's at least being measured by the 
>>>>> sensors)
>>>>>
>>>>> Looking at the Adding a Second Datasorce example comes close, but it's 
>>>>> not clear to me how to get the data from the LOOP record into the archive 
>>>>> record (the new_archive_record function).    
>>>>>
>>>>> Is there an example I've just missed in my readings?  Or could someone 
>>>>> point me towards an example of an add on that adds this?
>>>>>
>>>>> Thanks in advance!
>>>>>
>>>>> Earl
>>>>>
>>>>>
>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" 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-development/c00c24fa-2b64-497f-bd1a-0c7b8a5c03c9o%40googlegroups.com.

Reply via email to