Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Русский
    3. ioBroker
    4. ioBroker драйвера
    5. Драйвер ModBus

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Драйвер ModBus

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

      Добрый день всем.

      Столкнулся со странной штукой - установлен драйвер 0.4.5, хочу затащить в IOB данные с контроллера datakom via Modbus RTU.

      Для чего через socat был поднят виртуальный serial порт в системе (виртуалка VurtualBox).

      Тестовая утилитка modpoll видит устройство через виртуальный порт и прекрасно получает данные:

      ./modpoll -m rtu -a 1 -t 4 -r 48 -b 9600 -p none /dev/ttyvir0
      
      

      ! modpoll 3.4 - FieldTalk™ Modbus(R) Master Simulator
      ! Copyright (c) 2002-2013 proconX Pty Ltd
      ! Visit http://www.modbusdriver.com for Modbus libraries and tools.
      ! Protocol configuration: Modbus RTU
      ! Slave configuration...: address = 1, start reference = 48, count = 1
      ! Communication.........: /dev/ttyvir0, 9600, 8, 1, none, t/o 1.00 s, poll rate 1000 ms
      ! Data type.............: 16-bit register, output (holding) register table
      ! -- Polling slave... (Ctrl-C to stop)
      ! [48]: 120
      ! – Polling slave... (Ctrl-C to stop)
      ! [48]: 120
      ! – Polling slave... (Ctrl-C to stop)
      ! [48]: 120
      ! – Polling slave... (Ctrl-C to stop)
      ! [48]: 120
      Но тут мое счастье и закончилось. Драйвер не видит этот порт в упор в списке. Права 666 не помогли.

      Решил немного обмануть драйвер, сделал виртуальный порт как ttyS33. Результат - драйвер не видит ничего вообще. В списке undefined.

      Как пофиксить, никто не знает?

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

        Можешь создать в папке node_modules/iobroker.modbus файл port.js:

        var serialport = require('serialport');
        serialport.list(function (err, ports) {
        	console.log(JSON.stringify(ports, null, 2));
        	process.exit();
        });
        
        

        Запустить его из консоли node port.js

        Вот что я вижу:

        C:\ioBroker\node_modules\ioBroker.modbus>node port.js
        [
          {
            "comName": "COM3",
            "manufacturer": "Intel",
            "pnpId": "PCI\\VEN_8086&DEV_1E3D&SUBSYS_ABCDED&REV_04\\3&11583666&0&B3"
          },
          {
            "comName": "COM1",
            "manufacturer": "(����������� �����)",
            "pnpId": "ACPI\\PNP0501\\1"
          }
        ]
        

        А у тебя?

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

          @Bluefox:

          Можешь создать в папке node_modules/iobroker.modbus файл port.js:

          …..

          А у тебя? `

          А у меня вот что:

          ! root@spy-sh:/opt/iobroker/node_modules/iobroker.modbus# node ./port.js
          ! (node) v8::ObjectTemplate::Set() with non-primitive values is deprecated
          ! (node) and will stop working in the next major release.
          ! ==== JS stack trace =========================================
          ! Security context: 0x310f666cfb51 <js object="">#0#
          ! 1: .node [module.js:583] [pc=0x1fb2eb572ec4] (this=0x2c52d4005619 <an object/with/map/0x285de601a889="">#1#,module=0x92652d61fc1 <a module/with/map/0x285de601b7a9="">#2#,filename=0x92652d5f239 <string[96]: opt/iobroker/node_modules/iobroker.modbus/serialport/build/release/serialport.node="">)
          ! 2: load [module.js:473] [pc=0x1fb2eb53df12] (this=0x92652d61fc1</string[96]:></a> <a module/with/map/0x285de601b7a9="">#2#,filename=0x92652d5f239 <string[96]: opt/iobroker/node_modules/iobroker.modbus/serialport/build/release/serialport.node="">)
          ! 3: tryModuleLoad(aka tryModuleLoad) [module.js:432] [pc=0x1fb2eb53da3d] (this=0x310f66604381 <undefined>,module=0x92652d61fc1</undefined></string[96]:></a> <a module/with/map/0x285de601b7a9="">#2#,filename=0x92652d5f239 <string[96]: opt/iobroker/node_modules/iobroker.modbus/serialport/build/release/serialport.node="">)
          ! 4: _load [module.js:424] [pc=0x1fb2eb535222] (this=0x2c52d4005741 <js function/module/(sharedfunctioninfo/0x12e371b2be99)="">#3#,request=0x92652d5e1e9 <string[96]: opt/iobroker/node_modules/iobroker.modbus/serialport/build/release/serialport.node="">,parent=0x92652d4ded1</string[96]:></js></string[96]:></a> <a module/with/map/0x285de601b7a9="">#4#,isMain=0x310f66604271 <false>)
          ! 5: require [module.js:483] [pc=0x1fb2eb546d93] (this=0x92652d4ded1</false></a> <a module/with/map/0x285de601b7a9="">#4#,path=0x92652d5e1e9 <string[96]: opt/iobroker/node_modules/iobroker.modbus/serialport/build/release/serialport.node="">)
          ! 6: require(aka require) [internal/module.js:20] [pc=0x1fb2eb546ac6] (this=0x310f66604381 <undefined>,path=0x92652d5e1e9 <string[96]: opt/iobroker/node_modules/iobroker.modbus/serialport/build/release/serialport.node="">)
          ! 7: bindings [/opt/iobroker/node_modules/iobroker.modbus/node_modules/serialport/node_modules/bindings/bindings.js:76] [pc=0x1fb2eb56e3f6] (this=0x310f666e60e1 <js global/object="">#5#,opts=0x12e371ba7c61 <string[15]: serialport.node="">)
          ! 8: /* anonymous / [/opt/iobroker/node_modules/iobroker.modbus/node_modules/serialport/lib/bindings.js:3] [pc=0x1fb2eb56cf0e] (this=0x92652d45ef9 <an object/with/map/0xc8c151075e9="">#6#,exports=0x92652d45ef9 <an object/with/map/0xc8c151075e9="">#6#,require=0x92652d47551 <js function/require/(sharedfunctioninfo/0x12e371b5d751)="">#7#,module=0x92652d45ea9</js></an></an></string[15]:></js></string[96]:></undefined></string[96]:></a> <a module/with/map/0x285de601b7a9="">#8#,__filename=0x92652d43d31 <string[82]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/bindings.js="">,__dirname=0x92652d474e9 <string[70]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib="">)
          ! 9: _compile [module.js:556] [pc=0x1fb2eb546270] (this=0x92652d45ea9</string[70]:></string[82]:></a> <a module/with/map/0x285de601b7a9="">#8#,content=0x92652d46b01 <string[784]: 'use/strict';\n\nvar/bindings="require('bindings')('serialport.node');\nvar" listunix="require('./list-unix');\n\nvar" linux="process.platform" !="=" 'win32'/&&/process.platform/'darwin';\n\nfunction/listlinux(callback)/{\n/callback="callback" ||/function(err)/if/(err)/{/this.emit('error',/err)/}\n/}.bind(this);\n/return/listunix(callback);\n};\n\nvar/platformoptions="{};\nif" (process.platform/'win32')/vmin:/1,\n/vtime:/0\n/};\n}\n\nmodule.exports="{\n" close:/bindings.close,\n/drain:/bindings.drain,\n/flush:/bindings.flush,\n/list:/?/listlinux/:/bindings.list,\n/open:/bindings.open,\n/serialportpoller:/bindings.serialportpoller,\n/set:/bindings.set,\n/update:/bindings.update,\n/write:/bindings.write,\n/platformoptions:/platformoptions\n};\n="">,filename=0x92652d43d31 <string[82]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/bindings.js="">)
          ! 10: .js [module.js:565] [pc=0x1fb2eb53f4eb] (this=0x2c52d4005619 <an object/with/map/0x285de601a889="">#1#,module=0x92652d45ea9</an></string[82]:></string[784]:></a> <a module/with/map/0x285de601b7a9="">#8#,filename=0x92652d43d31 <string[82]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/bindings.js="">)
          ! 11: load [module.js:473] [pc=0x1fb2eb53df12] (this=0x92652d45ea9</string[82]:></a> <a module/with/map/0x285de601b7a9="">#8#,filename=0x92652d43d31 <string[82]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/bindings.js="">)
          ! 12: tryModuleLoad(aka tryModuleLoad) [module.js:432] [pc=0x1fb2eb53da3d] (this=0x310f66604381 <undefined>,module=0x92652d45ea9</undefined></string[82]:></a> <a module/with/map/0x285de601b7a9="">#8#,filename=0x92652d43d31 <string[82]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/bindings.js="">)
          ! 13: _load [module.js:424] [pc=0x1fb2eb535222] (this=0x2c52d4005741 <js function/module/(sharedfunctioninfo/0x12e371b2be99)="">#3#,request=0x12e371b61659 <string[10]: ./bindings="">,parent=0x2c52d40056b9</string[10]:></js></string[82]:></a> <a module/with/map/0x285de601b7a9="">#9#,isMain=0x310f66604271 <false>)
          ! 14: require [module.js:483] [pc=0x1fb2eb546d93] (this=0x2c52d40056b9</false></a> <a module/with/map/0x285de601b7a9="">#9#,path=0x12e371b61659 <string[10]: ./bindings="">)
          ! 15: require(aka require) [internal/module.js:20] [pc=0x1fb2eb546ac6] (this=0x310f66604381 <undefined>,path=0x12e371b61659 <string[10]: ./bindings="">)
          ! 16: /
          anonymous / [/opt/iobroker/node_modules/iobroker.modbus/node_modules/serialport/lib/serialport.js:16] [pc=0x1fb2eb54b32e] (this=0x2c52d40059f1 <an object/with/map/0xc8c151075e9="">#10#,exports=0x2c52d40059f1 <an object/with/map/0xc8c151075e9="">#10#,require=0x2c52d40057c9 <js function/require/(sharedfunctioninfo/0x12e371b5d751)="">#11#,module=0x2c52d40056b9</js></an></an></string[10]:></undefined></string[10]:></a> <a module/with/map/0x285de601b7a9="">#9#,__filename=0x2c52d4005981 <string[84]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/serialport.js="">,__dirname=0x2c52d4005959 <string[70]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib="">)
          ! 17: _compile [module.js:556] [pc=0x1fb2eb546270] (this=0x2c52d40056b9</string[70]:></string[84]:></a> <a module/with/map/0x285de601b7a9="">#9#,content=0x2c52d4008f99 <very long/string[13557]="">#12#,filename=0x2c52d4005981 <string[84]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/serialport.js="">)
          ! 18: .js [module.js:565] [pc=0x1fb2eb53f4eb] (this=0x2c52d4005619 <an object/with/map/0x285de601a889="">#1#,module=0x2c52d40056b9</an></string[84]:></very></a> <a module/with/map/0x285de601b7a9="">#9#,filename=0x2c52d4005981 <string[84]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/serialport.js="">)
          ! 19: load [module.js:473] [pc=0x1fb2eb53df12] (this=0x2c52d40056b9</string[84]:></a> <a module/with/map/0x285de601b7a9="">#9#,filename=0x2c52d4005981 <string[84]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/serialport.js="">)
          ! 20: tryModuleLoad(aka tryModuleLoad) [module.js:432] [pc=0x1fb2eb53da3d] (this=0x310f66604381 <undefined>,module=0x2c52d40056b9</undefined></string[84]:></a> <a module/with/map/0x285de601b7a9="">#9#,filename=0x2c52d4005981 <string[84]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/serialport.js="">)
          ! 21: _load [module.js:424] [pc=0x1fb2eb535222] (this=0x2c52d4005741 <js function/module/(sharedfunctioninfo/0x12e371b2be99)="">#3#,request=0x12e371b5d0d1 <string[10]: serialport="">,parent=0x2c52d400c4c9</string[10]:></js></string[84]:></a> <a module/with/map/0x285de601b7a9="">#13#,isMain=0x310f66604271 <false>)
          ! 22: require [module.js:483] [pc=0x1fb2eb546d93] (this=0x2c52d400c4c9</false></a> <a module/with/map/0x285de601b7a9="">#13#,path=0x12e371b5d0d1 <string[10]: serialport="">)
          ! 23: require(aka require) [internal/module.js:20] [pc=0x1fb2eb546ac6] (this=0x310f66604381 <undefined>,path=0x12e371b5d0d1 <string[10]: serialport="">)
          ! 24: /
          anonymous / [/opt/iobroker/node_modules/iobroker.modbus/port.js:1] [pc=0x1fb2eb54653f] (this=0x2c52d400c699 <an object/with/map/0xc8c151075e9="">#14#,exports=0x2c52d400c699 <an object/with/map/0xc8c151075e9="">#14#,require=0x2c52d400c591 <js function/require/(sharedfunctioninfo/0x12e371b5d751)="">#15#,module=0x2c52d400c4c9</js></an></an></string[10]:></undefined></string[10]:></a> <a module/with/map/0x285de601b7a9="">#13#,__filename=0x2c52d400c649 <string[50]: opt/iobroker/node_modules/iobroker.modbus/port.js="">,__dirname=0x2c52d400c621 <string[42]: opt/iobroker/node_modules/iobroker.modbus="">)
          ! 25: _compile [module.js:556] [pc=0x1fb2eb546270] (this=0x2c52d400c4c9</string[42]:></string[50]:></a> <a module/with/map/0x285de601b7a9="">#13#,content=0x2c52d400c7e9 <string[151]: var/serialport="require('serialport');\nserialport.list(function" (err,/ports)/{\n/console.log(json.stringify(ports,/null,/2));\n/process.exit();\n});\n="">,filename=0x2c52d400c649 <string[50]: opt/iobroker/node_modules/iobroker.modbus/port.js="">)
          ! 26: .js [module.js:565] [pc=0x1fb2eb53f4eb] (this=0x2c52d4005619 <an object/with/map/0x285de601a889="">#1#,module=0x2c52d400c4c9</an></string[50]:></string[151]:></a> <a module/with/map/0x285de601b7a9="">#13#,filename=0x2c52d400c649 <string[50]: opt/iobroker/node_modules/iobroker.modbus/port.js="">)
          ! 27: load [module.js:473] [pc=0x1fb2eb53df12] (this=0x2c52d400c4c9</string[50]:></a> <a module/with/map/0x285de601b7a9="">#13#,filename=0x2c52d400c649 <string[50]: opt/iobroker/node_modules/iobroker.modbus/port.js="">)
          ! 28: tryModuleLoad(aka tryModuleLoad) [module.js:432] [pc=0x1fb2eb53da3d] (this=0x310f66604381 <undefined>,module=0x2c52d400c4c9</undefined></string[50]:></a> <a module/with/map/0x285de601b7a9="">#13#,filename=0x2c52d400c649 <string[50]: opt/iobroker/node_modules/iobroker.modbus/port.js="">)
          ! 29: _load [module.js:424] [pc=0x1fb2eb535222] (this=0x2c52d4005741 <js function/module/(sharedfunctioninfo/0x12e371b2be99)="">#3#,request=0x12e371b53209 <string[50]: opt/iobroker/node_modules/iobroker.modbus/port.js="">,parent=0x310f66604201 <null>,isMain=0x310f666043c1 <true>)
          ! 30: /
          anonymous /(aka / anonymous /) [module.js:590] [pc=0x1fb2eb534cea] (this=0x310f66604381 <undefined>)
          ! 31: run(aka run) [bootstrap_node.js:394] [pc=0x1fb2eb534b68] (this=0x310f66604381 <undefined>,entryFunction=0x12e371b51381 <js function/module.runmain/(sharedfunctioninfo/0x12e371b2cc19)="">#16#)
          ! 32: startup(aka startup) [bootstrap_node.js:149] [pc=0x1fb2eb4448f2] (this=0x310f66604381 <undefined>)
          ! 33: /
          anonymous /(aka / anonymous /) [bootstrap_node.js:509] [pc=0x1fb2eb44274e] (this=0x310f66604201 <null>,process=0x310f666e1949</null></undefined></js></undefined></undefined></true></null></string[50]:></js></string[50]:></a> <a process/with/map/0xc8c15111619="">#17#)
          ! =====================
          ! ==== C stack trace ===============================
          ! 1: v8::Template::Set(v8::Localv8::name, v8::Localv8::data, v8::PropertyAttribute)
          ! 2: SerialportPoller::Init(v8::Localv8::object)
          ! 3: init
          ! 4: node::DLOpen(v8::FunctionCallbackInfo v8::valueconst&)
          ! 5: v8::internal::FunctionCallbackArguments::Call(void (
          )(v8::FunctionCallbackInfo v8::valueconst&))
          ! 6: 0x9ee352
          ! 7: 0x9eeb7e
          ! 8: 0x1fb2eb4092a7
          ! (node) v8::ObjectTemplate::Set() with non-primitive values is deprecated
          ! (node) and will stop working in the next major release.
          ! ==== JS stack trace =========================================
          ! Security context: 0x310f666cfb51 <js object="">#0#
          ! 1: .node [module.js:583] [pc=0x1fb2eb572ec4] (this=0x2c52d4005619 <an object/with/map/0x285de601a889="">#1#,module=0x92652d61fc1</an></js></v8::value></v8::value></v8::object></v8::data></v8::name></a> <a module/with/map/0x285de601b7a9="">#2#,filename=0x92652d5f239 <string[96]: opt/iobroker/node_modules/iobroker.modbus/serialport/build/release/serialport.node="">)
          ! 2: load [module.js:473] [pc=0x1fb2eb53df12] (this=0x92652d61fc1</string[96]:></a> <a module/with/map/0x285de601b7a9="">#2#,filename=0x92652d5f239 <string[96]: opt/iobroker/node_modules/iobroker.modbus/serialport/build/release/serialport.node="">)
          ! 3: tryModuleLoad(aka tryModuleLoad) [module.js:432] [pc=0x1fb2eb53da3d] (this=0x310f66604381 <undefined>,module=0x92652d61fc1</undefined></string[96]:></a> <a module/with/map/0x285de601b7a9="">#2#,filename=0x92652d5f239 <string[96]: opt/iobroker/node_modules/iobroker.modbus/serialport/build/release/serialport.node="">)
          ! 4: _load [module.js:424] [pc=0x1fb2eb535222] (this=0x2c52d4005741 <js function/module/(sharedfunctioninfo/0x12e371b2be99)="">#3#,request=0x92652d5e1e9 <string[96]: opt/iobroker/node_modules/iobroker.modbus/serialport/build/release/serialport.node="">,parent=0x92652d4ded1</string[96]:></js></string[96]:></a> <a module/with/map/0x285de601b7a9="">#4#,isMain=0x310f66604271 <false>)
          ! 5: require [module.js:483] [pc=0x1fb2eb546d93] (this=0x92652d4ded1</false></a> <a module/with/map/0x285de601b7a9="">#4#,path=0x92652d5e1e9 <string[96]: opt/iobroker/node_modules/iobroker.modbus/serialport/build/release/serialport.node="">)
          ! 6: require(aka require) [internal/module.js:20] [pc=0x1fb2eb546ac6] (this=0x310f66604381 <undefined>,path=0x92652d5e1e9 <string[96]: opt/iobroker/node_modules/iobroker.modbus/serialport/build/release/serialport.node="">)
          ! 7: bindings [/opt/iobroker/node_modules/iobroker.modbus/node_modules/serialport/node_modules/bindings/bindings.js:76] [pc=0x1fb2eb56e3f6] (this=0x310f666e60e1 <js global/object="">#5#,opts=0x12e371ba7c61 <string[15]: serialport.node="">)
          ! 8: /* anonymous / [/opt/iobroker/node_modules/iobroker.modbus/node_modules/serialport/lib/bindings.js:3] [pc=0x1fb2eb56cf0e] (this=0x92652d45ef9 <an object/with/map/0xc8c151075e9="">#6#,exports=0x92652d45ef9 <an object/with/map/0xc8c151075e9="">#6#,require=0x92652d47551 <js function/require/(sharedfunctioninfo/0x12e371b5d751)="">#7#,module=0x92652d45ea9</js></an></an></string[15]:></js></string[96]:></undefined></string[96]:></a> <a module/with/map/0x285de601b7a9="">#8#,__filename=0x92652d43d31 <string[82]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/bindings.js="">,__dirname=0x92652d474e9 <string[70]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib="">)
          ! 9: _compile [module.js:556] [pc=0x1fb2eb546270] (this=0x92652d45ea9</string[70]:></string[82]:></a> <a module/with/map/0x285de601b7a9="">#8#,content=0x92652d46b01 <string[784]: 'use/strict';\n\nvar/bindings="require('bindings')('serialport.node');\nvar" listunix="require('./list-unix');\n\nvar" linux="process.platform" !="=" 'win32'/&&/process.platform/'darwin';\n\nfunction/listlinux(callback)/{\n/callback="callback" ||/function(err)/if/(err)/{/this.emit('error',/err)/}\n/}.bind(this);\n/return/listunix(callback);\n};\n\nvar/platformoptions="{};\nif" (process.platform/'win32')/vmin:/1,\n/vtime:/0\n/};\n}\n\nmodule.exports="{\n" close:/bindings.close,\n/drain:/bindings.drain,\n/flush:/bindings.flush,\n/list:/?/listlinux/:/bindings.list,\n/open:/bindings.open,\n/serialportpoller:/bindings.serialportpoller,\n/set:/bindings.set,\n/update:/bindings.update,\n/write:/bindings.write,\n/platformoptions:/platformoptions\n};\n="">,filename=0x92652d43d31 <string[82]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/bindings.js="">)
          ! 10: .js [module.js:565] [pc=0x1fb2eb53f4eb] (this=0x2c52d4005619 <an object/with/map/0x285de601a889="">#1#,module=0x92652d45ea9</an></string[82]:></string[784]:></a> <a module/with/map/0x285de601b7a9="">#8#,filename=0x92652d43d31 <string[82]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/bindings.js="">)
          ! 11: load [module.js:473] [pc=0x1fb2eb53df12] (this=0x92652d45ea9</string[82]:></a> <a module/with/map/0x285de601b7a9="">#8#,filename=0x92652d43d31 <string[82]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/bindings.js="">)
          ! 12: tryModuleLoad(aka tryModuleLoad) [module.js:432] [pc=0x1fb2eb53da3d] (this=0x310f66604381 <undefined>,module=0x92652d45ea9</undefined></string[82]:></a> <a module/with/map/0x285de601b7a9="">#8#,filename=0x92652d43d31 <string[82]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/bindings.js="">)
          ! 13: _load [module.js:424] [pc=0x1fb2eb535222] (this=0x2c52d4005741 <js function/module/(sharedfunctioninfo/0x12e371b2be99)="">#3#,request=0x12e371b61659 <string[10]: ./bindings="">,parent=0x2c52d40056b9</string[10]:></js></string[82]:></a> <a module/with/map/0x285de601b7a9="">#9#,isMain=0x310f66604271 <false>)
          ! 14: require [module.js:483] [pc=0x1fb2eb546d93] (this=0x2c52d40056b9</false></a> <a module/with/map/0x285de601b7a9="">#9#,path=0x12e371b61659 <string[10]: ./bindings="">)
          ! 15: require(aka require) [internal/module.js:20] [pc=0x1fb2eb546ac6] (this=0x310f66604381 <undefined>,path=0x12e371b61659 <string[10]: ./bindings="">)
          ! 16: /
          anonymous / [/opt/iobroker/node_modules/iobroker.modbus/node_modules/serialport/lib/serialport.js:16] [pc=0x1fb2eb54b32e] (this=0x2c52d40059f1 <an object/with/map/0xc8c151075e9="">#10#,exports=0x2c52d40059f1 <an object/with/map/0xc8c151075e9="">#10#,require=0x2c52d40057c9 <js function/require/(sharedfunctioninfo/0x12e371b5d751)="">#11#,module=0x2c52d40056b9</js></an></an></string[10]:></undefined></string[10]:></a> <a module/with/map/0x285de601b7a9="">#9#,__filename=0x2c52d4005981 <string[84]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/serialport.js="">,__dirname=0x2c52d4005959 <string[70]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib="">)
          ! 17: _compile [module.js:556] [pc=0x1fb2eb546270] (this=0x2c52d40056b9</string[70]:></string[84]:></a> <a module/with/map/0x285de601b7a9="">#9#,content=0x2c52d4008f99 <very long/string[13557]="">#12#,filename=0x2c52d4005981 <string[84]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/serialport.js="">)
          ! 18: .js [module.js:565] [pc=0x1fb2eb53f4eb] (this=0x2c52d4005619 <an object/with/map/0x285de601a889="">#1#,module=0x2c52d40056b9</an></string[84]:></very></a> <a module/with/map/0x285de601b7a9="">#9#,filename=0x2c52d4005981 <string[84]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/serialport.js="">)
          ! 19: load [module.js:473] [pc=0x1fb2eb53df12] (this=0x2c52d40056b9</string[84]:></a> <a module/with/map/0x285de601b7a9="">#9#,filename=0x2c52d4005981 <string[84]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/serialport.js="">)
          ! 20: tryModuleLoad(aka tryModuleLoad) [module.js:432] [pc=0x1fb2eb53da3d] (this=0x310f66604381 <undefined>,module=0x2c52d40056b9</undefined></string[84]:></a> <a module/with/map/0x285de601b7a9="">#9#,filename=0x2c52d4005981 <string[84]: opt/iobroker/node_modules/iobroker.modbus/serialport/lib/serialport.js="">)
          ! 21: _load [module.js:424] [pc=0x1fb2eb535222] (this=0x2c52d4005741 <js function/module/(sharedfunctioninfo/0x12e371b2be99)="">#3#,request=0x12e371b5d0d1 <string[10]: serialport="">,parent=0x2c52d400c4c9</string[10]:></js></string[84]:></a> <a module/with/map/0x285de601b7a9="">#13#,isMain=0x310f66604271 <false>)
          ! 22: require [module.js:483] [pc=0x1fb2eb546d93] (this=0x2c52d400c4c9</false></a> <a module/with/map/0x285de601b7a9="">#13#,path=0x12e371b5d0d1 <string[10]: serialport="">)
          ! 23: require(aka require) [internal/module.js:20] [pc=0x1fb2eb546ac6] (this=0x310f66604381 <undefined>,path=0x12e371b5d0d1 <string[10]: serialport="">)
          ! 24: /
          anonymous / [/opt/iobroker/node_modules/iobroker.modbus/port.js:1] [pc=0x1fb2eb54653f] (this=0x2c52d400c699 <an object/with/map/0xc8c151075e9="">#14#,exports=0x2c52d400c699 <an object/with/map/0xc8c151075e9="">#14#,require=0x2c52d400c591 <js function/require/(sharedfunctioninfo/0x12e371b5d751)="">#15#,module=0x2c52d400c4c9</js></an></an></string[10]:></undefined></string[10]:></a> <a module/with/map/0x285de601b7a9="">#13#,__filename=0x2c52d400c649 <string[50]: opt/iobroker/node_modules/iobroker.modbus/port.js="">,__dirname=0x2c52d400c621 <string[42]: opt/iobroker/node_modules/iobroker.modbus="">)
          ! 25: _compile [module.js:556] [pc=0x1fb2eb546270] (this=0x2c52d400c4c9</string[42]:></string[50]:></a> <a module/with/map/0x285de601b7a9="">#13#,content=0x2c52d400c7e9 <string[151]: var/serialport="require('serialport');\nserialport.list(function" (err,/ports)/{\n/console.log(json.stringify(ports,/null,/2));\n/process.exit();\n});\n="">,filename=0x2c52d400c649 <string[50]: opt/iobroker/node_modules/iobroker.modbus/port.js="">)
          ! 26: .js [module.js:565] [pc=0x1fb2eb53f4eb] (this=0x2c52d4005619 <an object/with/map/0x285de601a889="">#1#,module=0x2c52d400c4c9</an></string[50]:></string[151]:></a> <a module/with/map/0x285de601b7a9="">#13#,filename=0x2c52d400c649 <string[50]: opt/iobroker/node_modules/iobroker.modbus/port.js="">)
          ! 27: load [module.js:473] [pc=0x1fb2eb53df12] (this=0x2c52d400c4c9</string[50]:></a> <a module/with/map/0x285de601b7a9="">#13#,filename=0x2c52d400c649 <string[50]: opt/iobroker/node_modules/iobroker.modbus/port.js="">)
          ! 28: tryModuleLoad(aka tryModuleLoad) [module.js:432] [pc=0x1fb2eb53da3d] (this=0x310f66604381 <undefined>,module=0x2c52d400c4c9</undefined></string[50]:></a> <a module/with/map/0x285de601b7a9="">#13#,filename=0x2c52d400c649 <string[50]: opt/iobroker/node_modules/iobroker.modbus/port.js="">)
          ! 29: _load [module.js:424] [pc=0x1fb2eb535222] (this=0x2c52d4005741 <js function/module/(sharedfunctioninfo/0x12e371b2be99)="">#3#,request=0x12e371b53209 <string[50]: opt/iobroker/node_modules/iobroker.modbus/port.js="">,parent=0x310f66604201 <null>,isMain=0x310f666043c1 <true>)
          ! 30: /
          anonymous /(aka / anonymous /) [module.js:590] [pc=0x1fb2eb534cea] (this=0x310f66604381 <undefined>)
          ! 31: run(aka run) [bootstrap_node.js:394] [pc=0x1fb2eb534b68] (this=0x310f66604381 <undefined>,entryFunction=0x12e371b51381 <js function/module.runmain/(sharedfunctioninfo/0x12e371b2cc19)="">#16#)
          ! 32: startup(aka startup) [bootstrap_node.js:149] [pc=0x1fb2eb4448f2] (this=0x310f66604381 <undefined>)
          ! 33: /
          anonymous /(aka / anonymous /) [bootstrap_node.js:509] [pc=0x1fb2eb44274e] (this=0x310f66604201 <null>,process=0x310f666e1949</null></undefined></js></undefined></undefined></true></null></string[50]:></js></string[50]:></a> <a process/with/map/0xc8c15111619="">#17#)
          ! =====================
          ! ==== C stack trace ===============================
          ! 1: v8::Template::Set(v8::Localv8::name, v8::Localv8::data, v8::PropertyAttribute)
          ! 2: SerialportPoller::Init(v8::Localv8::object)
          ! 3: init
          ! 4: node::DLOpen(v8::FunctionCallbackInfo v8::valueconst&)
          ! 5: v8::internal::FunctionCallbackArguments::Call(void (
          )(v8::FunctionCallbackInfo v8::valueconst&))
          ! 6: 0x9ee352
          ! 7: 0x9eeb7e
          ! 8: 0x1fb2eb4092a7
          ! undefined</v8::value></v8::value></v8::object></v8::data></v8::name></a></an></js>

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

            @Bluefox:

            Можешь создать в папке node_modules/iobroker.modbus файл port.js:

            var serialport = require('serialport');
            serialport.list(function (err, ports) {
            	console.log(JSON.stringify(ports, null, 2));
            	process.exit();
            });
            
            

            Запустить его из консоли `
            У меня вывод такой на ESXi
            ! root@Bee-IoT:/opt/iobroker/node_modules/iobroker.modbus# node port.js:

            module.js:327
                throw err;
                ^
            >! Error: Cannot find module 'serialport'
                at Function.Module._resolveFilename (module.js:325:15)
                at Function.Module._load (module.js:276:25)
                at Module.require (module.js:353:17)
                at require (internal/module.js:12:17)
                at Object. <anonymous>(/opt/iobroker/node_modules/iobroker.modbus/port.js:1:80)
                at Module._compile (module.js:409:26)
                at Object.Module._extensions..js (module.js:416:10)
                at Module.load (module.js:343:32)
                at Function.Module._load (module.js:300:12)
                at Function.Module.runMain (module.js:441:10)</anonymous> 
            

            root@Bee-IoT:/opt/iobroker/node_modules/iobroker.modbus# lsusb -````
            Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
            Bus 002 Device 006: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
            Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
            Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
            Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

            ! ````
            root@Bee-IoT:/opt/iobroker/node_modules/iobroker.modbus# node -v
            ! v4.5.0
            ! PS: полазил по папкам внутри драйвера…. запустил
            ! root@Bee-IoT:/opt/iobroker/node_modules/iobroker.modbus/node_modules/jsmodbus/node_modules/serialport/bin# ./serialport-list.js

            /dev/ttyS0
            /dev/ttyS1
            /dev/ttyS10
            /dev/ttyS11
            /dev/ttyS12
            /dev/ttyS13
            /dev/ttyS14
            /dev/ttyS15
            /dev/ttyS16
            /dev/ttyS17
            /dev/ttyS18
            /dev/ttyS19
            /dev/ttyS2
            /dev/ttyS20
            /dev/ttyS21
            /dev/ttyS22
            /dev/ttyS23
            /dev/ttyS24
            /dev/ttyS25
            /dev/ttyS26
            /dev/ttyS27
            /dev/ttyS28
            /dev/ttyS29
            /dev/ttyS3
            /dev/ttyS30
            /dev/ttyS31
            /dev/ttyS4
            /dev/ttyS5
            /dev/ttyS6
            /dev/ttyS7
            /dev/ttyS8
            /dev/ttyS9
            /dev/ttyUSB0    usb-1a86_USB2.0-Serial-if00-port0       1a86
            
            1 Reply Last reply Reply Quote 0
            • V
              VictorS last edited by

              @Bluefox:

              Можешь создать в папке node_modules/iobroker.modbus файл port.js:

              ….

              А у тебя? `

              Насколько я понимаю Вы имеете отношение к разработке данного драйвера? Если так - можно ли дать возможность прямого ввода имени порта, не из списка? Может это поможет?

              Есть подозрение что либа которая работает с serial devices (serialport) обламывается при попытке получить какие-то конфигурационные данные с порта, драйвер которого работает не на уровне kernel.

              Или подскажите где настройки на порт лежат, может туда можно в ручном режиме внести информацию о нестандартном порте.

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

                @VictorS:

                @Bluefox:

                Можешь создать в папке node_modules/iobroker.modbus файл port.js:

                ….

                А у тебя? `

                Насколько я понимаю Вы имеете отношение к разработке данного драйвера? Если так - можно ли дать возможность прямого ввода имени порта, не из списка? Может это поможет?

                Есть подозрение что либа которая работает с serial devices (serialport) обламывается при попытке получить какие-то конфигурационные данные с порта, драйвер которого работает не на уровне kernel.

                Или подскажите где настройки на порт лежат, может туда можно в ручном режиме внести информацию о нестандартном порте. `
                Попробуй так
                48_2016-11-01_10_25_30-minozw___________-_microsoft_visual_studio.png

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

                  @Bluefox:

                  @VictorS:

                  @Bluefox:

                  Можешь создать в папке node_modules/iobroker.modbus файл port.js:

                  ….

                  А у тебя? `

                  Насколько я понимаю Вы имеете отношение к разработке данного драйвера? Если так - можно ли дать возможность прямого ввода имени порта, не из списка? Может это поможет?

                  Есть подозрение что либа которая работает с serial devices (serialport) обламывается при попытке получить какие-то конфигурационные данные с порта, драйвер которого работает не на уровне kernel.

                  Или подскажите где настройки на порт лежат, может туда можно в ручном режиме внести информацию о нестандартном порте. Попробуй так

                  Попробовал. Порт внес в ручном режимы, но в ответ в логах:

                  ! host-spy-sh 2016-11-01 14:49:54.569 error instance system.adapter.modbus.0 terminated with code 0 (OK)
                  ! modbus-0 2016-11-01 14:49:54.556 info terminating
                  ! TypeError: 2016-11-01 14:49:54.530 error at Socket.Emitter.emit (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/component-emitter/index.js:134:20)
                  ! TypeError: 2016-11-01 14:49:54.530 error at Socket. (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/node_modules/component-bind/index.js:21:15)
                  ! TypeError: 2016-11-01 14:49:54.530 error at Manager.ondata (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/manager.js:323:16)
                  ! TypeError: 2016-11-01 14:49:54.530 error at Decoder.add (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/node_modules/socket.io-parser/index.js:247:12)
                  ! TypeError: 2016-11-01 14:49:54.530 error at Decoder.Emitter.emit (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/component-emitter/index.js:134:20)
                  ! TypeError: 2016-11-01 14:49:54.530 error at Decoder. (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/node_modules/component-bind/index.js:21:15)
                  ! TypeError: 2016-11-01 14:49:54.530 error at Manager.ondecoded (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/manager.js:333:8)
                  ! TypeError: 2016-11-01 14:49:54.530 error at Manager.Emitter.emit (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/node_modules/component-emitter/index.js:131:20)
                  ! TypeError: 2016-11-01 14:49:54.530 error at Manager. (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/node_modules/component-bind/index.js:21:15)
                  ! TypeError: 2016-11-01 14:49:54.530 error at Socket.onpacket (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/socket.js:229:12)
                  ! TypeError: 2016-11-01 14:49:54.530 error at Socket.onack (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/socket.js:305:9)
                  ! TypeError: 2016-11-01 14:49:54.530 error at Socket. (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:707:35)
                  ! TypeError: 2016-11-01 14:49:54.530 error at /opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:773:21
                  ! TypeError: 2016-11-01 14:49:54.530 error at /opt/iobroker/node_modules/iobroker.modbus/main.js:1332:13
                  ! TypeError: 2016-11-01 14:49:54.530 error at clear (/opt/iobroker/node_modules/iobroker.modbus/main.js:1328:22)
                  ! TypeError: 2016-11-01 14:49:54.530 error at Object.start (/opt/iobroker/node_modules/iobroker.modbus/main.js:1738:25)
                  ! TypeError: 2016-11-01 14:49:54.530 error Cannot read property 'on' of null
                  ! uncaught 2016-11-01 14:49:54.529 error exception: Cannot read property 'on' of null
                  ! modbus-0 2016-11-01 14:49:54.521 error Cannot open port "/dev/ttyvirt1" [9600]: TypeError: Cannot read property 'complete' of undefined
                  ! modbus-0 2016-11-01 14:49:54.171 info starting. Version 0.4.5 in /opt/iobroker/node_modules/iobroker.modbus

                  Возможно проблема как раз кроется в этой ошибке: Cannot read property 'complete' of undefined

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

                    Добрый день,

                    отчетик по проблеме с виртуальным драйвером serial порта и modbus драйвером к IOB.

                    Проблема описана вот тут: http://stackoverflow.com/questions/3232 … up-in-list

                    И кроется в каком-то внутреннем нежелании либы serialport работать с портами сделанными socat и не только.

                    Поскольку времени (да и особого опыта в JS) ковырять чужие либы нету, был найден workarround, а именно - устанавливаем на сервере IOB шлюз Modbus RTU <-> Modbus RTU over TCP. http://mbus.sourceforge.net/index.html

                    В результате шлюз общается в serial созданным socat, а драйвер IOB modbus видит данные с шлюза по протоколу TCP или RTU over TCP (работают оба варианта).

                    Может кому-то пригодится

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

                      @VictorS:

                      Добрый день,

                      отчетик по проблеме с виртуальным драйвером serial порта и modbus драйвером к IOB.

                      Проблема описана вот тут: http://stackoverflow.com/questions/3232 … up-in-list

                      И кроется в каком-то внутреннем нежелании либы serialport работать с портами сделанными socat и не только.

                      Поскольку времени (да и особого опыта в JS) ковырять чужие либы нету, был найден workarround, а именно - устанавливаем на сервере IOB шлюз Modbus RTU <-> Modbus RTU over TCP. http://mbus.sourceforge.net/index.html

                      В результате шлюз общается в serial созданным socat, а драйвер IOB modbus видит данные с шлюза по протоколу TCP или RTU over TCP (работают оба варианта).

                      Может кому-то пригодится `
                      Отличная новость. Мне надо внести это решение в readme.md

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

                        @VictorS:

                        Добрый день,

                        отчетик по проблеме с виртуальным драйвером serial порта и modbus драйвером к IOB.

                        Проблема описана вот тут: http://stackoverflow.com/questions/3232 … up-in-list

                        И кроется в каком-то внутреннем нежелании либы serialport работать с портами сделанными socat и не только.

                        Поскольку времени (да и особого опыта в JS) ковырять чужие либы нету, был найден workarround, а именно - устанавливаем на сервере IOB шлюз Modbus RTU <-> Modbus RTU over TCP. http://mbus.sourceforge.net/index.html

                        В результате шлюз общается в serial созданным socat, а драйвер IOB modbus видит данные с шлюза по протоколу TCP или RTU over TCP (работают оба варианта).

                        Может кому-то пригодится `
                        Скомпилил…

                        Запускаю - mbusd -p /dev/ttyUSB0 -s 9600 -m 8N1 -P 502

                        И теперь работает!!! Даже после разрыва RS-485 и восстановлении связи опрос продолжается.

                        Даже после перезапуска mbusd опрос взобновляется через Reconnect time в настройках.

                        Спасибо!

                        PS: Правильно ли я понял, что если я буду добавлять еще устройства на эту линию RS-485 в паралель, с другими ID, то мне необходимо добавлять еще драйвера modbus.1, modbus.2 и.т.д. Со своими настройками для каждго устройства, интервал опроса, Reconnect time ...

                        А параметрах соединения TCP, Адресс, порт, и тип Master остаются неизменными?

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

                          @MSapogov:

                          PS: Правильно ли я понял, что если я буду добавлять еще устройства на эту линию RS-485 в паралель, с другими ID, то мне необходимо добавлять еще драйвера modbus.1, modbus.2 и.т.д. Со своими настройками для каждго устройства, интервал опроса, Reconnect time …

                          А параметрах соединения TCP, Адресс, порт, и тип Master остаются неизменными? `

                          Да, так и есть. Для каждого Modbus ID свой экземпляр драйвера. Сам mbusd поддерживает несколько одновременных TCP-соединений.

                          1 Reply Last reply Reply Quote 0
                          • H
                            Haus last edited by

                            Ошибка при обновлении

                            ! ````
                            iobroker 2016-11-09 07:18:34.694 info exit 0
                            iobroker 2016-11-09 07:18:34.667 info Adapter "modbus" updated
                            iobroker 2016-11-09 07:18:34.512 info upload [0] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/img/plc_back.png img/plc_back.png image/png
                            iobroker 2016-11-09 07:18:34.433 info upload [1] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/index.html index.html text/html
                            iobroker 2016-11-09 07:18:34.344 info upload [2] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/lib/css/jsgrid-theme.css lib/css/jsgrid-theme.css text/css
                            iobroker 2016-11-09 07:18:34.254 info upload [3] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/lib/css/jsgrid-theme.min.css lib/css/jsgrid-theme.min.css text/css
                            iobroker 2016-11-09 07:18:34.179 info upload [4] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/lib/css/jsgrid.css lib/css/jsgrid.css text/css
                            iobroker 2016-11-09 07:18:34.114 info upload [5] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/lib/css/jsgrid.min.css lib/css/jsgrid.min.css text/css
                            iobroker 2016-11-09 07:18:34.039 info upload [6] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/lib/js/grid.locale-de.js lib/js/grid.locale-de.js application/javascript
                            iobroker 2016-11-09 07:18:33.971 info upload [7] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/lib/js/grid.locale-ru.js lib/js/grid.locale-ru.js application/javascript
                            iobroker 2016-11-09 07:18:33.888 info upload [8] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/lib/js/jsgrid.js lib/js/jsgrid.js application/javascript
                            iobroker 2016-11-09 07:18:33.754 info upload [9] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/lib/js/jsgrid.min.js lib/js/jsgrid.min.js application/javascript
                            host.Server-PC 2016-11-09 07:18:33.737 info object change system.adapter.modbus.0
                            iobroker 2016-11-09 07:18:33.721 info Update "system.adapter.modbus.0"
                            iobroker 2016-11-09 07:18:33.626 info upload [10] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/modbus.png modbus.png image/png
                            iobroker 2016-11-09 07:18:33.589 info got /opt/iobroker/node_modules/iobroker.modbus/admin
                            iobroker 2016-11-09 07:18:33.268 info npm WARN unmet dependency /opt/iobroker/node_modules/iobroker.modbus/node_modules/jsmodbus/node_modules/serialport/node_modules/debug,npm WARN unmet dependency which is version 2.3.0
                            iobroker 2016-11-09 07:18:33.262 info WARN unmet dependency /opt/iobroker/node_modules/iobroker.modbus/node_modules/jsmodbus/node_modules/serialport/node_modules/node-pre-gyp/node_modules/tar-pack requires debug@'~2.2.0' but will load
                            iobroker 2016-11-09 07:18:33.250 info npm
                            iobroker 2016-11-09 07:18:26.658 info npm install --production --prefix "/opt/iobroker/node_modules/iobroker.modbus" (System call)
                            iobroker 2016-11-09 07:18:26.072 info npm WARN unmet dependency /opt/iobroker/node_modules/iobroker.modbus/node_modules/jsmodbus/node_modules/serialport/node_modules/debug,npm WARN unmet dependency which is version 2.3.0
                            iobroker 2016-11-09 07:18:26.065 info WARN unmet dependency /opt/iobroker/node_modules/iobroker.modbus/node_modules/jsmodbus/node_modules/serialport/node_modules/node-pre-gyp/node_modules/tar-pack requires debug@'~2.2.0' but will load
                            iobroker 2016-11-09 07:18:26.058 info npm
                            iobroker 2016-11-09 07:17:18.870 info npm install iobroker.modbus --production --prefix "/opt/iobroker" (System call)
                            iobroker 2016-11-09 07:17:16.912 info upgrade modbus

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

                              @Haus:

                              Ошибка при обновлении

                              ! iobroker 2016-11-09 07:18:34.694 info exit 0 iobroker 2016-11-09 07:18:34.667 info Adapter "modbus" updated iobroker 2016-11-09 07:18:34.512 info upload [0] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/img/plc_back.png img/plc_back.png image/png iobroker 2016-11-09 07:18:34.433 info upload [1] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/index.html index.html text/html iobroker 2016-11-09 07:18:34.344 info upload [2] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/lib/css/jsgrid-theme.css lib/css/jsgrid-theme.css text/css iobroker 2016-11-09 07:18:34.254 info upload [3] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/lib/css/jsgrid-theme.min.css lib/css/jsgrid-theme.min.css text/css iobroker 2016-11-09 07:18:34.179 info upload [4] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/lib/css/jsgrid.css lib/css/jsgrid.css text/css iobroker 2016-11-09 07:18:34.114 info upload [5] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/lib/css/jsgrid.min.css lib/css/jsgrid.min.css text/css iobroker 2016-11-09 07:18:34.039 info upload [6] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/lib/js/grid.locale-de.js lib/js/grid.locale-de.js application/javascript iobroker 2016-11-09 07:18:33.971 info upload [7] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/lib/js/grid.locale-ru.js lib/js/grid.locale-ru.js application/javascript iobroker 2016-11-09 07:18:33.888 info upload [8] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/lib/js/jsgrid.js lib/js/jsgrid.js application/javascript iobroker 2016-11-09 07:18:33.754 info upload [9] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/lib/js/jsgrid.min.js lib/js/jsgrid.min.js application/javascript host.Server-PC 2016-11-09 07:18:33.737 info object change system.adapter.modbus.0 iobroker 2016-11-09 07:18:33.721 info Update "system.adapter.modbus.0" iobroker 2016-11-09 07:18:33.626 info upload [10] modbus.admin /opt/iobroker/node_modules/iobroker.modbus/admin/modbus.png modbus.png image/png iobroker 2016-11-09 07:18:33.589 info got /opt/iobroker/node_modules/iobroker.modbus/admin iobroker 2016-11-09 07:18:33.268 info npm WARN unmet dependency /opt/iobroker/node_modules/iobroker.modbus/node_modules/jsmodbus/node_modules/serialport/node_modules/debug,npm WARN unmet dependency which is version 2.3.0 iobroker 2016-11-09 07:18:33.262 info WARN unmet dependency /opt/iobroker/node_modules/iobroker.modbus/node_modules/jsmodbus/node_modules/serialport/node_modules/node-pre-gyp/node_modules/tar-pack requires debug@'~2.2.0' but will load iobroker 2016-11-09 07:18:33.250 info npm iobroker 2016-11-09 07:18:26.658 info npm install --production --prefix "/opt/iobroker/node_modules/iobroker.modbus" (System call) iobroker 2016-11-09 07:18:26.072 info npm WARN unmet dependency /opt/iobroker/node_modules/iobroker.modbus/node_modules/jsmodbus/node_modules/serialport/node_modules/debug,npm WARN unmet dependency which is version 2.3.0 iobroker 2016-11-09 07:18:26.065 info WARN unmet dependency /opt/iobroker/node_modules/iobroker.modbus/node_modules/jsmodbus/node_modules/serialport/node_modules/node-pre-gyp/node_modules/tar-pack requires debug@'~2.2.0' but will load iobroker 2016-11-09 07:18:26.058 info npm iobroker 2016-11-09 07:17:18.870 info npm install iobroker.modbus --production --prefix "/opt/iobroker" (System call) iobroker 2016-11-09 07:17:16.912 info upgrade modbus `
                              Игнорировать.

                              1 Reply Last reply Reply Quote 0
                              • L
                                leshyi last edited by

                                Коллеги, не могу разобраться…

                                Оборудование:

                                Raspberry pi2

                                iobroker.admin 1.6.6

                                js-controller 0.13.2

                                iobroker.modbus 0.4.7

                                ОВЕН ПЛК150

                                Настройки:

                                ПЛК150: Modbus slave id 1

                                iobroker.modbus: master

                                Переменные все float начиная с первого адреса.

                                Проблема:

                                В ПЛК первая переменная REAL: 14655.73

                                iobroker первая переменная (Float (Big Endian)) 14600.24

                                C остальными такая же беда…

                                Читаю другими средствами, все совпадает. Чистый вывод iobroker.modbus нигде не нашел как увидеть, даже в debug. String (Zero end) выводит какую-то ерунду...

                                Скриншот:

                                ! ![](</s><URL url=)<link_text text="https://4.downloader.disk.yandex.ru/dis ... 9127195a6b">https://4.downloader.disk.yandex.ru/disk/c3ca535dfa58336381d0937fb6660e9eeb8178b05bc74b0fa32fcb895ddf2ccc/58470c13/XGn0l5evRjfE4mkLQiECFfCGje_dBUTHUzY2X_mHX_c00lPD1EEz3Bb4XSc3R94PJJjsFCrrZnGZGInNRpcWtQ%3D%3D?uid=0&filename=2016-12-06_18-04-26.png&disposition=inline&hash=&limit=0&content_type=image%2Fpng&fsize=180743&hid=73c5d9980ea0f4cee1db84f47ddeb706&media_type=image&tknv=v2&etag=d46c1b9fa0aaa38c6ad36b9127195a6b</link_text>" />

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

                                  @leshyi:

                                  Коллеги, не могу разобраться…

                                  Оборудование:

                                  Raspberry pi2

                                  iobroker.admin 1.6.6

                                  js-controller 0.13.2

                                  iobroker.modbus 0.4.7

                                  ОВЕН ПЛК150

                                  Настройки:

                                  ПЛК150: Modbus slave id 1

                                  iobroker.modbus: master

                                  Переменные все float начиная с первого адреса.

                                  Проблема:

                                  В ПЛК первая переменная REAL: 14655.73

                                  iobroker первая переменная (Float (Big Endian)) 14600.24

                                  C остальными такая же беда…

                                  Читаю другими средствами, все совпадает. Чистый вывод iobroker.modbus нигде не нашел как увидеть, даже в debug. String (Zero end) выводит какую-то ерунду...

                                  Скриншот:

                                  ! ![](</s><URL url=)<link_text text="https://4.downloader.disk.yandex.ru/dis ... 9127195a6b">https://4.downloader.disk.yandex.ru/disk/c3ca535dfa58336381d0937fb6660e9eeb8178b05bc74b0fa32fcb895ddf2ccc/58470c13/XGn0l5evRjfE4mkLQiECFfCGje_dBUTHUzY2X_mHX_c00lPD1EEz3Bb4XSc3R94PJJjsFCrrZnGZGInNRpcWtQ%3D%3D?uid=0&filename=2016-12-06_18-04-26.png&disposition=inline&hash=&limit=0&content_type=image%2Fpng&fsize=180743&hid=73c5d9980ea0f4cee1db84f47ddeb706&media_type=image&tknv=v2&etag=d46c1b9fa0aaa38c6ad36b9127195a6b</link_text>" /> ` А адреса какие? С нуля или с 1 начинаются?

                                  1 Reply Last reply Reply Quote 0
                                  • L
                                    leshyi last edited by

                                    с 1…

                                    В ПЛК адреса вообще не ставятся... там по порядку...

                                    Есть скрипт, написанный на ruby, читает идеально. Там адреса с 1.

                                    Вообще, если в iobroker.modbus ставить первый адрес 0 - ругается.

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

                                      @leshyi:

                                      с 1…

                                      В ПЛК адреса вообще не ставятся... там по порядку...

                                      Есть скрипт, написанный на ruby, читает идеально. Там адреса с 1.

                                      Вообще, если в iobroker.modbus ставить первый адрес 0 - ругается. `
                                      А у тебя какие настройки адресов? Alias или нет?

                                      1 Reply Last reply Reply Quote 0
                                      • L
                                        leshyi last edited by

                                        нет, не alias…

                                        При alias адреса считаются с 40002... ситуация та же...

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

                                          @leshyi:

                                          нет, не alias…

                                          При alias адреса считаются с 40002... ситуация та же... `
                                          Вот этом и проблема. Alias начинаются с 1.

                                          Покажи настройки обоих устройств.

                                          И что, ни по адресу 2 или 3 тоже ничего нет?

                                          Что за адресация такая у овена? Не алиас, но с единицы.

                                          1 Reply Last reply Reply Quote 0
                                          • L
                                            leshyi last edited by

                                            Если бы…

                                            Перед тем как писать, перепробовал все... и с alias, и без.. и с 0, и с 1, и с 2, и с 40001, и с 40000, и с 40002

                                            Более менее близкий результат: с 1 без alias и с 40002 с alias... При этом результаты в обоих случаях одинаковые в точности, но не соответствуют ПЛК... сдвиг не помогает...

                                            В ПЛК же настроек адресов Modbus вообще нет. Это скорее не ОВЕН, а Codesys 2.3... Просто добавляем модуль Modbus (slave), указываем адрес устройства (в данном случае 1), ставим порт (502).

                                            Дальше добавляем переменные. в том порядке как добавили, они и встают начиная с 1 адреса и занимают соответствующий размер.

                                            Самое главное, библиотека Ruby Modbus выдавала четкий результат в соответствии со спецификацией Modbus, и все работало...

                                            Поищу код на ruby...

                                            Еще вопрос: реально увидеть изначальный ответ в Modbus в iobroker?

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            461
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            25
                                            174
                                            48648
                                            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