rgavril / homebridge-xiaomi-air-purifier3

Homebridge plugin for controlling Xiaomi Air Purifier 3/3H
46 stars 7 forks source link

crashes HB after proper plugin install #19

Open rangerek opened 3 years ago

rangerek commented 3 years ago

Oct 15 12:53:01 homebridge homebridge[32468]: [10/15/2020, 12:53:01 PM] ERROR LOADING PLUGIN homebridge-xiaomi-air-purifier3: Oct 15 12:53:01 homebridge homebridge[32468]: [10/15/2020, 12:53:01 PM] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined Oct 15 12:53:01 homebridge homebridge[32468]: at validateString (internal/validators.js:125:11) Oct 15 12:53:01 homebridge homebridge[32468]: at Object.join (path.js:1147:7) Oct 15 12:53:01 homebridge homebridge[32468]: at userData (/usr/local/lib/node_modules/homebridge-xiaomi-air-purifier3/node_modules/appdirectory/lib/appdirectory.js:21:29) Oct 15 12:53:01 homebridge homebridge[32468]: at AppDirectory._setTemplates (/usr/local/lib/node_modules/homebridge-xiaomi-air-purifier3/node_modules/appdirectory/lib/appdirectory.js:134:34) Oct 15 12:53:01 homebridge homebridge[32468]: at new AppDirectory (/usr/local/lib/node_modules/homebridge-xiaomi-air-purifier3/node_modules/appdirectory/lib/appdirectory.js:129:10) Oct 15 12:53:01 homebridge homebridge[32468]: at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-xiaomi-air-purifier3/node_modules/miio/lib/tokens.js:8:14) Oct 15 12:53:01 homebridge homebridge[32468]: at Module._compile (internal/modules/cjs/loader.js:778:30) Oct 15 12:53:01 homebridge homebridge[32468]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) Oct 15 12:53:01 homebridge homebridge[32468]: at Module.load (internal/modules/cjs/loader.js:653:32) Oct 15 12:53:01 homebridge homebridge[32468]: at tryModuleLoad (internal/modules/cjs/loader.js:593:12) Oct 15 12:53:01 homebridge homebridge[32468]: [10/15/2020, 12:53:01 PM] ====================

this is not my first plugin install and never seen such an issue :(

rangerek commented 3 years ago

not sure if this plugin is still maintained :( as there is no update - my temporary solution was to hardcode the paths into var /root/.local/ or /root/.cache/ - but need to understand why it returns undefined while executing node command to show process.env returns: > console.log(process.env) { SHELL: '/bin/bash', LANGUAGE: 'en_US:en', PWD: '/root', LOGNAME: 'root', HOME: '/root', LANG: 'en_US.UTF-8', TERM: 'xterm-256color', USER: 'root', SHLVL: '1', PATH: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', MAIL: '/var/mail/root', _: '/usr/local/bin/node' }

maxmacstn commented 3 years ago

I've just installed this plugin and it seems to works perfectly with my Mi Air Purifier 3H (Global version).

My Setup

HomeBridge 1.1.6 OS : Raspbian GNU/Linux Buster (10) Node JS Version: v10.21.0 NPM version: v6.14.5 Storage path: /home/pi/.homebridge Config path: /home/pi/.homebridge/config.json