Jump to content
Gen2 Devices: FW Update Required / Gen2 Geräte: FW-Update erforderlich ×

Dynamic components - Enum, Setting a value


Recommended Posts

I tried to use the documentation for the Virtual components to set an "Enum" element, but it's not working, I've tried to do it by Shelly Script as well as trying to call it with an URL but I failed in both cases.

Does anyone know how to make it work properly?

Thank you

Link to comment
Share on other sites

I'm testing with a Shelly Mini 1.

We want to use it to control an alarm and it should blink with different rythm according to the situation. It can be Off, it can be blinking once each second, blinking one each 5 seconds or just be always On.

With Shelly scripting we can easily create a timer to turn it on/off each second or five seconds or whatever, but we need somehow to tell the device to enter into that state. I have even tried to just send it a "turn it on" and then on the status change event detect that it has been triggered externally and query an external server to retrieve the desired state. But that fails if we happen to "send turn it on" when it's blinking and it's on at that moment, so we really prefer to be able to set exactly the state of the virtual component as desired and that would trigger the rest of the functionality by Shellly scripting on the device itself.

Sending a turn on/turn off from an external server each second doesn't make sense, these devices are so smart and powerful that we only need to know how to set a value for the enum state using the cloud api.

Regards

Link to comment
Share on other sites

  • 2 weeks later...
  • Integrators

I would do this with Scripting then have it all work from the device without scenes or actions. It just a matter of setting a variable and the condition it needs to have met to do what it needs. I have not done something like this so I am not sure where I should start 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...