Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. [Frage] analoge Temperatursensoren über I2C auslesen

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    [Frage] analoge Temperatursensoren über I2C auslesen

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

      MOD-Edit by eric2905; 09.05.2017 / 10:15; Betreff geändert

      Hallo Zusammen,

      wir möchten unsere alte Heizungssteuerung rausschmeißen und die Heizung über einen Raspberry Pi steuern.

      Da wir aber die alten PT1000 Temperatursensoren nicht rausschmeißen wollen, wollen wir die Werte der PT1000 über den IO Broker auswerten.

      Die PT1000 werden über ADC Pi + eingelesen und sollen im IO Broker ausgewertet werden.

      Die ADC Pi + Platine wird über I2C angebunden.

      <u>Hier haben wir folgendes Problem:</u>

      Wie können wir I2C Werte über den IO Broker einlesen?

      Vielen Dank im Voraus.

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

        @Schaimania:

        Wie können wir I2C Werte über den IO Broker einlesen? `
        Vermutlich mit Hilfe des NPM-Moduls https://www.npmjs.com/package/nodejs-adcpi.

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

          Hallo paul53, vielen Dankf ür die schnelle Antwort. Sobald wir das Programm installieren, kommt eine Fehlermeldung.

          Hier einmal der Errorlog:

          root@Heizung:~# cd /opt/iobroker

          root@Heizung:/opt/iobroker# npm install nodejs-adcpi

          |

          i2c@0.2.1 install /opt/iobroker/node_modules/nodejs-adcpi/node_modules/i2c

          node-gyp rebuild

          make: Entering directory '/opt/iobroker/node_modules/nodejs-adcpi/node_modules/i2c/build'

          CXX(target) Release/obj.target/i2c/src/i2c.o

          ../src/i2c.cc: In function ‘void ReadBlock(const v8::FunctionCallbackInfov8::value&)’:

          ../src/i2c.cc:162:47: error: no matching function for call to ‘New(int32_t&)’ Local <object>buffer = node::Buffer::New(len);

          ^

          ../src/i2c.cc:162:47: note: candidates are:

          In file included from ../src/i2c.cc:2:0:

          /root/.node-gyp/4.8.3/include/node/node_buffer.h:31:40: note: v8::MaybeLocal v8::objectnode::Buffer::New(v8::Isolate*, size_t)

          NODE_EXTERN v8::MaybeLocal v8::objectNew(v8::Isolate* isolate, size_t length);

          ^

          /root/.node-gyp/4.8.3/include/node/node_buffer.h:31:40: note: candidate expects 2 arguments, 1 provided

          /root/.node-gyp/4.8.3/include/node/node_buffer.h:34:40: note: v8::MaybeLocal v8::objectnode::Buffer::New(v8::Isolate*, v8::Localv8::string, node::encoding)

          NODE_EXTERN v8::MaybeLocal v8::objectNew(v8::Isolate* isolate,

          ^

          /root/.node-gyp/4.8.3/include/node/node_buffer.h:34:40: note: candidate expects 3 arguments, 1 provided

          /root/.node-gyp/4.8.3/include/node/node_buffer.h:39:40: note: v8::MaybeLocal v8::objectnode::Buffer::New(v8::Isolate*, char*, size_t, node::Buffer::FreeCallback, void*)

          NODE_EXTERN v8::MaybeLocal v8::objectNew(v8::Isolate* isolate,

          ^

          /root/.node-gyp/4.8.3/include/node/node_buffer.h:39:40: note: candidate expects 5 arguments, 1 provided

          /root/.node-gyp/4.8.3/include/node/node_buffer.h:46:40: note: v8::MaybeLocal v8::objectnode::Buffer::New(v8::Isolate*, char*, size_t)

          NODE_EXTERN v8::MaybeLocal v8::objectNew(v8::Isolate* isolate,

          ^

          /root/.node-gyp/4.8.3/include/node/node_buffer.h:46:40: note: candidate expects 3 arguments, 1 provided

          i2c.target.mk:92: recipe for target 'Release/obj.target/i2c/src/i2c.o' failedmake: *** [Release/obj.target/i2c/src/i2c.o] Error 1

          make: Leaving directory '/opt/iobroker/node_modules/nodejs-adcpi/node_modules/i2c/build'

          gyp ERR! build error

          gyp ERR! stack Error: make failed with exit code: 2

          gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)

          gyp ERR! stack at emitTwo (events.js:87:13)

          gyp ERR! stack at ChildProcess.emit (events.js:172:7)

          gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)

          gyp ERR! System Linux 4.4.50-v7+

          gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

          gyp ERR! cwd /opt/iobroker/node_modules/nodejs-adcpi/node_modules/i2c

          gyp ERR! node -v v4.8.3

          gyp ERR! node-gyp -v v3.4.0

          gyp ERR! not ok

          npm ERR! Linux 4.4.50-v7+

          npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "nodejs-adcpi"

          npm ERR! node v4.8.3

          npm ERR! npm v2.15.11

          npm ERR! code ELIFECYCLE

          npm ERR! i2c@0.2.1 install: node-gyp rebuild

          npm ERR! Exit status 1

          npm ERR!

          npm ERR! Failed at the i2c@0.2.1 install script 'node-gyp rebuild'.

          npm ERR! This is most likely a problem with the i2c package,

          npm ERR! not with npm itself.

          npm ERR! Tell the author that this fails on your system:

          npm ERR! node-gyp rebuild

          npm ERR! You can get information on how to open an issue for this project with:

          npm ERR! npm bugs i2c

          npm ERR! Or if that isn't available, you can get their info via:

          npm ERR!

          npm ERR! npm owner ls i2c

          npm ERR! There is likely additional logging output above.

          npm ERR! Please include the following file with any support request:

          npm ERR! /opt/iobroker/npm-debug.log

          root@Heizung:/opt/iobroker#

          Vielen Dank für die Hilfe im Voraus</v8::object></v8::object></v8::object></v8::object></v8::object></v8::string></v8::object></v8::object></v8::object></object></v8::value>

          1 Reply Last reply Reply Quote 0
          • UncleSam
            UncleSam Developer last edited by

            @Schaimania:

            Wie können wir I2C Werte über den IO Broker einlesen? ` Hi Schaimania

            Konntest du dein Problem mit dem nodejs-adcpi lösen?

            Ansonsten gibt es seit heute auch einen Adpater für I2C direkt in ioBroker:

            http://forum.iobroker.net/viewtopic.php?f=23&t=7437

            Im Moment unterstützt er zwar erst den PCF8574, aber wenn du wünschst, kann ich versuchen den MCP3424 zu integrieren.

            Freue mich auf deine Antwort.

            /UncleSam

            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

            578
            Online

            32.0k
            Users

            80.5k
            Topics

            1.3m
            Posts

            3
            4
            1475
            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