You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above syntax assumes your Zigbee adapter connects via USB. You should either remove both of those lines from your compose file, or make the `devices` clause inactive by prepending `x-`, like this:
175
+
The above syntax assumes your Zigbee adapter connects via USB. You should either remove or comment-out both of those lines from your compose file. An alternative approach is to make the `devices` clause inactive by prepending `x-`, like this:
This assumes that your system timezone has been copied to `~/IOTstack/.env`, otherwise defaults to `Etc/UTC`.
248
279
249
-
This is default value supplied with the IOTstack template. It assumes that both Zigbee2MQTT and the Mosquitto broker are running in non-host mode containers on the same Raspberry Pi.
Most (but not yet all) IOTstack containers use this syntax. The idea is that a single value set in `.env` will ensure your containers operate in the same timezone.
252
287
253
-
This would be appropriate if you were to run Zigbee2MQTT in host mode and the Mosquitto broker was running on the same Raspberry Pi.
288
+
#### serial adapter { #serialAdapter }
254
289
255
-
- `mqtt://«host-or-ip»:1883`
290
+
``` yaml
291
+
- ZIGBEE2MQTT_CONFIG_SERIAL_PORT=/dev/ttyACM0
292
+
```
256
293
257
-
If the Mosquitto broker is running on a *different* computer, replace `«host-or-ip»` with the IP address or domain name of that other computer. You should also remove or comment-out the following lines from the service definition:
294
+
The default value of `/dev/ttyACM0` works in conjunction with the `devices` clause:
The `depends_on` clause ensures that the Mosquitto container starts alongside the Zigbee2MQTT container. That would not be appropriate if Mosquitto was running on a separate computer.
301
+
Taken together, these assume your Zigbee adapter is connected to a local USB port. If you are using a [remote adapter](#identifyRemoteAdapter) then you should:
1. Change the right hand side of this variable so that it points to your adapter. For example:
267
304
268
-
This variable activates the Zigbee2MQTT web interface on port 8080. If you want to change the port number where you access the Zigbee2MQTT web interface, see [connecting to the web GUI](#connectGUI).
2. Remove, comment-out or inactivate the `devices` clause (as explained in [remote adapters](#identifyRemoteAdapter)).
271
310
272
-
Defining this variable causes Zigbee2MQTT to create a symlink pointing to the current log **folder** at the path:
311
+
#### adapter type { #adapterType }
273
312
313
+
``` yaml
314
+
- ZIGBEE2MQTT_CONFIG_SERIAL_ADAPTER=zstack
315
+
```
316
+
317
+
Identify your adapter from the [official list](https://www.zigbee2mqtt.io/guide/configuration/adapter-settings.html#basic-configuration). At the time of writing, the possible values were `zstack`, `ember`, `deconz`, `zigate` or `zboss`.
This is default value supplied with the IOTstack template. It assumes that both Zigbee2MQTT and the Mosquitto broker are running in non-host mode containers on the same Raspberry Pi.
330
+
331
+
- `mqtt://localhost:1883`
332
+
333
+
This would be appropriate if you were to run Zigbee2MQTT in host mode and the Mosquitto broker was running on the same Raspberry Pi.
334
+
335
+
- `mqtt://«host-or-ip»:1883`
336
+
337
+
If the Mosquitto broker is running on a *different* computer, replace `«host-or-ip»` with the IP address or domain name of that other computer. You should also remove or comment-out the following lines from the service definition:
338
+
339
+
```yaml
340
+
depends_on:
341
+
- mosquitto
274
342
```
275
-
~/IOTstack/volumes/zigbee2mqtt/data/log/current
276
-
```
277
343
278
-
See [Checking the log](#checkLog) for more information about why this is useful.
344
+
The `depends_on` clause ensures that the Mosquitto container starts alongside the Zigbee2MQTT container. That would not be appropriate if Mosquitto was running on a separate computer.
345
+
346
+
#### front end { #frontEndEnable }
347
+
348
+
The "front end" is the name given to the Zigbee2MQTT web interface on port 8080. If you want to change the port number where you access the Zigbee2MQTT web interface, see [connecting to the web GUI](#connectGUI).
349
+
350
+
Zigbee2MQTT version 2 introduced an incompatibility with this setting. The IOTstack template contains the following lines:
351
+
352
+
``` yaml
353
+
# only enable the next line for Zigbee2MQTT v1
354
+
# - ZIGBEE2MQTT_CONFIG_FRONTEND=true
355
+
- ZIGBEE2MQTT_CONFIG_FRONTEND_ENABLED=true
356
+
```
357
+
358
+
If you are running Zigbee2MQTT version 1 then the front end will not be enabled unless you uncomment:
359
+
360
+
``` yaml
361
+
- ZIGBEE2MQTT_CONFIG_FRONTEND=true
362
+
```
363
+
364
+
Zigbee2MQTT version 1 ignores the following environment variable so you do not need to comment it out:
365
+
366
+
``` yaml
367
+
- ZIGBEE2MQTT_CONFIG_FRONTEND_ENABLED=true
368
+
```
369
+
370
+
However, if you have been running Zigbee2MQTT version 1 and you upgrade to version 2 then you **must** either delete or comment-out:
371
+
372
+
``` yaml
373
+
# - ZIGBEE2MQTT_CONFIG_FRONTEND=true
374
+
```
375
+
376
+
If you do not do that then the container will go into a restart loop. If you examine the container's log, you will see this error:
377
+
378
+
```
379
+
frontend must be object
380
+
```
381
+
382
+
That error is telling you to comment-out that environment variable.
Enabling this variable turns on extended debugging inside the container.
287
405
288
406
### Configuration file { #confFile }
289
407
@@ -329,25 +447,21 @@ You are looking for evidence that the container is restarting (ie the "Status" c
329
447
330
448
### Checking the log { #checkLog }
331
449
332
-
You can't use `docker logs zigbee2mqtt` to inspect the Zigbee2MQTT container's logs. That's because Zigbee2MQTT writes its logging information to the path:
450
+
You can watch the container's log using this command:
where `yyyy-mm-dd.hh-mm-ss` is the date and time the container was last started. This means that you have to identify the folder with the latest timestamp before you can inspect the log contained within it.
339
-
340
-
Fortunately, Zigbee2MQTT offers a shortcut. If the [`… LOG_SYMLINK_CURRENT`](#logSymlink) environment variable is `true` then the path to the *current* log will be:
456
+
Press <kbd>control</kbd>+<kbd>c</kbd> to terminate the command. An alternative is to observe the following path using commands like `cat` and `tail`:
You can omit the `zigbee2mqtt` arguments from the `pull` and `up` commands, in which case `docker-compose` makes an attempt to pull any available updates for all non-Dockerfile-based images, and then instantiates any new images it has downloaded.
446
560
447
-
## Service definition change { #update202204 }
561
+
## 2025 v1 to v2 upgrade { #update202501 }
562
+
563
+
If you have been running Zigbee2MQTT version 1 but do a "pull" from DockerHub you will be upgraded to version 2. The first time you do this, you may encounter the following error:
564
+
565
+
```
566
+
frontend must be object
567
+
```
568
+
569
+
This is caused by a configuration incompatibility between v1 and v2. Although it is not *difficult* to update your service definition to work with v2, if you are in a hurry to get your Zigbee service running again you can revert to v1 by making a temporary alteration to your service definition, like this:
570
+
571
+
``` yaml
572
+
# image: koenkk/zigbee2mqtt:latest
573
+
image: koenkk/zigbee2mqtt:1.42.0
574
+
```
575
+
576
+
Then, "up" the container:
577
+
578
+
``` console
579
+
$ cd ~/IOTstack
580
+
$ docker-compose up -d zigbee2mqtt
581
+
```
582
+
583
+
When you are ready to upgrade to v2, you will need to undo the above change, and you will also need to update your Zigbee2MQTT service definition based on the [template](#configTemplate). In general terms, you will need to do the following:
584
+
585
+
1. If you have a locally-connected USB adapter then you will need to add:
586
+
587
+
``` yaml
588
+
- ZIGBEE2MQTT_CONFIG_SERIAL_PORT=/dev/ttyACM0
589
+
```
590
+
591
+
If you have a network adapter, you will have that variable defined already so you should not change it.
592
+
593
+
2. Add:
594
+
595
+
``` yaml
596
+
- ZIGBEE2MQTT_CONFIG_SERIAL_ADAPTER=zstack
597
+
```
598
+
599
+
Then read the explanation about [adapter types](#adapterType) and make a decision on whether `zstack` is the correct choice.
600
+
601
+
3. The value of `ZIGBEE2MQTT_CONFIG_MQTT_SERVER` will probably be correct so you should not change it.
602
+
603
+
4. Replace the existing `ZIGBEE2MQTT_CONFIG_FRONTEND` with the following:
604
+
605
+
``` yaml
606
+
# only enable the next line for Zigbee2MQTT v1
607
+
# - ZIGBEE2MQTT_CONFIG_FRONTEND=true
608
+
- ZIGBEE2MQTT_CONFIG_FRONTEND_ENABLED=true
609
+
```
610
+
611
+
5. Any other variables you have set will likely be correct so leave those alone.
612
+
613
+
## 2022 Service definition change { #update202204 }
448
614
449
615
This information is for existing users of the Zigbee2MQTT container.
450
616
@@ -459,28 +625,7 @@ If you were using the Zigbee2MQTT container in IOTstack before April 2022, you s
459
625
460
626
> You *could* run the menu, then de-select and re-select Zigbee2MQTT. That *will* have the effect of applying the updated service definition but it also risks overwriting any other customisations you may have in place. That is why editing your *compose file* is the recommended approach.
461
627
462
-
The updated service definition is included here for ease of reference:
The first two have the **identical** effect to the changes previously made via the Dockerfile. The last variable makes it easier for you to find and [view the current log](#checkLog).
510
-
511
-
See [environment variables](#envVars) for more detail.
646
+
2. Use the [template](#configTemplate) as a guide to adjusting your environment variables. See also [environment variables](#envVars) for more detail.
0 commit comments