I can remove a device using the mqtt topic, but the device is still in my Hassio device list. Hoe can I completely remove the device so Hassio won鈥檛 see it anymore?
remove it from configuration.yaml, database.db and state.json in the /data folder of zigbee2mqtt.
Search those for the device address, and remove all mentions, then restart zigbee2mqtt.
I tried all. Now I removed the sniffer, uninstalled the addon, removed the folder, etc., but the entity_id's are still showing up in Hassio, they are grey but still showing up. They are not there when mqtt discovery is false in Hassio config yaml. Any ideas?
Entity id's are not stored by Zigbee2mqtt but by homeassistant. You'll need to remove them manually from the '.storage' folder.
Can you tell me how?
@phoxy84 update to home assistant to 0.87 , then Configuration > Entity Registry > select the entry > delete
This release also includes a UI to manage the entity registry. The entity registry contains all entities with unique IDs that Home Assistant has ever seen. It will allow users to quickly rename entities, change entity IDs or have Home Assistant forget entities that are no longer active.
https://www.home-assistant.io/blog/2019/02/06/release-87/
@phoxy84 update to home assistant to 0.87 , then Configuration > Entity Registry > select the entry > delete
This release also includes a UI to manage the entity registry. The entity registry contains all entities with unique IDs that Home Assistant has ever seen. It will allow users to quickly rename entities, change entity IDs or have Home Assistant forget entities that are no longer active.
https://www.home-assistant.io/blog/2019/02/06/release-87/
Indeed, I removed them now.
who ever might find this post:
This is the full guide story what is did to remove my aqara body sensor (probably overkill)
0) find the device ID from Configuration> Integrations > MQTT: configuration.yaml
1) remove devices from Configuration Entity Registry
2) ssh into home assistant > stop home assistant
hassio ha stop
3) remove device from bridge
mosquitto_pub -h IP -p PORT -u USER -P PW -t "zigbee2mqtt/bridge/config/remove" -m "0x00158d000123a45b"
4) (A) clean mqtt
listen to all to find correct topic format
mosquitto_sub -h IP -p PORT -u USER -P PW -v -d -R -t '#'
remove cfg
mosquitto_pub -h IP -p PORT -u USER -P PW -r -n -t "homeassistant/binary_sensor/0x00158d000123a45b/occupancy/config"
mosquitto_pub -h IP -p PORT -u USER -P PW -r -n -t "homeassistant/binary_sensor/0x00158d000123a45b/illuminance/config"
mosquitto_pub -h IP -p PORT -u USER -P PW -r -n -t "homeassistant/binary_sensor/0x00158d000123a45b/battery/config"
mosquitto_pub -h IP -p PORT -u USER -P PW -r -n -t "homeassistant/binary_sensor/0x00158d000123a45b/config"
4) (B) or reinstall Mosquitto addon (save your config and stop zigbee2mqtt prior and do it before stopping home assistant ;) )
5) remove device from .storage/core.device_registry
6) start home assistant
hassio ha start
@Pockrandt thanks for these instructions!
Pockrandt
(B) or reinstall Mosquitto addon (save your config and stop zigbee2mqtt prior and do it before stopping home assistant ;) )
Solved
then
Verify all the non-desiderable enities vainshed like magic
Pockrandt
(B) or reinstall Mosquitto addon (save your config and stop zigbee2mqtt prior and do it before stopping home assistant ;) )Solved
- instead of reinstalling mosquitto: stop HA, stop Mosquitto, stop zigbee2mqtt.
- Remove /var/lib/mosquitto/mosquitto.db (lot of rubbish inside)
- start mosquitto
then
- started HA and check Entity Registry in Configuration
- verify no entry from zigbee2mqtt (also the non-desiderable) are available
- start Zigbee2mqtt
- wait 2 minutes to let Z2M republish all the entities
- restart HA to refresh the Entity Registry
Verify all the non-desiderable enities vainshed like magic
could you share wich system you are using?
With hassio i checked the /var/lib folder... but no luck finding Mosquitto files
(i am using the ssh add-on) not getting the debug ssh thing to work..
will try some other stuff to get rid of those damn entities...
Sure, since I don't like hass.io cause the CPU overhead, I have a Debian install, with only HA as one python venv. I think you have to look in the file system inside the MQTT docker image and not in the root file system.
Yeah.. thought this was the case...
just got one old zigbee device working again... checking the zigbee2mqtt dev to see if my new devices work
How I removed the device from Domoticz.
First of all, I deleted the device in "Setup" - "Devices".
Next in console:
# systemctl stop domoticz.service
# systemctl stop zigbee2mqtt.service
# mosquitto_pub -h IP -p PORT -u USER -P PW -t "zigbee2mqtt/bridge/config/remove" -m "0x00158d000123a45b"
who ever might find this post:
This is the full ~guide~ story what is did to remove my aqara body sensor (probably overkill)
- find the device ID from Configuration> Integrations > MQTT: configuration.yaml
- remove devices from Configuration Entity Registry
- ssh into home assistant > stop home assistant
hassio ha stop- remove device from bridge
mosquitto_pub -h IP -p PORT -u USER -P PW -t "zigbee2mqtt/bridge/config/remove" -m "0x00158d000123a45b"- (A) clean mqtt
listen to all to find correct topic format
mosquitto_sub -h IP -p PORT -u USER -P PW -v -d -R -t '#'
remove cfgmosquitto_pub -h IP -p PORT -u USER -P PW -r -n -t "homeassistant/binary_sensor/0x00158d000123a45b/occupancy/config" mosquitto_pub -h IP -p PORT -u USER -P PW -r -n -t "homeassistant/binary_sensor/0x00158d000123a45b/illuminance/config" mosquitto_pub -h IP -p PORT -u USER -P PW -r -n -t "homeassistant/binary_sensor/0x00158d000123a45b/battery/config" mosquitto_pub -h IP -p PORT -u USER -P PW -r -n -t "homeassistant/binary_sensor/0x00158d000123a45b/config"
- (B) or reinstall Mosquitto addon (save your config and stop zigbee2mqtt prior and do it before stopping home assistant ;) )
- remove device from
.storage/core.device_registry- start home assistant
hassio ha start
Thank you so much.
This guide should be in the official documentation.
Most helpful comment
who ever might find this post:
This is the full
guidestory what is did to remove my aqara body sensor (probably overkill)0) find the device ID from Configuration> Integrations > MQTT: configuration.yaml
1) remove devices from Configuration Entity Registry
2) ssh into home assistant > stop home assistant
hassio ha stop3) remove device from bridge
mosquitto_pub -h IP -p PORT -u USER -P PW -t "zigbee2mqtt/bridge/config/remove" -m "0x00158d000123a45b"4) (A) clean mqtt
listen to all to find correct topic format
mosquitto_sub -h IP -p PORT -u USER -P PW -v -d -R -t '#'remove cfg
4) (B) or reinstall Mosquitto addon (save your config and stop zigbee2mqtt prior and do it before stopping home assistant ;) )
5) remove device from
.storage/core.device_registry6) start home assistant
hassio ha start