SendToHTTP not working

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

SendToHTTP not working

#1 Post by manjh » 24 May 2017, 12:20

I've been trying to include a SendToHTTP statement in a rule, but somehow Domoticz does not get the command.
Have tried everything, and am now slowly going mad...

I'm sure this is one of these "of course" mistakes, most likely something stupid, but I don't see it.
Can someone check this statement and spot the error:

Code: Select all

SendToHTTP 10.0.0.199,8080,/json.htm?type=paramm=switchlight&command&idx=1687&switchcmd=On
I checked the IP of the Domoticz server, it is correct. Also the idx of the switch is correct.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: SendToHTTP not working

#2 Post by manjh » 24 May 2017, 23:48

any ideas? I've just spent some more time trying to get this to work, no progress... :evil:

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: SendToHTTP not working

#3 Post by manjh » 25 May 2017, 13:10

Found it.
Turns out I copied the sendtohttp statement from a rules example somewhere, and it contained an error. I had already wondered about the extra "m" in "paramm".
I now tried this:

Code: Select all

sendtohttp,10.0.0.199,8080,/json.htm?param=switchlight&type=command&idx=1687&switchcmd=On
and this works like a charm.....

Lesson learned: never copy/paste any code without understanding... ;)

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: SendToHTTP not working

#4 Post by grovkillen » 25 May 2017, 13:31

Thanks! Fixed the Wiki.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

vojtishek
Normal user
Posts: 70
Joined: 12 Jan 2017, 08:00

Re: SendToHTTP not working

#5 Post by vojtishek » 26 May 2017, 12:07

manjh wrote: 25 May 2017, 13:10 Found it.
Turns out I copied the sendtohttp statement from a rules example somewhere, and it contained an error. I had already wondered about the extra "m" in "paramm".
I now tried this:

Code: Select all

sendtohttp,10.0.0.199,8080,/json.htm?param=switchlight&type=command&idx=1687&switchcmd=On
and this works like a charm.....

Lesson learned: never copy/paste any code without understanding... ;)
Hi, I tried to achieve the same in this topic https://www.letscontrolit.com/forum/vie ... f=5&t=3037 , but still without success.
Could you please try to examine If I'm doing something incorrectly?
Thanks

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 33 guests