ndokter / dsmr_parser

Library to parse Dutch Smart Meter Requirements (DSMR) telegrams.
MIT License
110 stars 64 forks source link

Add socket timeout #155

Closed ido-szargel closed 3 weeks ago

ido-szargel commented 1 month ago

When reading data through a device called 'chargee sparky' I noticed that every time the wireless connection of the device is lost it stops transmitting data. dsmr_parser based on the example in the README doesn't do anything and will simply sit there for hours waiting for the next telegram. Adding a 1 minute timeout and breaking allows something upstream to notice, in my case my python runs as systemd service and once it exits it's restarted.

ndokter commented 3 weeks ago

Sorry for the late response. Looks good! Ill have to make a new build in the near future