WebThingsIO / zigbee-adapter

Zigbee adapter add-on for WebThings Gateway
Mozilla Public License 2.0
46 stars 29 forks source link

Adapter not starting after update to 0.21.0 #314

Closed damooooooooooh closed 3 years ago

damooooooooooh commented 3 years ago

Seems to be missing a file manifest.json in folder lib

Error:

2021-06-01 00:13:47.821 INFO : Loading add-on: zigbee-adapter 2021-06-01 00:13:49.809 INFO : zigbee-adapter: Opening database: /home/pi/.webthings/config/db.sqlite3 2021-06-01 00:13:49.865 INFO : zigbee-adapter: Ignoring https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/schema.json because it has no messageType 2021-06-01 00:13:51.698 INFO : zigbee-adapter: Ignoring https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/messages/definitions.json because it has no messageType 2021-06-01 00:13:55.027 INFO : zigbee-adapter: Loading add-on zigbee-adapter from /home/pi/.webthings/addons/zigbee-adapter 2021-06-01 00:13:55.037 ERROR : zigbee-adapter: { Error: Cannot find module './manifest.json' 2021-06-01 00:13:55.039 ERROR : zigbee-adapter: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) 2021-06-01 00:13:55.040 ERROR : zigbee-adapter: at Function.Module._load (internal/modules/cjs/loader.js:562:25) 2021-06-01 00:13:55.041 ERROR : zigbee-adapter: at Module.require (internal/modules/cjs/loader.js:692:17) 2021-06-01 00:13:55.043 ERROR : zigbee-adapter: at require (internal/modules/cjs/helpers.js:25:18) 2021-06-01 00:13:55.044 ERROR : zigbee-adapter: at Object. (/home/pi/.webthings/addons/zigbee-adapter/lib/index.js:11:18) 2021-06-01 00:13:55.046 ERROR : zigbee-adapter: at Module._compile (internal/modules/cjs/loader.js:778:30) 2021-06-01 00:13:55.047 ERROR : zigbee-adapter: at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) 2021-06-01 00:13:55.048 ERROR : zigbee-adapter: at Module.load (internal/modules/cjs/loader.js:653:32) 2021-06-01 00:13:55.049 ERROR : zigbee-adapter: at tryModuleLoad (internal/modules/cjs/loader.js:593:12) 2021-06-01 00:13:55.050 ERROR : zigbee-adapter: at Function.Module._load (internal/modules/cjs/loader.js:585:3) code: 'MODULE_NOT_FOUND' }

chas-iot commented 3 years ago

I worked around this by logging in to raspberry pi

cd .webthings/addons/zigbee-adapter
cp manifest.json lib

Once running, the adapter now defaults to not probing serial ports for zigbee dongles, which means that the legacy adapter is switched off. This is easy to resolve in the gateway configuration

damooooooooooh commented 3 years ago

I rolled back to the previous version manually, anyhow the issue needs to be resolved at the package level. I'm sure most implementations out there are broken.

riccardocossu commented 3 years ago

How do you roll back? I have the same issue... I tried changing the require to "../manifest.json" but it still didn't work: all BT devices were offline to the gateway. I guess it has to do with "looking in the wrong place", like the manifest file...

damooooooooooh commented 3 years ago

Do at your own risk, note the package I downloaded (wget) from the previous release is for Raspberry Pi 3. You will need to check which version is for your pi and download from the releases here: https://github.com/WebThingsIO/zigbee-adapter/releases/tag/0.20.0

Note creation of the .git folder should prevent the app auto-updating to the broken version again.

log onto the gateway then

cd /home/pi/.webthings/addons
rm zigbee-adapter -r
wget https://github.com/WebThingsIO/zigbee-adapter/releases/download/0.20.0/zigbee-adapter-0.20.0-linux-arm-v10.tgz
tar -xvf zigbee-adapter-0.20.0-linux-arm-v10.tgz
mv package zigbee-adapter
cd zigbee-adapter/
mkdir .git
sudo systemctl restart webthings-gateway.service
benfrancis commented 3 years ago

@tim-hellhake Will rolling back https://github.com/WebThingsIO/zigbee-adapter/commit/f0daf090ed45ff2adcec3969fdc72c4c87547420 fix this?

tim-hellhake commented 3 years ago

I removed the remaining manifest imports. The next update should fix it. Sorry for the inconvenience.

riccardocossu commented 3 years ago

Confirmed fixed for me