Danke an alle!
NEWS
W
Latest posts made by Wladimir
-
State von Type Array
Ich habe einen State von Type 'Array' erstellt und versuche den zu setzten.
setState("javascript.0.Alexa.Test", ["1", "2", "3"]);
Im log kommt folgende Warnung:
Wrong type of javascript.0.Alexa.Test: "object". Please fix, while deprecated and will not work in next versions.
State definition:
{ "from": "system.adapter.admin.0", "ts": 1543270856111, "common": { "name": "Alexa.Test", "role": "", "type": "array", "read": true, "write": true }, "native": {}, "acl": { "object": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator", "state": 1636 }, "_id": "javascript.0.Alexa.Test", "type": "state" }
Kann mir jemand sagen, was ich falsch mache?
-
Influxdb adapter: storeState function
Hallo zusammen,
ich versuche die Funktion "storeState" im Script zu verwendet.
Der Code sieht so aus:
sendTo('influxdb.0', 'storeState', { id: 'xxx', state: {ts: Date.now(), val: 2, ack: true, from: "yyy", q: 0 } });
Leider bekomme ich immer folgenden Fehler:
influxdb.0 2018-11-06 19:11:57.435 error at Socket.onpacket (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/socket.js:236:12) influxdb.0 2018-11-06 19:11:57.435 error at Socket.onevent (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/socket.js:278:10) influxdb.0 2018-11-06 19:11:57.435 error at Socket.Emitter.emit (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/component-emitter/index.js:133:20) influxdb.0 2018-11-06 19:11:57.435 error at Socket. <anonymous>(/opt/iobroker/node_modules/iobroker.js-controller/lib/states/statesInMemClient.js:52:30) influxdb.0 2018-11-06 19:11:57.435 error at Object.change (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:3400:34) influxdb.0 2018-11-06 19:11:57.435 error at Adapter.emit (events.js:211:7) influxdb.0 2018-11-06 19:11:57.435 error at emitOne (events.js:116:13) influxdb.0 2018-11-06 19:11:57.435 error at Adapter. <anonymous>(/opt/iobroker/node_modules/iobroker.influxdb/main.js:131:5) influxdb.0 2018-11-06 19:11:57.435 error at processMessage (/opt/iobroker/node_modules/iobroker.influxdb/main.js:310:9) influxdb.0 2018-11-06 19:11:57.435 error at storeState (/opt/iobroker/node_modules/iobroker.influxdb/main.js:1249:83) influxdb.0 2018-11-06 19:11:57.435 error TypeError: Cannot read property 'id' of undefined influxdb.0 2018-11-06 19:11:57.435 error message messagebox.system.adapter.influxdb.0 [object Object] Cannot read property 'id' of undefined</anonymous></anonymous>
Hat das schon mal jemand von euch gemacht?