Let’s explicitly request this.
Can Particle provide an endorsed Semi Automatic & Thread mode enabled .ino with skeleton code that:
- Connects to Wifi
- Connects to Particle cloud
- Registers cloud functions and variables
- Publishes ‘one time startup’ message(s)
- Subscribes and calls a basic function
- Publishes a routine message every n seconds
There have been a number of breaking changes to happen over the past 18 or so months. We had some bumps around 1.0.0, then after 1.1.1 it seemed a number of things were changed and broken, ie WiFi.macAddress() and requiring explicit wifi.connect / particle.connect instead of simply .connect().
It’s practically a necessity for Particle to open up their test cases to us and show what sketches they’re running to test platform changes and current cloud operation. If it doesn’t exist already, I suggest a Particle git repo.
We can start with semi automatic, thread mode enabled, connecting to cloud with functions and variables registering reliably and subscribe working as you’d expect.
For context, this was brought to my attention today when a customer with a perfectly fine internet connection in the UK was having issues with a device with 1.4.4 firmware. In the setup block it was not calling a cloud.publish and it was not subscribing, despite being wrapped in a waitfor cloud_connected 15000. I fixed both issues by moving the relevant calls into the loop and executing them the first time particle.connected() was true. I’ve never had this issue before and we’re used to factory testing via a dodgy internet connection behind the great chinese firewall.
Particle team, show us what sketches you use to test your platform and firmware so we can implement the ‘golden method’ and have confidence that what worked yesterday will work tomorrow.