Disabled Cloud, changed password, gets weird

Posted on
Thu Apr 08, 2021 7:16 am
Different Computers offline
User avatar
Posts: 2555
Joined: Jan 02, 2016
Location: East Coast

Disabled Cloud, changed password, gets weird

First off, if there's a way to change the web login password without having cloud enabled, I can't find it.

So I changed my ui.com login credentials, which would change my UDM web login credentials too.... IF I hadn't disabled cloud before I changed the password. I need the new password for ui.com, and the old one for the UDM.

Everything still sort of seems to be working, but this morning when I look at it for the first time, I see lots of this happening as shown in the image.

Screen Shot 2021-04-08 at 9.09.39 AM.png
Screen Shot 2021-04-08 at 9.09.39 AM.png (54.02 KiB) Viewed 3735 times


How does that even make sense? All three of those are the same device.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Thu Apr 08, 2021 2:30 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Disabled Cloud, changed password, gets weird

q:
are these all dev type unifi (client) or unifi devices (ap, switch, gw) in the plugin?

if unifi client: edit and check what is used to do up/down/expired, set to optimized.

if unifi device eg ap/ switch I have to think about it .

Karl

Posted on
Fri Apr 09, 2021 10:29 am
Different Computers offline
User avatar
Posts: 2555
Joined: Jan 02, 2016
Location: East Coast

Re: Disabled Cloud, changed password, gets weird

I'm not entirely sure I understand what you're asking.

All of these devices are in the "UNIFI_system" group, which I believe is a default group created by the plug-in. The Dream Machine AP Model is Device-AP, for example.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Fri Apr 09, 2021 1:46 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Disabled Cloud, changed password, gets weird

What are the device types
check the column in the main display.

[edit] I believe it is called Model in the display
Sent from my iPhone using Tapatalk

Posted on
Sun Apr 11, 2021 8:48 am
Different Computers offline
User avatar
Posts: 2555
Joined: Jan 02, 2016
Location: East Coast

Re: Disabled Cloud, changed password, gets weird

These are all the same device.
Attachments
Screen Shot 2021-04-11 at 10.47.26 AM.png
Screen Shot 2021-04-11 at 10.47.26 AM.png (24.11 KiB) Viewed 3593 times

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Sun Apr 11, 2021 8:53 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Disabled Cloud, changed password, gets weird

Is this a UDM pro?
That does not have the wifi ap part.

I did not define a UDM or UDM pro device in the plugin. Used existing devices( gateway switch ap) to show the dev states.

Since I don’t have a UDM it’s difficult to really tune the dicta and dev states to those devices.

But I will think about it.


Sent from my iPhone using Tapatalk

Posted on
Sun Apr 11, 2021 9:37 am
Different Computers offline
User avatar
Posts: 2555
Joined: Jan 02, 2016
Location: East Coast

Re: Disabled Cloud, changed password, gets weird

It is a UDM, not the pro.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Sun Apr 11, 2021 9:55 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Disabled Cloud, changed password, gets weird

So it has the wifi ap part?


Sent from my iPhone using Tapatalk

Posted on
Sun Apr 11, 2021 2:18 pm
DaveL17 offline
User avatar
Posts: 6757
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Disabled Cloud, changed password, gets weird

You may find some tips in the comment section of this video:

https://youtu.be/EhC_JgXjoBg

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun Apr 11, 2021 4:16 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Disabled Cloud, changed password, gets weird

@Different Computers could you run this is a terminal?

-select
- copy
- open file editor
-paste
-change userid password ip number
-save as test.py in users/youruserid/desktop
-open terminal
-cd desktop
-python test.py

then email me (karlwachs at me com ) the output ... MANY lines. I don't think there are any userid .. in the output.

I need to see the structure of the dicts

it will print site name, basic device info, complete device info


Code: Select all
#! /usr/bin/env python
# -*- coding: utf-8 -*-
####################


import json
import requests
import time

requests.packages.urllib3.disable_warnings(requests.packages.urllib3.exceptions.InsecureRequestWarning)

print(u" testing unif controller")

userID    = "userid of udm web"
passwd    = "password of udm web"
ipN    = "192.168.1.x"  #the ip number of the UDM   
port    = "443"
unifi_os = True
   
headers = {"Accept": "application/json", "Content-Type": "application/json"}
login_headers = {"Accept": "application/json", "Content-Type": "application/json", "referer": "/login"}
base_url = "https://{}:{}/".format(ipN, port)
loginDict = { "username": userID, "password": passwd} #, 'strict': True}
ssl_verify = False

