Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Gelöst: Bild von Festplatte in VIS laden

    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

    Gelöst: Bild von Festplatte in VIS laden

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

      Hallo
      ich weiß ja nun wie man ein Kamerabild in VIS speichert, nun möchte ich aber ein Bild von der Festplatte in VIS hochladen
      Das wäre die Kamera Variante:

          request({
              url: "http://192.168.178.xxx:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=xx&pwd=xxxxxx", encoding: null,
          },
              (error, response, body) => {
                  if (!error && body) {
                      writeFile("vis.0", "/NL/01Eingang.jpg", body);
                  }
              }
          );
      

      Nun würde ich gerne eben anstatt der URL einen Speicherpfad als Quelle angeben.
      Gruß
      Michael

      EDIT: So geht es: (für zwei Bilder)

      var request = require('request');
      var fs = require('fs');
      schedule("*/1 * * * *", function () {
      const body = fs.readFileSync('/Ferienhaus/Eingang/01Eingang.jpg');
      writeFile("vis.0", "/NL/01Eingang.jpg", body);
      const body1 = fs.readFileSync('/Ferienhaus/Steg/01Steg.jpg');
      writeFile("vis.0", "/NL/01Steg.jpg", body1);
      });
      

      Bleibt nur noch eine Frage, wie kann ich den Zeitstempel der letzten Änderung des Bildes auslesen?

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

        @michihorn sagte in Bild von Festplatte in VIS laden:

        anstatt der URL

        ich würde auf jeden Fall usr und passwd nicht veröffentlichen

        M 1 Reply Last reply Reply Quote 0
        • M
          michihorn @Homoran last edited by

          @Homoran ups Danke

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

          Support us

          ioBroker
          Community Adapters
          Donate

          711
          Online

          31.9k
          Users

          80.2k
          Topics

          1.3m
          Posts

          javascript
          2
          3
          191
          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