[RELEASE] Hunter Douglas PowerView Hub integration

That would be great, thanks. I guess I could always always for the v1 hub or buy it somewhere? Not sure I would need the v2 since with your set-up, ST sees it, therefore Alexa should see it…right?

Sure, if you pick up a v1 hub then this DTH will allow you to use Smartthings – and through that, Webcore, Alexa, Google Home, IFTTT, and whatever else talks to ST.

If you pick up a v2 hub, you can use Homekit, Alexa, IFTTT, and whatever HD lists on their integrations page, directly without getting ST involved. If I can get the updated API information, I would likely be able to update this DTH to work with a v2 hub.

I have a V1 Hunter Dougles hub with three shades. I put in the IP address of my hub, it finds my three shades and the 11 scenes I have. When I press on Save it says 'Hunter Dougles Powerview is now installed and automating but then immediately I get ‘An unexpected occurred’. Any ideas?

Hi @efs, can you copy over the debug log output from the IDE when that happens? I don’t know of any known issues at the moment.

John,

Sorry to bother you, I resolved my problem, user error on my part.

Thanks

hi @johnvey - I’ve really been enjoying the integration. Since I updates the device handler it looks like all the shades are being refreshed once a minute - is there an option to reduce frequency of the refreshes?

The batteries in my shades just died. Its only been a few months since I changed them so I’m starting to wonder the same thing.

