Page 1 of 1

Xiaomi Air Purifier - problem with dzVents

Posted: Monday 13 April 2020 14:43
by MajkiIT
I found a page with such a plugin https://domoticzfaq.ru/xiaomi-air-purif ... -domoticz/. When it extracts commands from SSH, everything works fine, but as I add the switch and dzVents script nothing happens. In the logs I see:

2020-04-13 14: 39: 50.571 (Purifier) Light / Switch (Purifier button)
2020-04-13 14: 39: 50.562 Status: User: Admin initiated a switch command (288 / Oczyszczacz button / Set Level)
2020-04-13 14: 39: 50.826 Status: dzVents: Info: Handling events for: "Button purifier", value: "Auto"
2020-04-13 14: 39: 50.826 Status: dzVents: Info: ------ Start internal script: test: Device: "Button cleaner (Button cleaner)", Index: 288
2020-04-13 14: 39: 51.172 Status: dzVents: Info: ------ Finished test

I'm doing something wrong? Maybe the script is bad?

Re: Xiaomi Air Purifier - problem with dzVents

Posted: Monday 13 April 2020 15:26
by waaren
MajkiIT wrote: Monday 13 April 2020 14:43 ....but as I add the switch and dzVents script nothing happens. In the logs
I'm doing something wrong? Maybe the script is bad?
First step to analyze would be to switch on DEBUG_LOG for the script and catch the result of the os execute. Or better move to io.popen.
With io.popen it is much easier to grab te result of the os command. If you share the script as you have it now, I can help converting it to use io.popen

I am not stating that it will solve your issue but at least you might get some more information where it goes wrong. :)

Re: Xiaomi Air Purifier - problem with dzVents  [Solved]

Posted: Monday 13 April 2020 20:19
by MajkiIT
Thanks, now I see that command is not execute on OS.