Hi,
I find Firebase really useful for holding simple configuration values for a number of things. I want to use it to hold a simple "ON" or "OFF" value for controlling a remote camera attached to an Arduino Yun.
If I run the CURL command from my MAC against the JSON URL, it works fine, e.g.
https://.firebaseio.com/camera/state.json
..returns..
ON
This area of my Firebase account is read/write to everyone - I know this is not an access issue in that respect. I have several node scripts running on Raspberry Pi's that can access this fine.
If, on my Yun, I use the Process library to run runShellCommand as follows;
p.runShellCommand("curl -X GET "https://.firebaseio.com/camera/state.json" ");
I just get a blank value back.
If I substitute a local URL for a simple page that just holds the value "ON" or "OFF", Curl (with those arguments) works fine. It also works fine if I test it with the URL for the Arduino ASCII Art logo (i.e. http://www.arduino.cc/asciilogo.txt).
Has anyone else managed to pull in Firebase values to a local variable in this way?
Thanks for the suggestions, but what I don't get is I have a different sketch that successfully puts and updates data to Firebase (output from a sensor). This works now - without installing any certs or ssl utils? The Curl command used in that script is;
So after much to'ing and fro'ing with OpenWRT upgrades, resets and reboots - it is now working. I'm sure I tried these options before without success (?!) but it's certainly working now. The following call to CURL works without any additional package installs;
p.runShellCommand("curl -k -X GET \"https://<myfirebase>.firebaseio.com/D3/State.json\" ");
I've a feeling it was the -k option that was missing (and that was present on the 'PATCH' REST calls that were working).