with requests.Session() as session:


   try:
      url = "https://"+ipN+":"+port+"/api/login"
      url = "https://"+ipN+":"+port+"/login?redirect=/api/login"
      url = "https://"+ipN+":"+port+"/api/auth/login"
      print(u"url login send:{}".format(url))
      response = session.post(url, headers=login_headers, json=loginDict, verify=ssl_verify, timeout=10.0)
      print(u"UniFi Controller Login Response: {}".format(response.text[0:100]))
   except Exception as err:
      print(u"UniFi Controller Login Connection Error: {}".format(err))

   if 'X-CSRF-Token' in response.headers:
      headers['X-CSRF-Token'] = response.headers['X-CSRF-Token']
   
   cookies_dict = requests.utils.dict_from_cookiejar(session.cookies)
   print response.headers

   if unifi_os:
      cookies = {"TOKEN": cookies_dict.get('TOKEN')}
   else:
      cookies = {"unifises": cookies_dict.get('unifises'), "csrf_token": cookies_dict.get('csrf_token')}

   # print site names
   url = "https://"+ipN+":"+port+"/proxy/network/api/self/sites"                   # works w get
   print url
   response = session.get(url,  headers=headers, cookies=cookies, allow_redirects=False, verify=ssl_verify, stream=False )     
   if response.status_code != requests.codes.ok:
      print(u"UniFi Controller Status Error: {}".format(response.status_code))
   else:   
      print(u"UniFi Controller  Response: >>{}<< ".format(json.dumps(json.loads(response.text),  sort_keys=True, indent=2),))


   # print site devices basic info
   url = "https://"+ipN+":"+port+"/proxy/network/api/s/default/stat/device-basic"                   # works w get
   print url
   response = session.get(url,  headers=headers, cookies=cookies, allow_redirects=False, verify=ssl_verify, stream=False )     
   if response.status_code != requests.codes.ok:
      print(u"UniFi Controller Status Error: {}".format(response.status_code))
   else:   
      print(u"UniFi Controller  Response: >>{}<< ".format(json.dumps(json.loads(response.text),  sort_keys=True, indent=2),))


   # print site devices  complete
   url = "https://"+ipN+":"+port+"/proxy/network/api/s/default/stat/device"                   # works w get
   print url
   response = session.get(url,  headers=headers, cookies=cookies, allow_redirects=False, verify=ssl_verify, stream=False )     
   if response.status_code != requests.codes.ok:
      print(u"UniFi Controller Status Error: {}".format(response.status_code))
   else:   
      print(u"UniFi Controller  Response: >>{}<< ".format(json.dumps(json.loads(response.text),  sort_keys=True, indent=2),))



Posted on
Sun Apr 11, 2021 4:33 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Disabled Cloud, changed password, gets weird

Re the unifi breach and 2fa.

It seems that the unifi single sign on (SSO) password is also the local unifi web password.
And switching on 2FA for the public web account access will also then switch on 2FA for the local web access. That is used in plugin to get certain info.

The other part of the plugin uses unix ssh access to the switches and AP and GW. That is not impacted by SSO / 2FA
You can leave the web userid/password empty and only rely on the direct device info. 80% of the plugin will still be working. (devices up/down expired...)

Karl

Posted on
Tue Apr 13, 2021 11:24 am
Different Computers offline
User avatar
Posts: 2555
Joined: Jan 02, 2016
Location: East Coast

Re: Disabled Cloud, changed password, gets weird

I'll give this a try tonight.

I'm also seeing this. I have no UNIFI cameras at all.
Code: Select all
uniFiAP Error                   error in  Line# 5709 ;  error='key name Unifi_Camera_with_Event not found in database'

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Tue Apr 13, 2021 11:34 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Disabled Cloud, changed password, gets weird

I guess you have switch cameras off?


Sent from my iPhone using Tapatalk

Posted on
Wed Apr 14, 2021 10:30 am
Different Computers offline
User avatar
Posts: 2555
Joined: Jan 02, 2016
Location: East Coast

Re: Disabled Cloud, changed password, gets weird

Just double checked, and yes, they are off and always have been. Pretty sure that is the default, right?

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Wed Apr 14, 2021 10:49 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Disabled Cloud, changed password, gets weird

which version?...

it can only get tho that place when
if camera =="protect":
....

Who is online

Users browsing this forum: No registered users and 10 guests