Presence detection using UniFi Controller (Ubiquiti Networks)

All kinds of 'OS' scripts

Moderator: leecollings

RapTile
Posts: 53
Joined: Saturday 10 March 2018 2:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Presence detection using UniFi Controller (Ubiquiti Networks)

Post by RapTile »

Maes wrote: Monday 29 October 2018 9:13 Okay, it works. I don't know how this jq works but it seems to utilize black magic.
Cool :)
I dont know how jquery works either. Had to do a lot of trial and error ;-)
Nice that it works for you as well.
RLezer
Posts: 7
Joined: Wednesday 01 June 2016 11:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Presence detection using UniFi Controller (Ubiquiti Networks)

Post by RLezer »

i am running this script against my controller, my devices get reported online.. but they never go Offline. i left the hous 2 hours ago, but my phone is still reported online.

if i switch it to off manually , it stays "off" until i get home.. so somewhere there is a small error. but haven't been able to pinpoint it yet.
seansco
Posts: 19
Joined: Tuesday 01 March 2016 20:51
Target OS: Linux
Domoticz version:
Contact:

Re: Presence detection using UniFi Controller (Ubiquiti Networks)

Post by seansco »

@BakSeeDaa You are the BOMB DOT COM!!!

Thank your for this :D
karlzre
Posts: 26
Joined: Sunday 06 August 2017 18:48
Target OS: -
Domoticz version:
Contact:

Re: Presence detection using UniFi Controller (Ubiquiti Networks)

Post by karlzre »

Hi,

I'm just testing your script i get a error 302

Code: Select all

Running unifi_detect.sh 1.0.1

302
Exiting with a result code of : 302
Any idea what's is wrong ?
karlzre
Posts: 26
Joined: Sunday 06 August 2017 18:48
Target OS: -
Domoticz version:
Contact:

Re: Presence detection using UniFi Controller (Ubiquiti Networks)

Post by karlzre »

Code: Select all

I'm just testing your script i get a error 302
CODE: SELECT ALL

Running unifi_detect.sh 1.0.1

302
Exiting with a result code of : 302
Any idea what's is wrong ?
Ok i found, i was trying to use the unesecure interface.
I changed it to https://ip port 8443 and it works now .
sschouten
Posts: 9
Joined: Thursday 23 April 2015 13:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Presence detection using UniFi Controller (Ubiquiti Networks)

Post by sschouten »

Hi,

since a few days the script is not working any more,
it worked for over a year perfect.

when i start the script trough ssh i get this message.

Code: Select all

Running unifi_detect.sh 1.0.1
./unifi_detect.sh: regel 47: onverwacht bestandseinde tijdens zoeken naar bijpassende ']'
./unifi_detect.sh: regel 129: syntaxfout: onverwacht bestandseinde
rbosch
Posts: 11
Joined: Monday 18 January 2016 20:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Netherlands
Contact:

Re: Presence detection using UniFi Controller (Ubiquiti Networks)

Post by rbosch »

I have been using the script succesfully for years. Switched to a Dreammachine today and cannot get it to work.
I added a local user with limited admin rights to the Dreammachine and changed the IP address of the script to point to the device.
Tried it with port 443 and without port. But no result.

Is there a log file where I can see what is going wrong? Any other clues?
edebruin
Posts: 1
Joined: Saturday 17 December 2016 10:03
Target OS: -
Domoticz version:
Contact:

Re: Presence detection using UniFi Controller (Ubiquiti Networks)

Post by edebruin »

I have running this script for a long time, with success. After reinstalling my Domoticz (Raspberry Pi), and copying over the script from the old installation to the new one. The result from the script is 'Exiting with a result code of : 404', and all Phones are switched off in Domoticz.

Someone any idea how to fix this issue?
parkerc
Posts: 6
Joined: Sunday 24 April 2016 17:52
Target OS: -
Domoticz version:
Contact:

Re: Presence detection using UniFi Controller (Ubiquiti Networks)

Post by parkerc »

Same issue, my latest UniFi controller update seems to have broke the wall

I have been trying to ing to figure out what’s changed. I’m wondering if the curl request / format has changed slightly (https://ubntwiki.com/products/software/ ... roller/api)

Maybe it’s become ..

Code: Select all

 curl -k -X POST --data '{"username": "usr", "password": "password"}' -b cookie.txt https://192.168.102.207:443/proxy/network/api/auth/login
nigels0
Posts: 221
Joined: Thursday 23 January 2014 12:43
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Presence detection using UniFi Controller (Ubiquiti Networks)

Post by nigels0 »

Is it working any more?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest