I just discovered this project and I like it.
I set up my first ESP some hours ago and configured almost everything without a hassle.
When it comes to sending the data, I want to use "Generic HTTP" as I have a server running, which receives a request (currently nodeMCU, but want to switch to ESPEasy) in the form:
Code: Select all
index.php?app=shc&a&ajax=pushsensorvalues&spid=3&sid=30&type=2&v1=22.4&v2=43.2
For a DS18b20, there will be only "v1", for a BME280 there would be "v1", "v2" and "v3".
Given the above example, I:
- named the device "3", being the sensorpoint-ID with the variable %sysname%
- named the task for the DHT "30", being the sensor-ID with the variable %tskname%
- gave the IDX the number "2", being the sensortype with the variable %IDX% (which doesn't work)
- named the value 1 "v1", with the variable %valname%
- named the value 2 "v2", with the variable %valname% (?)
So I assembled the following template-string:
Code: Select all
index.php?app=shc&a&ajax=pushsensorvalues&spid=%sysname%&type=%IDX%&sid=%tskname%&%valname%=%value%
The first problem is the length. The resulting request is cut right after %tskname, so the allowed length seems to be 80 chars only. I can enter the whole string, but by submitting it, it gets cut.
Second problem so far, the %IDX% is not getting "translated" into the value. I did not found a documentation where all possible variables are listed, only for the system-variables.
There's only an example string with some possible variables before one replaces this with his own template.
So I have 3 questions:
1. Is there any documentation with possible variables for putting together the template?
2. How is the varying number of possible %valname%=%value%-pairs, depending on the sensortype, handled? When I put that in my template only once (as above), will the other 1 or 2 be appended? Or will they be discarded? What's the "best practice" for this?
3. Is it possible to expand the length of the template when I build the firmware on my own? Will do this anyway, as I want to read VCC.
Thanks in advance