So I decided to change MQTTSubscribe from extraTemp1 and 2 (&3) to extraTemp4 & 5 . This necessitated that I also change the Seasons skins to go from extraTemp1, 2, 3 to extraTemp4, 5, 6 . To do this I changed skin.conf as well as
current.inc, hilo.inc, statistics.inc and index.html.tmpl . Note that what might look like a comment with the # in front of it (such as #if $day.extraTemp3.has_data ) is a conditional or preprocessor statement so those have to be changed. There is probably a way to do that in weewx.conf but I took the simple way out. On Friday, March 3, 2023 at 7:54:42 AM UTC-7 lloyd...@gmail.com wrote: > Rich: > Thank you very much. That would have probably taken me an eon to figure > that out. > > On Friday, March 3, 2023 at 7:11:39 AM UTC-7 bell...@gmail.com wrote: > >> Looks like rtldavis is ‘repurposing’ the extraTemp* fields. >> >> https://github.com/lheijst/weewx-rtldavis/blob/2f3b4b344fd70ab253aabfa837b0ffc76570c075/bin/user/rtldavis.py#L732 >> 'extraTemp1': 'pct_good_0', # renamed >> 'extraTemp2': 'pct_good_1', # renamed >> 'extraTemp3': ' pct_good_2', # renamed >> >> Also looks like there is a way to ‘override’ the setting in weewx.conf. >> >> https://github.com/lheijst/weewx-rtldavis/blob/2f3b4b344fd70ab253aabfa837b0ffc76570c075/bin/user/rtldavis.py#L769 >> if 'sensor_map' in stn_dict: >> self.sensor_map.update(stn_dict['sensor_map']) >> >> I see two options. >> 1. Configure rtldavis to leave inTemp1 and inTemp2 as temperature fields. >> 2. Configure MQTTSubscribe to use different temperature fields. >> rich >> >> On Thursday, 2 March 2023 at 20:52:36 UTC-5 lloyd...@gmail.com wrote: >> >>> This WeeWX is as close to stock as I can get given the SDR and >>> MQTTSubscribe and BME280. The only changes to weewx.conf have been the 2 >>> services and the SDR driver plus the labels generic >>> >>> On Thursday, March 2, 2023 at 6:44:44 PM UTC-7 lloyd...@gmail.com wrote: >>> >>>> 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. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/2c25f277-778a-49d6-a60e-c0b7e702a465n%40googlegroups.com.