0.5.0-rc.1 Variables Empty

After updating to 0.5.0-rc.1 when trying to get my variable they always return empty.

{
“cmd”: “VarReturn”,
“name”: “version”,
“result”: “”,

This appears to be a known issue; see: https://github.com/spark/firmware/issues/947
They can be empty or gibberish sometimes.

1 Like

And the temporary workaround is to use the old syntax again Particle.variable("varName", &var, INT) or DOUBLE and for STRING omit the ampersand in front of var.

You can also use the temporary workaround of using Particle._variable("varName", var); (note the underscore) but once this is fixed you should probably revert back.

Thanks @legoguy and @ScruffR that fixed that perfectly !!! awesomely quick response :slight_smile: , Now i have to solve the mystery behind this bad boy …