Modification of polling frequency for status values possible?

Hello,
not sure is this questions aims at a general Openhab feature or can be answered for the Shelly binding only, or if it’s possible at all, so one shot in the blue…

I would like to have the readout of shelly sensors, if possible only for some specific, in a very short timeframe, let’s say 2~3 seconds - is this possible? To provide the background for this question:

  • I have two water wells with pumps installed, both controlled by a Shelly1PM, i.e. with power reading.
  • Both pumps shutdown themselfs once not water is there, but this is not the recommended mode of operation, more or less just a self protection before they run dry.
  • Short before this point is reached I assume the required power will go do as there is no water to pump. I do not know right know how much this is, but will make this experiment in a couple of days to verify the assumption.
  • A depth reading with sensors is complicated due to the physical setup of the wells and cannot be considered (that was the primary solution I was aiming for, but it simply does not work).

So my idea is something like that:

  • Once the pump starts I start a script programmatically to check every second or so via cron or loop + timer the power consumption.
  • If it falls below a certain threshold, the pump will be turned off.
  • The script stops here

I noticed that sometimes readout values from Shelly devices come in after 5, sometimes after 20 seconds. As said, I’d like to read them in a higher frequency to be able to implement the above.

Maybe someone comes up with a different solution, that’d be also okay ,-))

Thanks,
Soeren

Wouldn’t it be better to use a sensor that detects the water level.

In general, the device is polled every 60 second. This can be changed in the Thing settings (might be an advanced config).
But if you enabled CoIoT for the device, value changes will be send out immediately.
So I see no need for your request.

1 Like

That’s a lot of work, to usually tell you nothing of interest.
Better to get the Shelley to tell you when something changes, and examine what has changed.

1 Like

Okay, thanks. I just checked for some installed devices: They seem to have to have ColoT enabled by default, also the Openhab settings has ColoT enabled. I’ll play around with the “Status interval” setting, maybe this has some impact.

@Wolfgang_S: As mentioned in the beginning, a sensor does not work. I tried ultrasonic and radar sensor, but because of pipes and supporting structure inside the wells reflecting false signals this does not work (actually I was trying with LoRaWAN sensors from Dragino). There are of course different solutions to tackle this, from pure mechanical, to a chain of contact and pressure driven sensors, but these type of sensors are very costly and not an option. Personally I try to do something with software first, then hardware ,-)

Habe nochmal mit der Aktualisierunsrate rumgespielt, auf 10 und auf 120 Sekunden gestellt (und ja, ColoT ist in OH und den Shellies gesetzt). Kein Unterschied, zumindest im Log. So grob kommt alle 15~20 Sekunden ein neuer Wert im Log an, scheinbar völlig egal was ich einstelle. Gut, dann ist das halt so.