[SOLVED] getValueWithDatasource for Particle doesn't work

Please be carefull this is your data source tag, are you sure that SWITCH is your data source tag, and the name of variable that you will get is this one


In the second green square you can change variable tag name, with this one you can get the value of your variable

1 Like

Thank you so much @Metavix for your help. I changed the “source name” to “source tag” it work perfectly. I’m getting value 5.0

But, why does it print out "

Client connected
Particle/1.1|LV|4cOonYcioTF2JgwHldR75bfOGYgh9X|36003d000247343339373536:onoff|end
Receiving TCP transaction of 4 bytes.
OK|5End of TCP transaction.End o

"

Can You please fix this in your newest version of library?

Thank you!

The entire data is a debug method to search if any user got a problem, it is better than show nothing. But if you prefer i could change that to show only the float response. Im happy to solve your problem, thank you so much for your patient

1 Like

Yes, I don’t want to see the debug mode, how can I make change to not show the debug mode?

Thank you so much @Metavix for your help. My problem has solved now. I’ve tried the 2.05,2.06,2.1.0 and 2.1.1 library not of these working with function ubidots.getValueWithDatasource()

Only The 2.1.2 is working properly without any issues. Hope you can make a note to anyone else know.

Thanks for help.

Thank you so much for you my friend. I am happy to read that

1 Like

Hi all,

I seem to have the same problem. my electron never connects.

I’ve tried using tag, name, as well as the variable ID to no success. :/.
My electron gets stuck on breathing cyan.

edit:
ubidots library 2.1.6
this are the dashboard settings

any pointers?

thanks

@ouchboy try to add ubidots.setDatasourceName("box"); under Serial.begin(115200);

No success.

Result:
-Serial unresponsive
-Led breathing cyan

@ouchboy can you post a screenshot after you add above code to your project?

@ouchboy what version of the library are you using?

Best regards,
Metavix

@faweiz
here you go
@Metavix

interesting thing is that after i upload this particular code I can no longer flash OTA.

this only happens with getting values, sending values is working fine.

edit: thanks for the help guys. I wouldn’t bother you but im flying blind on this one. :slight_smile:

@ouchboy
The led is breathing cyan or green?

@Metavix
cyan .

@ouchboy
It is very strange. Green led is infinite loop, the code is stuck. But led cyan is connected to the GSM network. When you upload the code the led has another color before the cyan? or only green and then cyan?

well i have to put the device on listening mode. so starting from there

  • blinking blue
    -magenta
    -flashing led
    -solid cyan for 2-3 seconds
    -breating cyan

@ouchboy why listening mode?

upload over serial. I can’t upload OTA after i put the code in.

@ouchboy could you try to upgrade the electron firmware? or the electron firmware is in its latest version?

@ouchboy Last time, I have this problem was by using the 2.1.2 library, you probably need to try to use this library and see if this work for you.