Good evening everyone
I’m reaching out to ask for help resolving my problem. After several attempts to restart Zigbee2mqtt, then Gladys, then deleting the sensor and reinstalling it, I still get this message when I confirm saving this sensor
An error occurred while saving.
This sensor is Xiaomi like the one in @pierre-gilles’s tutorial, which was properly integrated into Gladys.
In the Zigbee discovery window, this sensor requested an update, but when I confirmed it I got this message:
An error occurred while saving.
I removed the sensor in Zigbee2mqtt and in Gladys, I re-paired it, it appears correctly in Zigbee2mqtt and in Gladys Zigbee network discovery
, but when I try to save it, I still get this message:
An error occurred while saving.
However, it no longer appears in the Zigbee2mqtt logs (I think that’s normal).
I had another device that did this to me, so I removed it from Gladys’s Zigbee devices, and when I saved it, it worked and I no longer had this message.
Could it be that this Xiaomi sensor is still in a database that refuses to update it? I don’t know how to check that.
So now I can’t integrate it into Gladys anymore.
Does anyone have any idea to help me
Thanks in advance
hello @pierre-gilles
Yes I’m on v4.36
Apparemment it’s related to the Xiaomi detector, because I have a Zigbee relay that I removed from Gladys’s devices and that I reinstalled directly. I tested it with the Xiaomi app — it connects fine. I put it back on Zigbee2mqtt
Possible. Can you open the developer tools window (F12 in your browser) and go to the Network tab? At the moment you click Save, you should see a red line. It’s the response body we’re interested in.
status 409
code "CONFLICT"
error
message "external_id must be unique"
attribute "external_id"
value "zigbee2mqtt:detecteur couloir:light-sensor:decimal:illuminance"
type "unique violation"
Hello @cicoub13
Should I have the uuid displayed? because I’m stuck at the prompt: sqlite\u003e and I don’t know how to get out of it. .exit doesn’t make me exit
And for deletions I am supposed to replace:
id = '\u003cuuid\u003e';
with: id = 'my uuid'; ; removing this: \u003c\u003e
Actually I don’t know SQL at all
Thanks for your help
Wouldn’t you be more comfortable using an external tool by exporting your database to at least get the uuid?
You can check Pierre-Gilles’ post:
For my part I almost only use that!!
Turn off Gladys, download the database to your PC/Mac and view it.
If you made a backup beforehand, you can delete it in TablePlus then re-import your database (be careful with permissions — I have to open permissions to everyone then put them back afterward)