« Heizung, Lüftung, Klima  |

DIY Alternative zu Nibe Modbus Modul

Teilen: facebook    whatsapp    email
 
 <  1  2 ... 3  4  5  6  7 ... 8 ... 49  50  51  > 
  •  chrismo
  •   Gold-Award
29.1.2019 - 25.4.2024
1.009 Antworten | 62 Autoren 1009
127
1136
Weil es hier immer wieder zu Diskussionen zum Thema Modbus-Anbindung der Nibe kommt, wollte ich hier mal kurz meine Erfahrungen mit dem Nachbau einer DiY Lösung, auf Basis von im Netz vorhandener Infos, teilen. Für mich war es eine Spielerei und Zeitvertreib der letzten Tage. Der Post dient vor allem als Speicherort für meine gesammelten Infos und evt. dem Austausch von Leuten, die das so oder so ähnlich bei sich installiert haben. Ich kann und will hier keine Empfehlung abgeben, sowas selbst zu machen!

Die Lösung basiert im Wesentlichen auf den Nibe Bindings von openHAB (https://www.openhab.org/addons/bindings/nibeheatpump/), das eine Umsetzung Modbus auf UDP macht. Infos zur Funktionsweise findet man auf der openHAB Seite bzw. dem entsprechenden github Repo.

Die grobe Vorgangsweise war folgend:
1) Auf einen Arduino mit Ethernet Shield und RS485 Adapter die NibeGW Software (Teil des Bindings) installieren. Der Ardunio Code muss dabei an die eigenen Netzwerkeinstellungen angepasst werden. 

2) Den Arduino an die Wärmepumpe und ans LAN anschließen.

3) Die Nibe Modbus Manager Software auf einem Rechner installieren und bis zu 20 Register auswählen, die periodisch von der Wärmepumpe exportiert werden sollen. Diese Konfig muss gespeichert und per USB-Stick auf die WP WP [Wärmepumpe] übertragen werden.

4) Das Modbus Modul in der WP WP [Wärmepumpe] aktivieren. Wenn alles geklappt hat, bleibt die Wärmepumpe im Normalbetrieb. Falls irgendwas bei der Kommunikation mit dem Arduino schief geht, wird eine Fehlermeldung am Display ausgegeben und die WP WP [Wärmepumpe] geht in einen Alarmmodus.

5) Das nibeopenhab Binding in openHAB installieren und konfigurieren.

zu 1) Man könnte dazu auch einen Raspberry Pi mit RS485 Adapter verwenden, auf dem dann auch openHAB selbst läuft. Das finde ich aber nicht optimal. Ein Pi wäre mir da nicht robust genug. Selbst ein einfacher Neustart des Pis würde zu einem Fehler der WP WP [Wärmepumpe] führen und ein SD-Kartenfehler wäre sowieso ungemütlich.

zu 5) Da ich derzeit noch nicht weiß ob es openHAB oder was anderes wird - über Erfahrungen bzw. Empfehlungen würde ich mich freuen(!) - habe ich das Binding so adaptiert, das es ohne openHAB läuft. Derzeit verwende ich die Log-Dateien dieses "Stand-Alone Bindings" zur Speicherung der Werte. Eine Erweiterung für "richtige" Ausgabeformate bzw. Kanäle (Umsetzung auf KNX wurde hier mal in einem anderen Thread diskutiert) wäre aber von hier weg leicht machbar.

von energiesparhaus

  •  JanRi
  •   Gold-Award
