robertklep / nefit-easy-core

Core functionality to implementation communications with Nefit/Bosch backend.
MIT License
21 stars 4 forks source link

Explanation of the object properties #10

Closed TauPan closed 6 years ago

TauPan commented 6 years ago

Hi!

I've installed nefit-easy-server yesterday and it works fine (running against a CT100 from Bosch-Junkers). However I'm wondering what to make of the values I get, especially I'd like to look at the gas usage per day and if I e.g curl 'http://127.0.0.1:3000/bridge/ecus/rrc/recordings/gasusage?page=1' I'm puzzled as to what those objects mean:

{
   "type" : "recordings",
   "id" : "/ecus/rrc/recordings/gasusage",
   "value" : [
      {
         "T" : 128,
         "ch" : 9,
         "d" : "18-10-2017",
         "hw" : 6.5
      },
      {
         "d" : "19-10-2017",
         "T" : 127,
         "ch" : 8.7,
         "hw" : 6.2
      },

d is clearly the date, however I have no Idea what t, ch and hw mean.

I have similar problems with rcUIStatus and other endpoints. Did anybody figure out what those values might mean? If so, a link would be most helpful.

Kind regards Friedel

robertklep commented 6 years ago

I consulted the decompiled Android app that I use as reference, and found the following:

I assume that the units used for ch or hw is (cubic meters).

TauPan commented 6 years ago

Thanks, most helpful! To verify the unit, I could try summing up those values for the current month and comparing with the values in the history tab of the android app.

(Or for higher precision, compare with the gas meter.)

Is there any chance an explanation of at least some of the non-obvious keys could be added to the documentation, if you can find the time? I'd really appreciate it :)

robertklep commented 6 years ago

I have to admit that I don't maintain the documentation very well ;D

If an endpoint isn't documented, you can take a look at the code here: https://github.com/robertklep/nefit-easy-commands/tree/master/lib/commands

It's a higher-level library that you can use to get and set a list of endpoints, and I've tried to use a sensible naming scheme for the responses.

It already provides a command to retrieve gas usage: https://github.com/robertklep/nefit-easy-commands/blob/master/lib/commands/gasUsage.js

But I also edited the entry for it in the wiki: https://github.com/robertklep/nefit-easy-core/wiki/List-of-endpoints#gas-usage-history

(which also reminded me that the unit used isn't but kWh, the wiki explains how to convert those to ).

TauPan commented 6 years ago

Ah, thanks for pointing this out!