Zigbee2mqtt: Docker test image based on Gladys v4

Hello,

Finally, I am going back on what I said :smiley:

I started from scratch and for now, the temperature sensor + switch are working well :slight_smile:

As for the wireless switch (double), it is seen but not taken into account. I will look into adding the integration of this one.

2021-01-31T19:01:07+0100 <warn> handleMqttMessage.js:87 () Zigbee2mqtt device 0x00158d0002d7b79e, feature action not found.
2021-01-31T19:01:07+0100 <warn> handleMqttMessage.js:87 () Zigbee2mqtt device 0x00158d0002d7b79e, feature click not found.
2021-01-31T19:01:07+0100 <warn> handleMqttMessage.js:87 () Zigbee2mqtt device 0x00158d0002d7b79e, feature linkquality not found.
2021-01-31T19:01:07+0100 <warn> handleMqttMessage.js:87 () Zigbee2mqtt device 0x00158d0002d7b79e, feature voltage not found.

For my devices (all from Xiaomi) :slight_smile:

I’ve modified the container names to make them unique: fix(zigbee2mqtt): Containers' names · cicoub13/Gladys@6d916a4 · GitHub
I’ll let you know when I push a new image :whale:

I’ve added it to the list of things to do above :ok_hand:

Yes, the device list is here: https://github.com/cicoub13/Gladys/tree/zigbee2mqtt-service/server/services/zigbee2mqtt/model
You can contribute (I’ve added you to the repository)

Oh great thanks I will add that

I pushed a new image with container names clean for Gladys. Could you try again? I still think you’ll have an issue with port 1884 already in use on your machine :frowning:

1883 by default so that should work, I’ll test it tonight

Are you sure?

I have no zigbee2mqtt container that was created

I stopped my production container

Yes, the containers are now called:

  • gladys-zigbee2mqqt
  • gladys-zigbee2mqqt-mqtt

Be careful to clean up the containers (in the previous command, I suggested creating the container to test with the name gladys-zigbee2mqqt and this can conflict with the new containers… I rewrote the command with the name gladys-dev-zigbee2mqtt)

Oh, I just figured it out, it’s the name of the container with your image :sweat_smile: of course the name is already taken.

Display proposal for the Zigbee2MQTT Configuration page

On mobile:

On tablet:

The computer version remains the same

I confirm​:grin:

« dead » :skull: :scream:

@VonOx I fixed your existing Docker issue and pushed an image :slight_smile:
Don’t forget to delete all the old containers (gladys-zigbee2mqtt-mqtt and ga-zigbee2mqtt)

Yes it works (the containers are created)

I discovered another bug but I think it’s Gladys and not the z2m service


I had created the 1 house and a room.
To test, I assigned all discovered devices to this same room.
To make it cleaner, I deleted this room and created others ( big mistake :smiley: )

Impossible to assign what was discovered to a new room :slight_smile:

  • In the discover part I cannot edit the room (already created), by the way if they are already created they should not appear on this tab?

  • In devices, well there’s nothing left ^^

I messed everything up but in my opinion this room story is likely to happen again. There must be a check on Gladys side (do not delete a room if devices are linked) and on the service side I should be able to edit.

I also had to recover my database file (zigbee2mqtt) because it was impossible to join the network, I think that’s my dongle.

To be continued :slight_smile:

I didn’t think that was possible. Indeed, if there are devices in a room, it should be prevented from being deleted.

Ah! This is indeed related to the current operation of Gladys.

When you delete an entity in Gladys 4, all entities that depend on it are deleted. It’s true that in the case of devices/rooms, this doesn’t make much sense.

Two options:

  • Prevent the user from deleting the room as long as there are devices inside
  • Update all devices that are in the room to be deleted, and remove their association with the room

What do you think?

Remove ownership, it’s less restrictive for the user

PS: I just reread myself and it’s a disaster, sorry to those who read me for the mistakes.

Remove ownership (with a message before « All devices linked to this room… »)

I’m also for removing ownership but keeping the equipment!
It makes more sense and is less frustrating if there were 10 pieces of equipment in a room :sweat_smile:

Hello,

I think I found a bug. My smart plug is detected by Zigbee2mqtt but not displayed in Gladys.

I checked, the model is officially supported by the Zigbee2Mqtt project: Lonsonho 4000116784070 control via MQTT | Zigbee2MQTT

Zigbee2Mqtt logs:

