how to send a http post command by homesser
Today, 04:18 PM
Please, I need your help. I'm from Brazil
I have a multroom device that I can only control via httip, I just need to post some commands, I do not need answers. I've been trying for days and I can not post the command.
the lexicon multroom device manual provides this example to communicate with the machine, but I do not know and can not structure a script in homesser.
Example POST to set setting “auto-powerdown” on the DD8P: (Note: the DD8P IP address is 192.168.0.175)
POST /settings HTTP/1.1\r\n
HOST: 192.168.0.175\r\n
Content-Type: application/json\r\n
Content-Length: 20\r\n \
r\n
{“auto_powerdown”:1}
I tried to use the commands below, but it does not work, I do not know if I wrote it the right way.
hs.GetURL("192.168.0.175","POST /settings HTTP/1.1\r\nContent-Type: application/json\r\nContent-Length: 20\r\n \Content-Length: 20\r\n \{auto_powerdown:1}",FALSE,8080)
Can someone help me structure this command above in a way that I can send from the homeseer or tell me if I'm using the right command?
Today, 04:18 PM
Please, I need your help. I'm from Brazil
I have a multroom device that I can only control via httip, I just need to post some commands, I do not need answers. I've been trying for days and I can not post the command.
the lexicon multroom device manual provides this example to communicate with the machine, but I do not know and can not structure a script in homesser.
Example POST to set setting “auto-powerdown” on the DD8P: (Note: the DD8P IP address is 192.168.0.175)
POST /settings HTTP/1.1\r\n
HOST: 192.168.0.175\r\n
Content-Type: application/json\r\n
Content-Length: 20\r\n \
r\n
{“auto_powerdown”:1}
I tried to use the commands below, but it does not work, I do not know if I wrote it the right way.
hs.GetURL("192.168.0.175","POST /settings HTTP/1.1\r\nContent-Type: application/json\r\nContent-Length: 20\r\n \Content-Length: 20\r\n \{auto_powerdown:1}",FALSE,8080)
Can someone help me structure this command above in a way that I can send from the homeseer or tell me if I'm using the right command?
Comment