Comments (13)
So for realy generic - template per sensortype feature is also needed.
from espeasy.
sounds good krikk:)
from espeasy.
TODO: an option to send all the values in one http request?
from espeasy.
that last pull request is pretty good. now we can send multiple values in one call, and prevent needing a new controller for things like the nettemp one.
i did a bit of cleaning up and added it to testing.
a few notes for improvements:
- the big complex whileloops that delete unused variables should just call a generic function, like this: void DeleteVarIndex(String &s, byte varindex).
In case of SENSOR_TYPE_SINGLE you can then just call:
DeleteVarIndex(s, 2);
DeleteVarIndex(s, 3);
DeleteVarIndex(s, 4);
- handling of special stuff like SENSOR_TYPE_LONG should also be done in ReplaceTokenByValue(). That way we can remove the whole switch-statement in "case CPLUGIN_PROTOCOL_SEND:" and simply call HTTPSend011().
In the future we then can also add more complex stuff like wind-direction strings.
After that there is more room for little improvements, making the code even smaller and better maintainable. :)
thanks for all the hard work!
from espeasy.
OK, need to add also custom server key:
&key=SomeKey
and actual esp-ip-address:
&ip=1.1.1.1
for gpio have different template - will be possible to store it as different Controller?
Maybe it is good idea to hardcode some tamplates in HTTP Generic Advenced - to easy choose from?
from espeasy.
the key should be no problem you can add what ever text you want... the ip is also possible with %ip% after my newest pull requst is merged...
from espeasy.
from espeasy.
in a first step i will be simplier to collect this templates on the wiki...
from espeasy.
indeed. later i want to make a piece of javascript that dynamicly loads the templates from github. so we can add templates on the fly without needing new and bigger firmware.
i'm doing a similar thing for my ledanim project. works great.
from espeasy.
@psy0rz nice project :)
from espeasy.
would be nice to add a "PATCH" method to HTTP Generic advanced
from espeasy.
PATCH method?
from espeasy.
@krikk Yes! Currently supported is GET,POST,PUT and HEAD - to update variables in pimatic via restAPI PATCH is needed
from espeasy.
Related Issues (20)
- New Release HOT 6
- [BUG] ESP32-C3/-C6 not working well in latest build HOT 4
- [BUG] Plugin 135 - SCD4x freeze after some times HOT 19
- [FR]Provide storage information in JSON output HOT 2
- WIFI Connection after cold boot HOT 44
- [FR] add OLED display support for sh1107 128x128px HOT 2
- lost in build ;o) HOT 4
- no module named 'recommonmark' HOT 3
- the revenge of issue with rs232 HOT 2
- [BUG]No AP showing up when the sensor can't connect to known SSID HOT 4
- [FR] VL53L0x & VL53L1x ToF sensors - Add Direction value HOT 5
- Information of which set contains which plugin HOT 7
- RTTL Buzzer HOT 6
- OW list unsupported devices HOT 2
- [BUG] mDNS unavailable in ESP32-C3 HOT 13
- add WL134 RFID support HOT 1
- [FR] Disable bootloop recovery HOT 6
- Question about defining feature in custom.h HOT 5
- Problem with PCF8574, plugin P019 HOT 14
- Losing communication with the mqtt broker causes a delay in processing gpio events. HOT 40
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from espeasy.