Hello,
in the ihost system with 4 buttons assigned, can you set it so that in addition to the on/off function, the buttons can also be used to control the brightness in steps (gradually) - I only found a step for a predefined % of brightness. I can’t set it so that the brightness increases or decreases according to the number of presses
We don’t have such function in iHost for now.
Smart scene only supports certain percentage of brightness.
If you want a more customize automation, node-red add-on would be a better choice.
A simple combination of event-state node, switch node and control-device node would do the trick.
In the control device node there has to be a set amount to turn on. In contrast to real devices virtual devices have a “put device state” node. Is there a way to replicate the “put device state” node for real devices? For instance the brightness level could be stored as a variable and added to a template node before “a put device state” node. If there is way to do this with a real device I have not found it. Maybe an HTTP out calling an interface with the API?
That’s not a bad idea.
We’ve discussed it.
We’ll add a switch to toggle Action and JSON state in control-device node.
If it’s off, then only JSON state from payload will be send to iHost.
That is a good way to implement it. Some other nodes just allow the msg.payload to set the activation but I think that creates problems because all sorts of things get sent as msg.payload. Requiring a JSON object will hopefully minimise the amount of error types needed to be caught.
Whilst this is being implemented is there an easy way to do this using the HTTP Out node or a Function Node and the Cube API? I had thought about trying this but concluded I’d need to save a separate token somewhere in the flow.
Invoke the token api with some tools like postman, then click the button in iHost, then you’ll have your own token.
The token will be valid unless the iHost is reset or the total amount of your iHost token exceed 5000.