Skip to content

Commit

Permalink
carlo_gavazzi: set minimum timeout to 500 ms
Browse files Browse the repository at this point in the history
The network stack in the meter can lock up if too small a timeout
is used.  Make sure this remains unlikely.
  • Loading branch information
mansr committed Oct 14, 2020
1 parent 9806dd3 commit 17a53b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions carlo_gavazzi.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def decode(self, values):
class EM24_Meter(device.EnergyMeter):
productid = 0xb017
productname = 'Carlo Gavazzi EM24 Ethernet Energy Meter'
min_timeout = 0.5

def __init__(self, *args):
super(EM24_Meter, self).__init__(*args)
Expand Down

3 comments on commit 17a53b9

@mpvader
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@donnib
Copy link

@donnib donnib commented on 17a53b9 Feb 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@donnib https://github.com/victronenergy/dbus-modbus-client/search?q=min_timeout&type=code

Yes you are right, it's overriden since you are inherited one of the classes in device.py ..... hmm. don't know what to say...

@Hofyyy
Copy link

@Hofyyy Hofyyy commented on 17a53b9 Jul 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that work now or not?

Ok I debugged it via MQTT:
It seems to work, if I did it right.

Problem is, that I have still lockups ...

Edit:
Would it be possible to "log" the situation when a TCP reconnect is happen?

Please sign in to comment.