Announcement

Collapse
No announcement yet.

Alexa and Unifi USG

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

    Alexa and Unifi USG

    Over a year ago my Alexa integration mysteriously stopped working. I started this thread and was unable to reach a resolution. The support person I was working with at the time told me that all resources were being devoted to HS4, so they couldn't prioritize my issue. I just kind of forgot about it until recently. Now that HS4 is out I took the plunge and upgraded hoping that HS4 would resolve my issue. Should have known better.


    I've now been going back and forth with support for several days (again) trying to get this figured out. I've done the disable voice for all devices, enabled for one device, uninstall/reinstall flow roughly 20 times. Still no devices found. Support rep says it must be something on my network. Alexa finds every non-homeseer device with no problem. We just got a printer and it found it first try. All our sonos, smarthings, etc all work just fine.

    The rep asked me to disable my firewall. I've got a full ubiquiti setup, so it's not that simple. On the USG you can delete individual firewall rules but there's no on/off for the firewall. I have no custom firewall rules created (only the default rules which seem to be working for everything else) and I do have upnp enabled. Any unifi experts out there have tips? Help would be appreciated.

    The support rep just told me that he was done working on the problem since they don't offer networking advice. I am still not convinced that's the issue, but I don't really have much choice other than to ask for help here.

    #2
    I haven't taken the HS4 plunge, and admittedly am no Echo/Alexa expert, but it works for me. My understanding is that Alexa integration requires working myhs web access, can you confirm that you can reach your system through myhs.homeseer.com and not local?

    Echo access also requires JSON working, can you confirm you have that enabled in HS3/4? Did they have you enable JSON debugging in the log? JSON debugging is DebugLevel=2048.

    When I enable debugmode above and open the Alexa app on my phone and initiated discovery the following messages appeared in the log:

    Jul-09 12:33:38 PM System Current debug events set: JSON
    Jul-09 12:33:38 PM System Control Panel Immediate Script: &hs.DebugMode=2048
    Jul-09 12:35:36 PM DEBUG JSON Query: request=getsetting&setting=gGlobalTempScaleF&token=your-system-token-id&source=EchoSH
    Jul-09 12:35:36 PM DEBUG JSON Query: request=getevents&voiceonly=True&token=your-system-token-id&source=EchoSH
    Jul-09 12:35:35 PM DEBUG JSON Query: request=getcontrol&token=your-system-token-id&source=EchoSH
    Jul-09 12:35:35 PM DEBUG JSON Query: request=getsetting&setting=bLocationFirst&token=your-system-token-id&source=EchoSH
    Jul-09 12:35:35 PM DEBUG JSON Query: request=getstatus&devref=all&voiceonly=False&token=your-system-token-id&source=EchoSH

    your-system-token-id will be a numeric ID based on your system.

    Comment


      #3
      I have an edgemax pro not USG. Edgemax allows you to completely back up the configuration and save to another machine. If you do a backup, remove all firewall rules, then restore after your test. Not as easy as turning off but would allow you to test.

      Comment


        #4
        I also have a full Ubiquiti setup with no custom firewall rules and Alexa has worked fine on HS3 and HS4.

        Comment


          #5
          I would also add that since HS3 -> myhs access is initiated outbound from inside your LAN, only very sophisticated firewall rules would apply. 99% of firewalls I'm familiar with automatically allow return traffic for local initiated traffic.

          Comment


            #6
            Originally posted by mterry63 View Post
            I haven't taken the HS4 plunge, and admittedly am no Echo/Alexa expert, but it works for me. My understanding is that Alexa integration requires working myhs web access, can you confirm that you can reach your system through myhs.homeseer.com and not local?

            Echo access also requires JSON working, can you confirm you have that enabled in HS3/4? Did they have you enable JSON debugging in the log? JSON debugging is DebugLevel=2048.

            When I enable debugmode above and open the Alexa app on my phone and initiated discovery the following messages appeared in the log:

            Jul-09 12:33:38 PM System Current debug events set: JSON
            Jul-09 12:33:38 PM System Control Panel Immediate Script: &hs.DebugMode=2048
            Jul-09 12:35:36 PM DEBUG JSON Query: request=getsetting&setting=gGlobalTempScaleF&token=your-system-token-id&source=EchoSH
            Jul-09 12:35:36 PM DEBUG JSON Query: request=getevents&voiceonly=True&token=your-system-token-id&source=EchoSH
            Jul-09 12:35:35 PM DEBUG JSON Query: request=getcontrol&token=your-system-token-id&source=EchoSH
            Jul-09 12:35:35 PM DEBUG JSON Query: request=getsetting&setting=bLocationFirst&token=your-system-token-id&source=EchoSH
            Jul-09 12:35:35 PM DEBUG JSON Query: request=getstatus&devref=all&voiceonly=False&token=your-system-token-id&source=EchoSH

            your-system-token-id will be a numeric ID based on your system.
            I have myhs working and I have a corresponding user set up in Homeseer. I can confirm that I can access my system from outside my network. Where should I look to confirm JSON is enabled? I didn't see it in the settings menu.

            AllHailJ I am a bit hesitant to do that as it seems like a big risk. I know Alexa DID work for quite some time until it mysteriously stopped working. It sounds like other folks with similar setups aren't having any problems either. I guess that'll be my last ditch effort if needed.

            Comment


              #7
              The JSON setup is in the Network tab under the Settings Menu for HS3. Not sure for HS4.

              Click image for larger version

