NEWS
[Vorlage] Xiaomi Airpurifier 3H u.a. inkl. Token auslesen.
-
@thomas-braun Da hast du sicher Recht! Dennoch Dank dir, habe dazugelernt!
-
@haselchen sagte in [Vorlage] Xiaomi Airpurifier 3H u.a. inkl. Token auslesen.:
Kann ich mich per Skript irgendwie auch abmelden, dass ich quasi bei 0 beginne?
JS Controller neustarten sollte es tun.
-
Hallo zusammen,
ich bekommen seit heute ein paar fehlermeldungen
javascript.0 2021-11-12 15:35:51.771 error (1123) at RefreshGenericDpsTicker (script.js.MiHomeGeraete:893:17) javascript.0 2021-11-12 15:35:51.771 error (1123) at MiCloudProtocol.getDevices (/opt/iobroker/node_modules/iobroker.javascript/node_modules/node-mihome/lib/protocol-micloud.js:121:18) javascript.0 2021-11-12 15:35:51.770 error (1123) at processTicksAndRejections (internal/process/task_queues.js:97:5) javascript.0 2021-11-12 15:35:51.770 error (1123) at runMicrotasks (<anonymous>) javascript.0 2021-11-12 15:35:51.770 error (1123) at MiCloudProtocol.request (/opt/iobroker/node_modules/iobroker.javascript/node_modules/node-mihome/lib/protocol-micloud.js:107:13) javascript.0 2021-11-12 15:35:51.770 error (1123) script.js.MiHomeGeraete: Error: Request error with status Unauthorized javascript.0 2021-11-12 15:35:41.767 error (1123) at RefreshGenericDpsTicker (script.js.MiHomeGeraete:893:17) javascript.0 2021-11-12 15:35:41.766 error (1123) at MiCloudProtocol.getDevices (/opt/iobroker/node_modules/iobroker.javascript/node_modules/node-mihome/lib/protocol-micloud.js:121:18) javascript.0 2021-11-12 15:35:41.766 error (1123) at processTicksAndRejections (internal/process/task_queues.js:97:5) javascript.0 2021-11-12 15:35:41.766 error (1123) at runMicrotasks (<anonymous>) javascript.0 2021-11-12 15:35:41.766 error (1123) at MiCloudProtocol.request (/opt/iobroker/node_modules/iobroker.javascript/node_modules/node-mihome/lib/protocol-micloud.js:107:13) javascript.0 2021-11-12 15:35:41.765 error (1123) script.js.MiHomeGeraete: Error: Request error with status Unauthorized javascript.0 2021-11-12 15:35:31.759 error (1123) at RefreshGenericDpsTicker (script.js.MiHomeGeraete:893:17) javascript.0 2021-11-12 15:35:31.759 error (1123) at MiCloudProtocol.getDevices (/opt/iobroker/node_modules/iobroker.javascript/node_modules/node-mihome/lib/protocol-micloud.js:121:18) javascript.0 2021-11-12 15:35:31.759 error (1123) at processTicksAndRejections (internal/process/task_queues.js:97:5) javascript.0 2021-11-12 15:35:31.759 error (1123) at runMicrotasks (<anonymous>) javascript.0 2021-11-12 15:35:31.759 error (1123) at MiCloudProtocol.request (/opt/iobroker/node_modules/iobroker.javascript/node_modules/node-mihome/lib/protocol-micloud.js:107:13) javascript.0 2021-11-12 15:35:31.758 error (1123) script.js.MiHomeGeraete: Error: Request error with status Unauthorized
jemand eine Idee woran es liegt?
Christian
-
@christian-sandkaulen sagte in [Vorlage] Xiaomi Airpurifier 3H u.a. inkl. Token auslesen.:
jemand eine Idee woran es liegt?
Schon versucht den JS Controller neu zu starten?
-
Hab mit einen 3H gekauft um Ihn ggf. über IObroker einzubinden. Aber irgendwie bin ich mit dem Automatikmodus nicht zufrieden. Ich weiß, geht hier um die Einbindung und nicht das Gerät. Aber wennihr schon so über das gerät sprecht, dachte ich ich frage mal.
-
@gluecksmann sagte in [Vorlage] Xiaomi Airpurifier 3H u.a. inkl. Token auslesen.:
Hab mit einen 3H gekauft um Ihn ggf. über IObroker einzubinden. Aber irgendwie bin ich mit dem Automatikmodus nicht zufrieden. Ich weiß, geht hier um die Einbindung und nicht das Gerät. Aber wennihr schon so über das gerät sprecht, dachte ich ich frage mal.
Und was ist jetzt die Frage?
-
Hallo zusammen,
ich habe zu diesem Thema auch mal eine Frage, ich habe auch den 3H Luftreiniger und das Skript installiert.
Ich bin genau nach der Anleitung vorgegangen- JS-Adapter Einstellungen vorgenommen:
- Zugangsdaten im Skript hinterlegt
- Überprüft ob die zugehörige Datei (zhimi.airpurifier.mb3.js) im Ordner \node_modules\node-mihome\lib\devices vorhanden ist.
Das Skript läuft auch, legt die Datenpunkte an, aber alle Werte sind leer, außer im Ordner info:
Hier das Log:
2021-11-20 11:49:00.285 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Retrieving your in de registered MiHome Devices 2021-11-20 11:49:00.663 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Found 1 MiHome Devices, those are: 2021-11-20 11:49:00.664 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Mi Air Purifier 3/3H 2021-11-20 11:49:00.666 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Now searching for supported Devices... 2021-11-20 11:49:00.667 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Device Mi Air Purifier 3/3H is supported, creating DataPoints 2021-11-20 11:49:00.669 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Reaching PrepareDeviceDps, did=394459228 model=zhimi.airpurifier.mb3 2021-11-20 11:49:00.671 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Reaching CreateStates() 2021-11-20 11:49:00.689 - info: javascript.0 (3248) script.js.Luftreiniger_3H: 24 States created, now setting up channels! 2021-11-20 11:49:00.692 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Reaching main 2021-11-20 11:49:00.693 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Reaching WriteGenericDpValues() 2021-11-20 11:49:00.695 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Reaching CreateDevices 2021-11-20 11:49:00.696 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Now creating device for zhimi.airpurifier.mb3 / 394459228 / 192.168.179.5 / 1c3730d1b8b95ab38a8d5cf3be192b5a / 10000 2021-11-20 11:49:00.699 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Created device {"_events":{},"_eventsCount":0,"_maxListeners":100,"id":"394459228","address":"192.168.179.5","token":"1c3730d1b8b95ab38a8d5cf3bxxxxxxxa","protocol":"local","refresh":10000,"_properties":{},"_propertiesToMonitor":["air-purifier:fault","air-purifier:on","air-purifier:fan-level","air-purifier:mode","environment:pm2.5-density","environment:relative-humidity","environment:temperature","filter:filter-life-level","filter:filter-used-time","alarm:alarm","indicator-light:brightness","indicator-light:on","physical-controls-locked:physical-controls-locked"],"_miotSpec":null,"_miotSpecType":"urn:miot-spec-v2:device:air-purifier:0000A007:zhimi-mb3:2","model":"zhimi.airpurifier.mb3","setter":{},"definition":{"info":[{"id":"localip","initial":"","forceCreation":false,"common":{"read":true,"write":true,"name":"Ip Adress","type":"string","role":"value","def":""}},{"id":"token","initial":"","forceCreation":false,"common":{"read":true,"write":true,"name":"Token","type":"string","role":"value","def":""}},{"id":"did","initial":"","forceCreation":false,"common":{"read":true,"write":true,"name":"Device Id","type":"string","role":"value","def":""}},{"id":"model","initial":"","forceCreation":false,"common":{"read":true,"write":true,"name":"Model","type":"string","role":"value","def":""}},{"id":"rssi","initial":0,"forceCreation":false,"common":{"read":true,"write":false,"name":"rssi","type":"number","role":"value.rssi","def":0}},{"id":"name","initial":"","forceCreation":false,"common":{"read":true,"write":true,"name":"Name","type":"string","role":"value","def":""}},{"id":"isOnline","initial":false,"forceCreation":false,"common":{"read":true,"write":true,"name":"Is online","type":"boolean","role":"value","def":false}}],"model":"zhimi.airpurifier.mb3","description":"Purifier 3H","setter":{},"common":[{"name":"air-purifier.on","type":"boolean","role":"switch","read":true,"write":true,"min":false,"max":true},{"name":"air-purifier.fault","type":"number","read":true,"write":false,"min":0,"max":5,"states":{"0":"No faults","1":"m1_run","2":"m1_stuck","3":"no_sensor","4":"error_hum","5":"error_temp","6":"timer_error1","7":"timer_error2"},"role":"state"},{"name":"air-purifier.mode","type":"number","read":true,"write":true,"min":0,"max":3,"states":{"0":"auto","1":"sleep","2":"favorite","3":"fanset"},"role":"state"},{"name":"air-purifier.fan-level","type":"number","read":true,"write":true,"min":1,"max":3,"role":"state"},{"name":"alarm.alarm","type":"boolean","read":true,"write":true,"role":"state"},{"name":"indicator-light.brightness","type":"number","read":true,"write":true,"min":0,"max":2,"role":"state"},{"name":"indicator-light.on","type":"boolean","role":"switch","read":true,"write":true,"min":false,"max":true},{"name":"environment.temperature","type":"number","role":"value.temperature","read":true,"write":false,"min":-40,"max":125,"unit":"°C"},{"name":"motor-speed.motor-speed","type":"number","read":true,"write":false,"min":0,"max":3000,"unit":"rpm","role":"state"},{"name":"motor-speed.motor-set-speed","type":"number","read":true,"write":false,"min":0,"max":3000,"unit":"rpm","role":"state"},{"name":"motor-speed.favorite-fan-level","type":"number","read":true,"write":true,"min":0,"max":14,"role":"state"},{"name":"use-time.use-time","type":"number","read":true,"write":false,"role":"state"},{"name":"environment.relative-humidity","type":"number","role":"value.humidity","read":true,"write":false,"min":0,"max":100,"unit":"%"},{"name":"environment.pm2_5-density","type":"number","read":true,"write":false,"min":0,"max":600,"unit":"μg/m³","role":"state"},{"name":"filter.filter-life-level","type":"number","read":true,"write":false,"min":0,"max":100,"unit":"%","role":"state"},{"name":"filter.filter-used-time","type":"number","read":true,"write":false,"unit":"h","role":"state"},{"name":"physical-controls-locked.physical-controls-locked","type":"boolean","role":"switch","read":true,"write":true,"min":false,"max":true}]},"firstrun":true,"rssi":0,"isOnline":true} now fetching data 2021-11-20 11:49:02.604 - info: influxdb.0 (8536) Store 11 buffered influxDB history points 2021-11-20 11:49:04.851 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Init Device# 0 - device="zhimi.airpurifier.mb3" 2021-11-20 11:49:04.852 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Setting trigger #0 for zhimi.airpurifier.mb3 2021-11-20 11:49:04.854 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Reaching CreateDpTrigger 2021-11-20 11:49:04.854 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Setting DataPointTrigger #0 for zhimi.airpurifier.mb3 2021-11-20 11:49:04.855 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Setting Datapoint Trigger for javascript.0.MiHomeAll.394459228.air-purifier.on / read=true write=true 2021-11-20 11:49:04.856 - info: javascript.0 (3248) script.js.Luftreiniger_3H: No Datapoint Trigger set for air-purifier.fault because its readonly. 2021-11-20 11:49:04.856 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Setting Datapoint Trigger for javascript.0.MiHomeAll.394459228.air-purifier.mode / read=true write=true 2021-11-20 11:49:04.856 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Setting Datapoint Trigger for javascript.0.MiHomeAll.394459228.air-purifier.fan-level / read=true write=true 2021-11-20 11:49:04.857 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Setting Datapoint Trigger for javascript.0.MiHomeAll.394459228.alarm.alarm / read=true write=true 2021-11-20 11:49:04.857 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Setting Datapoint Trigger for javascript.0.MiHomeAll.394459228.indicator-light.brightness / read=true write=true 2021-11-20 11:49:04.858 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Setting Datapoint Trigger for javascript.0.MiHomeAll.394459228.indicator-light.on / read=true write=true 2021-11-20 11:49:04.858 - info: javascript.0 (3248) script.js.Luftreiniger_3H: No Datapoint Trigger set for environment.temperature because its readonly. 2021-11-20 11:49:04.858 - info: javascript.0 (3248) script.js.Luftreiniger_3H: No Datapoint Trigger set for motor-speed.motor-speed because its readonly. 2021-11-20 11:49:04.859 - info: javascript.0 (3248) script.js.Luftreiniger_3H: No Datapoint Trigger set for motor-speed.motor-set-speed because its readonly. 2021-11-20 11:49:04.859 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Setting Datapoint Trigger for javascript.0.MiHomeAll.394459228.motor-speed.favorite-fan-level / read=true write=true 2021-11-20 11:49:04.860 - info: javascript.0 (3248) script.js.Luftreiniger_3H: No Datapoint Trigger set for use-time.use-time because its readonly. 2021-11-20 11:49:04.860 - info: javascript.0 (3248) script.js.Luftreiniger_3H: No Datapoint Trigger set for environment.relative-humidity because its readonly. 2021-11-20 11:49:04.860 - info: javascript.0 (3248) script.js.Luftreiniger_3H: No Datapoint Trigger set for environment.pm2_5-density because its readonly. 2021-11-20 11:49:04.861 - info: javascript.0 (3248) script.js.Luftreiniger_3H: No Datapoint Trigger set for filter.filter-life-level because its readonly. 2021-11-20 11:49:04.861 - info: javascript.0 (3248) script.js.Luftreiniger_3H: No Datapoint Trigger set for filter.filter-used-time because its readonly. 2021-11-20 11:49:04.861 - info: javascript.0 (3248) script.js.Luftreiniger_3H: Setting Datapoint Trigger for javascript.0.MiHomeAll.394459228.physical-controls-locked.physical-controls-locked / read=true write=true
JS_Adapter ist Version v5.2.13 / SkriptVersion = "0.2.25"; //vom 23.08.2021
Habt ihr noch Ideen was ich anders machen muss?
- JS-Adapter Einstellungen vorgenommen:
-
@pittini ob es noch mehr Leute gibt die Pronleme mit dem Automatik Modus haben
-
@alkazar deine id musst du nicht im screen unkenntlich machen, diese steht im log, sowie dein token
-
@gluecksmann von welchen Problemen sprichts du?
-
Der Automatikmodus reagiert sehr schlecht... Es muss schon direkt daneben eine Kerze ausgepustet werden das er höher schaltet... Hab einen Reiniger von Philips, der schlägt an wenn ich das Bett aufschüttel
-
@gluecksmann sagte in [Vorlage] Xiaomi Airpurifier 3H u.a. inkl. Token auslesen.:
Der Automatikmodus reagiert sehr schlecht
hat aber nichts mit dem Script zu tun und war auch nicht ersichtlich, was du mit deiner Frage effektiv wissen wollest.
Ich habe zwar keinen direkten Vergleich mit anderen Geräten, kann aber soviel sagen, wenn z.b. im Bad Haare geföhnt wird, springt im Schlafzimmer der Lüfter an. -
OK, das doch eine Antwort...fraglich ist was dann das Problem bei meinem ist....
-
@gluecksmann sagte in [Vorlage] Xiaomi Airpurifier 3H u.a. inkl. Token auslesen.:
OK, das doch eine Antwort...fraglich ist was dann das Problem bei meinem ist....
Sensorfilter dicht?
-
@gluecksmann sagte in [Vorlage] Xiaomi Airpurifier 3H u.a. inkl. Token auslesen.:
Es muss schon direkt daneben eine Kerze ausgepustet werden das er höher schaltet... Hab einen Reiniger von
Das Skript kann ja den Dreck-Wert auslesen und man kann die Geschwindigkeit steuern.
Ich habe es bei mir so gemacht, dass wenn der Dreck > 15 ist, die Geschwindigkeit auf Stufe 2 gesetzt wird und ein Shelly eingeschaltet wird, an dem ein Söhnle-Luftreiniger steckt, der im Flur steht.
Ist der Dreck kleiner 15, schaltet er wieder auf Auto und den Shelly aus.
-
Ich habe ja das Problem gehabt das der "Dreck" Wert immer 1 war.
-
Hallo zusammen.
Ich habs mittlerweile hinbekommen, habe den Luftreiniger nun nochmal neu mit dem Netzwerk verbunden und es funktioniert nun.
Aber ich hab noch ne Frage:
Wenn ich den Modus ändern will habe ich zwei Zeilen, den Werttyp und den Wert:
{ "common": { "name": "air-purifier.mode", "type": "number", "read": true, "write": true, "min": 0, "max": 3, "states": { "0": "auto", "1": "sleep", "2": "favorite", "3": "fanset" }, "role": "state" }, "native": {}, "type": "state", "from": "system.adapter.javascript.0", "user": "system.user.admin", "ts": 1637404094112, "_id": "javascript.0.MiHomeAll.394459228.air-purifier.mode", "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }
Was muss ich aus der VIS senden um diesen zu ändern, Zahl z.B. 0 geht nicht und String z.B. auto funktioniert auch nicht.
UPDATE:
Nachdem ich die VIS einmal neugeladen habe geht es plötzlich - mit der Zahl! -
Hallo zusammen,
bisher funktionierte bei mir das Skript für den Airpurifier 3H relativ problemlos. Heute habe ich das System mal geupdatet und mit dem neustem js-Adapter bekomme ich das Skript (ohne jegliche Änderung" nicht mehr zum Laufen ;-(
Könnte mir jemand netterweise behilflich sein?
VG vsa
avascript.0 2021-12-29 22:31:06.571 error at Script.runInContext (vm.js:130:18) javascript.0 2021-12-29 22:31:06.571 error at script.js.common.zhimi.airpurifier.mb3:130:3 javascript.0 2021-12-29 22:31:06.571 error at script.js.common.zhimi.airpurifier.mb3:3:1 javascript.0 2021-12-29 22:31:06.570 error script.js.common.zhimi.airpurifier.mb3: ReferenceError: module is not defined javascript.0 2021-12-29 22:31:06.570 info script.js.common.zhimi.airpurifier.mb3: registered 0 subscriptions and 0 schedules javascript.0 2021-12-29 22:31:06.569 error at Script.runInContext (vm.js:130:18) javascript.0 2021-12-29 22:31:06.569 error at script.js.common.zhimi.airpurifier.mb3:130:3 javascript.0 2021-12-29 22:31:06.569 error at script.js.common.zhimi.airpurifier.mb3:1:16 javascript.0 2021-12-29 22:31:06.568 error at require (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:412:32) javascript.0 2021-12-29 22:31:06.568 error at require (internal/modules/cjs/helpers.js:74:18) javascript.0 2021-12-29 22:31:06.568 error at Module.require (internal/modules/cjs/loader.js:887:19) javascript.0 2021-12-29 22:31:06.567 error script.js.common.zhimi.airpurifier.mb3: Error: Cannot find module '../device-miio' javascript.0 2021-12-29 22:31:06.562 info Start javascript script.js.common.zhimi.airpurifier.mb3 javascript.0 2021-12-29 22:31:04.092 info script.js.common.Wetter_VIS: Material Design Widgets: Wetter Skript triggered by 'system.adapter.daswetter.0.alive' host.ioBroker-RasPi4 2021-12-29 22:31:04.052 error instance system.adapter.daswetter.0 terminated with code 15 (UNKNOWN_ERROR) javascript.0 2021-12-29 22:31:04.048 error at Script.runInContext (vm.js:130:18) javascript.0 2021-12-29 22:31:04.047 error at script.js.common.zhimi.airpurifier.mb3:130:3 javascript.0 2021-12-29 22:31:04.046 error at script.js.common.zhimi.airpurifier.mb3:3:1 javascript.0 2021-12-29 22:31:04.046 error script.js.common.zhimi.airpurifier.mb3: ReferenceError: module is not defined javascript.0 2021-12-29 22:31:04.045 info script.js.common.zhimi.airpurifier.mb3: registered 0 subscriptions and 0 schedules javascript.0 2021-12-29 22:31:04.044 error at Script.runInContext (vm.js:130:18) javascript.0 2021-12-29 22:31:04.044 error at script.js.common.zhimi.airpurifier.mb3:130:3 javascript.0 2021-12-29 22:31:04.043 error at script.js.common.zhimi.airpurifier.mb3:1:16 javascript.0 2021-12-29 22:31:04.043 error at require (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:412:32) javascript.0 2021-12-29 22:31:04.042 error at require (internal/modules/cjs/helpers.js:74:18) javascript.0 2021-12-29 22:31:04.042 error at Module.require (internal/modules/cjs/loader.js:887:19) javascript.0 2021-12-29 22:31:04.041 error script.js.common.zhimi.airpurifier.mb3: Error: Cannot find module '../device-miio' javascript.0 2021-12-29 22:31:04.033 info Start javascript script.js.common.zhimi.airpurifier.mb3 javascript.0 2021-12-29 22:31:04.026 info Stop script script.js.common.zhimi.airpurifier.mb3 javascript.0 2021-12-29 22:31:04.021 info Stop script script.js.common.zhimi.airpurifier.mb3
-
@vsa sagte in [Vorlage] Xiaomi Airpurifier 3H u.a. inkl. Token auslesen.:
airpurifier.mb3
Ist bei dir noch die Datei /opt/iobroker/node_modules/iobroker.javascript/node_modules/node-mihome/lib/devices/zhimi.airpurifier.mb3 vorhanden?
-
Es wurde vermutlich am Auth Verfahren was geändert.
Ist Dir das schon bekannt?
Bei mir startet das Skript nicht mehr.javascript.0 2022-01-02 18:36:14.031 error (884) at Init (script.js.Steuerung_Ventilator_und_Lüfter.Lüfter_und_Ventilator:795:21) javascript.0 2022-01-02 18:36:14.031 error (884) at MiCloudProtocol.getDevices (/opt/iobroker/node_modules/iobroker.javascript/node_modules/node-mihome/lib/protocol-micloud.js:121:18) javascript.0 2022-01-02 18:36:14.030 error (884) at processTicksAndRejections (internal/process/task_queues.js:97:5) javascript.0 2022-01-02 18:36:14.030 error (884) at MiCloudProtocol.request (/opt/iobroker/node_modules/iobroker.javascript/node_modules/node-mihome/lib/protocol-micloud.js:107:13) javascript.0 2022-01-02 18:36:14.028 error (884) script.js.Steuerung_Ventilator_und_Lüfter.Lüfter_und_Ventilator: Error: Request error with status Unauthorized