Open smontys opened 4 years ago
payload is supposed to be urlencoded and you send JSON.
payload is supposed to be urlencoded and you send JSON.
Thanks for your reply, @asquelt
Do you mean that instead of {“command”:”~0000 1”}
it should be {“command”=”~0000 1”}
, at http body?
I've changed with same result.
Making more test, seems the problem is with the http headers
[{"Accept":"*/*","Accept-Encoding":"gzip,deflate","Accept-Language":"es-ES","Cache-Control":"no-cache","Connection":"Keep-Alive","Content-Length":"13","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8","Cookie":"optomaprojctl=admin","Host":"192.168.222.21","Referer":"http://192.168.222.21/","User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"}]
If I don't enter them, got no error.
i think it should be just command=~0000 1
or command=%7e0000%201
(i'm not sure how java handles escaping)
i think it should be just
command=~0000 1
orcommand=%7e0000%201
(i'm not sure how java handles escaping)
Wow, you hit the target!!!
It works, without http header, just with http body exactly as you say, command=~0000 1
Many thanks!!!
Hi everybody. I need some help getting this to work. I have and old Optoma projector, model EX765W, with an embebed html web interface. I only one want to switch it ON and OFF.
There isn't a full url to do so, and I'm trying to setup with the right http headers and body. Using F12 developer tools, I'm getting the corresponding http calls when clicking 'Power On' and 'Power Off' buttons : there are two calls for each one, one for ON or OFF command and other for query:control command (sorry, locale is in spanish) Common headers for all the calls
ON body
OFF body
Second body call when ON and OFF
This is my setup
But got "spark.http.matching.GeneralError" with or without '[' ']', etc.
ha-bridge 5.3.1RC1 running on a Synology DS209 (DSM 4.2-3259)
Thanks for your help