At this weekend I finally established another network in my home — a ZigBee network. A looong time ago (in 2010 year) I touched the ZigBee networking in my university (ITMO, previously IFMO, in Saint-Petersburg) — these times it was a new technology, not used widely. And as a student I have some fun time playing with ZigBee main router, supplemental router and end-devices. You can view old photos and screenshots of old software on a my extremely old blog: h0rr0rr-drag0n.blogspot.com/20 (and read a blogpost, if you understand Russian).

It is kindly fascinating, that now, after 15 years, I can just buy some ZigBee-powered devices from AliExpress (using Black Friday discounts) and connect them to the network inside my house right in the way I did it in the university 15 years ago!

Sadly, although I bought native supported main router device, based on the EFR32MG2 with some software from Ember (EZSP v8) inside, the OpenHAB doesn't support this device natively — it supports it, but since my server is running NetBSD, I got problems with some bundled with OpenHAB things. Looks like some native libraries (rxtx-java) don't have bundled NetBSD versions. And the same library in the repository built for Java 8, not for Java 17.

So, I decided to use Zigbee2MQTT, not to build the necessary Java library myself. It was kinda scary — use program, which connects my ZigBee network via ZigBee USB-dongle to the MQTT server — which is written on JavaScript :drgn_hide: . Not on the C (as I can totally understand, for a such low-level program, operating with embedded devices) or at least on the C++/Perl/Python/whatever. But, looks like it works good enough, if I don't try to pair the device in wrong mode (my window sensors has two modes to pair them with network: first "common" mode causes zigbee2mqtt to silently crash and the second "compatible" mode works without problems).

And I could understand now, why people has so much problems with smart home security. Installed MQTT server mosquitto — it allows unauthenticated connections by default. Installed zigbee2mqtt — it allow connections to frontend without any password by default :drgn_sigh:

At least these two services don't each much memory: 1.2 Mb for Mosquitto and 75.6 Mb for ZigBee2MQTT.

For now, my ZigBee sensors works pretty well and robust, like these devices from university 15 years ago :drgn_aww:

OpenHAB main page with some labels in it. Labels divided into two parts: "Weather" and "Home".

On the "Weather" part there are labels with the next contents:
1) Temperature (-0.1°C) with temperature graph on the background.
2) Textual description of the weather (cloudy)
3) Pressure (759,062 mmHg) with pressure graph on the background
4) Humidity (93%)
5) Wind speed (18,7 km/h)

On the "Home" part there are the next labels with data from my ZigBee sensors:
1) Temperature in the living room (23.3°C) with temperature graph on the background.
2) Temperature in the kitchen (22.4°C) with temperature graph on the background.
3) Humidity in the living room (23.0%) with humidity graph on the background.
4) Humidity in the kitchen (29.0%) with humidity graph on the background.
5) State of the window in the living room (window opened).Zigbee2MQTT dashboard with three devices in it:
1) Temperature sensor in kitchen. It exposes the temperature, humidity, signal level and battery level. Also it provides controls to set temperature units, and to calibrate readings of temperature/humidity.
2) Temperature sensor in living room. It has the same controls.
3) Sensor with magnet contact, installed on the window in the living room. It exposes, set of contact, "low battery" signal, battery level and signal level.
0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.bsd.cafe/users/evgandr/statuses/115644250911698147 on your instance and quote it. (Note that quoting is not supported in Mastodon.)