Hi Gary, thanks for he hint
I was digging a bit more - and found an earlier post of yours, which I
had already used before as I wanted dewpoint and heatindex to be
displayed beyond only sensor 1-4:
https://groups.google.com/g/weewx-user/c/svov51heFp8?pli=1
I did a complete reinstall again with Python2
and found that in the earlier reinstall (P3) my old extensions.py got
"lost", overwritten, who knows what.
After creating the respective entries in extensions.py (which I now
saved externally), all is back again - to Python2 so far.
The other SD card with the Python3 install will be the next step - and
test. So far I only confirmed my old status on P2.
Meanwhile I did the restart with my other SD card (P3 install) - all
works fine with sensor map + unit declarations in extensions.py.
Looks like that got lost (as mentioned before) during a backup/new
install with P3 - hence the (meanwhile proven wrong) suspicion,
that is was due to P3.
*I suggest to have the gist from your above mail included in the
Klimalogg Pro readme of Matthew. (see below)
*[I took the liberty to complete the sensor map for all
dewpoint/heatindex values - the original post had it only for 1-4]
As this is already a 4-year old post, I'm not sure if and how Matthew is
available to add this - but it's important information if someone wants
heatindex and dewpoint shown and/or is using more than 4 sensors (up to
8 possible). Maybe to be added to the weewx wiki on GitHub under
Klimalogg Pro ...
I will add a respective post in the WXforum in the weewx section
--------
it appears that the default setup is that heatindex and dewpoint are not
calculated unless you specify them in the a [[sensor_map]] stanza in
weewx.conf (preferred) or modify the driver(not advisable). Try adding
something like the following to the [KlimaLogg] section of weewx.conf:
|
[[sensor_map]]
temp0 =Temp0
humidity0 =Humidity0
heatindex0 =heatindex0
dewpoint0 =dewpoint0
temp1 =Temp1
humidity1 =Humidity1
heatindex1 =heatindex1
dewpoint2 =dewpoint1
temp2 =Temp2
humidity2 =Humidity2
heatindex2 =heatindex2
dewpoint2 =dewpoint2
temp3 =Temp3
humidity3 =Humidity3
heatindex3 =heatindex3
dewpoint3 =dewpoint3
temp4 =Temp4
humidity4 =Humidity4
heatindex4 =heatindex4
dewpoint4 =dewpoint4
|temp5 =Temp5
humidity5 =Humidity5
heatindex5 =heatindex5
dewpoint5 =dewpoint4|5
||temp6 =Temp6
humidity6 =Humidity6
heatindex6 =heatindex6
dewpoint6 =dewpoint6||
|temp7 =Temp4
humidity7 =Humidity7
heatindex7 =heatindex7
dewpoint7 =dewpoint7|
||temp8 =Temp8
humidity8 =Humidity8
heatindex8 =heatindex8
dewpoint8 =dewpoint8||
|||| rxCheckPercent =SignalQuality
batteryStatus0 =BatteryStatus0
batteryStatus1 =BatteryStatus1
batteryStatus2 =BatteryStatus2
batteryStatus3 =BatteryStatus3
batteryStatus4 =BatteryStatus4
batteryStatus5 =BatteryStatus5
batteryStatus6 =BatteryStatus6
batteryStatus7 =BatteryStatus7
batteryStatus8 =BatteryStatus8
|
# to be added to extensions.py in /usr/share/weewx/user
# setup units to support custom Klimalogg sensor map
fromweewx.units importobs_group_dict
obs_group_dict['temp0']='group_temperature'
obs_group_dict['temp1']='group_temperature'
obs_group_dict['temp2']='group_temperature'
obs_group_dict['temp3']='group_temperature'
obs_group_dict['temp4']='group_temperature'
obs_group_dict['temp5']='group_temperature'
obs_group_dict['temp6']='group_temperature'
obs_group_dict['temp7']='group_temperature'
obs_group_dict['temp8']='group_temperature'
obs_group_dict['humidity0']='group_percent'
obs_group_dict['humidity1']='group_percent'
obs_group_dict['humidity2']='group_percent'
obs_group_dict['humidity3']='group_percent'
obs_group_dict['humidity4']='group_percent'
obs_group_dict['humidity5']='group_percent'
obs_group_dict['humidity6']='group_percent'
obs_group_dict['humidity7']='group_percent'
obs_group_dict['humidity8']='group_percent'
obs_group_dict['dewpoint0']='group_temperature'
obs_group_dict['dewpoint1']='group_temperature'
obs_group_dict['dewpoint2']='group_temperature'
obs_group_dict['dewpoint3']='group_temperature'
obs_group_dict['dewpoint4']='group_temperature'
obs_group_dict['dewpoint5']='group_temperature'
obs_group_dict['dewpoint6']='group_temperature'
obs_group_dict['dewpoint7']='group_temperature'
obs_group_dict['dewpoint8']='group_temperature'
obs_group_dict['heatindex0']='group_temperature'
obs_group_dict['heatindex1']='group_temperature'
obs_group_dict['heatindex2']='group_temperature'
obs_group_dict['heatindex3']='group_temperature'
obs_group_dict['heatindex4']='group_temperature'
obs_group_dict['heatindex5']='group_temperature'
obs_group_dict['heatindex6']='group_temperature'
obs_group_dict['heatindex7']='group_temperature'
obs_group_dict['heatindex8']='group_temperature'
obs_group_dict['rxCheckPercent']='group_percent'
obs_group_dict['batteryStatus0']='group_count'
obs_group_dict['batteryStatus1']='group_count'
obs_group_dict['batteryStatus2']='group_count'
obs_group_dict['batteryStatus3']='group_count'
obs_group_dict['batteryStatus4']='group_count'
obs_group_dict['batteryStatus5']='group_count'
obs_group_dict['batteryStatus6']='group_count'
obs_group_dict['batteryStatus7']='group_count'
obs_group_dict['batteryStatus8']='group_count'
|
|
On 09.03.2021 09:54, gjr80 wrote:
Doesn’t sound like a python2/3 issue but rather a unit group
assignment issue. To use the WeeWX formatting and unit conversion each
WeeWX field needs to be assigned to to a unit group, eg outTemp is
assigned to group_temperature so WeeWX knows that outTemp is a
temperature and not a pressure. Unit/formatting flows from that unit
group assignment. Looking at your weewx.conf you appear to be using a
number of fields that are not in standard unit group assignments.
That’s perfectly fine, but you then need to make sure you manually
assign those unit groups. This can be done in a number of ways,
sometimes it is done with a few lines of code in user/extensions.py or
it can be done with some code in a driver or a service (for an example
of what I am talking about see Assigning a unit group
<http://weewx.com/docs/customizing.htm#Assigning_a_unit_group> in the
Customization Guide). It should not be done by modifying
weewx/units.py. I have no idea how the klimalog driver handles this,
but I could certainly see that if it was to be done manually it could
easily be lost if re-installing.
Gary
On Tuesday, 9 March 2021 at 17:55:50 UTC+10 lang....@googlemail.com wrote:
Hi
I made a fresh installation of weewx 4.4.0 with Python3 on
Debian10 (Raspberry Pi).
And I have the Klimalogg extension installed.
The earlier installation was exactly the same, but ran under Python2.
Use the same weewx.conf, skin.conf, index.html.tmpl and database
as before.
Now the sensor values show as 17.433333 instead of 17.4 °C
respectively 46.000000 instead of 46.0 % as they did before. (see
attachment).
and no units (like % or °C) shown any more on the snippets (graphs).
The only difference is that weewx now uses Python3 instead of Python2.
I tried my best to look up the formatting in in the .conf files,
but there the definitions
look all reasonable: .%1f, .%2f
degree_C = %.1f
degree_F = %.1f
and the labels
degree_C = " °C"
degree_F = " °F"
I assume that the instructions for depiction of numbers and unit
denominator in
in index.html.tmpl and skin.conf are interpreted differently under
Python3.
Or formatting follows different rules.
Not being a Python expert (know other programming languages quite
well though),
I'm stuck here.
How to get a "proper" depiction back under Python3 ?
Advice appreciated.
weewx.conf, skin.conf, index.html.tmpl attached.
Rainer
--
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+unsubscr...@googlegroups.com
<mailto:weewx-user+unsubscr...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/61addd0d-569a-4c92-ae6e-0597774e5820n%40googlegroups.com
<https://groups.google.com/d/msgid/weewx-user/61addd0d-569a-4c92-ae6e-0597774e5820n%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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/b853d1c3-68f5-1f8e-0e5b-df43c34b0aa2%40gmail.com.