xtreme22886 / SmartThings_UniFi-Presence-Sensor

Integration for SmartThings to use UniFi wireless clients as presence sensors
GNU General Public License v3.0
8 stars 3 forks source link

How can I setup on UDM PRO #4

Closed dkimmm closed 3 years ago

dkimmm commented 3 years ago

Hello

I can not click “tap to set” box

How can I fix it?

My device is udm pro and raspberrypi.

Thanks

C2672979-CCC1-4B66-9667-D0F60C900155 79F53C21-8642-469B-8963-150F0A5ADEF4

xtreme22886 commented 3 years ago

Hi @dkimmm,

The UniFi Controller Address you have entered is invalid :). The port for the UDM Pro is port 443. So for the UniFi Controller Address field, you can enter in one of the following options:

Let me know how that goes.

dkimmm commented 3 years ago

It Does not working.

Is there something wrong? Iser controller site is correct? Previous setting was “default” on my usg. Previous I set up on usg and it does work well.

Thanks

6D834B3E-6415-493B-9092-679B1ED9D4EF

xtreme22886 commented 3 years ago

Hi @dkimmm,

Now your UniFi Controller Site is invalid. It was correct in your original screenshot. It should probably be default

If that doesn't work, Try changing UniFi Controller Address to just 10.0.1.1

If none of that works, we need to check on the Docker image running on your Pi. Try browsing to http://10.0.1.10:9443. Do you see the welcome page for the UniFi Presence Controller? If not, something is up with the Docker image running on your Pi.

If you do see the welcome page, try browsing to http://10.0.1.10:9443/unificlients. What do you see here? Do you see a list of UniFi clients? Or do you get an error message?

Please note, the "welcome page" I'm referring to is below. If you do not see this "welcome page" than you need to update your Docker image to the latest version that supports the UDM Pro.

image

dkimmm commented 3 years ago

Hi @xtreme22886

Browsing to http://10.0.1.10:9443. Message shows me "{"message":"Hello World"}"

Browsing to http://10.0.1.10:9443/unificlients. Message shows me "Internal Server Error"

So I update docker, but still same.

What else is there to do?

Thanks again

xtreme22886 commented 3 years ago

Hi @dkimmm,

If you are seeing {"message":"Hello World"} when browsing to http://10.0.1.10:9443 then that means you are not running the latest Docker image which supports the UDM Pro.

I would:

Once you are able to browse to http://10.0.1.10:9443 and see the welcome screen I posted previously, then that'll let you know things should begin to work correctly with the UDM Pro.

dkimmm commented 3 years ago

Hello @xtreme22886

Thank you for your help. Finally I can see welcome screen.

But I think it did not work. It does not changed to presence even though I'm connecting wifi. What else is there to do?

One more thing, I can not see sensor on smartthings new app. Classic app is not available anymore. I can check it on homekit(homebridge)

How can I see sensor on new app?

Thanks again.

xtreme22886 commented 3 years ago

Hi @dkimmm,

Awesome! Glad to hear we are making progress :)

Please have a read here. It explains there is not a "device" per say in the new app but the presence can still be used in the new app's Automations.

Also, have a read here to see different areas of logging to see what is going on.

I'd recommend viewing the SmartThings IDE Live Logging to see what happens when you disconnect/connect your device from WiFi. I'd also have a look at your SmartThings devices to ensure those look good. You can also check the present/not present status of the device in question there.

dkimmm commented 3 years ago

Hi @xtreme22886

I think almost done, but update date is not upload as attachment. I can see updated setting information but can not see true or false status.

There is no "Receive the following presence..." line.

What else is there to do? Thank you again.

스크린샷 2021-01-25 오후 10 00 08
xtreme22886 commented 3 years ago

Hi @dkimmm,

What do you see when you go to http://10.0.1.10:9443/monitoring ? Can you provide a screenshot of this data?

Based on the screenshot above, it looks like you keep going into the app and clicking 'save/done'. Which is why there are so many "Updated with settings" lines. Should not need to do that except initially to get things setup or to add/remove devices. Can you provide a complete screenshot with all the data so I can get a better idea of what is going on? There shouldn't be any sensitive data shown so it should be safe.

I'd also recommend ensuring that the MAC address of the device we are trying to monitor matches the MAC address on the actual device. I know Android devices like to change/mask their MAC address when connecting to WiFi (unless configured not to) so maybe the MAC we are monitoring is not the same as the MAC address on the actual device?

I'll install on a Pi and test on my end as well to ensure all is working as expected.

xtreme22886 commented 3 years ago

@dkimmm,

I just setup the Docker image on my Pi and run though some test. Everything is working as expected on my end with my devices.

image

When you browse to http://10.0.1.10:9443/unificlients you do see a list of devices correct?

dkimmm commented 3 years ago

@xtreme22886

  1. My all device's MAC is fixed, never changed.

  2. /monitoring {"monitoring":[ {"name":"(bd:8f)","mac":"f8:95:ea:0e:bd:8f","id":"unifi-bd:8f","last_seen":0,"present":null,"last_check":null},{"name":"android-656c702d87c33e66 (ae:fc)","mac":"08:d4:6a:f1:ae:fc","id":"unifi-ae:fc","last_seen":0,"present":null,"last_check":null}, {"name":"iPhone (94:7b)","mac":"f8:95:ea:33:94:7b","id":"unifi-94:7b","last_seen":0,"present":null,"last_check":null}]}

->I saved 3 phone as presence sensors.

  1. /unificlients I can see all device list of smartthings.
xtreme22886 commented 3 years ago

Hi @dkimmm,

Thank you so much for your time and patience on this issue. Also, thanks for bringing this issue to my attention. I figured out what was going on as I laid in bed last night. The issue should be resolved now but you'll need to delete your current container and image and redownload the Docker image as I made changes to it. Once you do that, give it a go and let me know if it's working for you.

Thanks!

dkimmm commented 3 years ago

Hi @xtreme22886

Same as before. Welcome page, /monitoring, /unificlients are fine.

Different thing is st log page. Any data is updating as before. Did not receiving status of presence.

This event is last. ->> Telling the UniFi Bridge to monitor the following device(s):

Thank you for help and time.

xtreme22886 commented 3 years ago

Hi @dkimmm,

I found the issue :). Can you please redo the Docker image again and re-test. It should be working now, hopefully :).

To ensure you have the latest Docker image running, I've added a version to the main screen. You should see "version 2.0" if on the latest one.

image

dkimmm commented 3 years ago

Hi @xtreme22886

I have test and it works well. I test it for 30 minutes and some error shows me as attachment.

Is it ok? or have to check?

스크린샷 2021-01-28 오후 5 03 26
xtreme22886 commented 3 years ago

@dkimmm,

Glad it is working now :). Hmm, I'll look into that error, but as long as everything is working, it shouldn't be too much of an issue.

dkimmm commented 3 years ago

@xtreme22886 It works well for 20days, Thanks

dkimmm commented 3 years ago

Hello

I have changed “mobile” to “sensor” on 18th line and than I noticed that I can see history of sensor

I just letting you know this.

Thanks

      1. 02:02, xtreme22886 @.***> 작성:

 Closed #4.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

xtreme22886 commented 3 years ago

@dkimmm,

This is awesome! Thanks for bringing this to my attention! I have modified my code to incorporate this change so that the sensor appears as a device in the device list and so that you can see the history of the device.

Thanks so much for informing me of this!