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
counter request mode not reliable #73
Comments
Thanks for reporting this. Can you please share a short part of the P1P2/R/# log (or the telnet output in "J10" mode? There is one other system where the main Daikin controller doesn't like the protocol violation that is necessary for the counter request. What happens is that the output with the counters from the Daikin EHSCB08P30E collides with the next request from the main Daikin wall controller (Daikin forgot to implement bus collission detection). And indeed sometimes it works, sometimes it does not, depending on exactly when the counter requests are inserted. An improved counter request insertion mechanism (works on one other system) will be released soon in v0.9.41; I hope that it will work for you too. Disabling the auxiliary control after read errors is a safety measure to prevent the risk of bus collissions or other errors. Once the "error budget" is restored (after 10 hour of error-free operation, or after an ATmega reset), you can restart auxiliary control again. The ATmega can be reset with the "A" command. |
@Arnold-n just a short feedback: with v0.9.41 P1P2Monitor it works now for several days. I still get errors sometimes, but no more disabling of aux control and counter request mode. for me this is a working solution :) |
@nicx, thanks, good to hear, though I am not happy with any remaining errors especially not if they are caused by the counter requests. Would you be able to log P1P2/R/# for a longer period so we can determine the cause of the errors? It's about 140MB/day raw data log, or 6MB/day compressed. |
@Arnold-n sure I can give you logs... any hint how exactly I could get them? :) |
@nicx On a Ubuntu or Raspberry Pi system I use a MQTT client that logs all MQTT traffic to P1P2/R/xxx: |
@Arnold-n just sent you the logfile via mail. hope it helps :) |
@Arnold-n unfortunately, the "Counter request Mode" has not worked at all for some time. Knowingly I have changed nothing. not even a reset helps.
|
Hi @nicx , can you please share a P1P2/R/# log of a few minutes of your system in C2 mode, both in L0 mode and in L1 mode, preferably after an ATmega reset ('A' command) to ensure writing to the bus is allowed? |
@Arnold-n I just sent you the log file. With the command "L1" I get the error
seems there is something wrong with the communication to the bus? |
@nicx thanks for the log. The message above may be a bit confusing but there is no error there: it reports ca 10 seconds after ATmega reboot that your system supports two auxiliary controllers 0xF0 and 0xF1. Because the EEPROM remembers that your system was in "L1" mode, it will start using auxiliary control slot 0xF0. I think it is a coincidence that your system gave this message just after you gave the L1 command. Your log also shows that C2 works nicely: all counter values are requested and provided by your system in the raw bus data. So if the values are not reported to HA, this could be because (1) they are not changed, or (2) they are changed, but for some reason not communicated over MQTT. Is your Daikin system operating (so that counters increase)? Can you try to give the "D3" command, which causes your interfaceto re-communicate all counters even if not recently changed and to re-init all HA sensors? |
ok thats weird... I can see the values again since doing the logging. I dont know if it was the Atmega reset command, or the switching of the C/L modes, or the reset with "d1" at the end of my testings. The problem was there for some days/weeks... and yes, the daikin was working in that time. anyway, it works again and I will monitor it. thanks a lot again for your great support! |
You're welcome - if it returns, can you log some P1P2/R/# before reset, to see what might be causing it? Would be even better to log all data on P1P2/# continuously to back-track the cause, but it is ~200MB/day of data. |
Thanks for the info @nicx, I found a bug (introduced in v0.9.41) which explains the issue after a D3 and possibly also after D1, it should be fixed in v0.9.43. It only effects the counters. In v0.9.43, both D1 and D3 should give all counters back, but it may take 2 minutes for all counters to show in HA. If some are still missing, can you show which counters do not come back in HA? In the current software architecture it is hard-coded which entities are shown in HA (using the macro "HACONFIG"). It is planned to make this easier to configure. |
@Arnold-n after some more time I can see counters are updating in MQTT, but they are not appearing in HA. |
@Arnold-n wit the new version all counters came back after a "D3". I will monitor that over the time. Thanks again! |
@Arnold-n one day later and the problem is back again... no counters are updated. but what I have learned: "d1" or "d3" did not help, switching "C" off and on did not help. only after an atmega reset with "A" all counters are working again immediately. anything I could do to help finding the root cause? |
@nicx can you share logs again (preferably before the "A" / "Dx" commands)? Without I am kind of blind. Did you see an error message after "C2" on P1P2/S/# ? If yes, it might be the safety mechanism that blocks writing after too many bus read errors were observed (such errors should really not be present), and we would need to find the cause for the errors; in this case it is worth looking at all logs, and at V_bus_ATmega_ADC_* values reported (which should be ~12V for _avg and small for _diff) and at Error_Budget (which should increase from 10 to 20 and should not decrease except during reset actions). If no, I am not sure yet on the cause. |
@Arnold-n I just sent you the logfile. If you need more, let me know :) |
@nicx thanks. I can see a problem now. In the log several ESP resets are visible. These ESP resets cause a state change in P1P2Monitor's counter request code making it to stop requesting counters. I'll need to look a bit deeper into the precise cause and solution. As for the ESP resets, did you trigger all of these? I wonder if the ESP resets are caused by the missing connection to the NTP server - does your bridge indeed have no internet access for an NTP server at your location? |
@Arnold-n yes, non of my IOT devices do have access to the internet. I have an internal NTP server. I did not trigger any reset during logging. is it possible to configure the ntp server in any way? otherwise I could grant internet to the module. |
@nicx it seems the missing NTP server is causing the ESP resets. Even worse, it causes a low-memory situation which causes the ESP to skip some of the outgoing MQTT messages. You can see this in the MQTT output (even if is is sometimes incomplete, see below). Free memory should be around 15000, not near 6000. I can reproduce this problem by blocking internet access from my module. I do not currently know whether it is a memory leak by the TZ library or a MQTT buffer problem due to NTP-related delays (I think the latter), and how I should avoid this problem in case of a missing NTP server. I will look into that later, but have other priorities first. But let me send you a firmware version with NTP disabled - that should solve the ESP resets and restore MQTT reliability on your side. Currently the NTP server is configured in the configuration header file. Separately I will improve the P1P2Monitor counter request code such that it isn't disturbed by ESP resets.
|
v0.9.48 and later have an option to disable NTP requests ( |
When trying to activate the counter request mode via telnet it sometimes works, sometimes not. When not working I get these messages:
After the "not working case" the Auxiliary controller mode is disabled automatically, too. I cannot reenable it afterwords, I get the following error message:
As already said, sometimes the counter request mode works. I am wondering what I could do to get both modes working reliable. My Daikin model is a Altherma 3 R Ech2O EHSXB08P30E. Any hints?
The text was updated successfully, but these errors were encountered: