-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sendtohttp] Add Open-Meteo events + JSON event #5207
base: mega
Are you sure you want to change the base?
Conversation
Command: Response:
|
Wrap the (long) url, that contains several commas, in quotes, and this issue should be resolved 😉 |
I tried that and it didn't work...but now i think i know what happend. I have this auto correction plugin in my browser. Disabling it helped :) |
- added FEATURE_OPENMETEO_EVENT to Custom-sample.h - disabled FEATURE_THINGSPEAK_EVENT and FEATURE_OPENMETEO_EVENT on default - both got the same structure in define_plugin_sets.h
Thanks for helping me... |
I combined the two functions because there is actually no need for that |
It would at least make the code more readable. |
Yes, we have, but it's not easy to use when parsing unknown data (see P037 code... 😞). |
I was thinking of using the Arduino code for parsing, but for now it is not worth it size-wise. |
We already use ArduinoJSON library (though not the latest 7.x as it got quite some increase in size), that works very well when having known input. |
I added also the inverter event. It seems that a bunch of inverter using the same API. |
I don't understand why the action runs are failing. For me these builds are working just fine fine... |
OK, hopefully this time the action run finishes without errors. example content:
For the URL: There needs to be &json added to the end of it to tell the parser that there is a JSON-response. Actually i would like to see this as an plugin, where you enter your URL and store your keys in the same manner. But that not only mean to create a new plugin but also to deduplicate code because of P037. |
Usually adding a parameter that is not existent on the server side causes no issues. |
- add array output to the json parser - add grouping of keys for individual requests
-changed variable name for the decimals to decimalsJP
As being asked here: https://www.letscontrolit.com/forum/viewtopic.php?p=72083#p72083 i do a PR for Open-Meteo events
On OpenMeteo#current Do...
)It works but responses can get quite long, especially for hourly variables and also when all types combined together.
But for now it was working fine on an esp32 classic even with very long resonses > 6kb
I tried to kind of create a size check but i am no expert for memory constraint systems. Maybe you can help out here with some recommendations.
I guess when calling this it is already to late 🙂 :
How to use:
sendtohttp api.open-meteo.com,80,/v1/forecast?...
Issues:
ESPEasy throws a "Too many arguments" error but it still works fine