I would like to control zigbee devices from my GL_Inet AR-300M running Openwrt 22.03.5 (please note that I do run vanilla Openwrt, NOT the firmware provided by the vendor).
My plan was to use zigbee2mqtt, however this requires node which is not available from the package repository.
I have now read that node requires a FPU that you can emulate but the mips-emulation (my device is mips) seems to be very slow.
I have no clue how much floating point arithmetic zigbee2mqtt actually uses, and I have no experience yet with building openwrt-packages, so my question is:
Is trying to build a node-package with the goal of running zigbee2mqtt with it something that is worth trying or is it doomed to fail?
Would there by any other way to control zigbee devices?
I'm on the same boat (with the added bonus that I have a wireguard tunnel between two locations).
As far as I know, running node.js on a CPU without a FPU does not work at all, even if your code does not use FP; you need to enable FPU emulation in the kernel (and it is not enabled on OpenWrt by default).
I have tried, and failed, to enable FPU emulation and then build node.js packages. I probably did something wrong, but the compilation returned errors I could not fix. I will try this later, when I find the time.
I am currently using zigbee2mqtt on one device (with a FPU), connected through ser2net, over the wireguard tunnel, to the coordinator on the other device (without FPU). It works but it also feels a bit weird.
I am also exploring the idea of dedicating and old Raspberry Pi for zigbee2mqtt.
So node needs an FPU and our CPU hasn't got one, so it needs to be emulated.
Where does this emulation happen? Is that a feature that needs to be compiled into the kernel or is it enough to compile the package with some extra flags?
But if you've already tried and failed I'll probably won't go there...
And I am exploring the idea of not using an old pi but rather a new one: A zero. Node can be tricky there as well and is not officially supported but you can make it work, I have seen posts about running zigbee2mqtt on a Pi Zero.
Yes, and you will not be able to install kernel-related packages from official repos; you will have to build your own images with all the packages included, or have your own repo.
Ok, many thanks - you probably saved me a lot of futile work.
It's really unfortunate that they've used node for implementing zigbee2mqtt because had they used another scripting language you probably could run it on our boxes as it probably does not even use the fpu that node insist on having, but that ship has sailed...