Hello ! I have added a few observations to my weewx. I use a battery and a solar panel to supply my sensor, so I added Vbat, Isolar, Vsolar.
This is working for a few month as unitless values (I can draw graph, use cheetah labels like $day.Isolar.max, all is fine). Now I would like to use suitable units. let's start slowly, so I followed the documentation of voltage, because group_volt already exists :-) I read here: http://www.weewx.com/docs/customizing.htm#Assigning_a_unit_group and created a file: /usr/share/weewx/user/electricity.py containing: import weewx from weewx.engine import StdService import weewx.units weewx.units.obs_group_dict['Vbat'] = 'group_volt' weewx.units.obs_group_dict['Vsolar'] = 'group_volt' #weewx.units.obs_group_dict['WVbat'] = 'group_volt' #weewx.units.obs_group_dict['WVsolar'] = 'group_volt' class AddElectricity(StdService): WVbat / WVsolar are not used yet (not in database), it will be my vbat & Vsolar values for wind sensor that I have not finished to develop yet. I commented to avoid issues as those 2 are not yet in database schema. I prepared my file based on the example from documentation: import weewx from weewx.engine import StdService import weewx.units weewx.units.obs_group_dict['electricity'] = 'group_energy' class AddElectricity(StdService): # [...] But then, I wonder how it should be said to weewx that this new file is here, waiting for processing? I assume it's probably need to add something in [engine] section of weewx.conf. I tried the following without sucess (added in dat_services) [Engine] [[Services]] # This section specifies the services that should be run. They are # grouped by type, and the order of services within each group # determines the order in which the services will be run. prep_services = weewx.engine.StdTimeSynch data_services = user.electricity.AddElectricity process_services = weewx.engine.StdConvert, weewx.engine. StdCalibrate, weewx.engine.StdQC, weewx.wxservices.StdWXCalculate archive_services = weewx.engine.StdArchive restful_services = weewx.restx.StdStationRegistry, weewx.restx. StdWunderground, weewx.restx.StdAWEKAS, user.windy.Windy #restful_services = weewx.restx.StdStationRegistry, weewx.restx.StdWunderground, weewx.restx.StdPWSweather, weewx.restx.StdCWOP, weewx.restx.StdWOW, weewx$ report_services = weewx.engine.StdPrint, weewx.engine.StdReport help welcome :-) -- 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]. For more options, visit https://groups.google.com/d/optout.