Zigbee2MQTT:info  2021-02-05 09:18:30: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"99274c7","coordinator":{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20201026,"transportrev":2},"type":"zStack3x0"},"log_level":"info","network":{"channel":11,"extendedPanID":"0xdddddddddddddddd","panID":6754},"permit_join":true,"version":"1.17.1"}'
Zigbee2MQTT:info  2021-02-05 09:18:34: MQTT publish: topic 'zigbee2mqtt/0x60a423fffe685063', payload '{"current":0.5,"energy":3.91,"linkquality":111,"power":81,"state":"ON","voltage":211}'
Zigbee2MQTT:info  2021-02-05 09:18:38: MQTT publish: topic 'zigbee2mqtt/bridge/config/devices', payload '[{"dateCode":"20201026","friendly_name":"Coordinator","ieeeAddr":"0x00124b0021cc41df","lastSeen":1612516718278,"networkAddress":0,"softwareBuildID":"zStack3x0","type":"Coordinator"},{"dateCode":"20170627","description":"Aqara human body movement and illuminance sensor","friendly_name":"0x00158d00044e9780","hardwareVersion":1,"ieeeAddr":"0x00158d00044e9780","lastSeen":1612516457300,"manufacturerID":4151,"manufacturerName":"LUMI","model":"RTCGQ11LM","modelID":"lumi.sensor_motion.aq2","networkAddress":6910,"powerSource":"Battery","softwareBuildID":"3000-0001","type":"EndDevice","vendor":"Xiaomi"},{"dateCode":"20161128","description":"Aqara door & window contact sensor","friendly_name":"0x00158d0003f26e95","hardwareVersion":2,"ieeeAddr":"0x00158d0003f26e95","lastSeen":1612516597980,"manufacturerID":4151,"manufacturerName":"LUMI","model":"MCCGQ11LM","modelID":"lumi.sensor_magnet.aq2","networkAddress":48897,"powerSource":"Battery","softwareBuildID":"3000-0001","type":"EndDevice","vendor":"Xiaomi"},{"dateCode":"20161128","description":"Aqara door & window contact sensor","friendly_name":"0x00158d0003173fdd","hardwareVersion":2,"ieeeAddr":"0x00158d0003173fdd","lastSeen":1612515745207,"manufacturerID":4151,"manufacturerName":"LUMI","model":"MCCGQ11LM","modelID":"lumi.sensor_magnet.aq2","networkAddress":28257,"powerSource":"Battery","softwareBuildID":"3000-0001","type":"EndDevice","vendor":"Xiaomi"},{"dateCode":"20170627","description":"Aqara human body movement and illuminance sensor","friendly_name":"0x00158d0004843eb4","hardwareVersion":1,"ieeeAddr":"0x00158d0004843eb4","lastSeen":1612516353652,"manufacturerID":4151,"manufacturerName":"LUMI","model":"RTCGQ11LM","modelID":"lumi.sensor_motion.aq2","networkAddress":59336,"powerSource":"Battery","softwareBuildID":"3000-0001","type":"EndDevice","vendor":"Xiaomi"},{"dateCode":"20170627","description":"Aqara human body movement and illuminance sensor","friendly_name":"0x00158d000460bf42","hardwareVersion":1,"ieeeAddr":"0x00158d000460bf42","lastSeen":1612516094548,"manufacturerID":4151,"manufacturerName":"LUMI","model":"RTCGQ11LM","modelID":"lumi.sensor_motion.aq2","networkAddress":45788,"powerSource":"Battery","softwareBuildID":"3000-0001","type":"EndDevice","vendor":"Xiaomi"},{"dateCode":"","description":"10A UK or 16A EU smart plug","friendly_name":"0x60a423fffe685063","hardwareVersion":1,"ieeeAddr":"0x60a423fffe685063","lastSeen":1612516714348,"manufacturerID":4098,"manufacturerName":"_TZ3000_rdtixbnu","model":"TS0121_plug","modelID":"TS0121","networkAddress":42938,"powerSource":"Mains (single phase)","type":"Router","vendor":"TuYa"}]'
Zigbee2MQTT:info  2021-02-05 09:18:38: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":[{"dateCode":"20201026","friendly_name":"Coordinator","ieeeAddr":"0x00124b0021cc41df","lastSeen":1612516718287,"networkAddress":0,"softwareBuildID":"zStack3x0","type":"Coordinator"},{"dateCode":"20170627","description":"Aqara human body movement and illuminance sensor","friendly_name":"0x00158d00044e9780","hardwareVersion":1,"ieeeAddr":"0x00158d00044e9780","lastSeen":1612516457300,"manufacturerID":4151,"manufacturerName":"LUMI","model":"RTCGQ11LM","modelID":"lumi.sensor_motion.aq2","networkAddress":6910,"powerSource":"Battery","softwareBuildID":"3000-0001","type":"EndDevice","vendor":"Xiaomi"},{"dateCode":"20161128","description":"Aqara door & window contact sensor","friendly_name":"0x00158d0003f26e95","hardwareVersion":2,"ieeeAddr":"0x00158d0003f26e95","lastSeen":1612516597980,"manufacturerID":4151,"manufacturerName":"LUMI","model":"MCCGQ11LM","modelID":"lumi.sensor_magnet.aq2","networkAddress":48897,"powerSource":"Battery","softwareBuildID":"3000-0001","type":"EndDevice","vendor":"Xiaomi"},{"dateCode":"20161128","description":"Aqara door & window contact sensor","friendly_name":"0x00158d0003173fdd","hardwareVersion":2,"ieeeAddr":"0x00158d0003173fdd","lastSeen":1612515745207,"manufacturerID":4151,"manufacturerName":"LUMI","model":"MCCGQ11LM","modelID":"lumi.sensor_magnet.aq2","networkAddress":28257,"powerSource":"Battery","softwareBuildID":"3000-0001","type":"EndDevice","vendor":"Xiaomi"},{"dateCode":"20170627","description":"Aqara human body movement and illuminance sensor","friendly_name":"0x00158d0004843eb4","hardwareVersion":1,"ieeeAddr":"0x00158d0004843eb4","lastSeen":1612516353652,"manufacturerID":4151,"manufacturerName":"LUMI","model":"RTCGQ11LM","modelID":"lumi.sensor_motion.aq2","networkAddress":59336,"powerSource":"Battery","softwareBuildID":"3000-0001","type":"EndDevice","vendor":"Xiaomi"},{"dateCode":"20170627","description":"Aqara human body movement and illuminance sensor","friendly_name":"0x00158d000460bf42","hardwareVersion":1,"ieeeAddr":"0x00158d000460bf42","lastSeen":1612516094548,"manufacturerID":4151,"manufacturerName":"LUMI","model":"RTCGQ11LM","modelID":"lumi.sensor_motion.aq2","networkAddress":45788,"powerSource":"Battery","softwareBuildID":"3000-0001","type":"EndDevice","vendor":"Xiaomi"},{"dateCode":"","description":"10A UK or 16A EU smart plug","friendly_name":"0x60a423fffe685063","hardwareVersion":1,"ieeeAddr":"0x60a423fffe685063","lastSeen":1612516714348,"manufacturerID":4098,"manufacturerName":"_TZ3000_rdtixbnu","model":"TS0121_plug","modelID":"TS0121","networkAddress":42938,"powerSource":"Mains (single phase)","type":"Router","vendor":"TuYa"}],"type":"devices"}'

