Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Entwicklung
    4. "Homematic Manager Adapter" First Steps

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    "Homematic Manager Adapter" First Steps

    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      versteckt last edited by

      So, Config wird richtig gebaut, funktioniert auch wunderbar mit "Änderungen zur Laufzeit".

      Jetzt aber eine blöde Frage, ist es möglich, bestehende Instanzen (in diesem Fall hm-rpc) abzufragen, welche Config

      dort beinhaltet ist?

      Weil dann könnte ich gleich direkt die bestehenden hm-rpc Adapter einbinden und müsste diese nicht doppelt konfigurieren.

      1 Reply Last reply Reply Quote 0
      • V
        versteckt last edited by

        Anbei mal eine Ansicht der Admin Einstellungen des Adapters.
        301_admin-console.png

        1 Reply Last reply Reply Quote 0
        • S
          StefSign last edited by

          Hallo versteckt,

          na Du legst ein Tempo hin…

          🙂

          Leider kann ich dir (momentan) nicht direkt weiterhelfen. Bin gerade dabei mit Webstorm mir eine Entwicklungsumgebung aufzubauen.

          Fragen:

          Wie könnte man den Sourcecode sharen?

          Was nutzt Du zum entwickeln? Ich hoffe nicht vi.

          Danke

          Steve

          1 Reply Last reply Reply Quote 0
          • Bluefox
            Bluefox last edited by

            @versteckt:

            So, Config wird richtig gebaut, funktioniert auch wunderbar mit "Änderungen zur Laufzeit".

            Jetzt aber eine blöde Frage, ist es möglich, bestehende Instanzen (in diesem Fall hm-rpc) abzufragen, welche Config

            dort beinhaltet ist?

            Weil dann könnte ich gleich direkt die bestehenden hm-rpc Adapter einbinden und müsste diese nicht doppelt konfigurieren. `
            Du kannst hm-rega abschauen.

            https://github.com/ioBroker/ioBroker.hm … index.html

            Es gibt schon fertige Funktion:

            `var instances = {};
            getAdapterInstances('hm-rpc', function (arr) {
               var count = arr.length;
               for (var i = 0; i < arr.length; i++) {
                    getObject('system.adapter.' + arr[i], function(err, obj) {
                         instances[obj._id] = obj;
                         count--;
                         if (!count) {
                            // finished, do something with your array
                            console.log(JSON.stringify(instances));
                         }
                    }
               }
               console.log(JSON.stringify(arr));
            }` [/i]
            
            1 Reply Last reply Reply Quote 0
            • S
              StefSign last edited by

              …oder vielleicht doch.

              Die Konfiguration von Adaptern steht doch in einem ibBroker Object wie hm-rpc oder system.adapter.hm-rpc?

              Steve

              1 Reply Last reply Reply Quote 0
              • Bluefox
                Bluefox last edited by

                @StefSign:

                …oder vielleicht doch.

                Die Konfiguration von Adaptern steht doch in einem ibBroker Object wie hm-rpc oder system.adapter.hm-rpc?

                Steve `
                Die steht in "system.adapter.hm-rpc.X", wo X Instanznummer ist.

                1 Reply Last reply Reply Quote 0
                • V
                  versteckt last edited by

                  Im Moment benutze ich noch Xcode, bin ja auf Apple unterwegs.

                  Muss erst mal schauen, inwiefern ich Eclipse einsetze. Komm ja noch aus der C bzw. Java Schiene, ist halt auch schon 12 Jahre her.

                  Werde mal versuchen die Objekte so auszulesen und dann mal ein Paket schnüren, damit es alle nutzen können.

                  1 Reply Last reply Reply Quote 0
                  • Bluefox
                    Bluefox last edited by

                    @StefSign:

                    • Gibt es eine Doku wie man aus einem eigenen ioBroker Adapter ein NPM Installations Packet erzeugt? Ich denke dies steckt im Gruntfile.js? `
                      Nein. Das ist allein package.json.
                    • Erst Account auf https://www.npmjs.com/ erzeugen.

                    • Danach````
                      npm init

                    
                    - Danach packet.json ergänzen ([https://docs.npmjs.com/files/package.json](https://docs.npmjs.com/files/package.json) oder bei anderen Adapter abschauen)
                    
                    -````
                    npm publish
                    

                    ioBroker Adapters müssen immer mit "iobroker." anfangen, sonst werden die ignoriert beim start.

                    @StefSign:

                    • Welche Architektur/Pattern steckt in ioBroker und seinen Adaptern? Ein paar Stichpunkte reichen natürlich. `
                      Example ist gar nicht so schlecht um zu verstehen wie einen Adapter funktioniert. Ich suche immer noch die Inspiration für ADAPTER.md :?
                    1 Reply Last reply Reply Quote 0
                    • V
                      versteckt last edited by

                      Bin die Woche ziemlich ausgelastet, werde also erst am Samstag versuchen die Daten hochzuladen.

                      Gesendet von meinem iPhone mit Tapatalk

                      1 Reply Last reply Reply Quote 0
                      • V
                        versteckt last edited by

                        Bin heute mal ein Stück weitergekommen:

                        Es werden nun automatisch alle hm-rpc Objekte in die Admin Seite geladen.

                        Somit muss man diese nicht manuell reinkonfigurieren.

                        Das Thema mit npm Install kommt dann als nächstes dran, hatte heute schon mal Zeit mich ein wenig einzulesen.

                        301_admin-console.png

                        1 Reply Last reply Reply Quote 0
                        • V
                          versteckt last edited by

                          Es ist vollbracht, eine initiale Version des iobroker.hmm ist in Git bzw. npm zu finden.

                          Bitte nicht erschlagen, es ist noch nichts dokumentiert und sicherlich Fehler behaftet.

                          Ausserdem sind beide Abhängigkeiten im Git mitdrinnen.

                          Könnt ihr trotzdem mal versuchen diesen zu installieren (im ioBroker Root-Dir einfach "npm install iobroker.hmm" eingeben)?

                          Dann weiss ich zumindest gleich mal, was ich alles noch machen muss.

                          1 Reply Last reply Reply Quote 0
                          • V
                            versteckt last edited by

                            Und gleich eine Installationsanleitung hinterhergeschossen GG:

                            cd IOBROKERDIR

                            npm install iobroker.hmm

                            cd node_modules/iobroker.hmm/node_modules

                            curl -o master.zip https://codeload.github.com/hobbyquaker … zip/master

                            unzip master.zip

                            rm master.zip

                            mv homematic-manager-master homematicmanager

                            cd homematicmanager

                            npm install

                            Danach in der Admin Seite den Adapter hinzufügen.

                            Dieser muss dann noch konfiguriert werden.

                            Ich habe die RPC Listen IP immer auf ein physikalisches Interface gesetzt.

                            Wenn bereits hm-rpc Adapter da sind, werden diese in der Liste automatisch gesetzt.

                            Falls kein hm-rpc Adapter aktiv ist, müssen folgende Parameter gesetzt werden:

                            Name: Ein aussagekräftiger Name

                            Type: BidCos-RF

                            IP: Die IP-Adresse des Homegear / CCU2

                            Port: 2001

                            isCcu: true

                            init: true

                            1 Reply Last reply Reply Quote 0
                            • Homoran
                              Homoran Global Moderator Administrators last edited by

                              ich habs versucht:

                              root@quad-pi:/opt/iobroker# npm install iobroker.hmm
                              npm http GET https://registry.npmjs.org/iobroker.hmm
                              npm http 200 https://registry.npmjs.org/iobroker.hmm
                              npm http GET https://registry.npmjs.org/iobroker.hmm/-/iobroker.hmm-0.0.6.tgz
                              npm http 200 https://registry.npmjs.org/iobroker.hmm/-/iobroker.hmm-0.0.6.tgz
                              npm http GET https://registry.npmjs.org/fs.notify
                              npm http 200 https://registry.npmjs.org/fs.notify
                              npm http GET https://registry.npmjs.org/retry
                              npm http GET https://registry.npmjs.org/async
                              npm http 200 https://registry.npmjs.org/async
                              npm http 200 https://registry.npmjs.org/retry
                              iobroker.hmm@0.0.6 node_modules/iobroker.hmm
                              └── fs.notify@0.0.4 (retry@0.6.1, async@0.1.22)
                              root@quad-pi:/opt/iobroker# cd node_modules/iobroker.hmm/node_modules
                              root@quad-pi:/opt/iobroker/node_modules/iobroker.hmm/node_modules# curl -o master.zip https://codeload.github.com/hobbyquaker ... zip/master
                                % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                                               Dload  Upload   Total   Spent    Left  Speed
                              100    21  100    21    0     0     33      0 --:--:-- --:--:-- --:--:--    46
                              curl: (6) Couldn't resolve host '...'
                              curl: (6) Couldn't resolve host 'zip'
                              root@quad-pi:/opt/iobroker/node_modules/iobroker.hmm/node_modules# unzip master.zip
                              Archive:  master.zip
                                End-of-central-directory signature not found.  Either this file is not
                                a zipfile, or it constitutes one disk of a multi-part archive.  In the
                                latter case the central directory and zipfile comment will be found on
                                the last disk(s) of this archive.
                              unzip:  cannot find zipfile directory in one of master.zip or
                                      master.zip.zip, and cannot find master.zip.ZIP, period.
                              root@quad-pi:/opt/iobroker/node_modules/iobroker.hmm/node_modules# rm master.zip
                              root@quad-pi:/opt/iobroker/node_modules/iobroker.hmm/node_modules# mv homematic-manager-master homematicmanager
                              mv: Aufruf von stat für „homematic-manager-master“ nicht möglich: Datei oder Verzeichnis nicht gefunden
                              root@quad-pi:/opt/iobroker/node_modules/iobroker.hmm/node_modules# cd homematicmanager
                              -bash: cd: homematicmanager: Datei oder Verzeichnis nicht gefunden
                              root@quad-pi:/opt/iobroker/node_modules/iobroker.hmm/node_modules# npm install
                              npm WARN package.json iobroker.hmm@0.0.6 No repository field.
                              root@quad-pi:/opt/iobroker/node_modules/iobroker.hmm/node_modules#
                              
                              

                              sagt dir das was?

                              1 Reply Last reply Reply Quote 0
                              • V
                                versteckt last edited by

                                Ja, die URL ist falsch.

                                Kopiere sie dir bitte mit "rechter Maustaste | Copy Link (oder was auch immer).

                                Wenn du den Text so kopierst, kopiert er die URL mit …

                                1 Reply Last reply Reply Quote 0
                                • Homoran
                                  Homoran Global Moderator Administrators last edited by

                                  danke, ich bin ja blind :oops:

                                  das hätte ich ja nu wirklich selbst sehen können.

                                  Gruß

                                  Rainer

                                  1 Reply Last reply Reply Quote 0
                                  • V
                                    versteckt last edited by

                                    Kein Problem, ich bin leider schon "Betriebsblind"…

                                    Gesendet von meinem iPhone mit Tapatalk

                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      StefSign last edited by

                                      Hallo Husky (Versteckt?)

                                      CHAPEAU!

                                      🙂

                                      Steve

                                      1 Reply Last reply Reply Quote 0
                                      • V
                                        versteckt last edited by

                                        Cool, gleich auf Anhieb?

                                        Na dann werde ich mal Doku schreiben gehen!

                                        Gesendet von meinem iPhone mit Tapatalk

                                        1 Reply Last reply Reply Quote 0
                                        • Homoran
                                          Homoran Global Moderator Administrators last edited by

                                          Hat alles geklappt, aber…... 😉
                                          144_iobroker_adapter_hmm02.jpg
                                          Der Port mit :8080 ist vielleicht nicht sinnvoll, wenn noch etwas anderes auf dem RasPi laufen soll.

                                          144_iobroker_adapter_hmm01.jpg
                                          So sieht es beim Reiter "Adapter aus".

                                          ich nehme an, dass die fehenden Infos kommen, wenn der Adapter im offizielen repository (und im admin) enthalten ist.

                                          Super Arbeit

                                          Gruß

                                          Rainer

                                          1 Reply Last reply Reply Quote 0
                                          • S
                                            StefSign last edited by

                                            Hallo Husky,

                                            würde es Sinn machen es (die Doku) in unser ioBroker Github Wiki einzufügen?

                                            BTW, werde gleich mal den Debugger anschmeissen um des Pudels Kern …äh HMM Kern anzusehen.

                                            🙂

                                            Steve

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            849
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            8
                                            66
                                            12419
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo