Hi

I did the same and got the same error.

Running Weewx 4.1.1

Gert

On Thursday, June 18, 2020 at 2:12:23 AM UTC+2, Benjamin Trey Blue wrote:
>
> Hello,
>
> Thank you for the patched interceptor driver - I just got a WH57 for my 
> GW1000 and am trying to get the observations added to the WeeWX DB. With 
> the patched driver, the lightning observations are showing in my raw 
> packets:
>
> weewx[29068] DEBUG user.interceptor: raw packet: {'wind_speed': 0.0, 
> 'humidity_in': 44.0, 'temperature_in': 69.4, 'solar_radiation': 0.0, 
> 'wind_gust': 1.12, 'wh65_battery': 0.0, 'lightning': '', 'humidity_out': 
> 81.0, 'uv': 0.0, 'lightning_num': 0.0, 'rain': 0.0, 'dateTime': 1592366447
> , 'pressure': 30.076, 'temperature_out': 68.0, 'wind_dir': 314.0, 
> 'wh57_battery': 5.0, 'rain_total': 0.0, 'lightning_time': '', 'rain_rate': 
> 0.0, 'usUnits': 1}
>
> I'm using WeeWX 4.1.0, so it's my understanding that the DB already has 
> types for lightning_strike_count and lightning_distance, but when I map the 
> 'lightning' observation tho the lightning_distance type, like so 
>
>  [[sensor_map_extensions]]
>         lightning_strike_count = lightning_num
>         lightning_distance = lightning
>
> then WeeWX shuts down after receiving one of the packets:
>
> Jun 17 19:44:23 raspberrypi weewx[21398] DEBUG user.interceptor: mapped 
> packet: {u'lightning_strike_count': 0.0, 'txBatteryStatus': 0.0, 
> 'pressure': 30.014, 'outHumidity': 97.0, 'UV': 0.0, 'radiation': 7.7, 
> u'lightning_distance': '', 'rain': None, 'dateTime': 1592437461, 'windDir': 
> 130.0, 'outTemp': 71.1, 'windSpeed': 0.89, 'inHumidity': 58.0, 'inTemp': 
> 76.3, 'windGust': 1.12, 'rainRate': 0.118, 'usUnits': 1}
> Jun 17 19:44:23 raspberrypi weewx[21398] INFO weewx.engine: Main loop 
> exiting. Shutting engine down.
> Jun 17 19:44:23 raspberrypi weewx[21398] DEBUG weewx.restx: Shut down MQTT 
> thread.
> Jun 17 19:44:23 raspberrypi weewx[21398] DEBUG weewx.restx: Shut down 
> PWSWeather thread.
> Jun 17 19:44:23 raspberrypi weewx[21398] INFO user.interceptor: shutting 
> down server thread
> Jun 17 19:44:23 raspberrypi weewx[21398] DEBUG user.interceptor: stop tcp 
> server
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__: Caught 
> unrecoverable exception:
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****  
> could not convert string to float: 
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****  
> Traceback (most recent call last):
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****    
> File "/usr/share/weewx/weewxd", line 154, in main
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****      
> engine.run()
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****    
> File "/usr/share/weewx/weewx/engine.py", line 191, in run
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****      
> self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****    
> File "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****      
> callback(event)
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****    
> File "/usr/share/weewx/weewx/engine.py", line 557, in new_loop_packet
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****      
> self.accumulator.addRecord(event.packet, add_hilo=self.loop_hilo)
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****    
> File "/usr/share/weewx/weewx/accum.py", line 429, in addRecord
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****      
> func(self, record, obs_type, add_hilo, weight)
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****    
> File "/usr/share/weewx/weewx/accum.py", line 487, in add_value
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****      
> self[obs_type].addHiLo(val, record['dateTime'])
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****    
> File "/usr/share/weewx/weewx/accum.py", line 163, in addHiLo
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****      
> val = to_float(val)
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****    
> File "/usr/share/weewx/weeutil/weeutil.py", line 1250, in to_float
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****      
> return float(x) if x is not None else None
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****  
> ValueError: could not convert string to float: 
> Jun 17 19:44:23 raspberrypi weewx[21398] CRITICAL __main__:     ****  
> Exiting.
>
> This doesn't happen if I map lightning_strike_count = lightning_num only, 
> just when I add in lightning_distance = lightning 
>
> Does anyone have any recommendations for addressing this?
>
> Thank you,
> Trey
>
> On Saturday, June 6, 2020 at 11:39:54 AM UTC-4, NanoG5Kite wrote:
>>
>> Hi Gert,
>>
>> I contacted Oliver for advise today - he is the "father" of the great 
>> generic Foshkplugin:
>> https://www.loxwiki.eu/display/LOXBERRY/FOSHKplugin+-+generic+version
>>
>> He answered and already and replied on Github:
>> https://github.com/matthewwall/weewx-interceptor/issues/69
>>
>> Further he send me "his" today patched interceptor.py adressing this 
>> issue/his quick hack..
>> I guess (hope) he donĀ“t mind, me attaching the file here... but maybe you 
>> like to give this a try...
>>
>> Regards,
>>
>> Matthias
>>
>>
>>
>>
>> Am Samstag, 6. Juni 2020 15:46:32 UTC+2 schrieb Gert Andersen:
>>>
>>> Hi NanoG5Kite
>>>
>>> Thanks for your help.
>>>
>>> I guess I also must create the lightning fields in th DB or will the 
>>> sensor map extension do that? 
>>>
>>> I'm already at the patched version to solve another warning.
>>>
>>> Gert
>>>
>>>
>>>
>>> On Saturday, June 6, 2020 at 11:48:05 AM UTC+2, NanoG5Kite wrote:
>>>>
>>>>
>>>> And for this:
>>>>>
>>>>>
>>>>
>>>> https://github.com/matthewwall/weewx-interceptor/pull/64/commits/00bdecdc1822d7deaa7c41f20dfc4c30a349936d
>>>>
>>>> You could use in the meantime the patched bin/user/interceptor.py - 
>>>> enclosed:
>>>>
>>>> <https://github.com/matthewwall/weewx-interceptor/pull/64/commits/00bdecdc1822d7deaa7c41f20dfc4c30a349936d#diff-cc0dde0a53d3a52b91f579a3193de57b>
>>>>
>>>>
>>>>

-- 
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/f4f78910-7baa-4382-b466-2bdcbb836d09o%40googlegroups.com.

Reply via email to