HousePanel Dashboard App for Hubitat

@kewashi with a little poking I got this up and running. Perhaps looking for instructions may have made it easier. However my initial impressions are that this working incrediblly well. My HP dashboard is updating very quickly with changes.

As always great work and thank you for continuing to make HP better and better!!

Edit: I may have spoke too soon. I cannot seem to get the tile editor to open for any tile.
Disregard got it working - sorry.

There are some niggles but overall hubpush is working well. I did get a hub lockup but not sure I can attribute that to HousePanel. There are a few issue with the HP app itself but I’ll hang around and see if they resolve.

I do think it would benefit from some examples of a more modern UI as the current look is very Win98.

K

Thanks guys for the feedback. This weekend I will be doing some updates including merging hubpush into the master branch so your timing is great. I know the look and feel needs a refresh. Working on it slowly.

Merged the hubpush branch into the master branch.

Also changed the hub index to use the hubId in prep for an update that allows hubs to be removed as well as added. This will allow the code to handle hubs that fall out of a neat numerical sequence.

I also cleaned up and did some more testing of the hubpush feature. I'm pretty happy with it now and how it is working. Even on the ST hub the local updates work blazingly fast. On Hubitat the speed of updates is insane.

In my testing any user created change to a tile outside of HousePanel will get updated on the panel within 2 seconds - without any polling now. This is pretty huge.

I still have to write up an update to the install instructions and debug the install.sh script but if you know how to do manual installs this should be ready to rock and roll.

And Chris @cwwilson08 I couldn't replicate your error with the tile editor. In this version I had no problems loading the tile editor so I'm not sure what was going on with your install.

I think it might have been that I used my old hmoptions file. When I deleted and reauthorized all was well..

Glad you got it working. Posted a minor bug fix this morning - update to the main php and tileeditor.css files only. Fixes a minor but pretty important bug in the auth page and options table format.

This has been addressed in V 1.985 posted today.

Yea, I know this is a bug. For now the easy workaround is to pull up the editor and hide the item. Will fix this soon.

Version 1.986 posted with Hub removal feature and various other cleanups. This only requires updating the main housepanel.php and housepanel.js files. No changes to the groovy files.

The auth page now includes a Remove button as shown below:

I dont seem to be able to add any hubs in 1.986 - it goes through the oath setup and then returns to the Authorize which hub - back on Hub#0

hmm actually I see 'Im on 1.985 will update again

Nope 1.986 just the same - I am hubless :frowning:

Yea sorry man. I introduced a gnarly bug in the auth flow in this last update. Working on a fix. I also noticed that the latest Hubitat Hub update changed the flow again to not ask for devices. So weird.

Hi Folks - I just now posted an update that fixes the oauth flow problem reported above. This also includes an updated housepanel-push.js Node.js program published to NPM. This was an obscure and nasty bug so I'm super sorry about that. To enable hubs to be deleted I changed the index over to use hubId instead of the numerical order in the array. Turns out I was using that numerical order in my hubpush logic, so that was fixed. The oauth flow was messed up because the variables entered into the auth screen were not being recognized for some reason. That is also now fixed. Again, I'm sorry about pulling the trigger too soon on the prior update.

This version is V 1.987 and should work well with hub pushes and oauth flows. Again, I noticed that the Hubitat Oauth flow was changed to just ask you if you want to authorize. It no longer asks you to pick the things to authorize. So I assume it just uses the prior things picked when you installed the app on the web. This isn't cool but I guess it it how they want it to work. Again, this isn't anything I did in HP.

I have done some more testing and remain satisfied with the speed and robustness of the hubpush feature. I hope you all get it up and going. As always, write if you have questions.

Sorry but I get the same result with 1.987 - I cant add my Hubitat Hub. It just says 'authorizing' and then goes through the Hubitat ouath and then returns with nothing created.

It's very late here now so I'll try once again tomorrow - but I'm thinking I'm a little too early in this app to make easy progress.

If I use the install.sh I still get this (but I have copied/overwritten files too to upgrade which has worked - definitely on 1.987). I can manually start housepanel-push.

npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "housepanel-push" under a package
npm ERR! also called "housepanel-push". Did you name your project the same
npm ERR! as the dependency you're installing?
npm ERR!
npm ERR! For more information, see:
npm ERR!     <https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm>

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/kevin/.npm/_logs/2019-02-18T00_42_37_317Z-debug.log

I haven't seen this error so something odd is happening. Did you try to add the HousePanel app in the web interface to Hubitat first? Sometimes that helps.

In the simplest install you can just download all the files then launch your browser. The housepanel-push file is a new complication that I am noticing is not very stable, but when it works it works well.

Let's start with getting your hub authorized. The best way to do that is by loading the main Hubitat page in a browser and installing it from there. Then when you go to this app the auth step is super easy.

I'm not worried about the hub push bit at the moment but I can't authorize any hubs - it goes through the motions 'authorizing' then the 'Authorize the app HousePanel to access your devices' but then just returns to the webpage with no hub added.

Did you turn on OAUTH in your app - and copy the ClientID and ClientSecret to the Auth page in HP?

When you do this it should show this question:
image

Then when you click "Authorize" it will report how many items you authorized. It used to let you pick the items here, but Hubitat changed OAUTH so you have to do that on the main app page. To do that, run the app - the opening page will look like this:

When you click "Next" you will get a page with your devices. Pick the ones you want. It will look like this:

Then click "Done" on the next page.

Then go back to HousePanel and do the auth page. You can then simply say authorize when presented with the question. I don't know why they removed the devices from the auth flow.

Yes - all exactly like that. But no hub added

Have rebooted hub, removed HousePanel app and reinstalled - re-enabled oauth got different keys but to no avail. It worked fine the first time I did this a few versions back.

okay - thanks for trying. There is probably still a bug in there somewhere. For some reason it works for me but who knows. I will continue debugging. The latest version has lots of updates so I could have easily messed up something.

Just tried an ST hub - it goes through the authorization allowing me to select devices but then on returning to the HousePanel authorization webpage again no hub has been added.

Checked 777 privileges on everything.

This is Hub #0 for me

"hubs":[],

K

Thanks for the additional debugging. Helps.

I think I know what is going on. I have pre existing hubs and you don’t. So the case where you are authorizing the first hub is barfing. Your notes to me helped me pinpoint this. Now I can focus on a fix.

Hi.
First off thank for the great program and the constant improvements!!

I am trying to install the latest master with the hubpush feature. I am running it on a Rpi 3. Everything else works as before, and i see the new features like the remove hub button.

I had to install node to get NMP to work, (hopefully i did that correctly), but i still get errors during the install relating to the hubpush setup.

I also tried restarting housepanel-push.service
Capture2

Here is my file structure

Any suggestions?
Thanks