Announcement

Collapse
No announcement yet.

How can I set the user access for all devices, script?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How can I set the user access for all devices, script?

    I have been experimenting with the MyCroft open source voice assistant and associated homeseer skill.

    The skill makes a request to <HomeSeer URL>/JSON?request=getstatus to retrieve a list of available devices. It does not seem to pay any attention to the "voice" property of each device and returns every device in the system.

    As you might expect, this makes voice commands difficult as a lot of devices can share similar names.

    What I would like to do, is create a user account specifically for Mycroft, and have it scoped to only be able to access a small number of voice controllable devices.

    Unfortunately every device already in the system is set to "All Users" for access.

    What I need to be able to do is set every device to "Admin users". Following that I can manually add the Mycroft guest account to a few devices for control.

    Does anyone have a script or other method that can systematically edit the permissions on a few hundred devices?

    Thanks.

    #2
    I am pretty certain that user access is managed at the web page level and not the device level. I am not aware of any property of a device that is associated with access rights.

    Since MyCroft is open source you should be able to change the way the list of available devices is obtained. Perhaps a web page the returns the JSON for the devices of interest.

    Comment


      #3
      This has to be one of my dumbest moments, turns out there's a bulk action for exactly this in the bulk action drop down list

      Comment


        #4
        Originally posted by Michael McSharry View Post
        I am pretty certain that user access is managed at the web page level and not the device level. I am not aware of any property of a device that is associated with access rights. Since MyCroft is open source you should be able to change the way the list of available devices is obtained. Perhaps a web page the returns the JSON for the devices of interest.
        Devices can be assigned user level permissions. As Fellhahn discovered, this access can be assigned by bulk editing on the Device Manager page.
        HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

        Comment


          #5
          When I navigate to Device Management I do not see any capability for bulk actions. How specifically is it accessed? Does the SDK/Help need an update to show where user access properties are managed?

          Comment


            #6
            Originally posted by Michael McSharry View Post
            When I navigate to Device Management I do not see any capability for bulk actions. How specifically is it accessed? Does the SDK/Help need an update to show where user access properties are managed?
            At the top right, just above the Display Filters row. The drop down will 9nly populate when you have at least 1 device selected in the checkbox to the far left of its row.

            Click image for larger version

Name:	48ACBB7C-4BF8-46F1-9068-5705069C51ED.jpeg
Views:	261
Size:	116.9 KB
ID:	1346338
            HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

            Comment


              #7
              I am running HS3 version 528 on Linux. If I select some devices and look at the pulldown I see some thinks related to mobile, but I see nothing about bulk. The other part of the question is where HS3 maintains the info as I do not see anything in the device object about user access.

              Comment


                #8
                In your screen shot above you have 17 devices of of 3203 devices filtered with one device selected. If you select more devices either by individually checking them or checking the select all check box next to the drop down you will be able to apply the commands in the drop down to all selected devices.

                In this screen shot below I have all 3 components of a WD200 selected. I can now use any of the options in the drop down menu to change all 3 components of the selected device. For example I can change the the floor or room or user access et. al.

                Click image for larger version

Name:	bulkaction.png
Views:	199
Size:	30.0 KB
ID:	1346350

                Comment


                  #9
                  Originally posted by Michael McSharry View Post
                  I am running HS3 version 528 on Linux. If I select some devices and look at the pulldown I see some thinks related to mobile, but I see nothing about bulk. The other part of the question is where HS3 maintains the info as I do not see anything in the device object about user access.
                  It is on the configuration tab for each device. Near the bottom just below the “Do not update device last change time if device value does not change:” checkbox.

                  HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                  Comment


                    #10
                    I can see the user access on the configuration tab. I cannot see anything in the HS documentation at https://homeseer.com/support/homeseer/HS3/HS3Help.pdf about user access for devices. Looks to be the case where software was updated but the documentation was not.

                    I also cannot see a "bulk" option on post #8 or when I select all device from my view and then use the pulldown. What I think is being communicated is that this pulldown can be used to set any available property for a the set of selected devices. Does not matter if one or many are selected, but whatever is selected will be applied to everything that was checkboxed.

                    Comment


                      #11
                      If you're running the Windows Admin Center gateway in service mode on Windows Server, use the following command to download the configuration package. Be sure to update the gateway address with the correct one for your environment.

                      PowerShell
                      $WindowsAdminCenterGateway = 'https://windowsadmincenter.contoso.com' Invoke-RestMethod -Uri "$WindowsAdminCenterGateway/api/nodes/all/features/jea/endpoint/export" -Method POST -UseDefaultCredentials -OutFile "~\Desktop\WindowsAdminCenter_RBAC.zip"
                      If you're running the Windows Admin Center gateway on your Windows 10 machine, run the following command instead:

                      PowerShell
                      $cert = Get-ChildItem Cert:\CurrentUser\My | Where-Object Subject -eq 'CN=Windows Admin Center Client' | Select-Object -First 1 Invoke-RestMethod -Uri "https://localhost:6516/api/nodes/all/features/jea/endpoint/export"

                      Comment

                      Working...
                      X