BobRak / OpenHAB-Smartthings

53 stars 54 forks source link

How to get iPhone presence to openhab #51

Closed 5witch closed 4 years ago

5witch commented 6 years ago

I selected my iPhone as one of the objects listed in the OpenHabAppV2 smart app, but I cannot discover it in Openhab. This would be a great solution to the "presence problem".

BobRak commented 6 years ago

Sorry for the delay in response. The next two weeks are going to be very busy for me.

What kind of a device did it show up as in OpenHapAppV2? How was it discovered by the Smartthings hub. It isn't zigbee or ZWave.

5witch commented 6 years ago

Under the "Presence Sensor" option in the OpenHABV2 app I see my iPhone and my wife's iPhone. Presumably this is on account of installing the Smartthings app on these devices and using the geofencing features.

BobRak commented 6 years ago

Right now I am in the middle of moving and don't have my openHAB or Smartthings hub operating. When My move is complete I'll look into this. Probably near the end of Sept.

Did your presence sensor come from Marketplace -> Sensors -> Presence sensors -> Mobile Phone?

5witch commented 6 years ago

Yes, and when I select "Connect Now from Marketplace -> Sensors -> Presence sensors -> Mobile Phone, I get a message saying "This mobile phone is already set up as a mobile presence device."

BobRak commented 5 years ago

I finally am back to working on the smartthings binding for openHab. I added the presence sensor to my Android phone. I have been able to discover it and add it to openHab.

image

In the ST app on your phone are you seeing it and is it registering correctly? Have you added it to the OpenHabAppV2?

5witch commented 5 years ago

I select the Phone in the list of presence sensors in the OpenHabAppV2. But discovery does not find it. I can add manually, but the .state is Null.

BobRak commented 5 years ago

I just deployed a new smartthings jar file to my github repo. You might start by downloading it. But, I don't think that I made any changes that should affect this problem. It is working correctly for me. Here is a picture of it in the PaperUI: image Here is what the definition looks like: image Is yours defined as a String?

I'm not sure why it wasn't getting discovered. I did make one change to the discovery service that allows it to create things where the name is Smartthings is not valid in OpenHAB. These would be names that include special character other than letters, number, hyphen and underscore. I think it is important to figure out why it isn't being discovered. Please check the openHAB logs on you openHAB server.