@armayer the latest version of the code only requests an update once every 3 hours – this is the 030e616 commit on Dec 8 (https://github.com/johnvey/smartthings-hd-powerview/commits/master). Are you on the latest version of both the SmartApp and the 2 DTHs? Perhaps there is some other component in your set up that is asking the shades for status every minute?

@johnvey I think I updated everything from the latest commit off your repo. I will review and confirm that this evening. Is the interval for the refreshes set in the app, scene or shade handler code? I only noticed this increase in refreshes when I preformed an update in the handlers last week.

@johnvey I just confirmed I’m using at latest code for the shade, scene and app and I’m still seeing refreshes once a minute.

I’m seeing these entries in the logs every minute for every blind:
2:28:55 PM: debug Setting shade level: 0
2:28:52 PM: debug Executing ‘refresh’

I vaguely recall running into orphaned schedules in the DTH after an update that can’t be canceled. I hate to resort to this, but can you try uninstalling/reinstalling at least one of the shades to see if its schedule corrects itself?

Unfortunately the dev platform is primitive so debugging this is hard. While one can view the scheduled jobs that are set by SmartApps, that capability is not available for device handlers (where my schedules are set): http://docs.smartthings.com/en/latest/smartapp-developers-guide/scheduling.html?highlight=scheduling#viewing-schedules-in-the-ide.

I had that issue as well when working on another SmartApp. The only fix was to remove/add and the rogue orphaned schedules were gone.

However, I do notice that my HD extender is very active while this was installed and running. It has a flashing light that shows the activity. I think it may be the polling event in the DH doing this.

The poll event runing the refresh command which is doing the forceupdate with ?refresh. I’m thinking the poll is getting called frequently and the ?refresh is causing communication with the blinds. Without it I think it just uses whatever the hub has cached. I’ve commented out the ?refresh and am watching it now. The activity has calmed down.

I can’t seem to find an exact answer as to how often the poll runs.

I was seeing the same activity on the extenders - flashing once a minute or so. I’m not at home now so I can’t tell if the flashing has stopped but I also commented out ?refresh as a test and I’m not seeing the same refresh in the logs every minute. And my blinds are still responding as far as I can tell from my remote monitors.

I’m trying to get this app up and running and having some issues during the discovery process.

I see the following in my log after inputting the IP of my Powerview hub (version 1)
a916427e-24a0-41a1-96f0-a82ab891ed62 2:49:34 PM: info fetchHubInfo()
a916427e-24a0-41a1-96f0-a82ab891ed62 2:49:34 PM: info pref.singlePagePref - shadeCount=0, sceneCount=0
a916427e-24a0-41a1-96f0-a82ab891ed62 2:49:34 PM: debug sendRequest: GET 192.168.1.22:80/api/scenes
a916427e-24a0-41a1-96f0-a82ab891ed62 2:49:34 PM: debug sendRequest: GET 192.168.1.22:80/api/shades
a916427e-24a0-41a1-96f0-a82ab891ed62 2:49:34 PM: debug sendRequest: GET 192.168.1.22:80/api/userdata
a916427e-24a0-41a1-96f0-a82ab891ed62 2:49:34 PM: info fetchHubInfo()

What is interesting is when I visit the GET IP’s in my browser they return the data expected, for example, when I visit /api/shades, I see:
{“shadeIds”:[27028,6557,13773],“shadeData”:[{“id”:27028,“name”:“TWlkZGxlIHNoYWRl”,“roomId”:55363,“groupId”:49833,“order”:0,“type”:8,“batteryStrength”:169,“batteryStatus”:3, “positions”:{“position1”:4508,“posKind1”:1,“position2”:0,“posKind2”:2}},{“id”:6557,“name”:“TGVmdA==”,“roomId”:55363,“groupId”:49833,“order”:1,“type”:8,“batteryStrength”:169,“batteryStatus”:3, “positions”:{“position1”:4508,“posKind1”:1,“position2”:0,“posKind2”:2}},{“id”:13773,“name”:“UmlnaHQgU2hhZGU=”,“roomId”:55363,“groupId”:49833,“order”:2,“type”:8,“batteryStrength”:169,“batteryStatus”:3, “positions”:{“position1”:4508,“posKind1”:1,“position2”:0,“posKind2”:2}}]}

Any ideas? I should note that I have tried various apps posted here with no success, so I suspect it is something related to my router, just not sure what.

Thanks so much! I’m a new smartthings user and I am going to try and get this working today.

And… here’s a little info I have discovered regarding gen2 hubs:
It seems like the only real change I have seen (so far) is that it is more case-sensitive.
E.g.:
http://powerview/api/scenes?sceneid=43508 – Does not work
http://powerview/api/scenes?sceneId=43508 – Works fine (Note the capital I in “sceneId”)
Pretty simple change!

I’m hoping I can use this, make a few tiny capitalization changes, and be good to go!
I’ll update if I succeed, or fail.
Thanks again!

1 Like

@rossc719 that’s hopeful news. Happy to take a pull request, or at least a list of endpoint changes that need to go in.

I’ve added the SmartApp and DTH from the GitHub source shown earlier. I can launch the SmartApp, and I’m prompted for the PowerView Hub IP address. However, once I enter it, the SmartApp just hangs, apparently looking for devices, and the devices never get added to SmartThings. What am I missing?

@Jim_Newman, what is the version of the PowerView Hub that you are using? The v1 hub is a black square, while I believe the v2 hub is a white circular shape, though the best way is to check the “hub info” section in the PowerView mobile app.

This DTH has been validated for the v1 hub, but the v2 hub seemed to have introduced a breaking change to some part of the protocol. @rossc719 has a v2 and was following a lead on a possible fix.

Sorry for the delay. I have a V2 hub. Perhaps I misunderstood, because in reading the thread I thought the V2 differences had been resolved. If there’s something I can do to modify and test this for everyone, I’ll be glad to do what I can. (Lots of experience in coding & testing, but not with groovy or DTH’s)

@Jim_Newman could you try interactively setting HTTP requests to your hub to see what the difference is?

  1. Check the v1 API at https://github.com/johnvey/smartthings-hd-powerview/blob/master/powerview_hub_api.md to see what commands the hub recognizes

  2. Use your favorite HTTP tool to send a modified request. An example HTTP call that does not work on v2 hubs is GET /api/scenes?sceneid=12345, but there is a report that changing the case of one key fixes it, like GET /api/scenes?sceneId=12345. Note that the case of the I is different.

Please let me know if this does see to resolve the issue, and how many of the API calls seem to be affected.