[SOLVED] Dashboard on/off button returning slider value? - particle

I’m trying to control an oven heater element from a particle photon with relay wired to it but I have a simple on/off button to give power from a relay and a slider to control the temperature set point, when I call:

#define DATA_SOURCE_TAG " --removed my api id"
set_pt =ubidots.getValueWithDatasource(DATA_SOURCE_TAG, “new_setpt”);
stop_flag = ubidots.getValueWithDatasource(DATA_SOURCE_TAG, “powervalue”);

The on/off button works correctly and returns 0 or 1 for about a day but the next day it begins returning the value I set on the slider rather than the correct 0/1. I believe it is coded correctly due to it working initially.

I have reflashed the code and reset everything - the only fix has been delete the button and slider widgets and delete the ubidots variables associated with them and create new ones. Then it works again for a day.

As the usual debugging:
Yes my data source tag is my api label, I have live thermocouple data streaming in and logging without issue, I have also tried coding with getValue(" variable id ") and get the same result, working for a day, bugged the next.

Additionally I’d like to add more functionality to my control - is it ‘ok’ to push the status of the on/off widget and pull the status as well? If I press on and ubidots.getvalue starts my program and the program finishes - can it switch the button widget to off from the ubidots.add or will that cause issues?

Hi,
I have exactly the same issue.
Did you figure out how to solve this ?

Ended up hard wiring a physical button, only deleting the variable and remaking it would temporarily fix it.

Hello, there was an updated to the library yesterday, please try the last version available in the build IDE.

Regards