Particle.publish not working

Hi

I have tried to use particle.publish but I do not get any events displayed in the console.
I have reduced my code to this.

int temp=99;

void setup() {
Particle.variable("temp", temp);
Particle.function("reset", resettemp);

}
bool success;
int heart=1;
void loop() {
    heart--;
    if (heart <= 0)
    {
        heart = 60;
        success = Particle.publish("myevent");
        temp = success;
    }
    delay(1000);
}
int resettemp(String command)
{
  temp=99;
  return 1;
}

My device is connected to the cloud as I can use the function resettemp and inspect the variable temp the particle.publish is returning a true but I still get no events displayed.
Am I missing something ???

Martin

Do you see the “device came online” event in console when you reset your device?

And to be a good netizen you should use Particle.publish("myevent", PRIVATE)

Hi
No I get no messages in the console.
I’ll change to private event.

Martin

If you don’t get any event of that device in console, chances are that you haven’t logged in to the correct account.

BTW, you need to keep https://console.particle.io/logs running to catch any events, the cloud does not store any fired events

Hi

All ok now (in chrome) - the console doesn’t work in ie or edge ( i should have read the docs ).
Hope particle get this sorted soon as i only use ie.

Regards

Martin

Any good reason for that, since IE is generally not a great browser, to put it nicely? You’d really be better of with pretty much any other browser.

1 Like

As a web developer, I second what @Moors7 said. You are missing out on some great feature web app developers can implement with update to date browsers. Although Edge tries to keep up, it’s still behind on many features.

Scroll down this page to see comparison between IE, Edge, Firefox and Chrome: http://caniuse.com/#compare=ie+11,edge+15,firefox+54,chrome+60

2 Likes

For my purposes IE is far superior to other browsers so hopefully particle will update the console to work in all browsers. A large number of companies I have worked for do not allow software to be installed on company computers so you are restricted to Microsoft products.

I can definitely understand that pain.