« Heizung, Lüftung, Klima  |

DIY Alternative zu Nibe Modbus Modul

Teilen: facebook    whatsapp    email
 
 <  1  2 ... 3  4  5  6 ... 7 ... 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
22.11.2019  (#81)
Hi,

at the moment I'm using csv-files written by shell- and python-scripts emoji but I see the advantages of the databased solution. Maybe some time...

zitat..
denis schrieb: that a MQTT topic which contains one complete snapshot of favorites data ist not really needed


I agree to that. If our client really gets the whole favorite set every time the heat pump send it, we do not need such a topic.

Greetings,

Jan

1
  •  nibepi
22.11.2019  (#82)

zitat..
JanRi schrieb: Remaining question: How do we write a register to heat pump? Is there a special topic the appropriate NibePi component is subscribed to? Then, if our client publishes a write request on that topic it will be written to heat pump? Or is this done differently?

You can publish your data to the same topic you subscribe to, but add "/set" in the end.
Example: Topic: "nibe/modbus/47398/set" Message: "20.5"
Will change the indoor temperature setpoint to 20.5, and topic "nibe/modbus/47398" will get updated ASAP. Because a set always triggers a get.
There are safety features in the worker which checks the data you want to send to see if it is within the MIN-MAX range, and that the register is writeable.
Is anyone here interested in testing the NodeRED nodes when I have gotten that far for beta testing? Requirments are NodeRED running with some sort of RS485 converter.

Have I mentioned that I'm also working to support the new S-series. It's very easy because it has an built in Modbus TCP/IP.
The older Fighter series with RS485 communication will also get supported with reading and writing. With the same NodeRED nodes, just another backend.


1
  •  JanRi
  •   Gold-Award
22.11.2019  (#83)
Hi,

zitat..
nibepi schrieb: Example: Topic: "nibe/modbus/47398/set" Message: "20.5"


That's simple and nice.

Today I prepared an old Pi 2 with your image (1.0.6) adopted to USB-RS485. Unfortunately, I have not yet found my spare RS485 adapter (I bought it before we moved into the house so it is some... most likely I will buy a new one since 2,6 Euro is not that expensive compared to hours of searching...). NodeRed is running on that image and I started to get famliar with it (obviously only up to the point it needs the connection to the heat pump).

You wrote earlier that MQTT etc. is planned for the 1.1 release. However, according to your README (and its automatic translation) a lot of nice stuff already works on the 1.0.6 image.

Is there a simple way to connect an external subscriber (some in the network) to this version (image 1.0.6)? Ideally would be a small (Linux) command line program (shell, js, ...) that just subscribes to one topic and prints all notifications it gets to stdout. As I'm more the C/Assembler/Python/Shellscript-guy, a pointer or code in this direction would be an ideal starting point. Maybe there is already some generic simple client...

zitat..
nibepi schrieb: Is anyone here interested in testing the NodeRED nodes when I have gotten that far for beta testing?

 
If detailled knowledge on NodeRed is not required, I guess I can help with testing. However, I'm not yet sure whether NodeRed is needed at all for my purpose... basically, it looks like I'm happy with receiving and sending notifications (but this might change).

Greetings,

Jan


1
  •  nibepi
22.11.2019  (#84)

zitat..
JanRi schrieb: You wrote earlier that MQTT etc. is planned for the 1.1 release. However, according to your README (and its automatic translation) a lot of nice stuff already works on the 1.0.6 image.

Yes, a lot of what I was talking about already works with 1.0.6. Like the /get, /set. Unfortunally you need a working serial connection to use the frontend to make sure it's running (nibepi:1880/ui)
Im sure there are many options of clients for Python among others. Maybe paho mqtt.
Im working with NodeJS so I dont have any examples for the other coding types.


zitat..
JanRi schrieb: If detailled knowledge on NodeRed is not required, I guess I can help with testing. However, I'm not yet sure whether NodeRed is needed at all for my purpose... basically, it looks like I'm happy with receiving and sending notifications (but this might change).

Now I would like someone with NodeRED experience to try it out so I can get some feedback.

Sorry for hijacking this forum btw btw [by the way, übrigens].




1
  •  chrismo
  •   Gold-Award
23.11.2019  (#85)
This is not hijacking emoji   This thread was created to discuss a DIY alternative for Nibe Modbus and this is exactly what you're doing here. I guess quite some ppl in this forum are interested in your solution, so happy to have you here and thank you for your efforts!

1
  •  JanRi
  •   Gold-Award
23.11.2019  (#86)
Hi,

zitat..
nibepi schrieb: Unfortunally you need a working serial connection to use the frontend to make sure it's running (nibepi:1880/ui)

 This is clear. 

Btw... I have a feature request that should be easy to implement: A kind of demo mode for testing without such connection that can be activated by not setting the serial device at all. In this demo mode, some registers are send with fixed values the same way as they would originate from the favorites, i.e., twice per second. This would be great in order to test loggers, controllers, etc. in a non-invasive way without interrupting heat pump operation. My plan is to start some basic version as soon as possible and to develop something more advanced in parallel (on an other computer, obviously) while the first version is used.


zitat..
nibepi schrieb: Now I would like someone with NodeRED experience


Not at the moment... maybe after implementing a logger based on this.


zitat..
nibepi schrieb: Sorry for hijacking this forum btw btw [by the way, übrigens].

No problem at all as this perfectly fits the topic.

Greetings,

Jan


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

yesterday I looked through the code and I guess I have a better understanding now. In order to check this, two questions:

First: Is it correct that the minimum working system on a RPi (equipped with RS485 and connected to heat pump) would just run "nodejs heatpump.js" in a way that it connects to an external Mosquitto broker some in the net? Everything else then connects to that broker.

Second: The configuration above is not safe with respect to restarts after power outage as it relys on the external broker that maybe fails while starting. Therefore, the minimum safe configuration would be "nodejs heatpump.js" on the RPi connected to a Mosquitto broker also running on the RPi. Everything else is then remotely connected to that broker.

"everything else" means Node Red, some loggers, funny controllers, etc... so everything that can subscribe to topics and can publish topics. Furthermore, this implies that for a simple logger Node Red is not necessary as the logger can connect to the broker (however, it seems to be an reasonable way to implement the logger using Node Red).

Is this understanding correct?

Greetings,

Jan

1
  •  nibepi
24.11.2019  (#88)

zitat..
JanRi schrieb: First: Is it correct that the minimum working system on a RPi (equipped with RS485 and connected to heat pump) would just run "nodejs heatpump.js" in a way that it connects to an external Mosquitto broker some in the net? Everything else then connects to that broker.

For a minimal setup you can just run "node heatpump.js" and you need an local mosquitto broker installed with no passwords or user. You could modify the code to adapt to an external broker but as you mention, it's not safe.

Actually I'm not gonna spend a lot of time helping you modify/understand heatpump.js because I'm working on version 1.1 and everything is reworked. If you are interested building a own simple application just give me some time to make my new "core" ready. With that you can launch it simple with "node index.js -dev=/dev/ttyUSB0". Or you can build a new simple nodejs application which requires that file and the data will get availible to you in the code on a emitter.


2019/20191124762776.png

With this above code I load the new library that I'm building and it logs all data to console. This is all the code you need to launch and get the data logged on the console.


2019/20191124851040.png

So if you're interested just give me a couple of days to finish the code for the library and I can share the files with you.

1
  •  Becker
  •   Gold-Award
24.11.2019  (#89)
Hallo, kann mir Jemand in 2-3 Sätzen übersetzen was der Nibe-Pi alles kann ?

Hatte den Macher schon mal in FB gefragt ob ich damit per VPN von überall aus einfach die Servicemenüeinstellungen, sowie alle anderen Einstellungen ändern kann (z.B. WW-Luxus einmalig betätigen).
Bin aber nicht ganz schlau geworden.

1
  •  denis
  •   Silber-Award
24.11.2019  (#90)
Hallo @Becker, 

Hier ist es schon mal in ein paar mehr Sätzen zusammengefasst: 

https://www.energiesparhaus.at/forum-diy-alternative-zu-nibe-modbus-modul/52722_2#529529

Kurz zusammengefasst. NibePi hängt per RS485 an der Wärmepumpe. Alle Nachrichten (Modbus Register) die von der WP WP [Wärmepumpe] kommen, nimmt NibePI entgegen und published (verschickt) sie per MQTT (ein Message Bus) an entsprechende MQTT Topics. Ein MQTT Client z.B. Openhab im Netzwerk kann diese Topics subscriben und bekommt damit alle Änderungen mit. (und kann damit machen was er will, z.B. loggen)

Umgekehrt geht es auch. Wenn man einen MQTT Client nutzt und sich mit dem NibePI MQTT Broker verbindet. Dann kann man an bestimmte MQTT Topics Register Werte publishen (wie Luxus Modus aktivieren) welche NibePI subscribed hat. NibePI gibt diese per RS485 an die WP WP [Wärmepumpe] weiter und die WP WP [Wärmepumpe] übernimmt die Settings.

Wenn du jetzt von außen auf deinen Home Server per VPN Zugriff hast (keine Ahnung was du nutzt ich nenne jetzt mal nur OpenHab als Beispiel), dann kannst du also auch den Luxus Modus starten ja.

Wir werden z.B. auf unseren KNX Tastern einen WW WW [Warmwasser] Luxus Modus Menüpunkt haben. Hier sieht der Flow dann wie folgt aus: 

KNX Taster Activate Luxus Modus -> OpenHab empfängt KNX Paket -> OpenHab sendet per MQTT "Activate Luxus Modus" -> NibePi empängt per MQTT "Activate Luxus Modus" und gibt es per RS485 weiter an die WP WP [Wärmepumpe] -> Die WP WP [Wärmepumpe] aktiviert den LuxusModus

1
  •  JanRi
  •   Gold-Award
24.11.2019  (#91)
Hallo,

zitat..
nibepi schrieb: Actually I'm not gonna spend a lot of time helping you modify/understand heatpump.js

Sorry, that was not my intention. I wanted to understand it and - thanks to your help - this is done now. Thank you very much.

I even started with a simple logger that subscribes to the corresponding topics (not yet ready and not tested with real data as I still have no RS485 yet). Mit node.js connected to the broker this is as simple as you wrote.


zitat..
nibepi schrieb: If you are interested building a own simple application just give me some time to make my new "core" ready. With that you can launch it simple with "node index.js -dev=/dev/ttyUSB0".


Take as much time as you need - this new possibility looks great and also simple.

Greetings,

Jan

Now some german explanation for Becker:


zitat..
Becker schrieb: Hallo, kann mir Jemand in 2-3 Sätzen übersetzen was der Nibe-Pi alles kann ?


NibePi tut so, als wäre es ein Modbus 40. Es bekommt damit einen Datenstrom von der WP WP [Wärmepumpe], der sowohl aus den "Favoriten" besteht (bis zu 20 Werte per LOG.SET) als auch individuell angefragten Registern. Die erstgenannten kommen alle 0,5 Sekunden, die übrigen alle 2,1 x Anzahl der Register Sekunden. NibePi "publiziert" das unter Nutzung des "Publish/Subscribe"-Konzeptes. Dort gibt es einen Broker, an dem ein Client Interesse anmelden kann. Man kann z.B. einen Client programmieren, der den VL VL [Vorlauf] wissen will. Dann bekommt er immer dann eine Nachricht, wenn es neue VL VL [Vorlauf]-Daten gibt. Das geht auch mit mehreren Werten und kann dann beliebig weiterverarbeitet werden. Gelesen werden kann alles, was es über Modbus gibt, schreiben kann man alles, was mit Modbus geschrieben werden kann. Einfach mal den "Modbus Manager" installieren und da rumklickern, dann bekommt man einen Eindruck.

VPN usw. ist was anderes... dazu müsste jemand ein betreffendes Programm schreiben. In dem RPi-Image ist eine Node Red Anwendung dabei, die einiges grafisch kann. Wenn man das über VPN tunnelt und entsprechend erweitert, dann könntest du das Ziel erreichen. "Out-of-the-Box" aktuell aber nicht, aber da wird auch gerade intensiv dran programmiert.

Hilft das erstmal?

Viele Grüße,

Jan

Edit: Denis war schneller...

1
  •  denis
  •   Silber-Award
24.11.2019  (#92)
Ich würde aus NibePI auch das Thema VPN heraus halten. Für die ganzen HomeServer die die eigentliche Arbeit mit den Daten übernehmen gibt es unzählige VPN Lösungen (OpenHab bringt z.B. schon eine mit). NibePI soll so leichtgewichtig wie möglich bleiben und nur seinen simplen Job machen.

1
  •  uzi10
  •   Gold-Award
24.11.2019  (#93)
Wo kann ich die Konponenten kaufen oder welche alternativen gibts? Entweder ausverkauft oder nur in uk?

1
  • ▾ Werbung
    Energiesparhaus.at ist Teilnehmer des Amazon-Partnerprogramms, das zur Bereitstellung eines Mediums für Webseiten konzipiert wurde, mittels dessen durch die Platzierung von Partner-Links zu Amazon.de Entgelte verdient werden können.
Hallo uzi10, schau mal hier im Shop nach, da siehst du Preise und wirst sicher auch fündig.
  •  SMiak
  •   Bronze-Award
24.11.2019  (#94)
@Becker: Die aktuelle Version stellt eine Art Webseite (per node red) auf dem Rasperry Pi bereit. Dort kannst du diverse Einstellungen vornehmen und die aufgezeichneten Daten anschauen. Da du bereits VPN in dein Heimnetzwerk hast, kannst du auch von unterwegs auf die Webseite zugreifen und die Wärmepumpe bedienen.

Man könnte die Frage auch anders stellen, was kann nicht per Modbus gesteuert und ausgelesen werden.

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

zitat..
uzi10 schrieb: Wo kann ich die Konponenten kaufen oder welche alternativen gibts?



Alternative:

Einen RPi für ca. 30 Euro (gibt es überall), Netzteil dazu (USB, je nach Pi bis 3A, altes Handynetzteil mit Mikro-USB tut auch), dazu einen USB-RS485-Stick für 2,6 Euro (reichelt.de, Link siehe oben). Dazu noch eine 4-8 GB große Mikro-SD-Karte.

Vorteil: LAN statt WLAN, LAN erfordert beim PiZero nochmal eine weitere Komponente.

Das werde ich nächste Woche testen, wenn ich den Stick entweder gefunden oder neu gekauft habe. Das Image von NibePi läuft auf meinem alten RPi 2 schon wunderbar.

Viele Grüße,

Jan

1
  •  jaydee73
24.11.2019  (#96)
Wie bekommt ihr denn die Daten weiter auf den KNX Bus? Muss man da zwangsläufig nochmal über OpenHAB gehen? Oder kann man das direkt auch über eine Erweiterung für das NibePi realisieren? Ich habe mich mit nodered noch nicht wirklich beschäftigt, aber da gibt es doch auch KNX-"Module" oder wie auch immer das da heißt, oder? Hat das schon jemand am laufen?

1
  •  denis
  •   Silber-Award
24.11.2019  (#97)
Naja man kann es auch über NodeRed machen. Aber dann muss das Gerät auf dem NodeRed läuft auch an den KNX Bus angebunden sein. 

1
  •  jaydee73
24.11.2019  (#98)
Aber es hängt doch im WLAN (oder bei einem rpi3 im LAN), genau wie das KNX-IP-Interface. Naiv wie ich bin, dachte ich, das reicht.

1
  •  denis
  •   Silber-Award
24.11.2019  (#99)
Du hast Recht. Das war Blödsinn von meiner Seite. Ja du kannst auch direkt auf den KNX Bus über Node Red und ein IP Gateway. 

1
  •  uzi10
  •   Gold-Award
24.11.2019  (#100)
Also macht ihr das mit einen standard pi. 
Wie meint ihr es stellt eine Art Webseite bereit?
Man kann mit Nodes drauf zugreifen oder muss trotzdem wo Node Red laufen lassn. Oder täusch ich mich

1
  •  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


Beitrag schreiben oder Werbung ausblenden?
Einloggen

 Kostenlos registrieren [Mehr Infos]


next