Hi,
i am new on this Forum and try to set up my ESP but i cant resolve the problem and i dont know what i made wrong.
I set up a mySql server and i have a php Script wich import me the value.
But i cant bring it to run.
The HTTP Post is not working from this Device.
I have try a lot of scripts and i lose already 2 days to search the problem.
so i say PLEASEEEEEEEEEES Help me
Thank you very much
Generic HTTP Advanced - PHP - MySQL
Moderators: grovkillen, Stuntteam, TD-er
-
- Normal user
- Posts: 15
- Joined: 21 Feb 2020, 17:33
Generic HTTP Advanced - PHP - MySQL
- Attachments
-
- 5.jpg (206.57 KiB) Viewed 8796 times
-
- 4.jpg (478.95 KiB) Viewed 8796 times
-
- 3.jpg (241.54 KiB) Viewed 8796 times
-
- 2.jpg (236.61 KiB) Viewed 8796 times
-
- 1.jpg (225.9 KiB) Viewed 8796 times
Re: Generic HTTP Advanced - PHP - MySQL
1. Please state which version of ESPEasy you are using.
2. Confirm the PHP script works. That is to say, validate it without using the ESPEasy device. That way you can determine if the problem is due to the ESPEasy controller settings.
3. Monitor ESPEasy's system log messages. They may help you diagnose the problem.
4. I noticed that the URI in the controller (see last image) is calling the "add.php" script. But the PHP file's name is "add2.php" (see first image).
5. I believe your HTTP controller should be using GET instead of POST. GET carries the request parameter appended in the URI string while POST carries it in the HTTP body.
- Thomas
2. Confirm the PHP script works. That is to say, validate it without using the ESPEasy device. That way you can determine if the problem is due to the ESPEasy controller settings.
3. Monitor ESPEasy's system log messages. They may help you diagnose the problem.
4. I noticed that the URI in the controller (see last image) is calling the "add.php" script. But the PHP file's name is "add2.php" (see first image).
5. I believe your HTTP controller should be using GET instead of POST. GET carries the request parameter appended in the URI string while POST carries it in the HTTP body.
- Thomas
-
- Normal user
- Posts: 15
- Joined: 21 Feb 2020, 17:33
Re: Generic HTTP Advanced - PHP - MySQL
hi,
thank you very much for responding.
i change my php script and test it like you say and now the values are working to put it inside the mysql if i acces directly the link.
http://vps767964.ovh.net/test3.php?temp ... rature2=22
my system info is:
and the device values are here:
i dont know what i made wrong but i dont get the values.
thank you very much for responding.
i change my php script and test it like you say and now the values are working to put it inside the mysql if i acces directly the link.
http://vps767964.ovh.net/test3.php?temp ... rature2=22
my system info is:
and the log is:Build:⋄
20104 - Mega
System Libraries:⋄
ESP82xx Core 2.7.0-dev stage, NONOS SDK 2.2.2-dev(bb83b9b), LWIP: 2.1.2 PUYA support
Git Build:⋄
mega-20200204
Plugins:⋄
79 [Normal] [Testing]
Build Time:⋄
Feb 4 2020 23:07:39
Binary Filename:⋄
ESP_Easy_mega-20200204_test_beta_ESP8266_4M1M.bin
my actual controller configuration is this:31147: HX711: ChanA: -3405674.000
31325: ADC : Analog value: 123 = 1.745
32696: WD : Uptime 1 ConnectFailures 0 FreeMem 14096 WiFiStatus 3
46147: HX711: ChanA: -3405683.000
46328: ADC : Analog value: 123 = 1.745
49135: DS : Temperature: 22.00 (28-41-55-d-21-19-1-b9)
51149: HX711: ChanA: -3405997.000
51337: ADC : Analog value: 123 = 1.745
59377: DS : Temperature: 22.00 (28-41-55-d-21-19-1-b9)
61149: HX711: ChanA: -3406118.000
61329: ADC : Analog value: 123 = 1.745
62694: WD : Uptime 1 ConnectFailures 0 FreeMem 14976 WiFiStatus 3
64497: DS : Temperature: 22.00 (28-41-55-d-21-19-1-b9)
71147: HX711: ChanA: -3406081.000
71334: ADC : Analog value: 123 = 1.745
74741: DS : Temperature: 22.00 (28-41-55-d-21-19-1-b9)
76147: HX711: ChanA: -3406133.000
76328: ADC : Analog value: 123 = 1.745
79863: DS : Temperature: 22.00 (28-41-55-d-21-19-1-b9)
81147: HX711: ChanA: -3405697.000
81331: ADC : Analog value: 123 = 1.745
84982: DS : Temperature: 22.00 (28-41-55-d-21-19-1-b9)
86147: HX711: ChanA: -3405674.000
86347: ADC : Analog value: 124 = 1.760
90102: DS : Temperature: 22.00 (28-41-55-d-21-19-1-b9)
91148: HX711: ChanA: -3405825.000
91323: ADC : Analog value: 124 = 1.760
92694: WD : Uptime 2 ConnectFailures 0 FreeMem 15000 WiFiStatus 3
95222: DS : Temperature: 22.00 (28-41-55-d-21-19-1-b9)
96148: HX711: ChanA: -3405825.000
96331: ADC : Analog value: 123 = 1.745
and the device values are here:
i dont know what i made wrong but i dont get the values.
Re: Generic HTTP Advanced - PHP - MySQL
Not sure if it is also applicable to this case, but please test also with the latest build.
There was an issue with URL encoding, which was fixed in the last build.
In short, it did contain too much HEX-encoded characters.
It was reported as an issue in Generic HTTP, but I don't see why it could not also affect the Generic HTTP Advanced plugin.
See this issue: https://github.com/letscontrolit/ESPEasy/issues/2878
There was an issue with URL encoding, which was fixed in the last build.
In short, it did contain too much HEX-encoded characters.
It was reported as an issue in Generic HTTP, but I don't see why it could not also affect the Generic HTTP Advanced plugin.
See this issue: https://github.com/letscontrolit/ESPEasy/issues/2878
-
- Normal user
- Posts: 15
- Joined: 21 Feb 2020, 17:33
Re: Generic HTTP Advanced - PHP - MySQL
Thank You very much. I flash to the new version and now it work more or less
the esp post data to the database but not the value )
i have in the database %temperature% not the value of the sensor
the esp post data to the database but not the value )
i have in the database %temperature% not the value of the sensor
Re: Generic HTTP Advanced - PHP - MySQL
There is no system variable named %temperature%, so you need to use [taskname#varname]
For example if your task is called "bme" and your temp variable is called "T" then use [bme#T] which will then be replaced with the current value of that sensor value.
For example if your task is called "bme" and your temp variable is called "T" then use [bme#T] which will then be replaced with the current value of that sensor value.
-
- Normal user
- Posts: 15
- Joined: 21 Feb 2020, 17:33
Re: Generic HTTP Advanced - PHP - MySQL
Thanks very much for the greate support.
I pay you a coffe on patreon i hope you get it soon ;D
Who is online
Users browsing this forum: No registered users and 61 guests