using "SendToHTTP"

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
kenkoknz
Normal user
Posts: 64
Joined: 03 Jul 2018, 23:46
Location: New Zealand

using "SendToHTTP"

#1 Post by kenkoknz » 31 Jul 2018, 06:44

Hi,
Advice will be appreciated, been to use SendToHTTP, but cant get it to work:

Environment: 1 wemos with pir sensor, 1 sonoff. all flashed with mega v2. I wanted to turn on the sonoff when the pir on the wemos is triggered.

Rules on the wemos:
on pir#pir1=1 do
gpio,2,0
delay 3000
gpio,2,1
SendToHTTP 192.168.20.102,80,/control?cmd=GPIO,12,1
endon

Tested the sonoff by just typing "http://192.168.20.102/control?cmd=GPIO,12,0" into browser and the sonoff work.

The pir in thw wemos seems to be working, as it does turn the blue led(gpio2) on when pir=1; but the sendtohttp does not seems to be trigerring the sonoff.

Any ideas?
Thanks,
Ken

wim16
Normal user
Posts: 88
Joined: 01 May 2017, 20:35

Re: using "SendToHTTP"

#2 Post by wim16 » 31 Jul 2018, 09:48


kenkoknz
Normal user
Posts: 64
Joined: 03 Jul 2018, 23:46
Location: New Zealand

Re: using "SendToHTTP"

#3 Post by kenkoknz » 31 Jul 2018, 10:48

Ok, after trying all the combinations and looking up and reading all the forums for sendtohttp, it still will not work, was getting really frustrating. Finally I though I try an older version of espeasy mega just in case, and it works!

With the later version "mega-20180722" which I downloaded few days ago, I just cannot get sendtohttp to work, but when I try an older version "mega-20180625" it works.

Also found that syntax can be:
SendToHTTP 192.168.20.102,80,/control?cmd=gpio,12,1
or
SendToHTTP,192.168.20.102,80,/control?cmd=gpio,12,1

So lesson learnt.

BTW, What is the what is the most stable mega version?

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

Re: using "SendToHTTP"

#4 Post by grovkillen » 31 Jul 2018, 18:57

Latest version 20180723 fixed some parsing errors, please try that one
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:

kenkoknz
Normal user
Posts: 64
Joined: 03 Jul 2018, 23:46
Location: New Zealand

Re: using "SendToHTTP"

#5 Post by kenkoknz » 01 Aug 2018, 00:48

@grovkillen, thanks for that. Mega-20180722 definately have issues with sendtohttp as I loaded it to another Wemos and sendtohttp does not work. The latest mega-20180723 is working, so anyone having issues with sendtohttp on mega-20180722, take note.

I found the command field in the tool tab great for testing commands if one is unsure if it works.

Any plan for a SendToHTTPS sometime?

Thanks,
Ken

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

Re: using "SendToHTTP"

#6 Post by grovkillen » 01 Aug 2018, 06:45

Send to https is much wanted but not in the pipeline currently since core features are being looked at and made stable. We're well overdue to release a stable version to supersede the very old stable R120. But a lot has changed behind the scenes (to the better) and this has taken more time than we anticipated. Just this last release is pretty epic, with much love put into making things more stable. Enjoy the "mega-20180801"! 8-)
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:

SvnKswttr
Normal user
Posts: 14
Joined: 25 Feb 2019, 12:52
Location: Germany

Re: using "SendToHTTP"

#7 Post by SvnKswttr » 02 Mar 2019, 14:42

Is there anythin new regarding HTTPS?
I would love to to use IFTTT to get notied when my letterbox was opened.
The webhooks from IFTTT are qorking only with HTTPS.

I have a ESP-01 with the normal firmware (ESP_Easy_mega-20190227_normal_core_241_ESP8266_1M.bin)
A reed-switch is connected between GND and RST wo wake the ESP up, wait for MQTT is connected and then publish the status. Would be graat to trigger an IFTTT event as well.
That's my current rule:

Code: Select all

on MQTT#Connected do
publish,%sysname%/letterbox/Status,Opened!
//SendToHTTP maker.ifttt.com,443,/trigger/letterbox/with/key/somesecretAPIkeygoesheretoauthenticate
endif
EDIT

This still works: viewtopic.php?p=32449#p32449

Post Reply

Who is online

Users browsing this forum: No registered users and 101 guests