Giter Club home page Giter Club logo

14105_go-echarger's Introduction

Anurag's GitHub stats

14105_go-echarger's People

Contributors

en3rgy avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

lightning1984

14105_go-echarger's Issues

Output nrg to Json string

The nrg value of the Wallbox is an array of 15 elements. To access them without adding 15 additional outputs, output them as a Json string.

nrg / Json Ouput does not work!

Hi @En3rGy,

I imported release 0.5 but that seemingly did not have JSON output for the "nrg" field enabled yet as mentioned here:
#4
So i downloaded and built the latest source version from github.

The JSON field was available in the Logic Module but was not populated with any data.
When looking at the code I found that the function to set the output field was not there:

if 'nrg' in json_state:
nrg = json_state['nrg']
nrg_curr = (int(nrg[4]) + int(nrg[5]) + int(nrg[6])) / 10
self._set_output_value(self.PIN_O_N_NRG_CURR, nrg_curr)
nrg_json = {"V L1": nrg[0], "V L2": nrg[1], "V L3": nrg[2], "V N": nrg[3], "A L1": nrg[4] / 10.0, "A L2": nrg[5] / 10.0,
"A L3": nrg[6] / 10.0, "kW L1": nrg[7] / 10.0, "kW L2": nrg[8] / 10.0, "kW L3": nrg[9] / 10.0, "kW N": nrg[10] / 10.0,
"kW Sum": nrg[11] / 100.0, "P% L1": nrg[12], "P% L2": nrg[13], "P% L3": nrg[14], "P% N": nrg[15]}
if 'fwv' in json_state:

after line 253 one would need
self._set_output_value(self.PIN_O_NRG_JSON, json.dumps(nrg_json))

Unfortunately it looks like the string fields are limited in length in the Module so the data gets cut short. To overcome this issue I split the field into 3 individual Fields:
https://github.com/En3rGy/14105_go-eCharger/compare/main...Lightning1984:patch-1?expand=1

Now the data is correctly exported in JSON format and can be further evaluated with e.g. the JSON Parser.

regards

Wrong json format

Reported by https://knx-user-forum.de/forum/öffentlicher-bereich/knx-eib-forum/1582969-neuer-baustein-14105_go-echarger?p=1891459#post1891459

Ich hatte bisher die aktuelle Ladeleistung aus dem Ausgang 15 (L1+L2+L3) berechnet, jetzt fiel mir aber auf, dass die tatsächliche Ladeleistung niedriger ist.

Sie wird über das Objekt "nrg[11]" zurückgemeldet mit Faktor 0,01 kW, 360 bedeutet also 3,6kW.

In dem JSON auf Ausgang 16 ist der Wert als "kw Sum" enthalten inkl. Umrechnung des 0,01 Faktors:
{'V N': 1, 'P% L2': 100, 'P% L3': 100, 'P% L1': 100, 'V L2': 220, 'V L3': 225, 'kW L1': 0.9, 'V L1': 225, 'kW N': 0.0, 'P% N': 1, 'kW L3': 0.9, 'kW Sum': 2.94, 'kW L2': 0.9, 'A L3': 4.4, 'A L2': 4.3, 'A L1': 4.3}

Allerdings ist das ja kein "richtiges" JSON, dann müsste es

"kW Sum" : 2.94

oder

"kW Sum" : "2.94"

heißen.

sURL not defined in on_input_value

In last block, when sending data, URL and Port shall be read from logic block input values and provides as sURL and nPort as parameters.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.