http send being truncated in rules
Moderators: grovkillen, Stuntteam, TD-er
-
- New user
- Posts: 5
- Joined: 11 Feb 2017, 02:16
http send being truncated in rules
Hello everyone, I'm just starting with ESPEasy and Domoticz, and I can't seem to put a http send in the rules to send a change in local output state when I use a local input to change it to Dometicz:
This is what I put in:
on local#switch do
if [lightstate#switch]=0
gpio,2,1
SendToHTTP 192.168.0.243,8080,/json.htm?type=command¶mm=switchlight&idx=10&switchcmd=On
else
gpio,2,0
SendToHTTP 192.168.0.243,8080,/json.htm?type=command¶mm=switchlight&idx=10&switchcmd=Off
endif
endon
But once I hit submit, this is what happens:
on local#switch do
if [lightstate#switch]=0
gpio,2,1
SendToHTTP 192.168.0.243,8080,/json.htm?type=command¶mm=switchlight&idx=10&switchcmd=On
else
gpio,2,0
SendToHTTP 192.168.0.243,8080,/json.htm?type=command¶mm=switchlight&idx=10&switchcmd=Off
endif
endon
I'm guessing I'm doing something whrong, but I have no idea what !!
Anyone have any suggestions?
This is what I put in:
on local#switch do
if [lightstate#switch]=0
gpio,2,1
SendToHTTP 192.168.0.243,8080,/json.htm?type=command¶mm=switchlight&idx=10&switchcmd=On
else
gpio,2,0
SendToHTTP 192.168.0.243,8080,/json.htm?type=command¶mm=switchlight&idx=10&switchcmd=Off
endif
endon
But once I hit submit, this is what happens:
on local#switch do
if [lightstate#switch]=0
gpio,2,1
SendToHTTP 192.168.0.243,8080,/json.htm?type=command¶mm=switchlight&idx=10&switchcmd=On
else
gpio,2,0
SendToHTTP 192.168.0.243,8080,/json.htm?type=command¶mm=switchlight&idx=10&switchcmd=Off
endif
endon
I'm guessing I'm doing something whrong, but I have no idea what !!
Anyone have any suggestions?
Re: http send being truncated in rules
try using a different browser
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8
Re: http send being truncated in rules
Try to change the format of the rules line
SendToHTTP 192.168.0.243,8080,/json.htm?type=command¶mm=switchlight&idx=10&switchcmd=On
changing it into
SendToHTTP 192.168.0.243,8080,/json.htm?type=command&idx=10&switchcmd=On¶mm=switchlight
that might help.
SendToHTTP 192.168.0.243,8080,/json.htm?type=command¶mm=switchlight&idx=10&switchcmd=On
changing it into
SendToHTTP 192.168.0.243,8080,/json.htm?type=command&idx=10&switchcmd=On¶mm=switchlight
that might help.
Re: http send being truncated in rules
The problem seems to be that '¶' is replaced by '¶' when the rules are saved.
This has been noted many times before!
This has been noted many times before!
Domoticz, Sonoff, ESP32
-
- New user
- Posts: 5
- Joined: 11 Feb 2017, 02:16
Re: http send being truncated in rules
Westcott wrote:The problem seems to be that '¶' is replaced by '¶' when the rules are saved.
This has been noted many times before!
Is anyone aware of a workaround/fix?
Re: http send being truncated in rules
I have the same issue, works the same way with both Chrome and IE
Any info or feedback on this would be appreciated.
Any info or feedback on this would be appreciated.
Re: http send being truncated in rules
+1
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8
Re: http send being truncated in rules
Workaround: Make sure that the "param" valuepair is the first in the list.
I use it like this:
I use it like this:
Code: Select all
sendtohttp 192.168.0.8,8080,/json.htm?param=udevice&type=command&idx=229&svalue=%eventvalue%
Re: http send being truncated in rules
this issue should now be fixed in the latest git-version. https://github.com/letscontrolit/ESPEasy/issues/231
Re: http send being truncated in rules
Yes now it works.
Who is online
Users browsing this forum: No registered users and 107 guests