Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Einsteigerfragen
  4. [Gelöst:] Adjust settings in the .env File

NEWS

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    17
    1
    4.1k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.2k

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.6k

[Gelöst:] Adjust settings in the .env File

Geplant Angeheftet Gesperrt Verschoben Einsteigerfragen
1 Beiträge 1 Kommentatoren 267 Aufrufe 1 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • S Offline
    S Offline
    Steinmetz_4
    schrieb am zuletzt editiert von Steinmetz_4
    #1

    Servus,

    ich wollte heute den Ds18b20 die Sensoren auf einem anderen System anzeigen lassen.
    Soweit bin ich bisher, aber ich kann mir keinen Reim auf "Please adjust the settings in the .env file." machen.

    Kann mir jemand weiterhelfen?

    pi@pi4-Master:~ $ mkdir ~/ds18b20-remote
    pi@pi4-Master:~ $ cd ~/ds18b20-remote
    pi@pi4-Master:~/ds18b20-remote $ wget -O remote-client-setup.js http://192.168.178.68:8081/adapter/ds18b20/remote-client-setup.js
    --2022-11-23 09:48:58--  http://192.168.178.68:8081/adapter/ds18b20/remote-client-setup.js
    Connecting to 192.168.178.68:8081... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 39797 (39K) [application/javascript]
    Saving to: ‘remote-client-setup.js’
    
    remote-client-setup 100%[===================>]  38.86K  --.-KB/s    in 0.003s
    
    2022-11-23 09:48:58 (14.5 MB/s) - ‘remote-client-setup.js’ saved [39797/39797]
    
    pi@pi4-Master:~/ds18b20-remote $ node remote-client-setup.js
    - ioBroker.ds18b20 remote client -
    
    Basic setup done.
    
    Please adjust the settings in the .env file.
    
    To manually start the client just run:
      node ds18b20-remote-client.js
    
    To setup the SystemD service, please run:
      sudo cp iobroker-ds18b20-remote.service /etc/systemd/system/iobroker-ds18b20-remote.service
      sudo systemctl daemon-reload
      sudo systemctl enable iobroker-ds18b20-remote.service
      sudo systemctl start iobroker-ds18b20-remote.service
    
    
    
    pi@pi4-Master:~/ds18b20-remote $ sudo nano remote-client-setup.js
    
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    const fs = require("fs");
    const os = require("os");
    const path = require("path");
    const SYSTEMD_SERVICE_NAME = 'iobroker-ds18b20-remote.service';
    const files = {
        'common.js': 'InVzZSBzdHJpY3QiOwpPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgIl9fZXNNb2R1bGUiLCB7IHZhbHVlOiB0cnVlIH0pOwpleHBvcnRzLmRlY3J5cHQgPSBleHBvcnRzLmVuY3J5cHQgPSBleHBvcnRzLlJFTU9URV9QUk9UT0NPTF9WRVJTSU9OID0gdm9pZCAwOwpjb25zdCBjcnlwdG8gPSByZXF1aXJlKCJjcnlwdG8iKTsKZ>
    'ds18b20-remote-client.js': 'InVzZSBzdHJpY3QiOwp2YXIgX19hd2FpdGVyID0gKHRoaXMgJiYgdGhpcy5fX2F3YWl0ZXIpIHx8IGZ1bmN0aW9uICh0aGlzQXJnLCBfYXJndW1lbnRzLCBQLCBnZW5lcmF0b3IpIHsKICAgIGZ1bmN0aW9uIGFkb3B0KHZhbHVlKSB7IHJldHVybiB2YWx1ZSBpbnN0YW5jZW9mIFAgPyB2YWx1ZSA6IG5ldyBQKGZ1bmN0aW>
    'logger.js': 'InVzZSBzdHJpY3QiOwpPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgIl9fZXNNb2R1bGUiLCB7IHZhbHVlOiB0cnVlIH0pOwpleHBvcnRzLkxvZ2dlciA9IHZvaWQgMDsKY2xhc3MgTG9nZ2VyIHsKICAgIGxvZyguLi5hcmdzKSB7CiAgICAgICAgY29uc29sZS5sb2coLi4uYXJncyk7CiAgICB9CiAgICBkZWJ1ZyguLi5hcmdzKSB7C>
    };
    for (const f in files) {
        const content = Buffer.from(files[f], 'base64').toString('utf-8');
        fs.writeFileSync(f, content, { encoding: 'utf-8' });
    }
    const systemDContent = `[Unit]
    Description=ioBroker.ds18b20 remote client
    Documentation=https://github.com/crycode-de/ioBroker.ds18b20
    After=network.target
    
    [Service]
    Type=simple
    User=${os.userInfo().username}
    WorkingDirectory=${__dirname}
    ExecStart=${process.execPath} ${path.join(__dirname, 'ds18b20-remote-client.js')}
    Restart=on-failure
    
    [Install]
    WantedBy=multi-user.target
    `;
    const systemDFile = path.join(__dirname, SYSTEMD_SERVICE_NAME);
    fs.writeFileSync(systemDFile, systemDContent, { encoding: 'utf-8' });
    const dotEnvContent = `# Settings for the ioBroker.ds18b20 remote client
    
    # Unique ID for this remote system
    SYSTEM_ID=my-remote
    
    # IP or hostname of the ioBroker host running the adapter
    ADAPTER_HOST=192.168.178.68
    
    # Port from the adapter config
    ADAPTER_PORT=1820
    
    # Encryption key from the adapter config
    ADAPTER_KEY=35305d096dc8eef7db46d575417926bafxxxxxxxxxxxxxxxxxxxxxx
    
    # Enable debug log output
    #DEBUG=1
    
    # System path of the 1-wire devices
    #W1_DEVICES_PATH=/sys/bus/w1/devices
    `;
    const dotEnvFile = path.join(__dirname, '.env');
    if (!fs.existsSync(dotEnvFile)) {
        fs.writeFileSync(dotEnvFile, dotEnvContent, { encoding: 'utf-8' });
    }
    console.log(`- ioBroker.ds18b20 remote client -
    
    Basic setup done.
    
    Please adjust the settings in the .env file.
    
    To manually start the client just run:
      node ds18b20-remote-client.js
    
    To setup the SystemD service, please run:
      sudo cp ${SYSTEMD_SERVICE_NAME} /etc/systemd/system/${SYSTEMD_SERVICE_NAME}
      sudo systemctl daemon-reload
      sudo systemctl enable ${SYSTEMD_SERVICE_NAME}
      sudo systemctl start ${SYSTEMD_SERVICE_NAME}
    `);
    //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0dXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcmVtb3RlL3NldHVwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBTUEseUJBQXlCO0FBQ3pCLHlCQUF5QjtBQUN6Qiw2QkFBNkI7QUFFN0IsTUFBTSxvQkFBb>
    
    pi@pi4-Master:~/ds18b20-remote $ node ds18b20-remote-client.js
    - ioBroker.ds18b20 remote client -
    [Error] No ADAPTER_HOST given!
    
    pi@pi4-Master:~/ds18b20-remote $ sudo systemctl status iobroker-ds18b20-remote.service
    ● iobroker-ds18b20-remote.service - ioBroker.ds18b20 remote client
         Loaded: loaded (/etc/systemd/system/iobroker-ds18b20-remote.service; enabled; vendor preset: enabled)
         Active: failed (Result: exit-code) since Wed 2022-11-23 10:56:00 CET; 23s ago
           Docs: https://github.com/crycode-de/ioBroker.ds18b20
        Process: 10290 ExecStart=/usr/bin/node /home/pi/ds18b20-remote/ds18b20-remote-client.js (code=exited, status=1/FAILURE)
       Main PID: 10290 (code=exited, status=1/FAILURE)
            CPU: 183ms
    
    Nov 23 10:56:00 pi4-Master systemd[1]: iobroker-ds18b20-remote.service: Scheduled restart job, restart counter is at 5.
    Nov 23 10:56:00 pi4-Master systemd[1]: Stopped ioBroker.ds18b20 remote client.
    Nov 23 10:56:00 pi4-Master systemd[1]: iobroker-ds18b20-remote.service: Start request repeated too quickly.
    Nov 23 10:56:00 pi4-Master systemd[1]: iobroker-ds18b20-remote.service: Failed with result 'exit-code'.
    Nov 23 10:56:00 pi4-Master systemd[1]: Failed to start ioBroker.ds18b20 remote client.
    pi@pi4-Master:~/ds18b20-remote $
    
    

    Für alle die auch nicht so gut auf Linux sind, die Lösung ist:

    pi@pi4-Master:~/ds18b20-remote $ sudo nano .env
    

    sieht dann so aus:

    
    # Settings for the ioBroker.ds18b20 remote client
    
    # Unique ID for this remote system
    SYSTEM_ID=Pi-4-Master
    
    # IP or hostname of the ioBroker host running the adapter
    ADAPTER_HOST=192.168.178.68
    
    # Port from the adapter config
    ADAPTER_PORT=1820
    
    # Encryption key from the adapter config
    ADAPTER_KEY=dea3458098c294f22546bbd5367a224a4b9082808xxxxxxxxx
    
    # Enable debug log output
    #DEBUG=1
    
    # System path of the 1-wire devices
    #W1_DEVICES_PATH=/sys/bus/w1/devices
    
    
    

    Mfg

    Tom

    Raspi 4 mit aktuellem IoBroker Master (The Brain)
    Raspi 4 mit aktuellem IoBroker Slave und DS18b20 für Warmwasser und Pufferspeicher
    Raspi 4 mit aktuellem Motioneye
    3 x Heizstab zur PV-Eigenverbrauchsoptimierung
    ETS 5 Professionel - 5.7.5
    Samsung Tab 2 - 10.1
    Buskomponenten von MDT

    1 Antwort Letzte Antwort
    1
    Antworten
    • In einem neuen Thema antworten
    Anmelden zum Antworten
    • Älteste zuerst
    • Neuste zuerst
    • Meiste Stimmen


    Support us

    ioBroker
    Community Adapters
    Donate

    476

    Online

    32.7k

    Benutzer

    82.4k

    Themen

    1.3m

    Beiträge
    Community
    Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
    ioBroker Community 2014-2025
    logo
    • Anmelden

    • Du hast noch kein Konto? Registrieren

    • Anmelden oder registrieren, um zu suchen
    • Erster Beitrag
      Letzter Beitrag
    0
    • Home
    • Aktuell
    • Tags
    • Ungelesen 0
    • Kategorien
    • Unreplied
    • Beliebt
    • GitHub
    • Docu
    • Hilfe