Repository navigation
HMS-1600-4T frequency shifts: field-tested automatic recovery scanner via Web API / ioBroker #3216
Replies: 2 comments
|
Thanks for the detailed write-up. Here are some observations on the inverter's channel behaviour that may explain the jumps. Test setup: one HMS-1600-4T with the same firmware as yours (FW 1.1.12, bootloader 0.1.1, HW part 10224106, HW 01.10), a CMT2300A DTU at close range, a few dozen deliberate channel changes. Please treat this as a hint, not as proof. Talking into its answer can move it. If the DTU transmits while the inverter is still sending its reply, the request gets lost or the inverter ends up on the neighbouring channel (+250 kHz). In a loop of 40 channel changes, all 4 failures happened right after such an overlap. In 33 runs without overlap, nothing failed. Of those 4 failures, it moved to the neighbouring channel once. On the neighbouring channel it can get stuck. There it still hears requests on the original frequency, but its replies are not received there. Those requests seem to reset its fallback timer (about 15 min without contact, then back to 868 MHz). It stayed on +250 kHz for more than 20 min while being polled on the original frequency. Moved 2 MHz away, it fell back to 868 MHz after about 15 min. This matches the "unreachable until the next DC cut" reports. ChannelChange works from any channel it listens on. Sent on the frequency where the inverter currently is, it moves back reliably; it worked in all of our tests. It does not acknowledge the command, so only a reply on the target frequency confirms it. Restart keeps the channel. Only a power-up starts on 868 MHz. A guess, not verified for OpenDTU: the logs in #2573 show resends 50 to 250 ms apart. A realtime reply takes about 300 ms. Waiting one full reply window after an unanswered request might prevent most of the jumps. |
|
I made a rework of the CMT2300A Radio, works with new and old radio FW versions: Based on the current Release: |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Field-tested workaround for sporadic HMS CMT frequency shifts using an external, bounded frequency scanner implemented in ioBroker via the OpenDTU Web API.
Hi everyone,
I would like to share some field observations and a recovery solution I have implemented for the sporadic frequency shift / communication loss problem with an HMS-1600-4T.
This is not intended as a replacement for the native FrequencyManager work in #2573. It is an external workaround running in ioBroker, but it may provide additional real-world data and independent validation of the general scanning approach discussed in #2137, #2278, #2573 and #3061.
Hardware / setup
/api/dtu/configI have seen the communication disappear repeatedly even with very good RF conditions.
For example, RSSI can be around -20 dBm, and I have also observed exactly the same behaviour around -50 to -60 dBm.
Changing the configured CMT frequency by one or more 250 kHz steps immediately restores communication.
Therefore, at least in my installation, this is clearly not simply a weak-signal problem.
Observed behaviour
During normal operation I have had to use different working frequencies within a relatively short period, for example:
When communication is lost, changing the OpenDTU CMT frequency usually makes the inverter immediately reachable again.
This behaviour appears very similar to the frequency shift cases already described in #2137 and related reports.
Recovery algorithm
I implemented a bounded scanner around the frequency that was configured when the communication loss occurred.
Let
Fbe the current CMT frequency read from OpenDTU.After the inverter has been unavailable continuously for 5 seconds, the scanner tests:
Important: every test frequency is calculated relative to the original frequency
F, not relative to the previously tested frequency.The scan stops as soon as stable communication has been confirmed.
If all six frequencies fail, the original frequency
Fis restored.Success criteria
I do not treat a single
available = trueas sufficient proof of recovery.For every test frequency:
cmt_frequencymust match the requested value.last_updatehas advanced.This avoids accepting a single stale or transient packet as a successful recovery.
OpenDTU Web API
The current DTU configuration is first read from:
The relevant configuration is preserved and only
cmt_frequencyis changed.The frequency is represented in Hz, for example:
The configuration is then written back through the same API endpoint.
After every POST, the configuration is read back again and the requested
cmt_frequencymust be confirmed before the frequency is considered successfully applied.The scanner also checks the legal frequency range and channel width reported by OpenDTU before writing a test frequency.
Real end-to-end recovery test
I deliberately configured OpenDTU to 866.25 MHz while the inverter was actually reachable at another frequency.
The automatic recovery produced the following result:
From the initial communication loss to fully verified recovery it took about 25 seconds.
This test was particularly interesting because it demonstrates that testing only +/-250 kHz would not have been sufficient in this case.
Actual recovery log
Implementation
The recovery controller currently runs as an ioBroker Blockly script with a few JavaScript helper functions for the OpenDTU Web API.
The implementation also includes:
I can share the complete ioBroker / generated JavaScript implementation if this is useful to others.
I deliberately implemented this externally instead of modifying OpenDTU itself because a native solution requires integration into the CMT/Hoymiles radio state machine. PR #2573 already seems to be the appropriate place for such a native implementation.
The current version reads
pollintervalfrom/api/dtu/configand derives the timing dynamically: recovery wait =2 × pollinterval + 500 ms, stability verification =3 × pollinterval, and offline verification =max(5000 ms, 3 × pollinterval).The DTU configuration is also refreshed periodically at runtime (default: every 15 minutes), so changes to the OpenDTU polling interval are picked up automatically without restarting the ioBroker script. The periodic refresh is skipped while a recovery scan is active.
Reference implementation
A sanitized version of the complete ioBroker / JavaScript implementation is available here:
OpenDTU HMS frequency recovery scanner for ioBroker
The script was generated from the ioBroker Blockly implementation used for the tests described above. Local IP addresses, credentials, inverter serial numbers and notification data points have been replaced with placeholders.
Relation to existing work
My observations seem closely related to:
There is also a related OpenDTU-OnBattery discussion (#1493 in the hoylabs/OpenDTU-OnBattery repository) describing similar HMS-1600-4T frequency problems.
Questions / possible value for upstream
I mainly wanted to provide an independent real-world implementation and test result.
The observations that may be useful for the native FrequencyManager work are:
If other users see the same issue, it might also be useful to collect:
I hope this helps with #2573 or with further investigation into why some HMS inverters apparently end up communicating on a different CMT channel.
All reactions