Closed pplucky closed 6 years ago
What type of devices are you removing? Looking at the code it seems that removing sensors will not work properly.
I did test this for "normal" devices and couldn't find any issues, so I'm closing this. Changes for sensor are released with v0.10.0
Hello.
Sorry for not replying earlier, but this seems to happen for devices with type 'VariablesDevice'.
I currently use these in Homekit, by using a temperature or humidity variable, to display its value in iOS.
Can you please check?
Thanks in advance.
There was indeed a bug for VariablesDevice which was fixed with the referenced changes. So it should be solved with 0.10.0
Unfortunately I already have 0.10.0 and I had this same issue of deleting a 'VariablesDevice' in Pimatic and it still appeared in Homekit.
Deleting in Homekit yielded an error, so I had to deleted hap-database manually, restart pimatic and then deleting the Bridge on iOS and adding it later again.
Do you need me to produce any debug log, anything?
Please provide me with a sample config of your VariablesDevice. I will try to reproduce this error as soon as I find the time.
Here is the config for 2 VariablesDevice:
{
"variables": [
{
"name": "temperature",
"expression": "$temp-quarto-diogo",
"type": "number",
"unit": "ºC"
}
],
"xAttributeOptions": [],
"hap": {
"service": "Lightbulb"
},
"id": "temp-quarto-diogo",
"name": "Temperatura Quarto Diogo",
"class": "VariablesDevice"
},
{
"variables": [
{
"name": "humidity",
"expression": "$rhum-quarto-diogo",
"type": "number",
"unit": "%"
}
],
"xAttributeOptions": [],
"hap": {
"service": "Lightbulb"
},
"id": "rhum-quarto-diogo",
"name": "Humidade Quarto Diogo",
"class": "VariablesDevice"
},
I think this issue also happens for ShellSensor devices, but from pimatic-hap perspective, both should be treated as generic based on 'humidity' or 'temperature', right?
Yes, that's right. Could you please test if you get the same behavior with a DummyTemperatureSensor?
I will test them all and get back to you. It may take a couple of days, but this is a workaroundable issue, not critical at all.
Do you need any debug log for these tests?
Hello.
I finally managed to test this with the following results:
Dummy Sensor --> deleted from Pimatic, still appears in Home app as if it was not even deleted;
{ "xAttributeOptions": [], "hap": { "service": "Lightbulb" }, "id": "dummy-sensorz", "name": "Dummy sensorz", "class": "DummyTemperatureSensor" }
Variables Device (config as above) --> deleted from Pimatic, still appears in Home app as not supported;
TPlinkHS100/TPlinkHS110 --> deleted from Pimatic, still appears in Home app as not supported.
{ "class": "TPlinkHS100", "name": "Tomada Sala", "id": "TomadaSala", "ip": "xxx.xxx.xxx.xxx", "interval": 60, "hap": { "service": "Switch" }
If I try to manually remove any of these in Home app, it simply tells me it is not possible.
Do you need me to do any more tests?
First, thanks for testing. I will have a look whats wrong with this feature. I was thinking that it worked (at least someday in the past).
No problem.
The other day I tried with another device type and this one worked properly (I wonder it might help you analyzing your code):
{ "class": "OrviboOutlet", "name": "Orvibo", "id": "orvibo", "ip": "xxx.xxx.xxx.xxx", "mac": "xxxxxxxxxxxx", "hap": { "service": "Switch" } }
Removing devices was implemented with 911375c. But i seems that sometimes devices still appear in the home app as disabled but don't get removed. There's nothing i can do at the moment. Therefor i close this issue for now.
Is it just me, or this still doesn't work properly? Should be, according to this enhancement.
Every time I remove a device in Pimatic, is still appears as not responding in Home app. If I try to delete it from there, I always get an error message.
What can I arrange (logs, whatever), for you to check this, please?
Thanks in advance.