Rémy LAVABRE
--
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/dbf90df9-0cee-465d-89b1-86b2c77076ebn%40googlegroups.com.
Rémy LAVABRE
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/43f0c3c7-27aa-4f9f-b8bf-d9e9b911b779n%40googlegroups.com.
However, I have a new question as I haven't been able to understand exactly the weewx documentation on this subject. I clearly saw that the case of adding electricity consumption to the database had been processed but I did not understand the entire explanation given.
To put it simply, I retrieve data in CSV format which I integrate at regular intervals into the weewx database using wee_import.py (my weather station does not have a USB output and the data is retrieved from AWEKAS).
To the weather data, I would have liked to add for the period considered:
- CPU load data (unitless)
- The total and used memory of the Raspberry (kB unit)
- The total and used capacity of the SSD (Gb unit)
- Power consumption (Watt unit)
- Water consumption (unit per liter)
I created the fields I needed in the existing WeeWX database without problem with wee_database
What I couldn't do:
- Create a new base group (for example group_memory with the new Kb and Gb units). What file exactly should be modified or created and where is it located?
Compared to the documentation, I would tend to make a file "/usr/share/weewx/user/memory.py" with in it:import weewx.units
weewx.units.obs_group_dict['rocketForce'] = 'group_memory'
weewx.units.USUnits['group_memory'] = 'byte'
weewx.units.MetricUnits['group_memory'] = 'byte'
weewx.units.MetricWXUnits['group_memory'] = 'byte'
weewx.units.default_unit_format_dict['byte'] = '%.1f'
weewx.units.default_unit_label_dict['byte'] = ' byte'Is my approach correct? How to create the units kB and gB?
- For data that is unitless such as charge1, charge5 and charge15 (assuming that the field names of the weewx.sdb database are charge1,charge5,charge15 and that the names of the header fields of the CSV file to import are charge1, charge5 and charge15), will the import be done by putting in the CSV import configuration file for wee_import.py:source = CSV
[CSV]
....
[[FieldMap]]
dateTime = dateTime, unix_epoch
....
charge1 = charge1
charge5 = charge5
charge15 = charge15