ioBroker.esphome
ioBroker.esphome copied to clipboard
Error when starting dashboard
!!! Before you start !!!
- [x] I have verified that there is not already an issue with the same problem
- [x] This is really a bug of current code, not an enhancement request (f.e. adding support for a new device type). There is a dedicated template for feature-requests.
Describe the bug
After successful installation I enabled the ESPhome Dashboard in the instance settings. Then the adapter crashes with error messages in the log. I also tried different installation methods with the same result everytime.
To Reproduce
Steps to reproduce the behavior:
- Install ESPHome adapter
- Create iobroker instance
- Activate dashboard
Expected behavior
I expected the Dashboard to start.
Logs (as screenshot and in text-form)
esphome.0 2024-04-12 09:46:46.005 info terminating
esphome.0 2024-04-12 09:46:45.982 error Exception-Code: MODULE_NOT_FOUND: Cannot find module '@mongodb-js/zstd-linux-arm-gnueabihf'Require stack:- /opt/iobroker/node_modules/@mongodb-js/zstd/index.js
esphome.0
2024-04-12 09:46:45.981 error Error: Cannot find module '@mongodb-js/zstd-linux-arm-gnueabihf'Require stack:- /opt/iobroker/node_modules/@mongodb-js/zstd/index.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1140:15) at Function.Module._load (node:internal/modules/cjs/loader:981:27) at Module.require (node:internal/modules/cjs/loader:1231:19) at require (node:internal/modules/helpers:177:18) at Object.
esphome.0 2024-04-12 09:46:45.980 error unhandled promise rejection: Cannot find module '@mongodb-js/zstd-linux-arm-gnueabihf'Require stack:- /opt/iobroker/node_modules/@mongodb-js/zstd/index.js
esphome.0 2024-04-12 09:46:45.980 error Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
esphome.0
2024-04-12 09:46:45.814 info [Error caught and send to Sentry, thank you collaborating!] error: Error: Cannot find module '@mongodb-js/zstd-linux-arm-gnueabihf'Require stack:- /opt/iobroker/node_modules/@mongodb-js/zstd/index.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1140:15) at Function.Module._load (node:internal/modules/cjs/loader:981:27) at Module.require (node:internal/modules/cjs/loader:1231:19) at require (node:internal/modules/helpers:177:18) at Object.
esphome.0 2024-04-12 09:46:45.646 info Native Integration of ESPHome Dashboard enabled
esphome.0 2024-04-12 09:46:45.636 info Try to connect to 192.168.0.14
esphome.0 2024-04-12 09:46:45.408 info starting. Version 0.5.0-beta.8 in /opt/iobroker/node_modules/iobroker.esphome, node: v18.20.2, js-controller: 5.0.19
If applicable, other logs (like compile logs in dashboard): ======================= SUMMARY ======================= v.2023-10-10
Static hostname: raspberrypi Icon name: computer Operating System: Raspbian GNU/Linux 12 (bookworm) Kernel: Linux 6.6.20+rpt-rpi-v8 Architecture: arm64
Installation: native Kernel: aarch64 Userland: armhf Timezone: Europe/Berlin (CEST, +0200) User-ID: 1000 X-Server: false Boot Target: graphical.target
Pending OS-Updates: 0 Pending iob updates: 0
Nodejs-Installation: /usr/bin/nodejs v18.20.2 /usr/bin/node v18.20.2 /usr/bin/npm 10.5.0 /usr/bin/npx 10.5.0 /usr/bin/corepack 0.25.2
Recommended versions are nodejs 18.20.2 and npm 10.5.0 Your nodejs installation is correct
MEMORY: total used free shared buff/cache available Mem: 8.2G 1.5G 4.9G 129M 2.0G 6.6G Swap: 104M 0B 104M Total: 8.3G 1.5G 5.0G
Active iob-Instances: 10 Active repo(s): stable
ioBroker Core: js-controller 5.0.19 admin 6.13.16
ioBroker Status: iobroker is running on this host.
Objects type: jsonl States type: jsonl
Status admin and web instance:
- system.adapter.admin.0 : admin : raspberrypi - enabled, port: 8081, bind: 0.0.0.0, run as: admin
Objects: 1772 States: 1389
Size of iob-Database:
20M /opt/iobroker/iobroker-data/objects.jsonl 3.6M /opt/iobroker/iobroker-data/states.jsonl
=================== END OF SUMMARY ====================
Versions:
- Adapter version: 0.5.0-beta.8
- ESPHome Dashboard version:
- JS-Controller version: 5.0.19
- Node version: v18.20.2
- Operating system: Raspbian GNU/Linux 12 (bookworm)
- Installation Method: via github url
I wonder, has nobody else this problem?
It seems that the problem is my linux installation. I am on a 64 bit system: Architecture: arm64, Kernel: aarch64. But the userland is armhf which seems to be 32 bit. Because of this, the 32 bit version of @mongodb-js is installed. But ESPHome needs the 64 bit version. I will check if it is possible to change the userland to 62 bit. My installation is a default Raspberry OS 64 bit.
But the userland is armhf which seems to be 32 bit. Because of this, the 32 bit version of @mongodb-js is installed. But ESPHome needs the 64 bit version. I will check if it is possible to change the userland to 62 bit. My installation is a default Raspberry OS 64 bit.
I am sorry but this indeed really looks like an edge case. Honestly I have no influence on this as the mango DB part is required by the backend library and source (so not the adapter itself) and even I am more than willing to support all I can.... I am the maintainer/founder of this integration and not the python relation of ESPhome itself
Did your try succeeded? I haven't seen any related issues like this on other situations which makes it hard for me to troubleshoot/reproduce :/
as a sidenode, please be aware this adapter can still be used for ESP-Home integration but you will need to run the dashboard separately (like in an docker environment)
the adapter itself does not have this dependency, only if you want to run the dashboard integrated in ioBroker itself