Yan jiaqi
________________________________
From: weewx-user@googlegroups.com <weewx-user@googlegroups.com> on behalf of 
lloyd...@gmail.com <lloydrbr...@gmail.com>
Sent: Friday, March 3, 2023 9:44:44 AM
To: weewx-user <weewx-user@googlegroups.com>
Subject: [weewx-user] Re: MQTTSubscribe service - not getting extraTemp1 or 2

The values come in as C and I wanted to convert to F.  For some unknown reason 
WeeWX seems to be trying to convert to %???

Interesting, I removed units = degree_C and it started to run without errors 
but it shows on the skin (whatever the default is)  RTD Temperature 20%  and 
TMP117 temperature 18% for temperatures of 20.46 and 18.09 respectively - I did 
change the weewx.conf to show under labels generic
                extraTemp1 = RTD Temperature
                extraTemp2 = TMP117 Temperature
                extraTemp3 = Temperature3


On Thursday, March 2, 2023 at 6:07:58 PM UTC-7 lloyd...@gmail.com wrote:
Well that change helped and shows MQTTSubscribe reading the values  but now it 
says can't convert degree_C to percent as per the following for rtd_temperature 
(same for tmp117_temperature)
Also what should I do  when copying sections of weewx.conf to make it easier to 
read?

Mar  2 17:56:03 pi34 weewx[10834] DEBUG user.MQTTSubscribe: (Service) 
MessageCallbackProvider data-> incoming topic: rtd_temperature, QOS: 0, retain: 
0, payload: b'20.39'
Mar  2 17:56:03 pi34 weewx[10834] DEBUG weewx.units: Unable to convert from 
degree_C to percent
Mar  2 17:56:03 pi34 weewx[10834] ERROR user.MQTTSubscribe: (Service) 
MessageCallbackProvider on_message_individual failed with <class 'KeyError'> 
and reason 'percent'.
Mar  2 17:56:03 pi34 weewx[10834] ERROR user.MQTTSubscribe: (Service) **** 
MessageCallbackProvider Ignoring topic=rtd_temperature and payload=b'20.39'
Mar  2 17:56:03 pi34 weewx[10834] ERROR user.MQTTSubscribe: (Service) **** 
MessageCallbackProvider Traceback (most recent call last):#012  File 
"/home/weewx/bin/user/MQTTSubscribe.py", line 1527, in 
_on_message_individual#012    (fieldname, value) = self._update_data(fields, 
fields_conversion_func, key, payload_str, unit_system)#012  File 
"/home/weewx/bin/user/MQTTSubscribe.py", line 1264, in _update_data#012    
(value, new_units, new_group) = weewx.units.convert((value, 
fields[orig_name]['units'], None), to_units) # match signature pylint: 
disable=unused-variable#012  File "/home/weewx/bin/weewx/units.py", line 1454, 
in convert#012    conversion_func = 
conversionDict[val_t[1]][target_unit]#012KeyError: 'percent'



On Thursday, March 2, 2023 at 5:21:16 PM UTC-7 vince wrote:
In that case should [[[topic/rtd_temperature]]] be just [[[rtd_temperature]]] 
perhaps ???

It's a bit hard to decipher with such a cryptic description and unfortunately 
google ate whatever formatting you entered on your cut+paste, so your original 
post is very hard to read as a result.

Give it a try.  It's already not working so you can't make anything worse.

On Thursday, March 2, 2023 at 3:21:42 PM UTC-8 lloyd...@gmail.com wrote:
without the xargs

rtd_temperature 20.70
tmp117_temperature 18.33


On Thursday, March 2, 2023 at 4:12:46 PM UTC-7 vince wrote:
How about you just show the mosquitto_sub results without the xargs pipe 
please...


--
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/ec8c8e83-4cc8-4474-8d67-67185934cbd2n%40googlegroups.com<https://groups.google.com/d/msgid/weewx-user/ec8c8e83-4cc8-4474-8d67-67185934cbd2n%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/KL1PR01MB40177616C415DC94F94B71DAF3B39%40KL1PR01MB4017.apcprd01.prod.exchangelabs.com.

Reply via email to