HA Docker Linux + IKEA Trådfri (Zigbee) GW 1 - Xiaomi Mi Sensor 2 (flashed) and just new to this thing

Background: I’m doing R&D for a project involving humidity sensors (for several humidors in two separate rooms) and an IoT hub to connect them. My project use case is to have 1x sensor in each humidor (1…n sensors) a hub to connect them and then some alarm (email outbound) for when the RH (humidity) drops below a certain threshold. That’s it in stage 1. Stage 2 may be a web dashboard accessible over the Internet or at least on an iPad/Tablet in the vicinity of those rooms to see historical data etc.

Current context 1: Through the Swedish site Automatiserar I found out about the Xiaomi Mi Sensor 2 (the LYWSD03MMC for about €7 on Amazon) and how to flash it from using BT to Zigbee. I followed the steps and it seems to be successful. Note: I currently only have an IKEA Trådfri v1 IoT Gateway installed for some lamps and remote control via app and Google Home, no other Zigbee networks, and no other Zigbee hubs/controllers.

Current context 2: I have successfully started a Home Assistant instance using Docker container on my old Linux laptop running in my closet. I don’t use it for much but it’s a lab environment for this kind of thing. I also have an RPi 3B somewhere but currently not running, more on this later. I was able to log in to HA over LAN, do the initial setup and then just follow along with the suggested guides. I did read something about plugins not being available when running from Docker and that’s ok at this stage since I’m still experimenting. I do not have a controller yet but I’ve ordered the. Sonoff Zigbee Gateway, ZBDongle-E USB Zigbee 3.0 USB Dongle Plus from Amazon.

Current context 3: During setup, I did see a Tuya Zigbee card in the integrations section. It needed setup and I’ve done some things but have not been able to add or see the sensor. So something in HA found it via all the radios in the Linux laptop and maybe(?) through the IKEA Trådfri GW. I am assuming this is because I flashed the Mi 2 sensor and it now shows up as a Tuya device. Correct?

So seeing as I probably did a lot of things straight up backwards, here are my questions:

Q1: When I flashed the Mi 2 sensor from BT to Zigbee, seeming without an existing Zigbee network to join, what should I do with the unit now, like backwards flash to BT again or is there something else I should consider? It works, it just isn’t connected to any network or dashboard afaik.

Q2: From what I’m reading about HA Docker mode, and the fact that I want zigbee2mqtt in this project, can the docker container be used - or - should I install it like bare metal on the Linux laptop - or - is the old RPi 3B bare metal install just the best way of setting up HA? (The Zigbee USB dongle works with both of these gadgets, right?)

Q3: Am I reading this correctly that the IKEA Trådfri GW (Zigbee) cannot be used as an external Zigbee controller (via API) and thus not used for the Mi 2 Zigbee flashed sensors if I wanted to hook up my apartment for temp + humidity in each room? (separate project)

Q4: When I get the Zigbee USB dongle, can I add the previously flashed Mi 2 sensor without flashing it again? I didn’t consider the fact that when I flashed the BT away from the unit, I wasn’t able to send an updated configuration via BT (browser tool) any more. Heh…

All input and answers are very welcome! Thanks in advance.

You can use the Zigbee2MQTT container, or install Zigbee2MQTT bare metal, both work. Don’t forget you also need a MQTT broker.

Correct. The Tradfri gateway does not support Temp&Humidity sensors

Yes

1 Like

So that would make it three docker containers running on my Linux server.
C1: Home Assistant
C2: Zigbee2MQTT
C3: MQTT Broker (like Mosquitto)

I can probably find docker-compose.yml files or guides for this.

And am I understanding this correctly that the sensor is the data producer, the zigbee2mqtt converts those radio signals to MQTT messages, and the broker consumes those sent messages and publishes them to subscribers, which would be the HA dashboard?

Correct. :slight_smile: