Multiple devices 'set' by same dashboard 'set' button

I’ve hit a snag and need some help; see below…

I’ve created a dashboard input control box that helps me set temperature/humidity thresholds within Losant without the need to use the sensor mfr’s web portal. As such, a ‘dummy’ message is coded in the Payload area of the ‘set’ button that ‘looks like’ the sensor is the one ‘sending’ the thresholds’ values, but is not. It works great, I have 1 box for each sensor and it looks neat. And since I have less than 10 of these I don’t have the need for Context / Dashboard Context Vars:

What I need help with is that I would like eventually to be able to ‘push’ the same thresholds you see here to more than 1 device as shown (say, to all 10) without the Context Feature (which recycles the same box for each, in this case I want to press ‘set’ once for ALL). What do you suggest? Thanks. :red_circle:

Hi @Jose_Cruz.

I would recommend two paths for your use case, but the choice is yours depending on which works better for what you need! The first would be to have a “set all devices” button, separate from the “set” button. This would work well if you already have groupings of devices, as you could organize the device IDs into an array and define what is sent to the workflow. If you did have some groupings of devices, you could include a couple of buttons to set certain device groups, such as “all devices,” “red devices,” and “blue devices,” for example.

If you would like more customization over which devices are selected, you could use a Toggle Switch for each of the 10 devices, and when they are set to true, include the device IDs in the button. This would require some conditionals in the actual button, so it is a bit more difficult that the prior suggestion.

After thinking on this question, I think a checkbox might actually be a good Feature Request for this block, I will create a new request with our engineers for this functionality :smile:

Let me know if I can help further in any way!
Julia

2 Likes

@JuliaKempf thank you. I began already working on option #2 but for something else (other ‘set’ supervisory messages), and although it does work as needed as you correctly state

But let me go over all above suggested this week; I will see what works and doesn’t and come back to you on that. The ‘Feature Request’ is definitely a good idea :bulb: to include in the list! :slight_smile: :red_circle:

1 Like

@JuliaKempf, so I went with the harder option #2 : a Toggle Switch for each individual device (in this example 7 devices each with its own Toggle Switch and ‘Set’ button):
image
Works great for each. This is a sample for each individual ‘Set’ button:


As you suggested, for each of the <10 devices it works perfect. But I’m strugglin’ still with the ‘Array’ for ‘All Devices’. For example, I thought I just simply could make a separate ‘All Devices’ as you mentioned with the above Payload template for all devices, but either I’m doing something wrong or I can’t have an ‘Array’ for just 1 press of a ‘Set’ button. Am I correct on these assumptions? Can you give me a bit more guidance as to what Array you refer to, Node Array on the WFL or on the TTY payload shown above? (TTY, meaning dashboard, sorry old telecom habit). As always, :pray: :red_circle:

@JuliaKempf, disregard! I found a way (cheap shot, but it works!). Just created a fake ‘device’ (yeah, that one occupied my last 10th ‘free’ max ‘basket place’, but that’s ok since we’re soon to go on a sub so :smiley: ) and I use this fake ‘dummy’ device as my ‘master gate keeper’; so the SET ALL button is set to that one only fake dummy dev but controls all the ‘gates’ wherever I want to in my WFL:
image


Thank you! This issue has been solved :slight_smile: :red_circle:

1 Like