0

toggle block on dashboard incorrect after a reset ?
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

toggle block on dashboard incorrect after a reset ?

by jimk123 on Thu Mar 25, 2021 1:39 pm

I have a dashboard with two toggle blocks (subscribe) I am using to toggle two relays and an indicator block for each one (publish) as feedback on the dashboard that the command was received. It all works fine until I reset the board and the relays go back to the off state but the dashboard toggle thinks they are still on. Since I am reading the status of each relay and publishing if it is on or off on the dashboard indicator block displays the true status but I cannot figure out how to reset the toggle block.

thanks
in this example 'dock' status is red meaning the relay is off but the toggle thinks it is still on after a reset.
dashboard2.png
dashboard2.png (6.31 KiB) Viewed 123 times

jimk123
 
Posts: 287
Joined: Sun Dec 26, 2010 7:04 pm

Re: toggle block on dashboard incorrect after a reset ?

by brubell on Fri Mar 26, 2021 9:16 am

It all works fine until I reset the board and the relays go back to the off state but the dashboard toggle thinks they are still on.


Adafruit IO dashboard blocks display the last received value. If the last value sent by your board was a '1', and your board turned off, then the feed will display '1'.

You'll want to send an off value (0) to the feeds connected to the toggle block prior to shutting off the board.

In addition, you can "reset" the board when it turns back on. After the board connects to wifi and adafruit io, send the off values to toggle the relays off so adafruit io and the relays initialize with the same value.

brubell
 
Posts: 1383
Joined: Fri Jul 17, 2015 10:33 pm

Re: toggle block on dashboard incorrect after a reset ?

by jimk123 on Fri Mar 26, 2021 5:58 pm

I never thought of using the same feed name as both a publish and subscribe object, works perfect !
btw the IO service you folks offer is amazing ! very rich feature set and incredibly easy to use with the excellent tutorials.
thank you !

jimk123
 
Posts: 287
Joined: Sun Dec 26, 2010 7:04 pm

Re: toggle block on dashboard incorrect after a reset ?

by brubell on Mon Mar 29, 2021 10:18 am

jimk123 wrote:I never thought of using the same feed name as both a publish and subscribe object, works perfect !
btw the IO service you folks offer is amazing ! very rich feature set and incredibly easy to use with the excellent tutorials.
thank you !

Awesome, thanks for the compliment, I'll pass it on to the team

brubell
 
Posts: 1383
Joined: Fri Jul 17, 2015 10:33 pm

Please be positive and constructive with your questions and comments.