SmartThings Community

[RELEASE] HousePanel Dashboard for SmartThings and Hubitat


(HousePanel Author) #1163

Okay - so at least we now know that it isn’t making the call to gather the list of things from the hub. My guess is your PHP code is barfing somewhere in between authenticating and the call to get the thing list. This could be a cURL install issue since cURL isnt used to do the initial authentication. It could also be something obscure in your PHP settings. So let’s start with running a phpinfo() on your setup. You should have a phpinfo.php file in the same location as housepanel that you can just load into your browser. Examine that and confirm you have cURL set up. Also tell me what version you have. Hopefully not 7 since I haven’t tested HP on that version. Finally, the solution will be revealed with some clarity if you could turn on php logging and then tell me what that says when you load HP. I’m typing this from memory so I can’t help further until saturday when I get home. Maybe someone else on the forum can help you with php logging. That will tell us what we need to fix the issue.

(HousePanel Author) #1164

I looked at the code since I was jet lagged and couldn’t sleep. After authentication the next call is to a function called getResponse that queries all things from the hub. This is the call that is failing. For it to work the access_token and endpt variables must be correct. They are stored in a cookie so your browser must enable cookies.

A good check is to edit the housepanel.php code and set DEBUG2 to true near the top of the file. Then reupload it to your rPi and refresh the browser. This will print out the authentication codes. Let me know if they look normal. Don’t post them here publicly but tell me if the access_token looks like a long string of random letters and numbers. The endpoint should be a recognized graph.api web url.

If that works, change DEBUG2 back to false and rerun. Then find your cookies. These should be set to the same values you saw in the debug statement. You can see your cookies using Chrome F12 under the application tab I believe.

Sorry this is messy but there isn’t any easy way to do troubleshooting of sophisticated web apps unfortunately.

(HousePanel Author) #1165

I did this mainly as a example to show the flexibility of the css structure. You can just mimic what I did ft the locks. The editor can also do this effect by hiding the title and changing the color and alignment of the text.

(Babar Khan) #1166

I really appreciate all this. Now, I am in transit and will check in a couple of days and get back to you. Thanks a lot.

(HousePanel Author) #1167

The whole tile background color and size need to added as options to the tile editor to do this and other cool things properly. It’s on the todo list. For example the transparent background behind the thermostat circle is part of the whole tile setting. Presently there is no way to style that in the tile editor. Just need an easy way to select the whole tile instead of a specific tile element. Hopefully you figured out by now that whatever tile element you click on is what gets styled by the color settings on the left. The header has its own color setters. Maybe I need to just do the same for the whole tile.

(Chris Wilson) #1168

No worries my friend. I actually managed to make the motion sensor do exactly what I wanted by tweaking the css.

(HousePanel Author) #1169

Great - you can basically create any look you like with direct editing of the CSS. When I created HP that was the mental model I had in mind. It wasn’t until Nick (who has mysteriously vanished from ST forum) wrote the first tile editor that I realized a GUI editor was possible and would add value.

Now I’m working on a totally new and intuitive install method and a new way to save configurations - dumping the clientinfo.php file. Will now save everything in hmoptions file. Coming soon.

(HousePanel Author) #1170

Update posted in a new branch. Details are described in the Hubitat forum:

(HousePanel Author) #1171

Question - would users prefer a new edit page to edit the page names or would you prefer to click on a tab on the existing screen to edit the name in place? If the latter that would mean you can’t move between pages when in edit mode.

They are equally hard to do - just different.

(HousePanel Author) #1172

Migrated latest post to the master thread and fixed a timezone bug.


(Chris Wilson) #1173

So my thoughts… If there is more you could with the a seperate options page (change image, set solid color)? then the extra screen could be useful.

If we are just talking about name changing of the room it makes more sense to me to edit them in place.

I continue to appreciate the dedication to this project. I have dove down many different rabbit holes since starting my adventure with HP. I have learned a lot and the inspiration started here. Thanks again as always…

(HousePanel Author) #1174

Thanks Chris. I am going to do room name edits in place and Mae the options page a clean and simple thing selector matrix only. I also found and fixed the save bug tonight. I haven’t uploaded it yet because other things are still in flight. Next version wil be posted sometime next week.


I’m experiencing the same issue; no devices populating.
I see this in the log

nothing else.

(HousePanel Author) #1176

I’m super sorry folks but the latest version is buggy. I’m still fixing them so stay tuned

(HousePanel Author) #1178

