Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. smoker2604x

    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

    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 25
    • Best 0
    • Groups 0

    smoker2604x

    @smoker2604x

    0
    Reputation
    14
    Profile views
    25
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    smoker2604x Follow

    Latest posts made by smoker2604x

    • RE: [UMFRAGE] Besteht Interesse an einem Octoprint Adapter

      Auf jeden Fall besteht Interesse

      Gesendet von meinem HUAWEI VNS-L31 mit Tapatalk

      posted in Entwicklung
      smoker2604x
      smoker2604x
    • RE: [UMFRAGE] Besteht Interesse an einem Octoprint Adapter

      Hi,

      mich würde das Script auch interessieren. kannst du mir das auch bitte zur verfügung stellen.

      Danke

      posted in Entwicklung
      smoker2604x
      smoker2604x
    • RE: Welche Umgebung für Entwicklung

      @AlCalzone:

      @DeepCore:

      @AlCalzone:

      VSCode. Wenn das einmal ordentlich eingerichtet ist, gibts nix einfacheres IMO. Git-Integration, optional Type-Checking, etc… Könntest Du mal Deine Einrichtung erläutern?
      Konsole und Git sind ja von Haus aus drin. Mag zwar nicht jeder, aber ich bin damit einfach am schnellsten.

      Installierte Erweiterungen:

      • Auto Close Tag (für HTML/React)

      • Bookmarks

      • Coverage Gutters + Run on Save (Automatische Test-Coverage-Anzeige wenn package.json entsprechend konfiguriert ist)

      • ESLint (JS-Datei-Prüfung)

      • TSLint (TypeScript-Datei-Prüfung auf stilistische und typische Syntax-Fehler)

      TypeChecking erfordert eine entsprechend konfigurierte tsconfig.json-Datei im Projektordner, siehe https://github.com/ioBroker/ioBroker.cl … onfig.json oder https://github.com/AlCalzone/ioBroker.t ... onfig.json und "typescript" als devDependency. Dann meckert VSCode beim Öffnen von Dateien, wenn es Fehler findet, die über einfache Fehler wie ( vergessen hinausgehen.

      Für Adapter-Aktualisierung auf dem Zielhost hab ich auch ein kleines Skript.

      package.json => scripts:

      "deploy_local": "node --require ts-node/register maintenance/deploy_local.ts",
      

      maintenance/deploy_local.ts sieht so aus:

      ! ````
      // tslint:disable:no-var-requires
      /*
      Allows easier local debugging over SSH.
      Running npm run deploy_local updates remote adapter files
      and restarts the instance
      /
      ! /

      CONFIGURATION:
      - provide a deploy_password.json file in the local dir with contents
      {
      "host": "<hostname>",
      "username": "<username>",
      "password": "<password>"
      }
      - specify which dirs and files should be uploaded
      - specify where the root dir is relative to this script
      */
      const uploadDirs = ["admin", "build"];
      const uploadFiles = ["package.json", "io-package.json", "main.js"];
      const rootDir = "../";
      ! // =========================
      // CAN'T TOUCH THIS
      // =========================
      ! import * as nodeSSH from "node-ssh";
      import * as path from "path";
      ! const localRoot = path.resolve(__dirname, rootDir);
      ! const ioPack = require(path.join(rootDir, "io-package.json"));
      const ADAPTER_NAME = ioPack.common.name;
      ! const ssh = new nodeSSH();
      const sshConfig = require(path.join(_dirname, "deploy_password.json"));
      ! const remoteRoot = /opt/iobroker/node_modules/iobroker.${ADAPTER_NAME};
      ! (async function main() {
      await ssh.connect(sshConfig);
      ! for (const dir of uploadDirs) {
      console.log(cleaning ${dir} dir...);
      await ssh.execCommand(rm -rf ${path.join(remoteRoot, dir)});
      console.log(uploading ${dir} dir...);
      try {
      await ssh.putDirectory(path.join(localRoot, dir), path.join(remoteRoot, dir), {
      recursive: true,
      concurrency: 10,
      validate: (pathname) => {
      const basename = path.basename(pathname);
      if (basename.startsWith("deploy
      ")) return false;
      if (basename.endsWith("Thumbs.db")) return false;
      if (basename.endsWith(".map") && basename.indexOf(".bundle.") === -1) return false;
      if (basename.indexOf(".test.") > -1) return false;
      if (basename === "src") return false;
      return true;
      },
      });
      } catch (e) {
      console.error(e);
      }
      }
      for (const file of uploadFiles) {
      console.log(uploading ${file}...);
      await ssh.putFile(path.join(localRoot, file), path.join(remoteRoot, file));
      }
      ! // update in-mem adapter
      let execResult;
      console.log("updating in-mem adapter");
      execResult = await ssh.execCommand(iobroker upload ${ADAPTER_NAME});
      console.log(execResult.stdout);
      console.log(execResult.stderr);
      if (process.argv.indexOf("--norestart") === -1) {
      execResult = await ssh.execCommand(iobroker restart ${ADAPTER_NAME});
      console.log(execResult.stdout);
      console.log(execResult.stderr);
      }
      ! console.log("done");
      process.exit(0);
      })();</password></username></hostname>

      und erfordert in package.json
      

      "devDependencies": {
      "node-ssh": "^5.0.0",
      "ts-node": "^4.1.0",
      "typescript": "^2.6.2",
      }

      Wenn das Skript konfiguriert ist (siehe Kommentare am Skript-Anfang), reicht ein "npm run deploy_local" und die aktualisierten Adapterdateien werden per SSH auf dem Zielhost hochgeladen und der Adapter dort aktualisiert/neu gestartet.
      
      Für dein Vorhaben musst du vermutlich vorher noch 1-2 Skripte lokal ausführen, um die Übersetzungsdateien umzuwandeln. `  Wau danke werde mir das morgen Mal anschauen
      

      Gesendet von meinem HUAWEI VNS-L31 mit Tapatalk

      posted in ioBroker Allgemein
      smoker2604x
      smoker2604x
    • Welche Umgebung für Entwicklung

      Halo zusammen,

      Welche Entwicklerumgebung benutzt ihr um Adapter zu entwickeln?

      Gesendet von meinem HUAWEI VNS-L31 mit Tapatalk

      posted in ioBroker Allgemein
      smoker2604x
      smoker2604x
    • RE: Wetty über iobroker.pro

      leider

      posted in ioBroker Allgemein
      smoker2604x
      smoker2604x
    • Wetty über iobroker.pro

      Hallo zusammen,

      hat einer von euch es schon geschaft den Wetty Adapther über die iobroker cloud zu betreiben. Wenn ich den tab öffne, bleibt leider die Seite leer.

      Ich vermute es hat was mit dem port zutun bin mir da aber nicht ganz sicher.

      LG

      Tobias

      posted in ioBroker Allgemein
      smoker2604x
      smoker2604x
    • RE: Watchdog

      Genau das gleiche Problem habe ich auch. Ich habe das iobroker Image auf dem pi3 und benutze WLAN als Netzanschluss

      Gesendet von meinem HUAWEI VNS-L31 mit Tapatalk

      posted in Skripten / Logik
      smoker2604x
      smoker2604x
    • RE: Amazon Dash Button für ioBroker nutzen

      Hallo zusammen,

      hat einer eine Idee bei mir lauft der Adapther immer noch nicht. Es liegt auch nicht an Dash Button. Habe mal in die main.js eine andere mac eingetragen, die immer online ist und leider wird auch von dem kein Objekt angelegt.
      2891_unbenannt.png

      posted in ioBroker Allgemein
      smoker2604x
      smoker2604x
    • RE: [Gelöst] MQTT On/Off Sonoff Manuelles ein und Ausschalten

      Leider zeigte mir VIS nicht ann wenn ich den Sonoff übers Webinterface vom Sonoff geschaltet habe.

      Firmware: tasmota

      Es liegt dadran, dass der Wert vom objekt cmnd.0.Sonoff.POWER nciht geändert wird wenn man manuell schaltet.

      Ich habe jetzt ein kleines javascript geschrieben um das zu ändern.

      on({id: 'mqtt.0.POWDrucker.POWER', change: "any"}, function (obj) {
              if (getState('mqtt.0.POWDrucker.POWER').val == "OFF" ){
                  setState('mqtt.0.POWDrucker.cmnd.POWER', false);
              }
              else if (getState('mqtt.0.POWDrucker.POWER').val == "ON" )
              {
                  setState('mqtt.0.POWDrucker.cmnd.POWER', true);
              }
           });
      

      ich hoffe es hilft den ein oder anderen. 🙂
      2891_sonoff.png

      posted in Visualisierung
      smoker2604x
      smoker2604x
    • RE: HUE Adapter mit Sonoff 4 Channel

      Ah super danke dir dann habe ich es jetzt verstanden.

      Gesendet von meinem HUAWEI VNS-L31 mit Tapatalk

      posted in ioBroker Allgemein
      smoker2604x
      smoker2604x
    Community
    Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
    The ioBroker Community 2014-2023
    logo