almost month before your SparkCloudAPI module, @Lexa made Spyrk using Hammock.
I’ve updated it a bit and came up with idea that maybe three of us could focus on one module to have full featured one? What do you think about that?
Also this is question to @Lexa if he’s up to it
It’s great to see more interest into accessing a Spark core with python :).
I am totally for collaborative work on this! I did not focused much on Spyrk and the core lately, but both are still in my visor. Especially since I will start using the core for bigger projects soon :).
Hi @beklein and @suda,
I am an Electrical Engineer at SDstate.edu, but I also love coding. I am very interested in using the library you created for python. I might join as a contributor as well.
My plan is to run python on my Raspberry Pi or on my old Android phone and then control my spark or my photons (yes, I bought two ).
The APIs existing back then haven’t changed (or not much anyway) since then, so it should work as is IMO.
But if you find issues, it’s always best to state them as exact as possible to get help for exactly that.
import requests
import json
r = requests.post('https://api.particle.io/v1/devices/0123456789abcdef01234567/brew', data = {'access_token':'<yourAccessToken>'})
print (r.content)
OUTPUT:
runfile('H:/SKIRIPSIE/GUI CODE/fancytext.py', wdir='H:/SKIRIPSIE/GUI CODE')
b'{\n "error": "Permission Denied",\n "info": "I didn\'t recognize that device name or ID, try opening https://api.particle.io/v1/devices?access_token=<yourAccessToken>"\n}'
Have you adapted the device ID for your own device and added your own access token? 0123456789abcdef01234567 is not a valid device ID, and I guess the access token you had there (before I removed it, since that should be kept secret) wasn’t yours either.