24.11.2019  (#101)
Hi,

schau dir mal das Readme auf der Git-Seite an, die weiter oben gelinkt ist. Das ist zwar alles schwedisch, aber Google-Translate hilft da. Die Screenshots zeigen, was geht. Je nach Programmierkenntnissen kann man dann letztlich machen, was man will.

Ich werde mit einen kleinen Client bauen, der sich auf alles relevante "subskribiert" ("abonniert") und das dann erstmal loggt.

Ein zweiter Client wird das Warmwasser steuern und ein dritter wird die Heizungspumpe im Heizungsbetrieb nach einer AT AT [Außentemperatur]-geführten Kurve steuern.

Das ist ja das Coole an Pub/Sub: Wir haben eine Datenquelle und beliebige Senken können alles oder Teile davon beim Broker abonnieren und dann gezielt drauf reagieren.

Viele Grüße,

Jan

1
  •  jaydee73
24.11.2019  (#102)
@NibePi:
the read-only feature of your installation is implemented in the image itself, right? So when I install the image on a "normal" Pi (3b), it is also read-only by default?

You said one has to edit the installation for a usb-rs485-stick to work properly on a rpi3. So a write procedure is necessary?

I only ask because I have no deeper knowledge of the pi-world yet. Have to dig deeper into it to get it working. But I do have a rpi3b, so I would prefer using this one instead of your pi-zero suggestion.

1
  •  Becker
  •   Gold-Award
24.11.2019  (#103)
Kann man das WP WP [Wärmepumpe] Display "nachbilden" per Webseite (node red) ?

Oder zumindest die ganzen Funktionen schön geordnet nach Menüs und die Messwerte (Serviceinfo) auch separat übersichtlich geordnet.

Das ganze dann wie z.B. die fritzbox im Lan abrufbar machen (node red).

So dachte ich ganz am Anfang funktioniert das Uplink emoji (habe die IP der WP WP [Wärmepumpe] eingegeben, aber es kam nichts).

Gerade die Messwerte der Serviceinfo sind teilweise wild durcheinander und unlogisch beschriftet von Nibe aus, das könnte man viel besser machen, inkl. momentaner thermischer Leistung einpflegen.

P.s. Ja VPN habe ich natürlich schon, daher wäre das so interessant.

1
  •  JanRi
  •   Gold-Award
24.11.2019  (#104)
Hi,

here I can help because I already did that emoji

zitat..
jaydee73 schrieb: the read-only feature of your installation is implemented in the image itself, right?


The Javascript program (heatpump.js) switches the root into read-only (e.g., line 90 in heatpump.js from git, version 1.0.6). If it wants to write its config, it remounts to rw and back afterwards.

zitat..
jaydee73 schrieb: You said one has to edit the installation for a usb-rs485-stick to work properly on a rpi3. So a write procedure is necessary?



You have to change line 28 to ttyUSB0 or whatever your stick is.

You have two options to do that:

1. You write the image to the SD card. You connect the SD card to a linux machine, mount the partition and change the appropriate file (/<mountpoint>/home/pi/.nibepi/heatpump.js if I remember correctly).

2. You log into the Pi using ssh with username pi and password nibe. Then remount the root RW (sudo mount -o remount,rw /) and change the file. Now restart the services or reboot the PI.

Greetings,

Jan

1
  •  jaydee73
24.11.2019  (#105)
I'll choose option 2. emoji

Is there a driver installation necessary for the usb-stick to work with the NibePi image?

1
  •  JanRi
  •   Gold-Award
24.11.2019  (#106)
Hi,

I guess not but I have not tried yet I still have to wait for my stick. If this image uses the standard Raspian kernel modules (I guess it does) than it should work out of the box (I use such a stick on my Pi3 that runs the KNX and I2C light control). I can tell more once I have the stick.

Greetings,

Jan

1
  •  uzi10
  •   Gold-Award
24.11.2019  (#107)
Ihr könnts auch deutsch sprechen emoji

1
  •  JanRi
  •   Gold-Award
24.11.2019  (#108)
Hi,

habe ich gar nicht gemerkt, dass das englisch war. Ich denke aber, dass der schwedische Autor von NibePi auch daran interessiert ist, was wir damit machen wollen, von daher bin ich meist bei Englisch geblieben.

Viele Grüße,

Jan

1
  •  nibepi
24.11.2019  (#109)
Regarding the read-only part, It's a standard Raspbian Stretch image but I've run the read-only solution in this link https://learn.adafruit.com/read-only-raspberry-pi/
It removes all the processes which is writing to the disk and sets the filesystem to read-only.
My heatpump.js script can change it back to RW mode, then back to RO mode when it makes changes to the config file. 
I really recommend the hardware in my github and the image file, which makes the solution very userfriendly, no prior programming knowledge or other homeautomation system needed. It's easy to modify the NodeRED running to make the dashboard the way you want it. For that you need NodeRED experience.
With my new version 1.1 coming up all this will be easier and for the hardcore programmer it will be easier to implement.

And I google translate all that you're writing so dont worry about the language. I also speak 1% german :D

5
  •  SMiak
  •   Bronze-Award
24.11.2019  (#110)
emoji

1
  •  uzi10
  •   Gold-Award
24.11.2019  (#111)
Haha you're the Best emoji

1
  •  jaydee73
25.11.2019  (#112)
@nibepi:
I just installed your image on my rpi3. So far so good. I just wanted to ask (someone did this before and also opened an issue on github for this), do you plan to translate your program to english with your upcoming v1.1?

I can translate your Github documentation, that's no problem. But all these node red flows and icons, the web ui, the dashboard and so on, that's hard to translate... emoji

Regards,
Stefan

1
  •  nibepi
25.11.2019  (#113)

zitat..
jaydee73 schrieb: @nibepi:
I just installed your image on my rpi3. So far so good. I just wanted to ask (someone did this before and also opened an issue on github for this), do you plan to translate your program to english with your upcoming v1.1?

I can translate your Github documentation, that's no problem. But all these node red flows and icons, the web ui, the dashboard and so on, that's hard to translate...

Regards,
Stefan

Yes I've started to translate everything to english. I'm working on a new core so it will take some time.

3
  •  jaydee73
27.11.2019  (#114)
Gibt es eigentlich irgendwo eine Dokumentation, welche Werte über Modbus ausgelesen (und geschrieben) werden können? 

1
  •  denis
  •   Silber-Award
27.11.2019  (#115)
@jaydee73: 

Gibt es von Nibe. Aber auch direkt im NibePI Repo.

Hier beispielsweise für die 1255: 

https://github.com/bebben88/NibePi/blob/master/nibepi/models/F1255.json

`"mode":"R"` bedeutet zum Beispiel dass das Register nur gelesen werden kann. (RW wäre Read and Write)

Hier sind alle Modelle: 

https://github.com/bebben88/NibePi/tree/master/nibepi/models



1
  •  chrismo
  •   Gold-Award
27.11.2019  (#116)
Hier sind die Register auch beschrieben: http://www.openhab.org/addons/bindings/nibeheatpump/

Unter "Channels" sind die Register gelistet. Sensor bedeutet nur lesbar, Setting bedeutet schreiben möglich.

1
  •  jaydee73
27.11.2019  (#117)
Danke! Das sind ja einige... emoji

1
  •  JanRi
  •   Gold-Award
28.11.2019  (#118)
Hi,

it works! And I have both a logger and a "real-time dashboard"

I was not able to find my existing USB RS485 so I bough a new one - not USB but a Pi-Shield (from Joy-IT, less than 10 Euro at reichelt.de). I guess it is similar in function to the one use by nibepi.

The image with NodeRed etc. works just out of the box.

Next, I started hacking my first real JavaScript program ever emoji

MQTT is really simple with node.js so I had the first data from heat pump after a few minutes. Now I have a console based dashboard (updates whenever one of the values has changed) that logs once a minute to a file in CSV format. 

To put this into perspective: It took me (experienced programmer but never really used JavaScript before) appr. two hours to build this. Obviously, this was only possibe due to the really impressive work by nibepi and his great idea of using pub/sub for this purpose.

I ran into some problems with data types (esp. on s32 and u32) but I guess this is due to my non-existing JavaScript skills so I will solve that later.

However, there is one problem that seems to be related to NibePi: I have register 43514 (relay state in order to see if hot water is running) defined as part of my favorites. It is logged to USB (so LOG.SET worked) but it is not published by NibePi. However, if I add it manually (mosquitto_pub -h nibepi -t nibe/register/add -m "43514"), everything works as expected so the receiving side seems to work (even the very simple one: mosquitto_sub -h nibepi -t 'nibe/modbus/43514'). It just does not publish it as part of the favorites.

But, overall, it is really great! Thank you very much for this work!

Since I have no fancy GUI but just console, this is how it looks now:

AT: 7.8 IT: 21.9
VL: 24.7 RL RL [Rücklauf]: 22.7 exVL: 24.7 VLsoll: 24.6
Kond.VL: 24.6 Heissgas: 41.9 Sauggas: 9
SoleEin: 6.2 SoleAus: 3
BWoben: 44.6 BWunten: 43.8
WQ: 1 % WT: 49 % WT: 14.8 l/min
Kompr. 28 Hz Relais: 7 Starts: -186
-501.7 GM
Spreizung: 2.00 Leistung: 2065 W

(it is much easier to read on a fixed font console than here in the forum)

The power is calculated from the other values.

And, even better: Writing works!

mosquitto_pub -h nibepi -t "nibe/modbus/47414/set" -m "48"

...and the supply pump goes to 48%.

Next step: I will change my old script on the other Pi that reads the smart meters using modbus in a way that the power values are also published on MQTT. This way, my logger will read them in parallel to the heat pump values. This gives real-time coefficient of performance and a nice mapping of thermal and electrical power.

@NibePi: Have I understood you correctly (Posting from 11/22 at 9:53) that requesting a single read of a register (not part of favorite) is not yet implemented but will come in 1.1? 

Reading some non-favorites by adding them first works perfect so add/waiting for message / remove will be a work around.

Greetings,

Jan

3
  •  moef
  •   Gold-Award
29.11.2019  (#119)
Gratuliere 👍🤗👍

1
  •  SMiak
  •   Bronze-Award
29.11.2019  (#120)
Hi Jan,

do you also connected GND between rpi and the heatpump?
In general the cheapest way to build a Modbus gateway is to use a NodeMCU with rs485 and DC-DC step down converter. Costs are then only ~10 €

Greetings,
Maik

1
  •  JanRi
  •   Gold-Award
29.11.2019  (#121)
Hi,

GND is not connected as it is usually not needed by RS485.

However, during the night I experienced two modbus alarms. Nibepi automatically resets those, therefore it has no impact, but this should not happen.

Maybe GND is really an issue, but actually I see two other possible reasons:

First, Uplink was still connected. Now, I disconnected the network in order to find out if this was the reason.

Second, I still have an USB stick connected in logging mode. As the same LOG.SET applies both to USB log and modbus, there might be a connection. I will try removing the USB stick if Uplink was not the reason.

Greetings,

Jan

1


Beitrag schreiben oder Werbung ausblenden?
Einloggen

 Kostenlos registrieren [Mehr Infos]


next