Custom commands for Tuya / Smart Life actions

Some very crafty users sometimes want to send commands to their Tuya / Smart Life devices which are not supported by our user interface. A good example is the wish to change the colours of a bulb.
With the action “Custom command” you can enter your own command string which will be sent directly to your device!
The full payload that Apilio sends to a device looks like this:

    {
      "commands": [
        {
          "code": "switch_led",
          "value": true
        }
      ]
    }

Apilio will automatically wrap {"commands": [ ]} around the value you specify in the action. So for the example above, you would only have to enter {"code":"switch_1","value":false} in the value field.

Please take into consideration that you have to investigate and find the correct commands yourself. Maybe some pro users here in the community or on other Internet forums might be able to help you find the correct command syntax.

Here is a documentation of the standard device categories (This is a good start to find commands).
And here is a documentation with more examples of how commands are formed.

3 Likes

Hi @pebneter ,

This is really great news… Amongst other things it means that it is now possible to set the colour of Tuya light bulbs (which was an “ask” I made a while ago, so thank you!). I’ve posted in the original request to show how this can be done, which includes the settings for a wide range of standard colours.

Implement colour setting for Tuya bulbs - Feature Requests - Apilio Community

Many thanks!

3 Likes