HousePanel Dashboard App for Hubitat

The io page looks prettier but same content

1 Like

Thanks Ken!

@kewashi

Is there currently a way to to control multiple devices with one api call? If so how would I string them together?

If not consider it a request for your abundant free time :slight_smile:

No easy way to do this other than writing a subroutine to make it easy to make repeated api calls from the same app. Sorry.

Tell me more about your desired use case and I will look into seeing what I can do, almost anything is possible given the open architecture of house panel

So that project is what I am asking for. I am using tasker to control Hubitat using HP endpoints. I am looking to reduce the popcorn effect on my lights.

I figured it would respond faster if all commands came at once. As tazker waits for a response to each get request. I was thinking I might be better using RM endloints to control groups.

If it is a major effort I wouldn't stress it Ken. Really what I need to do is figure out how to write the app does everything I need. In the meantime HP is becoming more and more vital to me all the time.

You can reduce the effect by queuing up all the HTTP requests from Tasker at once. Ideally though, you'd want to hit a HE App endpoint which truly batches all the light requests together rather than executing them sequentially.

Also note that you can use the Javascriptlet feature in Tasker for more advanced control over your requests from Tasker. It's less point and click, but much more powerful once you get the hang of it.

To do this more efficiently in HP I could modify it to take an array of tile numbers to toggle on or off. I think this change will be easy under the assumption that all tiles take the same action. It will probably have to be only by tile numbers and not by thing ids. I will look into it.

This is I think your best option but requires you to write a custom Hubitat App in groovy. Groovy isn’t hard but it is funky and the syntax of writing Apps isn’t that intuitive. Fortunately there are lots of examples around to mimick including HousePanel itself.

1 Like

Yeah I figured this was the most efficient way. Maybe now is the time to start poking at it.

Can tasker be made to do this? Or would this need to happen on the Hubitat side with an app?

Tasker can kind of do it by queuing the requests asynchronously. It's not the same as executing them in batch like you might be able to do with a custom App, but it should be a huge improvement over each request being synchronous/serialized and having to complete before the next can run.

I have the multi-thing API call more than 50% done so this is definitely possible.

1 Like

You are beast Ken. As always many thanks.

Okay my friend, your loyalty motivated me to help you out quickly, so the latest post now includes a feature that allows multiple things to be controlled in a single HousePanel API call. The feature only works with doaction or dohubitat API calls, not the query equivalents. To use this feature just list multiple thing ID's or TILE numbers in the API call separated by commas. For example:

http://192..168.1.50/housepanel/housepanel.php?useajax=dohubitat&id=12,16,27&value=on

this will turn on all three tiles listed. You can also use tile numbers obtained from the showid call as follows:

http://192..168.1.50/housepanel/housepanel.php?useajax=dohubitat&tile=4,7,9&value=on

This will turn on tile numbers 4, 7, and 9.

All commands are supported including on, off, and toggle. The subid and attr parameters are also supported as with all HP API calls.

The return value will be a concatenated string of json variables returned from each of the things. I didn't separate them with a comma - but I probably should have. Let me know if you have a preference. If it is important I could make a valid single json return variable. Note that these returns don't work for the GUI which is fine because the GUI can't generate multi-tile actions anyway.

1 Like

Ken you are awesome - This seems to work perfect. Thank you!

I think this is what I need - Something that can be easily parsed. Reading this paragraph made me realize something that should have been painfully obvious. I have been using a separate call to update status on my widgets. The widget app I use updates every widget on variable change. I should have been using the response from the original commands. This will simplify keeping everything in sync - I had much more complicated plans to do this.

One last note - I could have sworn I read that you added support for pistons, I well could be wrong on this because I cannot seem to find the post atm - I toggled the option on in the app, but I don't seem to have the option to authorize pistons.

I couldn't remember if the pistons would just show up in my dashboard - So I checked and no dice there either.

Not a huge deal here - I am trying to shut down all my piston anyways. I was really just testing. I well may have missed / messed something. It's after work and I am sleepy :slight_smile:

Thanks again for making this happen Ken.

Thanks Chris, I’m happy to have done that. Regarding pistons, I put together hastily an update that I thought would work but I don’t have Pistons installed on my habitat hub, so I will need to do that and then test it to get it to work.

Folks - I'm making progress on the multiple hub feature. The interim feature can be found in the "multihub" branch in the GitHub repo.

This is still beta code and a work in progress but for those living on the edge who want to try it, feel free.

This basically allows any number of hubs to be added and authorized, and it uses the proper OAUTH flow methods for authorizing Hubitat instead of the current hack.

Not expecting anyone to try this, but I did want the community to know that I'm working on it. The importance is bigger than Hubitat. This will enable HousePanel to be a generic panel to talk to basically any hub that supports OAUTH authentication. Next up is Wink. The only requirement will be to write a binding to read things from the authenticated hub. I will work on documenting that profusely.

My goal in posting this now is to build some excitement about HousePanel evolving into a general purpose control panel for any smart home hub. I recently was turned onto OpenHab by a friend. So an OpenHab binding will be coming your way soon too.

Cheers

3 Likes

Have the multiple hubs working in beta mode in the multihub branch. More debugging and fine tuning still required but I’m plodding away.

1 Like

Today I posted the a candidate release version of multihub HousePanel to the "multihub" branch in the usual repository. As a reminder, I moved the master repo to my GitHub account so you should be using that one now.

This version 1.793 includes a number of important new features. Most importantly, it has multiple hub support. Any number of Hubitat and SmartThings hubs can be connected to the panel. Hooks are there for Wink and Vera support which will come with time. I'm excited about this because I wrote this generally enough to make future hub bindings easy to add.

Other updates include:

  • New analog clock (uses the CoolClock javascript plugin)
  • Music tiles now work on the Hubitat side
  • Authentication flow on Hubitat now uses standard OAUTH
    • support both local and cloud end point flow options
    • the API URL will dictate which version you get
  • Info page now shows hub details for each connected hub
  • New graphics included for use in the Tile Editor
  • Squashed numerous bugs including a long-standing empty page bug

The authorization page is intuitive and easy to use. Once a hub is authorized it will return and tell you how many devices were retrieved. You can then proceed and authorize another hub or return to the main page.

This update implements a new format for the hmoptions.cfg file. Code is included to read and translate old hmoptions.cfg files but it is probably not perfect, so you may need to redo some of your setup.

Here's a screen shot of the new Auth page.

The rest of the app looks as it always did so I won't post another screen grab here. However, the new graphics and features in the editor are super cool so you should try them out.

A merge to the master branch will occur soon but feel free to try and test this version. It should be pretty stable.

1 Like