[EDIT - first bugfix]
Well … it has been an interesting journey and I’m not fully done yet but done enough to finally post a draft release. You can find this in the “savelocal” branch in the usual GittHub location. This is a major upgrade so I recommend installing this into a fresh new location until it has been finalized and bug checked fully. Here is what you need to know about this upgrade:

  • Most importantly this version doesn’t use the hmoptions.cfg and clientinfo.php files so no more haggling with file permissions.

  • the API still works but as before remember that when calling from anything but a browser that also accesses HousePanel, you will have to provide authentication parameters on the command line. Unlike before fixed authentication parameters do not work as a workaround.

  • The options data that contains info about what tiles are shown in what rooms and what tiles are available in your setup is now stored in a HTML5 local storage repository. This means HP will only work with browsers that support this. All modern browsers support this to my knowledge. In the app a technique is used that pushes the options data from JavaScript into PHP using an Ajax call. What this means is when you authenticate a page will temporarily display that JavaScript uses to exchange data. Then a reload happens and all is well. Most users won’t care about this but it does mean an extra page shows upon authentication.

  • refactors will now renumber the tiles and it will renumber any existing customtiles settings created from the use of the TileEdit feature. I don’t use TileEdit much so would appreciate some community testing of this. Be sure to save your existing custom tiles file in case it screws up.

  • when the auth page is shown you will need to provide the same information on that screen that you previously stored in the clientinfo.php file. This information is confidential and can be used by others to control your home, so protect it accordingly. Previously the storage of this info in clientinfo.php represented a major security vulnerability that is now corrected.

  • the Hubitat auto setup push to HousePanel isn’t working yet even thought the Hubitat app thinks that it works. For now just copy and paste these values into the auth page instead of what you did before which was pasting the info into clientinfo.php

  • there is an Import Legacy button that will read data from existing hmoptions.cfg and clientinfo.php files to populate the auth page. The information is automatically converted to the new format and saved in the localstorage that HTML5 provides. This will also set your rooms up according to your prior configuration. For this to work be sure to copy these two files into the new HP installation location. Once you have imported them they can be deleted for security purposes.

  • drag drop editing no longer forces a page reload when you finish.

  • All pages are displayed as real pages instead of form posts. This means page refreshes no longer ask if you want to repost the data. Some pages when refreshed will revert back to the main page.

  • The Show Info feature now includes prettier display and it includes a display of the room matrix similar to the Options page in read-only format.

  • All of the underlying machinery is in place to allow custom room names and custom tile names to work properly now. I haven’t put the code in yet to do this, but that will be next. The hard part is done so this will come quickly.

  • Removed annoying tab hide/show when clicking on open space and added a button to do that.

  • On screen summary of what to do when authorizing

That’s all I can think of for now. In this stage of maturity you may still experience some quirkyness such as a random loss of configuration where the auth page shows up unexpectedly. If this happens just reauthenticate. I would appreciate a note summarizing what you did to create this quirk so I can fix it. You can always reimport legacy options too if you kept your files around.

(HousePanel Author) #1179

Try the new version in the savelocal branch

(HousePanel Author) #1180

I have done more testing and I’m still not happy with the performance and stability of the new approach. Also I am unhappy with the required page refreshes to get info back into JavaScript from PHP. Finally I learned from testing last night that the new approach doesn’t seem to work at all on Fully Kiosk Browser and that is a deal breaker.

So given all of this plus the lack of much community interest, I have kept this edit in the separate branch named “savelocal” and it is likely to stay there for awhile. I thought about using cookies instead of localStorage but the options info string is too long to fit in a standard cookie.

Would anyone care if I abandoned this branch and returned to develop enhancements and bug fixes on the master branch?


That sounds good. I was able to test the savelocal branch and it did indeed bring across my devices from smartthings. So that was a huge step in the right direction as I had spent a lot of time trying to get them to come across using the master branch with no success. The savelocal branch was acting a little funky though and I had not had a chance to really test it fully and reply.
Anyway it would be great if you focused your efforts on the master branch. I’ll lay low until I hear that the coast is clear.
I wish I had more time to debug things; but I’m certain HousePanel is a great tool that I would like to use. Your efforts are appreciated.

(Devesh Batra) #1182

Fresh install of ubuntu server, verified Apache, PHP, mysql (lamp server installed)

tried cloning both the master and savelocal branches

cant get beyond the SmartThings token setup (select devices, then when i click continue, i get a timeout/error) . not sure what I’m doing wrong
in the master branch, the token setup page loads again, in the savelocal branch, i get an HTTP 500 error

appreciate your help with fixing the issue…

EDIT: i was able to launch the savelocal version after i reinstalled cURL. The server still can’t write files to the directory so i can’t save any settings…

(HousePanel Author) #1183

The new SmartThings migration to Samsung appears to have broken HousePanel. I’m investigating. Will report back soon as I figure out a fix.