Seems like, changed it to
if self.latest_sensor_data is None or sensor_data['datetime'] > 
self.latest_sensor_data['datetime']:
and it didn't crash again so far.

[email protected] schrieb am Samstag, 27. Januar 2024 um 14:31:43 UTC+1:

> Case typo?
>
> if self.latest_sensor_data is None or sensor_data['datetime'] > 
> self.latest_sensor_data['dateTime']:
> [email protected] schrieb am Samstag, 27. Januar 2024 um 14:24:58 UTC+1:
>
>> That part worked. You can tell by the weewx.restx: MQTT: Published record 
>> entries in the log, there is only one Loop packet every 10s (the poll 
>> interval).
>> But after a few archive_intervals it crashed:
>>
>> 2024-01-27 14:17:25 weewxd[657388] INFO weewx.engine: Main loop exiting. 
>> Shutting engine down.
>> 2024-01-27 14:17:25 weewxd[657388] INFO weewx.engine: Shutting down 
>> StdReport thread
>> 2024-01-27 14:17:26 weewxd[657388] INFO user.gw1000: GatewayCollector 
>> thread has been terminated
>> 2024-01-27 14:17:27 weewxd[657388] INFO user.gw1000: GatewayCollector 
>> thread has been terminated
>> 2024-01-27 14:17:27 weewxd[657388] CRITICAL __main__: Caught 
>> unrecoverable exception:
>> 2024-01-27 14:17:27 weewxd[657388] CRITICAL __main__:     ****  'dateTime'
>> 2024-01-27 14:17:27 weewxd[657388] CRITICAL __main__:     ****  Traceback 
>> (most recent call last):
>>
>> 2024-01-27 14:17:27 weewxd[657388] CRITICAL __main__:     ****    File 
>> "/home/pi/weewx-venv/lib/python3.9/site-packages/weewxd.py", line 166, in 
>> main
>>
>> 2024-01-27 14:17:27 weewxd[657388] CRITICAL __main__:     ****     
>>  engine.run()
>>
>> 2024-01-27 14:17:27 weewxd[657388] CRITICAL __main__:     ****    File 
>> "/home/pi/weewx-venv/lib/python3.9/site-packages/weewx/engine.py", line 
>> 206, in run
>>
>> 2024-01-27 14:17:27 weewxd[657388] CRITICAL __main__:     ****     
>>  self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
>>
>> 2024-01-27 14:17:27 weewxd[657388] CRITICAL __main__:     ****    File 
>> "/home/pi/weewx-venv/lib/python3.9/site-packages/weewx/engine.py", line 
>> 241, in dispatchEvent
>>
>> 2024-01-27 14:17:27 weewxd[657388] CRITICAL __main__:     ****     
>>  callback(event)
>>
>> 2024-01-27 14:17:27 weewxd[657388] CRITICAL __main__:     ****    File 
>> "/home/pi/weewx-data/bin/user/gw1000.py", line 1504, in new_loop_packet
>>
>> 2024-01-27 14:17:27 weewxd[657388] CRITICAL __main__:     ****     
>>  self.process_queued_sensor_data(queue_data, event.packet['dateTime'])
>>
>> 2024-01-27 14:17:27 weewxd[657388] CRITICAL __main__:     ****    File 
>> "/home/pi/weewx-data/bin/user/gw1000.py", line 1611, in 
>> process_queued_sensor_data
>>
>> 2024-01-27 14:17:27 weewxd[657388] CRITICAL __main__:     ****      if 
>> self.latest_sensor_data is None or sensor_data['datetime'] > 
>> self.latest_sensor_data['dateTime']:
>>
>> 2024-01-27 14:17:27 weewxd[657388] CRITICAL __main__:     ****  KeyError: 
>> 'dateTime'
>>
>> 2024-01-27 14:17:27 weewxd[657388] CRITICAL __main__:     ****  Exiting.
>>
>>
>> [email protected] schrieb am Donnerstag, 25. Januar 2024 um 10:48:00 
>> UTC+1:
>>
>>> OK, I need to sort this out a little. I think I messed up with 0.6.0bx 
>>> and 0.5.0bx. Currently I've got too many things on my plate, and wasn't as 
>>> focused on this topic, as I should have been, sorry for that. I'll do my 
>>> homework and check everything again.
>>>
>>> gjr80 schrieb am Mittwoch, 24. Januar 2024 um 22:24:13 UTC+1:
>>>
>>>> On Thursday 25 January 2024 at 06:56:42 UTC+10 [email protected] 
>>>> wrote:
>>>>
>>>> The log is from latest logs I posted are from b5. Sorry, I forgot to 
>>>> mention that I didn't use the file in your link above, I downloaded from 
>>>> the releases, and for b4 it says: removed, go for b5. b5 is producing two 
>>>> independent LOOP packets after a few on my RPi4.
>>>>
>>>>
>>>> Sorry, but I don't understand this. The latest log you posted yesterday 
>>>> is very clearly from b4:
>>>>
>>>> 2024-01-23 19:46:51 weewxd[232660] INFO weewx.engine: Loading station 
>>>> type GW1000 (user.gw1000) 
>>>> 2024-01-23 19:46:51 weewxd[232660] INFO user.gw1000: GatewayDriver: 
>>>> version is 0.6.0b4 
>>>> 2024-01-23 19:46:51 weewxd[232660] INFO user.gw1000: device address is 
>>>> 10.0.1.85:45000
>>>>
>>>> b4 and b5 have not been published to releases, they have been produced 
>>>> to deal with this issue and I have kept them back until I know the issue 
>>>> is 
>>>> fixed. You need to re-download the driver from the link I provided earlier 
>>>> in order to get b5, b3 (releases) and b4 will never work. Here is the link 
>>>> again:
>>>>
>>>>
>>>> https://raw.githubusercontent.com/gjr80/weewx-gw1000/master/bin/user/gw1000.py
>>>>
>>>> Gary
>>>>
>>>

-- 
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/e6bf55fe-60f9-40e5-8971-640cc1912f3en%40googlegroups.com.

Reply via email to