Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Deleting device in Pimatic doesn't seem to delete it also in Homekit #64

Closed
pplucky opened this issue Feb 18, 2017 · 13 comments
Closed

Comments

@pplucky
Copy link

pplucky commented Feb 18, 2017

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.

@michbeck100
Copy link
Owner

What type of devices are you removing? Looking at the code it seems that removing sensors will not work properly.

@michbeck100
Copy link
Owner

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

@pplucky
Copy link
Author

pplucky commented Mar 30, 2017

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.

@michbeck100
Copy link
Owner

There was indeed a bug for VariablesDevice which was fixed with the referenced changes. So it should be solved with 0.10.0

@pplucky
Copy link
Author

pplucky commented Mar 30, 2017

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?

@michbeck100
Copy link
Owner

Please provide me with a sample config of your VariablesDevice. I will try to reproduce this error as soon as I find the time.

@pplucky
Copy link
Author

pplucky commented Mar 30, 2017

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?

@michbeck100
Copy link
Owner

Yes, that's right. Could you please test if you get the same behavior with a DummyTemperatureSensor?

@michbeck100 michbeck100 reopened this Mar 30, 2017
@pplucky
Copy link
Author

pplucky commented Mar 30, 2017

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?

@pplucky
Copy link
Author

pplucky commented Apr 27, 2017

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?

@michbeck100
Copy link
Owner

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).

@pplucky
Copy link
Author

pplucky commented May 5, 2017

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):

  • OrviboOutlet --> deleted from Pimatic, and was also deleted from Homekit (disappeared in Home app).
    { "class": "OrviboOutlet", "name": "Orvibo", "id": "orvibo", "ip": "xxx.xxx.xxx.xxx", "mac": "xxxxxxxxxxxx", "hap": { "service": "Switch" } }

@michbeck100
Copy link
Owner

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants