Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Modbus adapter

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    Modbus adapter

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

      Guten Morgen,

      wie läuft das mit der Device-ID? Ich habe mir auch mal das Superprogramm zugelegt. Den Wechselrichter muss ich mit der Device-ID 3 ansprechen, sonst kommt nur 65535…FF.

      721_deviceid.jpg

      721_objekte.jpg

      721_userid.jpg

      Gruß Marco

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

        @Bluefox: Verständnisfrage: Du verwendest den TooTallNate stack, ist es so, dass man mit dieser library nur RAW-Daten lesen und schreiben kann und man das ganze Zahlenhandling dann selbst macht?

        1 Reply Last reply Reply Quote 0
        • M
          Marcolotti last edited by

          Hallo,

          Danke Bluefox für das Update mit der DeviceID.

          Was für mich wirklich irreführend ist, ist die Adressierung.

          Wenn ich die 30803 z.B. für die Netzfrequenz angebe, macht er daraus eine 30802.
          721_objekte.jpg

          Der Valuewert ist nicht richtig.

          Im RMM sieht es so aus und ist korrekt:
          721_rmm.jpg

          4998=49,98Hz

          Wie lese ich nun die zweite Zeile aus. Alle Adresse haben den Inhalt in der zweiten Zeile bzw. bestehend aus erster und zweiter Zeile.

          Bei mir kommt entweder -1 oder eine utopische Zahl heraus. Habe schon mit allen möglichen Varianten versucht. 😢

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

            Entwarnung:
            > bei hohen Zahlenwerten scheint auch noch ein Problem. Ein Float der in Radzio 1,76365E0006 ergibt, stoppt den modbus-adapter - log:
            Dies kam zustande, weil ich das Register in "holdingRegisters" definiert habe. Richtig wäre gewesen: "inputRegisters", zumindest läufts jetzt.

            oft wird inputRegisters und holdingRegisters verwechselt. inputRegisters sind reine Lese-Register, während holdingRegisters RW sind.

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

              Erste Erfolge:

              Messwerte aus Siemens PAC 3200 in iobroker
              291_modbus.png

              1 Reply Last reply Reply Quote 0
              • M
                Marcolotti last edited by

                Guten Abend.

                Kann das sein, dass beim Signed32 die Werte multipliziert werden?

                721_modbus-poll.jpg

                Gruß Marco

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

                  Nein. Die Werte werde richtig geliefert. (Getestet mir Radzio MMS)

                  1 Reply Last reply Reply Quote 0
                  • M
                    Marcolotti last edited by

                    😐 😢

                    Hilft das vielleicht weiter? (Transmission.log vom Radzio!)

                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x75</rx> 
                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x73</rx> 
                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x73</rx> 
                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x76</rx> 
                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x86</rx> 
                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x88</rx> 
                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x8C</rx> 
                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x97</rx> 
                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x95</rx> 
                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x93</rx> 
                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x94</rx> 
                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x93</rx> 
                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x93</rx> 
                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x92</rx> 
                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x92</rx> 
                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x92</rx> 
                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x67</rx> 
                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x55</rx> 
                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x54</rx> 
                    <tx>0x00 0x00 0x00 0x00 0x00 0x06 0x03 0x04 0x78 0x91 0x00 0x02</tx> 
                    <rx>0x00 0x00 0x00 0x00 0x00 0x07 0x03 0x04 0x04 0x00 0x00 0x05 0x54</rx> 
                    
                    1 Reply Last reply Reply Quote 0
                    • Bluefox
                      Bluefox last edited by

                      > Hilft das vielleicht weiter? (Transmission.log vom Radzio!)
                      Da sehe ich jetzt, dass da 2 InputRegister vom DeviceID 3 gelesen werden 30865 und 30866 und es kommt zurück ~1395.

                      Wie sehen deine Einstellungen aus?

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

                        @Marcolotti - was beinhaltet die Adresse 30865 ? was steht da in Deiner Tabelle 2 U32 FIX2 RO ???

                        1 Reply Last reply Reply Quote 0
                        • M
                          Marcolotti last edited by

                          @Starfisch

                          Die Adresse 30865 steht für den Netzbezug, d.h. welche Leistung ich vom Energieversorger momentan beziehe. Der Wechselrichter holt sich die Information via Broadcast vom SMA Energy Meter. Dafür hatte ich eigens ein Node-Red-Flow gebaut, der dann hoffentlich überflüssig wird.

                          Die Information zu Einspeisung und Photovoltaik-Leistung rufe ich mit SBFspot alle 20 Sekunden ab. Das ist umständlich und alle 20 Sekunden ist schon recht lang. 🙂

                          Wenn man mehrere Wechselrichter hat, kann man z.B. die SunnyWebbox auslesen, die alle Wechselrichter zusammenfasst. Der ModBus-Adapter ist bzw. wäre daher ein sehr mächtiges Tool.

                          Im Anhang habe ich für den SMA SunnyBoy 1.5 & 2.5 die ModBus Adressen als Excel-Liste und eine Dokumentation von SMA hinterlegt.

                          Viele Grüße

                          Marco
                          721_modbus-sunnyboy-sb.xls
                          721_sma_modbus-tb-de-13.pdf

                          1 Reply Last reply Reply Quote 0
                          • M
                            Marcolotti last edited by

                            Guten Morgen,

                            @BlueFox: Grandios! 2 Updates innerhalb einer Nacht. :mrgreen: :lol: Es funktioniert jetzt tadellos!

                            Ich bin begeistert. 😛

                            Vielen Dank für deine Mühe.

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

                              dann kann man die Sache ja abhaken … ist schon eine beachtliche Leistung von Bluefox, wenn man bedenkt, dass er die Geräte nicht vorliegen hat.

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

                                dafür läufts bei mir nach dem update nicht mehr:

                                host-odroid	2015-10-27 08:34:18	info	Restart adapter system.adapter.modbus.0 because enabled
                                host-odroid	2015-10-27 08:34:18	error	instance system.adapter.modbus.0 terminated with code 6 (uncaught exception)
                                TypeError:	2015-10-27 08:34:18	error	at Decoder.Emitter.emit (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/node_modules/component-emitter/index.js:134:20)
                                TypeError:	2015-10-27 08:34:18	error	at Decoder. (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/node_modules/component-bind/index.js:21:15)
                                TypeError:	2015-10-27 08:34:18	error	at Manager.ondecoded (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/manager.js:301:8)
                                TypeError:	2015-10-27 08:34:18	error	at Manager.Emitter.emit (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/node_modules/component-emitter/index.js:134:20)
                                TypeError:	2015-10-27 08:34:18	error	at Manager. (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/node_modules/component-bind/index.js:21:15)
                                TypeError:	2015-10-27 08:34:18	error	at Socket.onpacket (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/socket.js:220:12)
                                TypeError:	2015-10-27 08:34:18	error	at Socket.onack (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/socket.js:295:6)
                                TypeError:	2015-10-27 08:34:18	error	at Socket. (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:623:35)
                                TypeError:	2015-10-27 08:34:18	error	at /opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:680:21
                                TypeError:	2015-10-27 08:34:18	error	at /opt/iobroker/node_modules/iobroker.modbus/main.js:691:65
                                TypeError:	2015-10-27 08:34:18	error	Cannot read property 'len' of undefined
                                uncaught	2015-10-27 08:34:18	error	exception: Cannot read property 'len' of undefined
                                modbus-0	2015-10-27 08:34:18	info	starting. Version 0.3.2 in /opt/iobroker/node_modules/iobroker.modbus
                                

                                versuch mal reboot

                                reboot hat nichts gebracht …

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

                                  hab zum Testen mal ne neue modbus-instanz erzeugt. das hat nichts geändert. folgendes konnte ich feststellen:

                                  • ein holding register eintrag funktioniert nur, wenn zuvor ein input register definiert wurde.

                                  • bei den Objekten wird kein input-register folder erzeugt (siehe Bild unten)

                                  • die input-register daten werden aber bei den Ereignissen angezeigt.

                                  • bestimmte register, die vorher als holding-register eingetragen werden mussten funktionieren nur noch als input-register

                                  vielleicht helfen diese Angaben …(?)

                                  291_unbenannt.png

                                  Nachtrag 1: 20 Minuten später war der input-register folder da mitsamt den dazugehörigen datenpunkten, diesen Punkt kann man streichen.
                                  291_nach_20min.png

                                  leider wird in meiner Register-Liste nicht erwähnt, welche Register RO und welche RW sind. Aber irgendwie plausibel ist das schon, dass die gemessenen Netzspannungen RO sind, und deshalb in die Input-Registers gehören.

                                  Nachtrag 2: hab jetzt alle Datenpunkte in "Input Registers" gezügelt. Scheint mir logisch, und alles funktioniert wieder wie vorher.

                                  ( :lol: :lol: :lol: Geduld kostet nichts - ausser Nerven :lol: :lol: :lol:)

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

                                    @starfish:

                                    dafür läufts bei mir nach dem update nicht mehr:

                                    host-odroid	2015-10-27 08:34:18	info	Restart adapter system.adapter.modbus.0 because enabled
                                    host-odroid	2015-10-27 08:34:18	error	instance system.adapter.modbus.0 terminated with code 6 (uncaught exception)
                                    TypeError:	2015-10-27 08:34:18	error	at Decoder.Emitter.emit (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/node_modules/component-emitter/index.js:134:20)
                                    TypeError:	2015-10-27 08:34:18	error	at Decoder. (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/node_modules/component-bind/index.js:21:15)
                                    TypeError:	2015-10-27 08:34:18	error	at Manager.ondecoded (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/manager.js:301:8)
                                    TypeError:	2015-10-27 08:34:18	error	at Manager.Emitter.emit (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/node_modules/component-emitter/index.js:134:20)
                                    TypeError:	2015-10-27 08:34:18	error	at Manager. (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/node_modules/component-bind/index.js:21:15)
                                    TypeError:	2015-10-27 08:34:18	error	at Socket.onpacket (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/socket.js:220:12)
                                    TypeError:	2015-10-27 08:34:18	error	at Socket.onack (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/socket.js:295:6)
                                    TypeError:	2015-10-27 08:34:18	error	at Socket. (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:623:35)
                                    TypeError:	2015-10-27 08:34:18	error	at /opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:680:21
                                    TypeError:	2015-10-27 08:34:18	error	at /opt/iobroker/node_modules/iobroker.modbus/main.js:691:65
                                    TypeError:	2015-10-27 08:34:18	error	Cannot read property 'len' of undefined
                                    uncaught	2015-10-27 08:34:18	error	exception: Cannot read property 'len' of undefined
                                    modbus-0	2015-10-27 08:34:18	info	starting. Version 0.3.2 in /opt/iobroker/node_modules/iobroker.modbus
                                    

                                    versuch mal reboot

                                    reboot hat nichts gebracht … `
                                    Ändere bitte die Zeile 691 in /opt/iobroker/node_modules/iobroker.modbus/main.js von

                                    `lastAddress = address + main.ac.inputRegs[i].len;` 
                                    auf
                                    `~~[code]~~lastAddress = address + main.ac.holdingRegs[i].len;` 
                                    
                                    Richtiger Fix kommt dann am Abend.[/i][/code][/i]
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      starfish last edited by

                                      hallo Bluefox, danke für die Antwort. Ich habe jetzt alles unter inputregisters eingereiht, was m.M. auch Sinn macht. So funktioniert alles im Moment.

                                      Unabhängig von Deinem Fix stellt sich jetzt die Frage nach dem RW bzw. RO der modbus-Register. Leider ist meine Tabelle diesbezüglich nicht klar. Aber Messwerte überschreiben ist eigentlich unlogisch, sodass input-registers passt. Anders verhält es sich bei akkumulierenden Zählern, die man dann und wann gern mal auf Null stellen möchte oder bei Ausgängen. Ich bin schon mal happy, dass es so läuft, wie es jetzt läuft.

                                      LG Beat
                                      3723_unbenannt3.png

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

                                        ist das nicht so:

                                        • RW - holding registers

                                        • RO - input registers

                                        ??

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

                                          ja, genau - deshalb sind meine messwerte jetzt alle in input registers. Schreiben musste ich noch nie, deshalb kann ich nichts dazu sagen. (ist das überhaupt schon implementiert?)

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

                                            > ist das überhaupt schon implementiert?
                                            Ja. Muss gehen.

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate
                                            FAQ Cloud / IOT
                                            HowTo: Node.js-Update
                                            HowTo: Backup/Restore
                                            Downloads
                                            BLOG

                                            773
                                            Online

                                            31.8k
                                            Users

                                            80.0k
                                            Topics

                                            1.3m
                                            Posts

                                            modbus modbus adapter
                                            140
                                            970
                                            331061
                                            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