CLI spark get variable core returns nothing [SOLVED]

Hello,

I’m having some issues with one of my project with the command line. I’m doing a version of the spark thermostat and my code can be found here. I’m able to login to the cloud and spark list returns the correct functions and variables:

Checking with the cloud...
Retrieving cores... (this might take a few seconds)
Thermo (53ff70066667574844552467) is online
  Variables:
    current_temp (int32)
    desired_temp (int32)
    is_heat_on (bool)
    is_fan_on (bool)
    is_AC_on (bool)
    motionDetect (bool)
  Functions:
    int set_temp(String args)

When I go to get variable data, I get nothing in return.

skelator@Johnny-Two:~/thermostat/thermostat$ spark get current_temp Thermo

skelator@Johnny-Two:~/thermostat/thermostat$ 

When I call functions I get “Permission Denied”:

skelator@Johnny-Two:~/thermostat/thermostat$ spark call set_temp Thermo 75
Function call failed  Permission Denied

I’m logged in and I can see my core. Why am I getting a permission denied problem?

Any help is greatly appreciated.

Thanks,

Try

spark get 53ff70066667574844552467 current_temp

Nice. That worked for getting variable data. Thanks. I thought I did try that but I guess I didn’t.

But, it doesn’t work for calling a function. Is my syntax wrong? What am I doing wrong here:

skelator@Johnny-Two:~/thermostat/thermostat$ spark call 53ff70066667574844552467set_temp 80
Function call failed Permission Denied
skelator@Johnny-Two:~/thermostat/thermostat$ spark call 53ff70066667574844552467set_temp "80"
Function call failed Permission Denied
skelator@Johnny-Two:~/thermostat/thermostat$

nevermind. I forgot a space.

thanks. you can close this one.

1 Like

Glad it is working for you!

For the next person, here’s a link to the doc:

http://docs.spark.io/cli/#command-reference