@Singib:
Thank you, apollon77,
let me understand the idea.
1. I specified a new command (ack=false) with some value by calling adapter.setState(,false).
2. I thought, the my adapter should process this command in a part of my code and then should confirm this change by calling adapter.setState(,true).
Instead of this, the ioBroker body (ie mqtt) confirms setting of state on its own. So, the state changing is not a command, but just a value.
OK. but how to understand a documentation sentence "States can be written as commands or as statuses…. "?
sorry for my stupid questions 🙂 `
As far as I understand your code: the all values for your virtual pins are updates of the states. Not the commands.
You should send it with ack=true.
Only If you want to control states of other adapters (not yours) you should set the ack=false.
After this line https://github.com/Go00oglin/ioBroker.b … ain.js#L55 is executed, the ack in your adapter must be set to true. Or may be it will be done automatically because the adapter will get the update of the status here: https://github.com/Go00oglin/ioBroker.b ... in.js#L122
It took me sometime too to understand the concept of ack, but now it is self-evident. 🙂
You update your states always with ack=true,
Other adapters controls your states always with ack=false.
MQTT is not the body of ioBroker, it is just other adapter. And may be it has some logic on some client that acknowledges the state. ioBroker do not acknowledges the states automatically.