Particle Publish Windows CMD

I have the code to manually push events to my Photon in Linux, but i dont know what the windows equivalent would be, please help?

particle publish touch_event 0,1,70,date +%s,0

We’re talking the Particle CLI in the windows command line right? It’s all node.js which is platform agnostic I think, so it should be the same. The difference for date is easily found on google… Try this:

particle publish touch_event “0,1,70, %date%,0” --private

You may also want to enclose the payload argument in double quotes to prevent the system CLI (cmd or Powershell) from splitting it at blank, commas and other special characters (advisable for any OS really)

So I’d try

particle publish touch_event "0,1,70,%date%,0" --private
1 Like

Thank you @ScruffR… I was trying to validate the use of the quotes last night but stumbled over a login issue with the multi-factor authentication (I reset my phone a few weeks ago and couldn’t locate the recovery codes). You are indeed correct, you need the double quotation marks to encapsulate the event data. And CLI does use node.js, not Python. I’ll edit my above answer.

1 Like