Name:	Untitled.png
Views:	242
Size:	10.9 KB
ID:	1401052

              Comment


                #8
                Originally posted by mterry63 View Post
                The JSON setup is in the Network tab under the Settings Menu for HS3. Not sure for HS4.

                Click image for larger version  Name:	Untitled.png Views:	0 Size:	10.9 KB ID:	1401052
                Thanks! I found it just after posting that last reply. It was checked. I even forwarded port 11000 in my USG just for good measure. Still won't discover any devices. I'm not sure how to enable JSON debugging though.

                Comment


                  #9
                  Blackbeard ,

                  I have gone through the previous posts and have noticed that you have not stated which server software you are running HomeSeer on. Please note that if you are using Windows and people say turn off your Firewall, that's the first firewall they assume. There are times when you are installing software which is supposed to communicate through the network ports and it invokes a Firewall pop to ask you to deny or allow but if the software was poorly designed it will not do that. So you have to go in there and do the settings accordingly.

                  Tip: Now if Windows, and while at it make sure you turn off all the public access options because your computer is not a public server. Else, if Linux then the issue may be elsewhere and if you use Ubiquiti gear then look at the Multicast settings (mDNS). Here : https://help.ui.com/hc/en-us/article...-UniFi-Network
                  But before you go there are few things about security you have to understand and please spend some time -,

                  Here : https://kb.iweb.com/hc/en-us/article...ecurity-issues
                  This will also be useful : https://www.vueville.com/home-securi...es-government/

                  Extra,
                  This here may not apply if you solve your problem but worth a look : https://community.ui.com/questions/A...5-1734b764e379



                  Eman.
                  TinkerLand : Life's Choices,"No One Size Fits All"

                  Comment


                    #10
                    ASCII controls e.g. port 11000 isn't used by myhs or Alexa. Be careful enabling it externally.

                    Did you enable JSON debugging? Did it show any log entries when you tried discovery? If not, I'd say the problem lies somewhere in the Alexa Skill and myhs settings.

                    Do you have an entry in your log like this?

                    Jul-07 9:39:14 AM Info System connected to MyHS Service successfully with license ID xxxxx

                    Comment


                      #11
                      Also, port forwarding isn't required for myhs communications. It works like apps like "GoToMyPC" by opening a constant connection outbound from your HS3/4 application to a cloud based server waiting for external commands. Which is why the log entry above about HS contacting myhs. This prevents the software vendor from having to deal with firewalls. From a firewalls perspective, it looks just like a browser session you initiate to an external site.

                      Comment


                        #12
                        Thanks for the replies everyone.

                        Eman I am running HS4 on the Hometroller S6 Pro on Windows 7. The firewall is turned off. I'll take a look at the other links you shared. Thanks.

                        Comment


                          #13
                          mterry63 I still can't figure out how to turn on debug logging for JSON. I've done it a few times for a particular plugin, but that also seems to have changed in HS4.

                          Comment


                            #14
                            In HS3 it's under Tools > Control Panel. Change my example from 0 to 2048. Set back to zero when done. I'm assuming Control Panel still exists in HS4, if not you could add the same command as an immediate script in a manually executed event.

                            Click image for larger version

Name:	Untitled.png
Views:	239
Size:	11.2 KB
ID:	1401338

                            Comment


                              #15
                              Make sure you click "Execute Command". It should show up in the log.

                              If support didn't have you go through this step they weren't completely supportive.

                              Comment

                              Working...
                              X