NEWS
Adapter für mehrere RPI
-
Ich bin nach dieser Anleitung vorgegangen.
http://www.iobroker.net/docu/?page_id=3068&lang=de
Redis habe ich zum Testen aktiviert.
iobroker setup custom type of states DB [file, redis], default [file] : redis
Zuvor habe ich die ip unter geändert.
nano /etc/redis/redis.conf bind 0.0.0.0
Habe es danach aber wieder auf default gestellt.
Ob file oder redis, brachte keine Verbesserung.
Was mir aber aufgefallen ist, unter:
Host of objects DB(file), default[127.0.0.1]
wird keine andere IP Adresse (Master: 0.0.0.0, Slave: 192.168.178.35) übernommenen/gespeichert.
-
Sollte aber.
Woran machst du das fest?
Beim nächsten Aufruf steht da erst einmal der default Wert.
Da musst du in der iobrojer.conf (?) Nachsehen.
Gruß Rainer
-
Datei /opt/iobroker/iobroker-data/iobroker.json
Bei lokaler DB:
{ "system": { "memoryLimitMB": 0, "hostname": "" }, "multihostService": { "enabled": false, "secure": true }, "network": { "IPv4": true, "IPv6": true, "bindAddress": null, "useSystemNpm": true }, "objects": { "type": "file", "typeComment": "Possible values: 'file' - [port 9001], redis - [port 6379], couch - [port 5984].", "host": "127.0.0.1", "port": 9001, "user": "", "pass": "", "noFileCache": false, "connectTimeout": 2000 }, "states": { "type": "file", "typeComment": "Possible values: 'file' - [port 9000], 'redis' - [port 6379].", "host": "127.0.0.1", "port": 9000, "maxQueue": 1000, "options": { "auth_pass": null, "retry_max_delay": 15000 } }, [...]
-
Das ist auch alles merkwürdig.
Die IP wurde richtig übernommen.
Anbei der Code vom Master
"system": { "memoryLimitMB": 0, "hostname": "" }, "multihostService": { "enabled": true, "secure": true, "password": "muster" }, "network": { "IPv4": true, "IPv6": true, "bindAddress": null, "useSystemNpm": true }, "objects": { "type": "file", "typeComment": "Possible values: 'file' - [port 9001], redis - [port 6379],$ "memoryLimitMB": 0, "hostname": "" }, "multihostService": { "enabled": true, "secure": true, "password": "muster" }, "network": { "IPv4": true, "IPv6": true, "bindAddress": null, "useSystemNpm": true }, "objects": { "type": "file", "typeComment": "Possible values: 'file' - [port 9001], redis - [port 6379],$ "host": "0.0.0.0", "port": 9001, "pass": "", "noFileCache": false, "connectTimeout": 2000 }, "states": { "type": "file", "typeComment": "Possible values: 'file' - [port 9000], 'redis' - [port 6379$ "host": "0.0.0.0", "port": 9000, "maxQueue": 1000, "options": { "auth_pass": null, "retry_max_delay": 15000 } }, "log": { "level": "info", "maxDays": 7, "noStdout": true, "file1": { "type": "file", "enabled": true, "filename": "log/iobroker", "fileext": ".log", "maxsize": null, "maxFiles": null }, "syslog1": { "enabled": false, "host": "localhost", "host_comment": "The host running syslogd, defaults to localhost.", "port_comment": "The port on the host that syslog is running on, defaul$ "protocol": "udp4", "protocol_comment": "The network protocol to log over (e.g. tcp4, udp4,$ "path_comment": "The path to the syslog dgram socket (i.e. /dev/log or $ "facility_comment": "Syslog facility to use (Default: local0).", "localhost": "iobroker", $ng from (Default: localhost).", "sysLogType_comment": "The type of the syslog protocol to use (Default:$ "app_name_comment": "The name of the application (Default: process.titl$ "eol_comment": "The end of line character to be added to the end of the$ } } }, "dataDirComment": "Always relative to iobroker.js-controller/", "dataDir": "../../iobroker-data/" }
Vom Slave
"system": { "memoryLimitMB": 0, "hostname": "" }, "multihostService": { "enabled": false, "secure": true }, "network": { "IPv4": true, "IPv6": true, "bindAddress": null, "useSystemNpm": true }, "objects": { "type": "file", "typeComment": "Possible values: 'file' - [port 9001], redis - [port 6379],$ "port": 9001, "user": "", "pass": "", "noFileCache": false, "connectTimeout": 2000 }, "states": { "type": "file", "typeComment": "Possible values: 'file' - [port 9000], 'redis' - [port 6379$ "host": "192.168.178.35", "port": 9000, "maxQueue": 1000, "options": { "auth_pass": null, "retry_max_delay": 15000 } }, "log": { "level": "info", "maxDays": 7, "noStdout": true, "transport": { "file1": { "type": "file", "enabled": true, "filename": "log/iobroker", "fileext": ".log", "maxsize": null, "maxFiles": null "syslog1": { "type": "syslog", "enabled": false, "host": "localhost", "host_comment": "The host running syslogd, defaults to localhost.", "port_comment": "The port on the host that syslog is running on, defaul$ "protocol": "udp4", "protocol_comment": "The network protocol to log over (e.g. tcp4, udp4,$ "path_comment": "The path to the syslog dgram socket (i.e. /dev/log or $ "facility_comment": "Syslog facility to use (Default: local0).", "localhost": "iobroker", "localhost_comment": "Host to indicate that log messages are coming fro$ "sysLogType_comment": "The type of the syslog protocol to use (Default:$ "app_name_comment": "The name of the application (Default: process.titl$ "eol_comment": "The end of line character to be added to the end of the$ } } }, "dataDirComment": "Always relative to iobroker.js-controller/", "dataDir": "../../iobroker-data/" }
-
Gib mal beim slave unter iobroker setup custom
Auch bei Objects die IP des masters ein
Gruß Rainer
-
Ich habe die IP Adresse neu eingegeben.
Nun wird sie unter /opt/iobroker/iobroker-data/iobroker.json auch angezeigt.
Ich bin mir aber sicher, dass ich diese IP bereits eingegeben hatte. :?
Habe versucht, einen Adapter auf dem Slave hinzuzufügen.
Bekomme immer wieder die gleiche Meldung.
$ ./iobroker add hilink undefined server error undefined Error: server error at Socket.onPacket (/root/node_modules/socket.io-client/node_modules/engine.io-client/lib/socket.js:445:19) at XHR. <anonymous>(/root/node_modules/socket.io-client/node_modules/engine.io-client/lib/socket.js:268:10) at XHR.Emitter.emit (/root/node_modules/socket.io-client/node_modules/component-emitter/index.js:133:20) at XHR.Transport.onPacket (/root/node_modules/socket.io-client/node_modules/engine.io-client/lib/transport.js:145:8) at callback (/root/node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling.js:144:10) at Object.exports.decodePayload (/root/node_modules/engine.io-parser/lib/index.js:309:18) at XHR.Polling.onData (/root/node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling.js:148:10) at Request. <anonymous>(/root/node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling-xhr.js:126:10) at Request.Emitter.emit (/root/node_modules/socket.io-client/node_modules/component-emitter/index.js:133:20) at Request.onData (/root/node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling-xhr.js:296:8)</anonymous></anonymous>
Anschließend habe ich die Verbindung zum Master getrennt und mich direkt auf den ioBroker angemeldet.
Hier kann die Adapter ohne Probleme installieren.
Nachtrag: Habe bei PI gerade komplett neu aufgesetzt.
Nun funktioniert alles!
Es ist aber trotzdem merkwürdig, dass es vorher nicht funktionierte! :?
-
Glückwunsch. Prima das es jetzt funktioniert. Darf ich noch fragen, welche npm-Version du jetzt nutzt und ob der Autostart auf dem PI sofort geklappt hat?
-
Danke!
Aktuell ist NPM 5.8.0 drauf.
Wobei ich auch bei dieser Neuinstallation das Problem hatte, dass NPM nicht vorhanden war bzw. mit installiert worden ist.
Ich habe mich an die folgende Anleitung gehalten. http://www.iobroker.net/docu/?page_id=5106&lang=de
Somit musste ich über
> sudo apt-get install npm
npm installieren, anschließend habe ich habe ich die Version 5.8.0 über> sudo npm install -g npm@5
eingespielt.Der Autostart hat auch nicht geklappt, da die Datei iobroker.sh. fehlte.
:lol: :mrgreen:
-
Sie fehlte im /etc/init.d-Ordner?
-
Korrekt.
/etc/init.d/iobroker.sh
Gibt es eigentlich noch mit der NPM Version 5.8.0 Probleme?
-
Das schaut man sich gerade an. Bei mir ging es mit npm 4.6.1 inkl. der automatischen init.d-Anpassung. Alles wird besser…