-
-
Notifications
You must be signed in to change notification settings - Fork 731
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
Add javascript support to the http plugin #1944
Conversation
This allows to run javascript code on the data returned by the HTTP call and optionally processed via jq This allows e.g. the senec device to be configured without using external scripts that runs curl and python The data is provided to the script env via an input variable
This PR allows the Senec device to be setup like this:
instead of
Making the configuration independent of the system evcc is running on. |
Whoah… das schau ich mir morgen an 👍🏻 |
Was tut das sub bei jq? |
Ersetzt |
Ich meine jetzt verstanden zu haben, dass es sich um eine HEX zu Foat32 Umwandlung handelt. Die könnte ggf auch die entsprechenden Funktionen aus Modbus nutzen: https://github.com/evcc-io/evcc/blob/master/util/modbus/modbus.go#L267 |
Das ist in dem Beispiel richtig. Aber dazu müsste man dann eine Property |
Mit
|
|
Das müssten sicher 2 Operationen sein. Hex auspacken und Wert interpretieren. Evtl decode als Liste? |
Liste finde ich merkwürdig, habs mal mit
|
LGTM |
This allows to run javascript code on the data returned by the HTTP call, optionally processed via jq and decoded, e.g. hex values into ints and floats
This allows to run javascript code on the data returned by the HTTP call and optionally processed via jq
This allows e.g. the senec device to be configured without using external scripts that runs curl and python
The data is provided to the script env via an input variable