-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
[NASA] Commands not being executed #57
Comments
Hi @asekijima can you tell us first if you have a newer NASA based device or a older NonNASA device? You can see it based on the device addresses. 00 are NonNASA 20.00.00 are NASA based devices. |
I’m so sorry, man! |
Ok then stay tuned. Currently this can happen when the message is sent while other data is incoming. The code currently did not check if a command is executed correctly. But I started to explore how to do that. |
Same here. I've updated my ESP today and now sometimes when changing FAN mode it does not change on my AC |
@mbo18 can you test the fanmode? I think I fixed it a few hours ago. |
@lanwin I'm also seeing messages sent by esp being ignored by the unit. Did you get a chance to have a look at it? Or maybe have any pointers to share? |
The problem here is that I did not yet found the right timing to send the messages. It happens that "send" runs when its start receiving. But NASA requests are getting a response message when the command is execrated successfully. So its possible to automatically compensate and resent the when no response is received. I made some initially tests for that and startet to rewrite the code for that. But its not ready yet. |
Seems ok now |
@lanwin I spent some time the last couple days "looking at the matrix" of data flowing back and forth trying to figure out why commands sometimes fail. I did rewrite a good chunk of the transport code in the process and I think I mostly fixed that. I will play around with it over the weekend and will submit a pr. |
My plan there was to put all requests in e outgoing log with there timestamp and a retrycount of 3. Then when an Ack happens remove then and then when all packets are processed check if there is something in the list where the timestamp is 2-3 seconds ago. Decrease the retrycount and resend the command. |
atanasenko@58b1a59 |
There is nothing yet. I made tests that you can see in the main branch where the Ack message handled. The rest was for now only a plan. The retrycount is a port of the messsages and the protocol. So it would be good to leverage that to prevent endless loops in case something went wrong. |
For a better overview in the bus traffic i would suggest to extend the debug message log. it would be very helpful to write the time (ms) since the last received message behind the message. So you can see the gaps in the bus-communication and see some regularities |
@matthias882 @lanwin
|
@atanasenko |
I just installed this solution for my 3 indoor, 1 outdoor setup (located in Germany). I'm observing the same behavior, and while I know it doesn't really help to just say this, I would like to offer some debugging capabilities, if needed. I can also help with coding, if someone guides me :) |
@leukipp not much besides the fact that I'm using that locally without any issues so far. I will need to at least rebase it on top of latest main though, and there are a few changes in protocol code, though mostly relating to non-nasa. |
@atanasenko could you please have a look at the current non nasa protocol impl. @jbekkema added resending support there without exposing it to the "outside". The approach should also work for nasa. I think it should be possible to extract his approach to util class with then can be used by booth protocols. The only problem would be to generalize/adapt the message classes. |
@lanwin Nasa has acks which makes it much easier. |
@atanasenko which branch of your fork should i use for testing? Edit: I have a NASA windfree device and would be able to provide feedback / debug logs |
Any update on this issue? I'm willing to help in testing NASA devices. |
@serialx not yet. Only to be sure. You mean the problem that command sometimes did not execute on the first try or did you mean every time? |
I mean when command sometimes does not execute on the first try. @atanasenko branch seems to be stale, so if theres any updates to the code, I'm willing to test it. If you need it ofc. :) |
Is it not possible according to the confirmation Ack After a long test A log illustrating Ack
|
Yes that is the plan. Its just a matter of not enough time. |
Hi @htht2001, Thank you for raising this issue and your detailed investigation! The new commit implements a confirmation check using the acknowledgment (Ack) messages. Now, the system verifies if the sent packet received an Ack, and if not, it attempts to resend the packet. This approach ensures more reliable communication and minimizes potential data loss. After thorough testing and multiple commits aimed at enhancing stability and clarity in the code, I believe this solution addresses the concern you mentioned. If you encounter further issues or have additional suggestions, please let me know! Best, |
@omerfaruk-aran At the moment, I am unable to test if it works because my TTL to RS-485 adapter stopped functioning (#197). When it was working, I had to use this branch: #93, which resolved both the issue of commands not being executed and the ability to send commands to multiple devices simultaneously (#176). If you've implemented these fixes, as soon as I receive my new adapter, as soon as I get the new adapter I go straight back to the to the main branch. Have a wonderful day! |
I have loaded the last code to my 3 ESP and the issue is still there : I need to do 2 times the same action for the AC to take it into account. Like if AC are off, I need to click on heat 2 times for the AC to be on. Same to change temperature. It is like the first time it wake the AC from sleep |
Hello @htht2001, Thank you so much for your valuable contributions and feedback! The PR has not been merged into the main branch yet, but your insights and comments are really appreciated. Once you get your new adapter and have a chance to test, I look forward to hearing your experience with the updated branch. Wishing you a great day! Ömer Faruk Aran |
Hello @mbo18, Thank you for taking the time to test the latest code and sharing your findings. The PR addressing this issue hasn't been merged into the main branch yet, so there could be some pending improvements. Please follow PR #194 for updates. Once it is merged into the main branch, it would be great if you could test it again and provide your feedback. I appreciate your patience and support in refining the project! Best regards, |
Hey @lanwin, just checking if you've seen this before I start to investigate any further.
Sometimes I have to give the command twice so it gets executed.
Like: if AC is off and I want to turn it ti cool mode. I select cool mode, AC beeps but nothing happens, I have to open drawer again and select cool, then magic happens.
It's primarily for mode changes, like turning it on and off.
It's not annoying at all if I am in the room, but it's not good because we have to give the commands twice sometimes, to make sure haha
Either way, it's a great work you did, thanks a lot for that!
The text was updated successfully, but these errors were encountered: