Hmm, '*the data must be present in a field in a WeeWX generated archive 
record (lines starting with REC: when running WeeWX directly)*', that 
includes any calculated/derived/added fields by any WeeWX service last time 
I checked. I stand by my previous post.

Gary

On Sunday, 16 July 2023 at 13:55:41 UTC+1 Peter Fletcher wrote:

Your condition 2) is, of course, an absolute requirement. Your condition 1) 
isn't, strictly speaking. It is perfectly possible (and fairly common) for 
a Service triggered by the Archive record event to add (e.g.) a calculated 
value to the archive record being processed, which is then inserted in the 
database.

On Sunday, July 16, 2023 at 4:23:30 AM UTC-4 gjr80 wrote:

For WeeWX to save data to the database two conditions must be met (1) the 
data must be present in a field in a WeeWX generated archive record (lines 
starting with REC: when running WeeWX directly) and (2) the same field must 
exist in the database. If these conditions are not met then data for that 
field will not be saved to database, whether the data is from a 
service/driver or an import. Getting data from new fields into the database 
is typically achieved by either re-purposing an existing, unused database 
field (ie you rename the archive record field to match the repurposed 
database field) or you add a new type to the database with the same name as 
the field in your archive record. 

I suggest you have a read of the Customising the database 
<http://weewx.com/docs/latest/customizing.htm#archive_database> section of 
the Customization Guide <http://weewx.com/docs/latest/customizing.htm>, in 
particular the Modifying an existing database 
<http://weewx.com/docs/latest/customizing.htm#Modifying_an_existing_database> 
section.

Gary
On Sunday, 16 July 2023 at 08:17:47 UTC+1 IceNov wrote:

Just started experimenting with weewx - and using the simulator with 
lighttpd serving up the data to a great looking web page on my rPi.

While I don't have a weather station yet, I've been trying to incorporate 
data from an mqtt service and have had partial success. I am using the 
MQTTSubscribeService.

I can see the mqtt data when running weewxd from the command line - it is 
one of the fields showing up in the terminal output - but it's not being 
added to the database.

I've also tried importing a csv file with timestamp and value - which 
reported success - but still no new column in the db.
How do I get a new measurement into the standard database?
Thanks
Tony
 

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/90bd7e0d-0de1-446f-9a51-007cfbdda20fn%40googlegroups.com.

Reply via email to