-
-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set Limit over MQTT stop responding #1088
Comments
If you are updating your inverter limit so often you should increase your polling interval (which is currently 5 seconds). Other way would be to send the limit updates with more delay |
Im set right now interval to 30 seconds(DTU Poll Interval). MQTT Im leave at 5 seconds. |
To understand the logic I have to explain some things:
Why was this implemented in this way? Commands like limit or restart have higher priority in this way and never get lost. So now it's in the response of the user not to send the limit commands too often. (which was also a feature request to leave this in the users hand) |
Im sorry but I understand your explaination or something do not work correctly... Lets test. I have 3 Inverters enabled. Situation 1: So there is no Limit or other commands send to inverters. Situation 2: So there is no Limit or other commands send to inverters. Situation 3: So there is only one Limit command every 15 seconds send to only one inverter. No other commands send to inverters. Situation 4: So there is only one Limit command every 15 seconds send to only two inverters. No other commands send to inverters. Log when DTU need more than 200 seconds to get data:
System looks ok: If there is FIFO for commands is not better idea to only keep last limit command if there are 5, 10 or more commands in row? Looks like sending limit by FIFO way every 15 seconds work ok for only one inverter, but for 2 do not work and it go to infinity loop... |
Makes sense with 5 inverters
And this applies only if the queue is empty. if e.g. 4 seconds after polling inverter 1 a limit command comes in then the limit command is handled first before polling inverter 2. and as I see you are inserting 2 limit commands in a row. that means that both limit commands have to be sent first.
it depends... What if one command is turn off and the other one is turn on? |
Ok now I understand more :) Then in DTU settings "Poll Interval" is not pool interval but delay between inverter pool requests :) How long usually need set power command to be completed? In current test it looks like one request is completed in 15 seconds but two are not. DTU is around 3-4 meters away from inverters. NRF Power has been set to high now Im set it to Minimum if there will be some difference... Is there some reason why this is not set to 1 second? Then it will imediatelly continue after set commands... Im think about this when talking about FIFO optiimzations After optimization and when command "set inverter 1 power 100" will finish it will became: So all other comands like turn on/off or reboot will stay in queue. but if for some inverter there is already in queue some power limit command it will delete old one and enter new one in queue... Afcourse persistent and non persistent(This are currently problematic) need to be seperated... This also can be option in inverter settings to queue only last set power command.... I will test more combinations tomorrow because right now there is no sun :) |
Now using v23.6.26 firmware. Situation 5: So there is only one Limit command every 30 seconds send to two inverters. No other commands send to inverters. Situation 6: So there is only one Limit command every 30 seconds send to three inverters. No other commands send to inverters. Situation 7: So there is only one Limit command every 30 seconds send to three inverters. No other commands send to inverters. For now Situation 7 work best... I think that current pooling is not optimized and there can be a lot of improvements... Im never program arduino but maybe it can be done by simple fix in Hoymiles.cpp where you check isQueueEmpty() one else statement to decrease _pollInterval value to minimum... |
@tbnobody Did you think to do some check if "same" command(with different value) is already in queue that to inverter is send only last one? |
I have the same setup and the same issues. I increased the publishing intervall of the new powerlimit via mqtt to 33seconds. This is working fine over the day. |
@DejanBukovec as Thomas explained the commands are queued in your scenarios. For the Active Power Limit | 0x0B command it will not only transmit the new power limit but also has to wait several seconds (15-20 seconds) until the inverter responds with the new value to the SystemConfigPara | 0x05 command which we need to show the new value has been accepted. So it is only natural that in case you have filled up your FiFo queue with Active Power Limit and System Config Para commands, that this will eventually prevent your OpenDTU from querying new RealTimeRunData_Debug data from the inverters. Please double check the Dynamic Power Limiter (DPL) function in the daughter project OpenDTU-OnBattery. @tbnobody nevertheless I second Dejan's idea of finding older entries with Active Power Limit | 0x0B for the same inverter, which could be skipped or overwritten when a new Command has been received for the same inverter with a new value. Thus preventing the queue from growing or even overflowing too easily. |
Hi, |
@tbnobody as Dejan mentioned we should consider a different scheme regarding the ActivePowerLimit. As this takes quite some time to send to the inverter and wait for its update/confirmation, we may be faster to compare the current ActivePowerLimit on the OpenDTU before we actually try to send any command via NRF/CMT. As Dejan noted only the last requested value / command should be executed. i am unsure if we have to distinguish / prioritize between Temporary ( aka. non-persistent ;) ) and Persistent PowerLimit values too ? |
Co-authored-by: Bernhard Kirchen <schlimmchen@posteo.net>
see #2356 |
What happened?
Hi,
I have 3 HM-800 inverters.
Im make in Home Assistant automation which every 15 seconds calculate how many power solar system need produce to cover current power usage(Zero export).
DTU Settings:
DTU Poll Interval: 5 seconds
MQTT Publish Interval: 5 seconds
When I enable automation for 1 inverter everything work ok. And all inverters receive/update every cca. 15-30 seconds.
When I enable automation also for second inverter then problem start. It set limit on second inverter but newer receive any data/update from it. Im wait around 200-300 seconds and DTU didn't receive any updates from inverters...
To Reproduce Bug
Enable automation in Home Assistant which set Non persistent power limit over MQTT for 3 HM-800 inverters.
Expected Behavior
Setting Limit over MQTT do not stop receiving data from inverters...
Maybe solution is to add commands received by MQTT into cache and update inverters on next pool timeout to avoid loosing inverter data? Or add this option inside inverter options if sending commands need to be imediate or at pool interval....
Install Method
Pre-Compiled binary from GitHub
What git-hash/version of OpenDTU?
v23.6.21
Relevant log/trace output
Anything else?
No response
The text was updated successfully, but these errors were encountered: