Autor Thema: Nefit Easy / Buderus CT100  (Gelesen 329 mal)

Offline superbert

  • Developer
  • New Member
  • ****
  • Beiträge: 18
Nefit Easy / Buderus CT100
« am: 05 April 2018, 00:04:15 »
Hi all,

Since my German is not very good, I decided to write this post in English.

I've established a module (basically for my own use) to integrate the "Nefit-Easy". The module uses the nefit-easy http server of Robert Klepp (https://github.com/robertklep/nefit-easy-http-server), and assumes the server is running (has a session with the backend). The module is stable running for the last 2 weeks now in my configuration.

The module mainly supports the "Weather dependent controls", but can easily be extended by adding some more endpoints into the perl-hash "resources" in the beginning of the file.

What could or should be enhanced / completed:

  • Fetch and parse all endpoints from the backend (would be neat)
  • Use non-blocking http calls (didn't get it to work properly due to sending new requests before the answer was there)
  • Get this csrf thing in place (I didn't have time to get sufficient knowledge on this one)
  • Write the documentation

The module polls the endpoints at defined intervals (1 means every minute, 10 means every 10 minutes, etc; this is all configured in the perl-hash "resources". Be careful with scheduling to much updates at the same interval, as this will freeze FHEM temporarily (due to the blocking http calls).

Definition: define <name> NEFITEASY [host=<ip-adddres>[:<port-number>]] [base_url=<url>]

defaults:
host: 127.0.0.1:3000
base_url: /bridge

I hope some of you can use my module and have some fun with it!

R.

Eeg.

Offline Mike_GKA

  • New Member
  • *
  • Beiträge: 21
Antw:Nefit Easy / Buderus CT100
« Antwort #1 am: 21 Juni 2018, 12:02:37 »
Hi,
I try to ask in English:
I'm the author of https://forum.fhem.de/index.php/topic,74483.0.html. So nefit-easy is running and I get the values with HTTPMOD.
Your solution seems to be more adequate than HTTPMOD.
I try to use your module but "reload 25_NEFITEASY" results into the error:
Can't locate REST/Client.pm in @INC (you may need to install the REST::Client module)

Do you know how to solve this?
Thanx in advance.

Offline superbert

  • Developer
  • New Member
  • ****
  • Beiträge: 18
Antw:Nefit Easy / Buderus CT100
« Antwort #2 am: 21 Juni 2018, 13:09:12 »
You have to install the perl modules (just type: “cpan REST::Client” and “cpan JSON::Parse”)

Let me know if you need further help.

R. Eeg.

Offline Mike_GKA

  • New Member
  • *
  • Beiträge: 21
Antw:Nefit Easy / Buderus CT100
« Antwort #3 am: 21 Juni 2018, 13:50:34 »
Many thanx for the quick answer -> your module is now running on my raspberry!

Some additional questions:
Interval: I think (the default is 60) in seconds? Can we change the value, it is not a setting?
I missed "/bridge/ecus/rrc/recordings/yearTotal" or something similar to get the consumption
« Letzte Änderung: 21 Juni 2018, 15:08:20 von Mike_GKA »

Offline superbert

  • Developer
  • New Member
  • ****
  • Beiträge: 18
Antw:Nefit Easy / Buderus CT100
« Antwort #4 am: 21 Juni 2018, 18:07:04 »
Interval is indeed an internal. You can change it in the code if you like. Readings can be added in the code also, just have a look (they are all defined in the beginning in a perl-hash)

 

decade-submarginal