I developed a Node application that works fine on my windows laptop, but when I tried running it on my raspberry pi, no events were being received on the pi.
This is the code that I’m having problems with
spark.on('login', function() {
console.log("logged in to spark api");
alert("logged into spark api");
//Get updates for every event from our devices
spark.getEventStream(false, 'mine', function(data) {
alert("got event");
var rawData = JSON.stringify(data);
console.log("event stream event: " + rawData + "\n");
var data = JSON.parse(rawData);
//code continues....
So the raspberry pi is actually able to the connect to the spark cloud because alert("logged into spark api");
pops up on the screen.
But alert("got event");
never appears.
I’m using the Epiphany web browser.
Does anyone know why it’s not working.