When I manually turn off the plug:

Zigbee2MQTT:info  2021-02-05 09:24:34: MQTT publish: topic 'zigbee2mqtt/0x60a423fffe685063', payload '{"current":0.22,"energy":3.92,"linkquality":114,"power":22,"state":"ON","voltage":212}'
Zigbee2MQTT:info  2021-02-05 09:24:36: MQTT publish: topic 'zigbee2mqtt/0x60a423fffe685063', payload '{"current":0.22,"energy":3.92,"linkquality":126,"power":22,"state":"OFF","voltage":212}'
Zigbee2MQTT:info  2021-02-05 09:24:44: MQTT publish: topic 'zigbee2mqtt/0x60a423fffe685063', payload '{"current":0.22,"energy":3.92,"linkquality":105,"power":22,"state":"ON","voltage":212}'

We can see that the information is sent to Gladys, which does not display it in the interface.

Gladys logs:

2021-02-05T10:27:34+0100 <warn> handleMqttMessage.js:87 () Zigbee2mqtt device 0x60a423fffe685063, feature current not found.
2021-02-05T10:27:34+0100 <warn> handleMqttMessage.js:87 () Zigbee2mqtt device 0x60a423fffe685063, feature energy not found.
2021-02-05T10:27:34+0100 <warn> handleMqttMessage.js:87 () Zigbee2mqtt device 0x60a423fffe685063, feature linkquality not found.
2021-02-05T10:27:34+0100 <warn> handleMqttMessage.js:87 () Zigbee2mqtt device 0x60a423fffe685063, feature power not found.
2021-02-05T10:27:34+0100 <warn> handleMqttMessage.js:87 () Zigbee2mqtt device 0x60a423fffe685063, feature state not found.
2021-02-05T10:27:34+0100 <warn> handleMqttMessage.js:87 () Zigbee2mqtt device 0x60a423fffe685063, feature voltage not found.

You need to declare each device and its associated features in the code here https://github.com/cicoub13/Gladys/tree/zigbee2mqtt-service/server/services/zigbee2mqtt/model. I think your outlet is not listed there.
I don’t know if there is another way to work (automatic detection).