-
Notifications
You must be signed in to change notification settings - Fork 15
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
Run actions #53
Comments
Welcome in the club. As there is no good documentation in node-mihome and the Dev don't answers to issues, pr's or questions, i see no way to implement actions. So, at last, its not an issue here, rather then node-mihome direct. |
I understand. I've also tried the Homebridge adapter for iobroker togheter with the homebridge-miot plugin. It recognizes without any configuration both the device and actions available (shows information in the log file) and tells it's ready to be controlled, but since I discovered that this plugin doesen't create any datapoint it's useless for iobroker. |
Just some notes to help other people that are looking for a way to run actions from Iobroker with the Pittini's nodemihome script, and until someone else will find out how to extend the node-mihome module for actions: Actions need the MI Cloud support and can't be run on local LAN with the miio protocol. The only way that I found to run an action from iobroker is through a CLI python script that has the Mi cloud protocol support for actions: https://github.com/Yonsm/MiService I've been able in this way to configure and run all the actions present in the Mi Smart Air Fryer. Steps:
Next an example of a setter to start cooking that shows how those extra parameters have been used.
In short, the action 'start-custom-cook', or Action ID 1 (AIID 1) for Service ID 3 (SIID 3) has as 'in' parameter an array of values defined by the values of the indicated PIIDs. The 'in' value will be then an array of parameters like this: ["", 2, 40, 0, 0, 0]
The downside of this simple method to run actions is that the function setDevices() in Pittini's script will be executed at the same time. Since it won't run anything useful it doesen't create problems, but Pittini himself has surely better skills than me to eventually modify the script and include the execution of actions in this way without affecting the normal behaviour of the setDevice() function. |
Next the device definition for the careli.fryer.maf02 (modify <your_did> with the DID for your device and <your_parameters> with the parameters you like as options for the action:
|
and the content for the device file that has to be added to /node-mihome/lib/devices folder (rename it as careli.fryer.maf02.js): |
Really great work. |
Is there any way to execute actions on devices? I succesfully integrated some read states for the Mi Smart Air Fryer (careli.fryer.maf02). This machine though has actions (AIID) to run a cooking and I can't understand how and if I can use them.
The text was updated successfully, but these errors were encountered: