How to Reset a Modbus Value

Hello,

I’m using a fenecon home 10 with a 50kw battery.

I’m setting SetActivePowerGreaterOrEquals to 1000 and SetActivePowerLessOrEquals to 0 every 30 seconds to avoid the watchdock timer.

Now I try to reset/fallback SetActivePowerLessOrEquals to their default. Normaly I would expect that If I don’t write this value for > 60 seconds. The watchdog timer will reset this value. But this is not the case.

My question is, how can I reset/fallback one value but still keep a different value at the same time.

Hey,

i looked into the code to give you a proper answer on this.

The write values from the API are managed by the ApiWorker class. Important thing to understand: all your API write values are stored in a shared queue (ApiWorker.values map), and the watchdog timer resets on every new write - not per channel, but for the entire queue.

So heres the problem: when you write SetActivePowerGreaterOrEquals every 30 seconds, you also reset the watchdog timer for SetActivePowerLessOrEquals. It will never timeout as long as you keep writing anything through the API. The default timeout is 10 seconds btw, not 60.

To remove a single constraint while keeping the other, you can set the value to null via the API. The ApiWorker has this logic:

So your flow should be:

  1. Keep writing SetActivePowerGreaterOrEquals = 1000 every 30s as usual
  2. When you want to reset SetActivePowerLessOrEquals, send a write request with value null for that channel

This will remove only that one constraint from the queue while your GreaterOrEquals constraint stays active.

Hope that clears things up

thanks for the explanation!

currently I’m using the modbus write app. But modbus does not allow null values :innocent:

so I will change my app “modbus write” to “rest write” and with rest, it should be possible. I already wrote the support, and I hope they can convert the app license key.

ah sorry, i missed this - okay