Got my pixelblaze updated to v2.23
… and have been able to successfully communicate with it using websocat command line tool (windows x64) like so…
websocat ws://192.168.xx.xx:81/
and I can get a list of programs (saved patterns) back after sending…
{“listPrograms”: true}
but using the program ID I’m not able to get a pattern to actually start after sending either/both commands such as…
{“activeProgramID”: “FozMDMfBx3Cmau95D”}
{“activeProgram”:{“activeProgramId”:“FozMDMfBx3Cmau95D”,“controls”:{}}}
What am I missing?
P.S. also tried connecting as websocat ws://192.168.xx.xx:81/ -b (for binary) or -t for text but that didn’t help.
Hi @jpm,
You are close, but I think a few small things caused it to not work.
It looks like those are smart quotes, not the straight quotes used in JSON format. If you are using a word processor, they tend to convert them to smart quotes automatically. A text editor designed for coding can be helpful there, like Sublime Text, VS Code, Atom, etc.
The other small thing is the capitalization on Id - it’s a lowercase ‘d’ and won’t work otherwise.
You’ll want the first form, the second form is an event that is sent out when the pattern actually changes, rather than a command to make it change.
Adding the -b for binary mode will cause it to treat text as binary, and won’t try to parse it as JSON, so leave that off.
I knew it was going to be something simple/silly. Capital D in ID was my bad!
Not sure how the smart quotes got inserted (forum software or firefox perhaps) but I am sending strait quotes.
This websocket communication helps me ensure it will turn on/off via HomeSeer motion sensor also in the room, and the bridge turns all green when the Laundry is done (Laundry is on the second floor and I often forget about/can’t hear it in my office)