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.
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
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 to include in the list!
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):
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,