SendToHTTP not working
Moderators: grovkillen, Stuntteam, TD-er
Re: SendToHTTP not working
I think the rule is never triggered. I started 2 timers: When timer-1 expires, I switch the on-board LED on. When timer-2 expires, I switch it off. Nothing happens.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: SendToHTTP not working
You mind sharing screen shots?
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: SendToHTTP not working
here is a screenshot of my rules. Do you need another tab?
- Attachments
-
- rules tab
- rules.png (51.08 KiB) Viewed 46531 times
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: SendToHTTP not working
Okay, that explains it. You cannot use timers like that. They will start tugging for that poor gpio 2. You need to do it like this.
You need to do this in order to know that they will trigger in sequence.
Code: Select all
On System#Boot Do
TimerSet,1, 5
EndOn
On Rules#Timer=1 Do
Gpio,2,1
TimerSet,2,10
EndOn
On Rules#Timer=2 Do
Gpio,2,0
TimerSet,1,5
EndOn
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: SendToHTTP not working
This also doesn't work. My Rules are:
Take a look at the log:
I think the timer starts but never expires?
I have also tried my code (the one in my screenshot) in a module running build 120 and it works ok.
Code: Select all
On System#Boot Do
TimerSet,1, 2
EndOn
On Rules#Timer=1 Do
Gpio,2,1
TimerSet,2,4
EndOn
//on Clock#Time do
// SendToHTTP 192.168.1.9,80,/control?cmd=lcd,1,1,--%systime%--
//endon
On Rules#Timer=2 Do
Gpio,2,0
TimerSet,1,2
EndOn
Code: Select all
5390 : EVENT: System#Boot
5395 : ACT : TimerSet,1, 2
5426 : EVENT: Processing time:36 milliSeconds
5427 : WD : Uptime 0 ConnectFailures 0 FreeMem 18832
5442 : EVENT: Clock#Time=Sun,21:50
5474 : EVENT: Processing time:32 milliSeconds
32470 : EVENT: Clock#Time=Sun,21:51
32498 : EVENT: Processing time:28 milliSeconds
35426 : WD : Uptime 1 ConnectFailures 0 FreeMem 18688
65426 : WD : Uptime 1 ConnectFailures 0 FreeMem 18688
92724 : EVENT: Clock#Time=Sun,21:52
92751 : EVENT: Processing time:27 milliSeconds
95426 : WD : Uptime 2 ConnectFailures 0 FreeMem 18688
125426 : WD : Uptime 2 ConnectFailures 0 FreeMem 18688
152837 : EVENT: Clock#Time=Sun,21:53
152864 : EVENT: Processing time:27 milliSeconds
155426 : WD : Uptime 3 ConnectFailures 0 FreeMem 18688
185426 : WD : Uptime 3 ConnectFailures 0 FreeMem 18688
213269 : EVENT: Clock#Time=Sun,21:54
213296 : EVENT: Processing time:27 milliSeconds
I have also tried my code (the one in my screenshot) in a module running build 120 and it works ok.
Re: SendToHTTP not working
Don't use spaces here:
Instead use:
Code: Select all
TimerSet,1, 2
Code: Select all
TimerSet,1,2
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: SendToHTTP not working
Yes, my phone added those spaces. Sorry!TD-er wrote: ↑11 Feb 2018, 21:27 Don't use spaces here:Instead use:Code: Select all
TimerSet,1, 2
Code: Select all
TimerSet,1,2
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: SendToHTTP not working
thanks guys. I tried it without space but it also doesn't work
After the module boots, I can see the following in the log:
5449 : ACT : timerSet,1,2
but there is no other similar log entry. And of course no led blinking
After the module boots, I can see the following in the log:
5449 : ACT : timerSet,1,2
but there is no other similar log entry. And of course no led blinking
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: SendToHTTP not working
Please try another esp board if possible.
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: SendToHTTP not working
Hi,
ok, I flashed my other module with this binary: ESP_Easy_mega-20180209_test_ESP8266_1024.
The timers start and expire correctly, led flashes. I also added a SendToHTTP command when a timer expires. It also works! I am sending the http request to my laptop. I have apache and run wireshark so I see that the request from wemos is fine. I'll test sending it to the other module with the display (I need to do some re-wiring). But it should also work.
I'll erase the flash and re-flash the other module. What can be the problem?
ok, I flashed my other module with this binary: ESP_Easy_mega-20180209_test_ESP8266_1024.
The timers start and expire correctly, led flashes. I also added a SendToHTTP command when a timer expires. It also works! I am sending the http request to my laptop. I have apache and run wireshark so I see that the request from wemos is fine. I'll test sending it to the other module with the display (I need to do some re-wiring). But it should also work.
I'll erase the flash and re-flash the other module. What can be the problem?
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: SendToHTTP not working
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: SendToHTTP not working
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.
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.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: SendToHTTP not working
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: SendToHTTP not working
I am running: mega-20180209 (ESP_Easy_mega-20180209_test_ESP8266_1024.bin)
Re: SendToHTTP not working
I have also tried the following rules:
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.
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
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.
Re: SendToHTTP not working
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.
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.
Re: SendToHTTP not working
There has been a proposed fix for these displays.
It was just merged, so perhaps check tomorrow's build?
It was just merged, so perhaps check tomorrow's build?
Re: SendToHTTP not working
no, unfortunately the problem still exists. I tried with ESPEasy_mega-20180305.zip
Re: SendToHTTP not working
Still broken for me on ESPEasy_mega-20180315.zip
Re: SendToHTTP not working
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.
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.
Re: SendToHTTP not working
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?
Re: SendToHTTP not working
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.
Re: SendToHTTP not working
This is a very good idea.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.
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?
updated 28/3/18: added one more hint
Last edited by sentinel on 30 Mar 2018, 21:25, edited 1 time in total.
Re: SendToHTTP not working
Can you add a Github issue for this?sentinel wrote: ↑27 Mar 2018, 17:14This is a very good idea.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.
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
On the forum, good ideas tend to get lost.
Re: SendToHTTP not working
here is is: #1211 Plugin template file and hints on writing new pluginsCan you add a Github issue for this?
Re: SendToHTTP not working
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)
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)
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: SendToHTTP not working
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: SendToHTTP not working
you can try the following:
Add the following Rule on unit#1 (which has the BME280 sensor):
And add the following Rules on unit#2 (which has the display):
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
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
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
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
Re: SendToHTTP not working
sentinel
it works !
thank you very much for your help
it works !
thank you very much for your help
Re: SendToHTTP not working
you are welcome
Who is online
Users browsing this forum: Bing [Bot] and 36 guests