Page 1 of 1

SendToHTTP rule

Posted: 10 Apr 2018, 14:58
by Txus
Hello,
I try to send, from sonoff TH16, upgraded with espeasy 2.0, messages by HTTP (temp & dew)
i would like to are sure that my rule is done. Wireshark isn't log any HTTP message from sonoff to my server.
My rule :

On System#Boot do
timerSet,1,10
endon

On Rules#Timer=1 do
SendToHTTP 192.168.x.x,80,/rcgi.bin/UpdateTagForm?TagName1=T_int_sonoff&TagValue1= [Sonde#Temperature]
timerSet,1,10
endon

Maybe i forget something.
Thank you by advance for your help,

Txus

Re: SendToHTTP rule

Posted: 10 Apr 2018, 15:04
by TD-er
There is a space in your URL.
Not sure if that's the issue, just noticed it.

Re: SendToHTTP rule

Posted: 10 Apr 2018, 16:54
by ManS-H
Txus wrote: 10 Apr 2018, 14:58 Hello,
I try to send, from sonoff TH16, upgraded with espeasy 2.0, messages by HTTP (temp & dew)
i would like to are sure that my rule is done. Wireshark isn't log any HTTP message from sonoff to my server.
My rule :

On System#Boot do
timerSet,1,10
endon

On Rules#Timer=1 do
SendToHTTP 192.168.x.x,80,/rcgi.bin/UpdateTagForm?TagName1=T_int_sonoff&TagValue1= [Sonde#Temperature]
timerSet,1,10
endon

Maybe i forget something.
Thank you by advance for your help,

Txus
You missed a "," between SendToHTTP and 192.168.x.x,80,
Like this: SendToHTTP,192.168.x.x,80,

Re: SendToHTTP rule

Posted: 11 Apr 2018, 15:08
by Txus
Thank you for your answer.
I tryed with a "," between SendToFTP and ip@ with the same result.
Do you know one way to log or monitor TCP output from SONOFF ?

Re: SendToHTTP rule

Posted: 11 Apr 2018, 16:14
by ManS-H
Txus wrote: 11 Apr 2018, 15:08 Thank you for your answer.
I tryed with a "," between SendToFTP and ip@ with the same result.
Do you know one way to log or monitor TCP output from SONOFF ?
I work with a Wemos with a switch and a Sonoff basic. On the Wemos i used a duo color led for the status of the Sonoff.
On the wemos side:
Devices: Switch input - Switch, name: button1, GPIO 0
on button1#switch do
SendToHTTP,192.168.0.126,80,/control?cmd=Event,ToggleRelay
if [button1#switch]=1 //switch on
gpio,15,0 // red led off
else
gpio,15,1 // red led on
endif
endon

On the Sonoff side:
Devices: Switch Input, name: Relay, GPIO 12
Rule on the Sonoff side:
on button1#switch do
Event,togglerelay
endon

on togglerelay do
if [relay#state]=0
gpio,12,1
SendToHTTP,192.168.0.127,80,/control?cmd=GPIO,14,1 // green led controller on
else
gpio,12,0
SendToHTTP,192.168.0.127,80,/control?cmd=GPIO,14,0 //green led controller off
endif
endon

Re: SendToHTTP rule

Posted: 11 Apr 2018, 16:42
by Txus
With the V2.0 ?

Re: SendToHTTP rule

Posted: 11 Apr 2018, 17:26
by ManS-H
Txus wrote: 11 Apr 2018, 16:42With the V2.0 ?
Wemos: GIT version: v2.0.0-dev13

Sonoff Pow: GIT version: (custom)

Re: SendToHTTP rule

Posted: 12 Apr 2018, 09:06
by Txus
not better...
I have downloaded to R120 and result is same.
I think than syntax off the message is not understanded by espeasy program : SendToHTTP,192.168.x.x,80,/rcgi.bin/UpdateTagForm?TagName1=T_int_sonoff&TagValue1= [sonde#temperature]

Re: SendToHTTP rule

Posted: 12 Apr 2018, 10:02
by grovkillen
You could use Fiddler or Wireshark to receive the messages and look if the sent message is correct.

Re: SendToHTTP rule

Posted: 12 Apr 2018, 15:55
by Txus
Is the problem. Wireshark don't log any message from sonoff to my server

Re: SendToHTTP rule

Posted: 12 Apr 2018, 16:52
by ManS-H
Txus wrote: 12 Apr 2018, 09:06 not better...
I have downloaded to R120 and result is same.
I think than syntax off the message is not understanded by espeasy program : SendToHTTP,192.168.x.x,80,/rcgi.bin/UpdateTagForm?TagName1=T_int_sonoff&TagValue1= [sonde#temperature]
maybe a stupid question, but what is this: /rcgi.bin/UpdateTagForm?
Can be that that's your problem?

Re: SendToHTTP rule

Posted: 12 Apr 2018, 22:28
by Txus
This command is done when she's sended directly by firefox :roll:

Re: SendToHTTP rule

Posted: 21 May 2018, 13:02
by sentinel
did you sort this out?
the SendToHTTP command doesn't have a comma ',' after the command. See the wiki.
If you install wireshark and apache on your computer, you can perhaps try to send the command to your computer's IP. And then use wireshark to see the command. Or try sending a simpler command with ESPEasy to your computer (eg. SendToHTTP 192.168.x.x,80,/simple)

Did you correct the space TD-er noticed?