-
Notifications
You must be signed in to change notification settings - Fork 68
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
Samsung AC - "Clean" gets toggled twice #116
Comments
@bogd Did you forget to restart HA after changing the toggle_list setting? |
You are absolutely right - in recent versions of HAss, I got used to using the "quick reload" setting (either via restart/quick reload, or via the "reload all configuration YAMLs" buttons). I did a full restart now, and it does seem to behave properly (sending "clean: on" at power off as well). However, this leaves me with a different issue - once the cleaning cycle is complete, the unit will disable its "clean" feature (the local setting, stored on the AC unit). But, of course, tasmota_irhvac will not be aware of that. Which means that tasmota_irhvac will still remember internally that "clean" is set to "on", and not set the "clean" bit in future IR commands. Is there a way to tell tasmota_irhvac to change its internal state, without sending an IR command? My use case would be:
[ Edited to add: I could probably template this to do a "set_clean" with "not current_state" in step 2, but I would prefer to keep the state in tasmota_irhvac consistent with the one on the actual unit. :) ] Thank you! |
Since I honestly do not know whether this could be more easily fixed in the library (IRRemoteESP8266), or in Thank you once again! |
I think @crankyoldgit put me on the right path here... With his response to the issue, I believe that Tasmota would be the best place to implement this "feature". And taking a closer look at the docs, I found this:
I cannot test this right now, but it might be the winning solution. If I do:
It would be nice to get support in |
@bogd I think I have a good understanding of this issue. I think that skillful use of StateMode can solve this problem. By allowing the StateMode to be specified when running the service, it should work. for example··· service: tasmota_irhvac.set_clean
data:
clean: "off"
state_mode: StoreOnly
target:
entity_id: climate.living_ac I will work on this implementation. |
Certain devices may update their own state at certain times, breaking the synchronization between the state maintained by Home Assistant and the state of the device. This new service option allows you to keep Home Assistant and your device state synchronized.
@bogd I created a branch |
You people are incredible... I ask for help (on a Sunday!!), and a few hours later there's already a branch with the changes! (plus a lot of help and guidance on the two issues posted). Thank you!! One quick note, though - according to the Tasmota docs, the default for StateMode should be SendOnly. And even though the docs are not 100% clear (the Tasmota docs have this habit :) ), they seem to suggest that this is because otherwise tasmota would see its own IR signal and toggle the setting twice. And if I'm reading the code correctly, this would always set StateMode in messages, with a default of SendStore. Which differs from the current default, and might break things for other people. Maybe consider adding SendOnly to the list, and making it the default? I will get to testing, and post the results back here. |
Previously this Tasmota-IRHVAC always sent StateMode as "SendStore". The current implementation of Tasmota-IRHVAC defaults to "SendStore" and does not support "SendOnly". If there seems to be a case where it is necessary to use "SendOnly", I will deal with it at that time. |
I went through several cleaning cycles, and I can confirm everything works as expected. And like you said, I have seen no problems using SendStore (unlike what the Tasmota docs seem to suggest :) ), even though I do have an IR receiver on the Tasmota unit. I will keep using this branch until it gets merged into the main one. Thank you once again for your help, and for all the work that you are doing with this component! |
@bogd Thank you for your cooperation in verifying the operation. Thanks to you, I can perform a merge into the master branch. An open source project is not only the work of the committers, but also the collaboration of the people who use it. Let's continue to work together! 👍 |
Certain devices may update their own state at certain times, breaking the synchronization between the state maintained by Home Assistant and the state of the device. This new service option allows you to keep Home Assistant and your device state synchronized.
I am back again, with a very similar issue as #78 and #106 .
With recent changes in IRRemoteESP8266 (mainly this one ), the toggling of the "clean" setting is handled on the library side automatically, with the "clean" bit being set in the IR signal only when the desired state for "clean" is different from the previous (stored) state.
Unfortunately, this brings me back to the situation described in #78 - no matter what I do, it is impossible to turn on and off the unit without "clean" being toggled twice.
I did remove the "clean" setting from tasmota_irhvac's
toggle_list
, but the behavior is the same.As per @nao-pon 's comment on #106 (taking the example with "clean: off", because my unit always starts with clean mode set to off):
This does not work as expected. Here are the details:
Device clean mode is OFF
Air conditioner operation start
Tasmota console:
stat/tas/RESULT = {"IRHVAC":{"Vendor":"SAMSUNG_AC","Model":1,"Mode":"Cool","Power":"On","Celsius":"On","Temp":26,"FanSpeed":"Auto","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}
Send clean mode ON once
tasmota_irhvac.set_clean
. Tasmota sends "clean: on" (different from the previous state), so the bit is on in the IR signal. The unit toggles to "clean: on".Tasmota console:
stat/tas/RESULT = {"IRHVAC":{"Vendor":"SAMSUNG_AC","Model":1,"Mode":"Cool","Power":"On","Celsius":"On","Temp":26,"FanSpeed":"Auto","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"On","Beep":"Off","Sleep":-1}}
Air conditioning stop
climate.set_hvac_mode
. Tasmota sends "clean: off" (why? with "clean" no longer being part oftoggle_list
, shouldn't it keep sending the previous state??). This is different from the previous state recorded by Tasmota, so the IR bit is once again set to on. The AC unit toggles again, to "clean: off".Tasmota console:
stat/tas/RESULT = {"IRHVAC":{"Vendor":"SAMSUNG_AC","Model":1,"Mode":"Off","Power":"Off","Celsius":"On","Temp":26,"FanSpeed":"Auto","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}
Clean mode is enabled.
One more thing I noticed: when looking at the climate entity's state from home assistant, the "clean" attribute stays off even after calling
tasmota_irhvac.set_clean
(and this is probably why the power off call sendsclean: off
):So the main question here is: why does tasmota_irhvac send
clean: off
on that last message (even thoughclean
is no longer intoggle_list
), and what can I do to change this behavior?The text was updated successfully, but these errors were encountered: