SendToHTTP not working

Moderators: grovkillen, Stuntteam, TD-er

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

Re: SendToHTTP not working

#31 Post by grovkillen » 13 Feb 2018, 19:27

Corrupted flash maybe. Hard to tell.
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:

sentinel
Normal user
Posts: 55
Joined: 02 Dec 2017, 17:40

Re: SendToHTTP not working

#32 Post by sentinel » 18 Feb 2018, 18:10

I think the problem is with the TM1637 plugin:
When I disable the plugin and reboot the device, both the timers and SendToHTTP work. When I enable it, both stop working. This happens with both my modules.

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

Re: SendToHTTP not working

#33 Post by grovkillen » 18 Feb 2018, 19:06

What version are you running?
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:

sentinel
Normal user
Posts: 55
Joined: 02 Dec 2017, 17:40

Re: SendToHTTP not working

#34 Post by sentinel » 19 Feb 2018, 09:07

I am running: mega-20180209 (ESP_Easy_mega-20180209_test_ESP8266_1024.bin)

sentinel
Normal user
Posts: 55
Joined: 02 Dec 2017, 17:40

Re: SendToHTTP not working

#35 Post by sentinel » 19 Feb 2018, 15:21

I have also tried the following rules:

Code: Select all

On System#Boot Do
 SendToHTTP 192.168.1.2,80,/control?cmd=lcd,1,1,booting
EndOn

On Clock#Time Do
  SendToHTTP 192.168.1.2,80,/control?cmd=lcd,2,2,--%systime%--
EndOn
and the behaviour is the same: when the plugin is not enabled, both SendToHTTPs work. When it is enabled they don't work.

Just to clarify: when I say "plugin enabled" I mean that I have configured the display and then I enable/disable it using the tick-box.

sentinel
Normal user
Posts: 55
Joined: 02 Dec 2017, 17:40

Re: SendToHTTP not working

#36 Post by sentinel » 03 Mar 2018, 22:39

did you reproduce it?
I'm trying to find out what goes wrong when the 7-segment is enabled. I'm slow :|
I can see that after I enable the device, when the code reaches the point to check if there are any timers active, it finds no timer active.

TD-er
Core team member
Posts: 8748
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SendToHTTP not working

#37 Post by TD-er » 03 Mar 2018, 23:43

There has been a proposed fix for these displays.
It was just merged, so perhaps check tomorrow's build?

sentinel
Normal user
Posts: 55
Joined: 02 Dec 2017, 17:40

Re: SendToHTTP not working

#38 Post by sentinel » 05 Mar 2018, 17:38

no, unfortunately the problem still exists. I tried with ESPEasy_mega-20180305.zip

walmtech
New user
Posts: 1
Joined: 17 Mar 2018, 00:47

Re: SendToHTTP not working

#39 Post by walmtech » 17 Mar 2018, 00:49

Still broken for me on ESPEasy_mega-20180315.zip

TD-er
Core team member
Posts: 8748
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SendToHTTP not working

#40 Post by TD-er » 17 Mar 2018, 12:00

Could you add an issue on Github about this, describing as much as you can.
I'm loosing track of where to gather information on issues/bugs here on the forum and although the issue list on Github isn't perfect either, it is at least a bit more contained than the forum here.

sentinel
Normal user
Posts: 55
Joined: 02 Dec 2017, 17:40

Re: SendToHTTP not working

#41 Post by sentinel » 18 Mar 2018, 13:28


sentinel
Normal user
Posts: 55
Joined: 02 Dec 2017, 17:40

Re: SendToHTTP not working

#42 Post by sentinel » 25 Mar 2018, 17:49

Should we add a note in wiki in the plugin development page to indicate that plugins should not by default return success = true (if the plugin didn't do anything), since Rules, Timers and other plugins will be affected?

TD-er
Core team member
Posts: 8748
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SendToHTTP not working

#43 Post by TD-er » 25 Mar 2018, 20:22

sentinel wrote: 25 Mar 2018, 17:49 Should we add a note in wiki in the plugin development page to indicate that plugins should not by default return success = true (if the plugin didn't do anything), since Rules, Timers and other plugins will be affected?
I totally agree such important things should be documented.
And maybe we should just add some kind of template file for plugin/controller in the sourcecode, describing what should be where.
This may be comment code, but it should turn up when searching for some keywords in the source.

sentinel
Normal user
Posts: 55
Joined: 02 Dec 2017, 17:40

Re: SendToHTTP not working

#44 Post by sentinel » 27 Mar 2018, 17:14

And maybe we should just add some kind of template file for plugin/controller in the sourcecode, describing what should be where.
This may be comment code, but it should turn up when searching for some keywords in the source.
This is a very good idea.
I made an attempt to create a plugin template file (which needs a lot of description added). I have gone through the bugs and wiki and created a list of hints I thought are good to know when developing a plugin. I have also added a few bugs which I think provide good information, but I can't summarise it :?
Does that help?
_Pxxx_PluginTemplate_hints.zip
(3.75 KiB) Downloaded 406 times

updated 28/3/18: added one more hint
Last edited by sentinel on 30 Mar 2018, 21:25, edited 1 time in total.

TD-er
Core team member
Posts: 8748
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SendToHTTP not working

#45 Post by TD-er » 30 Mar 2018, 19:03

sentinel wrote: 27 Mar 2018, 17:14
And maybe we should just add some kind of template file for plugin/controller in the sourcecode, describing what should be where.
This may be comment code, but it should turn up when searching for some keywords in the source.
This is a very good idea.
I made an attempt to create a plugin template file (which needs a lot of description added). I have gone through the bugs and wiki and created a list of hints I thought are good to know when developing a plugin. I have also added a few bugs which I think provide good information, but I can't summarise it :?
Does that help?
_Pxxx_PluginTemplate_hints.zip



updated 28/3/18: added one more hint
Can you add a Github issue for this?
On the forum, good ideas tend to get lost.

sentinel
Normal user
Posts: 55
Joined: 02 Dec 2017, 17:40

Re: SendToHTTP not working

#46 Post by sentinel » 30 Mar 2018, 21:33

Can you add a Github issue for this?
here is is: #1211 Plugin template file and hints on writing new plugins

TD-er
Core team member
Posts: 8748
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SendToHTTP not working

#47 Post by TD-er » 31 Mar 2018, 01:54

Thanks :)

esp8266
New user
Posts: 3
Joined: 27 Sep 2018, 17:10

Re: SendToHTTP not working

#48 Post by esp8266 » 27 Sep 2018, 18:18

Hello, all
first I want to thank the developers and everyone involved for this wonderful product - ESP Easy
with all due respect, the ESP Easy wiki lacks real, living examples, only syntax.

well, my hard:
1. esp8266 nodemcu, bme280 mega-20180822 (192.168.0.6)
2. esp8266 nodemcu, tm1637 mega-20180822 (192.168.0.7)

my task: to simplify (without mosquito and the like) transfer the temperature value from unit1 to the display of tm1637 unit2
my settings look at the attached screenshots
please correct the settings of the rules

Thank you
(I apologize for me the bad english)
The attachment ESPEASY_1.jpg is no longer available
ESPEASY_1.jpg
ESPEASY_1.jpg (203.28 KiB) Viewed 47377 times

esp8266
New user
Posts: 3
Joined: 27 Sep 2018, 17:10

Re: SendToHTTP not working

#49 Post by esp8266 » 27 Sep 2018, 18:22

2 attachment
ESPEASY_2.jpg
ESPEASY_2.jpg (187.32 KiB) Viewed 47373 times

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

Re: SendToHTTP not working

#50 Post by grovkillen » 27 Sep 2018, 18:32

We are very much aware that the wiki is lacking in every aspect. We're working on a new GUI and integrated wiki which will be easier to maintain.
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:

sentinel
Normal user
Posts: 55
Joined: 02 Dec 2017, 17:40

Re: SendToHTTP not working

#51 Post by sentinel » 02 Oct 2018, 18:38

you can try the following:
Add the following Rule on unit#1 (which has the BME280 sensor):

Code: Select all

on sendData do
  SendToHTTP 192.168.0.7,80,/control?cmd=7dt,[bme280#temp]
endon
And add the following Rules on unit#2 (which has the display):

Code: Select all

on WiFi#Connected do
  sendToHTTP 192.168.0.6,80,/control?cmd=event,sendData
  timerSet,1,2
endon

on Rules#Timer=1 do
  sendToHTTP 192.168.0/6,80,/control?cmd=event,sendData
  timerSet,1,2
endon
So my idea is:
Unit#2
- when unit#2 connects to the wifi, it sends a request to unit#1 to execute "sendData". It also starts a timer
- when the timer expires, it sends a request to unit#1 to execute "sendData". It also re-starts the timer
Unit#1
- contains simply sendData, which will call 7dt and send the temperature to unit#1 using sendToHTTP

esp8266
New user
Posts: 3
Joined: 27 Sep 2018, 17:10

Re: SendToHTTP not working

#52 Post by esp8266 » 03 Oct 2018, 21:27

sentinel
it works ! :D
thank you very much for your help

sentinel
Normal user
Posts: 55
Joined: 02 Dec 2017, 17:40

Re: SendToHTTP not working

#53 Post by sentinel » 04 Oct 2018, 18:05

you are welcome :D

Post Reply

Who is online

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