Just to recap on what has been said already. Are you certain that the
bin/user/extensions.py file in your 4.10.2 installation doesn't have the
required additions in it already?

That's where I thought you had put them.

Cheers
 Glenn

Various WeeWx addons at
https://github.com/glennmckechnie


On Thu, 11 Jul 2024 at 04:50, [email protected] <[email protected]> wrote:

> Tom,
> I have attempted to construct a file user/geiger.py from the customizing
> groups/units directions. I haven't tried it yet because I wanted you to see
> if I am on the right track here. I'm not sure of the syntax necessary. The
> class statement  looks odd as if somethig should come after the ":"
> class Addgeigerdose(StdService):
> class Addgeigercpm(StdService):
> Anyway, please comment when you have time. Thanks.
> Bob
>
> ### geiger.py
> ###########################
> import weewx
> from weewx.engine import StdService
> import weewx.units
>
> weewx.units.obs_group_dict['geigerdose'] = 'group_severt'
> weewx.units.obs_group_dict['geigercpm'] = 'group_cpm'
>
> class Addgeigerdose(StdService):
> class Addgeigercpm(StdService):
>
> weewx.units.USUnits['group_severt'] = 'µSv'
> weewx.units.MetricUnits['group_severt'] = 'µSv'
> weewx.units.MetricWXUnits['group_severt'] = 'µSv'
>
> weewx.units.USUnits['group_cpm'] = 'cpm'
> weewx.units.MetricUnits['group_cpm'] = 'cpm'
> weewx.units.MetricWXUnits['group_cpm'] = 'cpm'
>
> weewx.units.default_unit_format_dict['µSv'] = '%.1f'
> weewx.units.default_unit_label_dict['µSv'] = ' µSv'
>
> weewx.units.default_unit_format_dict['cpm'] = '%.0f'
> weewx.units.default_unit_label_dict['cpm'] = ' cpm'
>
>
> On Wednesday, July 10, 2024 at 11:37:44 AM UTC-4 [email protected] wrote:
>
>> Thanks for the replies. Sorry for the confusing question which is
>> probably because I'm confused about why things aren't working.
>> To narrow this down, I have a Geiger counter sending data to weewx which
>> is being stored in weewx.sdb under signal1 and signal2. This seems to be
>> working.
>> I have added the following to weewx.conf (Standard skin) under units,
>> groups and  string format (see original message above).
>>
>> signal1 = cpm  group_cpm  = cpm   cpm = %.0f
>> signal2 =  µSv  group_severt = µSv   µSv  = %.2f
>>
>> I have this in my weewx.conf for 4.10.2 where it's working but does not
>> work in 5.1 when pasted into weewx.conf. In 4.10.2, I have not used any
>> extra code for an extension. I'm not sure of how to format something like
>> 'geiger.py' for weewx 5.1 but maybe that is what I need to do. Vince
>> pointed me to a cheetah-generator formatting section which I had not seen
>> before so maybe I could use something like this in my index.html.tmpl (?).
>>
>> I have restored the original units.py. That modification was just an
>> uneducated guess on my part.
>>
>> What I have in 5.1 is working. It would just look better if it displayed
>> the units and format better.
>>
>> CO2 level                        458 ppm at 11:00   [this one works
>> correctly]
>> Radiation Count Level  16.857143 at 11:15
>> Radiation Dose              0.095714 at 11:15
>>
>> Thanks for your help.
>> Cheers,
>> Bob
>> On Tuesday, July 9, 2024 at 11:59:53 PM UTC-4 vince wrote:
>>
>>> I would again suggest you use your working v4 system as a reference and
>>> do the same edits to your new v5 system.
>>>
>>> Nothing has changed related to formatting your data in the cheetah .tmpl
>>> templates.  See
>>>
>>> https://weewx.com/docs/5.1/custom/cheetah-generator/?h=forma#formatting-examples
>>> for some hopefully obvious examples.
>>>
>>> On Tuesday, July 9, 2024 at 9:12:26 AM UTC-6 [email protected] wrote:
>>>
>>>> Sorry to keep going on this but I have no takers so far.
>>>>
>>>> I have added this to weewx.conf:
>>>> [[StandardReport]]
>>>>         # This is the old "Standard" skin. By default, it is not
>>>> enabled.
>>>>         skin = Standard
>>>>         enable = true
>>>>
>>>>          [[[Units]]]
>>>>             [[[[Groups]]]]
>>>>                 group_fraction     = ppm                #added for CO2
>>>> monitor 11/30/21
>>>>                 group_severt       = µSv
>>>>                 group_conductivity = dSm
>>>>                 group_cpm          = cpm
>>>>          [[[[StringFormats]]]]
>>>>                 ppm                = %.0f  # 12/2/21
>>>>                 cpm                = %.0f
>>>>                 µSv                = %.2f
>>>>                 dSm                = %.2f
>>>>
>>>> and this to units.py:
>>>>
>>>> obs_group_dict = ListOfDicts({
>>>> "signal1"                   : "group_cpm",
>>>>     "signal2"                   : "group_severt",
>>>>
>>>> USUnits = ListOfDicts({
>>>> "group_severt"      : "µSv",
>>>>
>>>> As mentioned earlier, this is working fine in 4.10.2 but I just can't
>>>> get going in 5.1 (pip install). Everything else seems to be working well.
>>>> Any help would be greatly appreciated.
>>>> Cheers,
>>>> Bob
>>>> grattans.org/wx
>>>>
>>>> On Thursday, July 4, 2024 at 3:06:51 PM UTC-4 [email protected] wrote:
>>>>
>>>>> Hello all,
>>>>> I am slowly moving my weewx 4.10.2 ubuntu VP2+ station to an RPI5 with
>>>>> Bookworm. Lacking in indepth knowledge of html and python, I'm having lots
>>>>> of trouble with formats and units. I had it working on the Standard skin
>>>>> (see attache file) but many things have changed on how this is now done.
>>>>> Before I was adding to weewx.conf but it appears more complicated for 5.0.
>>>>> The file shows my present Standard page and then the attempted version
>>>>> in 5.0. I'm not sure how to add the "µ" symbol or to round data with too
>>>>> many decimal places.
>>>>> What I have in 5.0 seems to be running but doesn't look very nice.
>>>>> Could someone please point me in the correct direction? I have looked
>>>>> at the customization section of the wiki but am not sure how to proceed.
>>>>> The Geiger counter data is stored in Signal1 and Signal2 of weewx.sdb.
>>>>>
>>>>> MQTT section from weewx.conf
>>>>>         ##################
>>>>>         ## Radmon+ Geiger counter from emonpi
>>>>>         ##################
>>>>>
>>>>>         [[[gccpm]]]
>>>>>             name = signal1
>>>>>             [[[[message]]]]
>>>>>                 type = individual
>>>>>         [[[gcdose]]]
>>>>>             name = signal2
>>>>>             [[[[message]]]]
>>>>>                 type = individual
>>>>>         ####################################
>>>>>         ## Soil Moisture / Soil Temp from emoncms
>>>>>         ####################################
>>>>>         [[[4103]]]
>>>>>             name = soilMoist1
>>>>>             [[[[message]]]]
>>>>>                 type = individual
>>>>>         [[[4102]]]
>>>>>             name = soilTemp3
>>>>>             [[[[message]]]]
>>>>>                 type = individual
>>>>>         [[[4108]]]
>>>>>             name = signal3
>>>>>             [[[[message]]]]
>>>>>                 type = individual
>>>>>
>>>>> Thanks in advance. Everything is rtunning with no errors so far.
>>>>> Bob
>>>>> http://grattans.org/wx
>>>>>
>>>>> --
> 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/5bcb58da-6b8e-4ad9-966b-419d57ea9e66n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/5bcb58da-6b8e-4ad9-966b-419d57ea9e66n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAAraAzjVuaj4BWJw0SrCN2iOmX1q3qcKs%2ByB7boPBraX6q%3DFGw%40mail.gmail.com.

Reply via email to