I’ll keep it short. I bought a Xenon, Argon and a temperature Sensor.
Coding the Xenon:
I accessed the temperaturevalue via Particle.function and Particle.variable with an empty loop and everything worked perfectly.
I did some changes to the code so the Argon could subscribe to the value.
Now the Xenon is dead.
I don’t want to kill another Xenon, it would help me alot if some smart talented guy could tell me where the small mistake is.
How did your Xenon connect to the cloud without a gateway?
How would any changes on the Argon contribute to the "death" of your Xenon?
But one thing smells here
You have a Particle.publish() (which you should actually limit the scope to PRIVATE) which may be executed before you have a valid cloud connection (due to SYSTEM_THREAD(ENABLED)).
When you wrap that publish with an if (Particle.connected()) check then at least this problem should go away.
BTW, why would you consider SYSTEM_MODE(MANUAL) buggy?
Okay, I limited the scope of Particle.publish to private. I did not know "SYSTEM_THREAD(ENABLED)" does this.
Your solution is very helpful, thanks for your comment.
I will remember you helped me on this ScruffR.
I am too scared to test the changed code on another device, I don't want to break 2 of them.
I will test it when I know the "exact" reason with the changes you suggested. Then I will inform you about it ScruffR.
This should restore the OS, then back to DFU mode and enter particle flash --usb tinker
let it restart and you should have flashing green - or if it is part of a mesh and the gateway is active and connected, it will shortly then transition to breathing cyan.
I did execute the steps you suggested and it worked, the Xenon is now functionally again.
After execution the Xenon was in listening mode.
I let him join the mesh network and it worked.
This should be posted on the infopage as general solution.