Zigbee for aqara devices thru zigbee2mqtt

My practical objectives for now is to interconnect some Zigbee aqara devices together, with a wifi tuya horn (110 decibels) to get them work as an alarm system.

Here I am trying to follow jimtng propositions:

Practically speaking, you would be using zigbee2mqtt and present the zigbee devices to openhab (or HA) via mqtt. For tuya in openhab, you have 2 options:

** Use the Tuya binding for openhab, this was only recently adopted as an official part of openHAB, so it will be available in the coming openhab 5. You can use the openhab milestone or snapshot version in the meanwhile.*
** Use tuyamqtt (this is no longer maintained, but I’ve been using it for at least 4 years now)*

Here is the result of my searches and the state of my installation for zigbee2mqtt

zigbee2mqtt threads
They seem difficult to find or quite outdated or I am really bad with google keywords.

openhab version installed on ubuntu

fl@Satellite-Z930:~$ openhab-cli info
Version:     4.3.4 (Build)

Prerequisiste
mosquitto an open source message broker for the MQTT protocol
Installing mosquitto

sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa
sudo apt-get update

From Zigbee2MQTT install on Linux

You will do the following:
Install latest nodejs from snap store

sudo snap install node --classic
npm install -g pnpm

Verify node has been installed

node --version
pnpm --version``

start Zigbee2MQTT

cd /opt/zigbee2mqtt
pnpm start

For now I get some error message at

fl@Satellite-Z930:~$ node --version
v12.22.9
fl@Satellite-Z930:~$ pnpm --version
/usr/local/lib/node_modules/pnpm/bin/pnpm.cjs:18
  if(!require('module')?.enableCompileCache?.())
                        ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47
fl@Satellite-Z930:~$

Things went wrong when I have tried to fix things following
fl@Satellite-Z930:~$pnpm start
after getting the error message:
No package.json (or package.yaml

Hi looks like you did not install npm using elevated creds
I just did a full clean build of unbuntu following exactly what you posted and only difference is I used
sudo npm install -g pnpm

It’s much easier to install mosquito and zigbee2mqtt using docker. All you’d need to worry about is the docker-compose content.

I’m lazy and put all my docker stuff in a user called “dockers”

So in /home/dockers I have my docker-compose.yaml and a subdirectory for each container, so mosquito subdir, zigbee2mqtt subdir, openhab subdir, etc

I should write a tutorial if one doesn’t exist yet.

I read about docker. This would nice to have such a docker how-to. : )

From what I understand I can install Docker on my xubuntu installation

I will do.

Nursery before I might wipe out the extras packages on my installation.

I realize that that the setup for docker and openhab is not made according to the link I provided in the precedent post. But rather with

There are two options

  1. Running the Container as a Service Managed by Docker
  2. Running the Container as a Service Controlled by Systemd

The former seems less complicated to install.