Announcing HousePanel Control Panel [Alpha]

Raspberry Pi with the following details
OS: Raspbian GNU Linux Release 8 (jessie)
PHP: 5.6.17-0+deb8u1
Webserver: Apache 2.4.10

A few other details to check…

make sure curl is enabled in PHP. This can be checked by running phpinfo() in a simple web file, or by editing your php.ini file. On my Pi this is on by default. The php.ini file is in /etc/php5/apache2

@cafl I have not been successful at figuring out how to enable routines as a tile, but I wanted to let you know of the workaround that I use that I actually like better than using routines anyway. Basically, what I do is create a virtual tile of type momentary tile. This is done in the ST IDE by going to My Devices, click on +New Device, and then pick type “Momentary Button Tile”. All other fields are self explanatory, but be sure to give a unique ID for Device Network Id.

Once this is set up, go to your mobile app, and add a smart lighting smartapp using this momentary virtual tile as the trigger, or if you use CoRE or SmartRules, you can use either of these to invoke routines or any number of other complex actions upon clicking this tile. Then back on HousePanel you just add this virtual tile and you’re good to go.

It is on my “TODO” list to make a special graphic for momentary tiles and switches that are not lights so you won’t have a light bulb for such tiles. For now virtual momentary tiles will show up as buttons that I think is not too bad.

One other tip for everyone that to a large degree has nothing to do with HousePanel. I think it is a really great idea to create a handfull of virtual switches to use as flags in smart apps. I made 12 of them. Then when I use Stringify or SmartRules I can string actions together using these virtual tiles as persistent variables that transcend individual smartapps.

For example, I have a smart app that sets one of these variables to true when my car leaves a particular zone flagging that I am on my way home from work. Then in a separate smart app, I notify my wife via txt message that I am on my way home and I set my office thermostat to a comfy temperature. In many other apps I can check whether this flag is set to take or avoid certain actions. This is just one example. The tie to HousePanel is these variable tiles can be shown on their own tab.

Sorry about spamming my own topic, but so much is happening I need to update everyone. Earlier in the week I sneaked in a very powerful and useful feature that beta testers probably didn’t notice. This post is to communicate this new feature. On the Options tab, the name of any of the Tabs can be directly edited by simply clicking on the name. This works on any tab except the Options tab itself. When you click on the Tab name, it converts itself into a text entry box where you can rename the tab. The following screenshot shows this in action. I still need to add a UI to add and remove tabs but this is a start. Let me know what you think.

Thanks - your graphical work really helped me. I’m now good with building on that with new stuff as you are seeing.

I have a Rachio (http://www.rachio.com/) smart watering unit so the next new feature is going to be yard watering tiles.

I really like the echo dot tile… How are you doing that?

1 Like

This is a generic tile with capability of musicPlayer - then I give each returned attribute its own CSS flag and then in the CSS file I style it accordingly. The cool look is done by styling with a rgba(r,g,b,0.3) where 0.3 is the transparency value - which makes the background shine through. The player icons are a png Sprite with an index to each control…

Does it actually control the dot?

No - it controls a Sonos Connect which has an Echo Dot plugged into the LineIn plug

3 Likes

So @kewashi, for starters… wow :slight_smile: really neat work with a flexible framework and ability to extend. Very impressive as you’ve gotten me closer to a tablet-style control mounted to a wall (one of my goals especially with a useless Windows tablet that I don’t use much).

Here’s some of my feedback to provide my immediate reaction. I’m sure more ideas will come as I use it a bit more but it’s really nice, I’m happy I spent the 20 minutes setting it up :slight_smile: thankfully I saw your curl warning and just installed the php5-curl package and injected this into php.ini: extension=curl.so ---- after that the HTTP 500’s stopped.

  • Any reason for the default room names? It’d be great if you considered simply using the rooms and assign child objects to the room just like defined in ST. Possibly doing that as a setting when re-authorizing.
  • Under Options, alphabetize names of devices.
  • Under Options, alignment of room name and the checkmarks is not right.
  • Enhancement of being able to drag a device from one room and onto another room’s tab.
  • Enhancement of adding/embedding a camera feed like MJPEG or else directly to a room and assign it’s dimensions, etc.
  • For ease you may want to provide the template for clientinfo.php — it will save you some headache with the questions around the subject.

Thanks for sharing your hard work!!!

1 Like

Thanks JZ - the framework is what I worked the hardest at, so I appreciate you recognizing that.

I really appreciate all of the excellent feedback and ideas.

The current default is just initial deployment MVP (minimally viable product) laziness. I initially had them hard-coded so when I put in the flexible architecture I left the default to my room names. It is a high priority to read the room names from the ST server and use those as the starting point. I also need to implement the user interface for removing and adding rooms so you can have as many or as few tabs as you like.

Agreed - this should be done, but I think I will still keep them grouped by type - maybe even add a filter like you have in Excel so you can pick which ones to show. I have over 80 things so my table is huge so I’ll be a good test case.

Yea, this happens on tablets but not on a PC. I need to add the media tags so I know when a tablet is viewing. Easy fix that I’ll add to the list.

I don’t know about this one. With the way options are set up, its super easy to just uncheck a column and check another. Probably won’t pursue this unless several others request it.

I started writing this code and ran into all types of exceptions and complexities on the groovy side so I stopped. Instead I ended up with the generic photo tile that can also be a video feed. I think most cameras will send a video feed or a photo feed to a URL. One would just point your feed to the RPi and you’re good to go. I still need to write a user interface that works because at present you have to directly edit the CSS which most people won’t want to do. Feedback from others on this?

Agree completely and super easy to do. Will also probably write an install PHP script that will write the file for you as well as handle other configuration settings such as checking for Curl availability and picking an options persistence method - DB, File, or Session. Session will be the simplest but least persistent. Then again with the Sessions approach one can have different configurations on different devices. Hmmmm I think I can implement that too with the other options. Thoughts? Anyone want that?

The backend groovy file repo is being reconfigured for direct loading into ST but I can’t get it to work. Bear with me folks. You can still pull it directly into your cloned copy via GIT - the new directory structure will be reflected, even though it doesn’t work yet with ST.

Regarding routines…

here’s how webCoRE executes routines:

private long vcmd_executeRoutine(rtData, device, params) {
	def routineId = params[0]
    def routine = location.helloHome?.getPhrases().find{ hashId(it.id) == routineId }
    if (routine) {
	    location.helloHome?.execute(routine.label)
    }
    return 0
}

If you reference them by labels (names), then you just need to run it like this:

location.helloHome?.execute(name)

I am referencing routines by their IDs and that’s why I got more complex procedures to run it.

And this is how webCoRE gets the list of routines:

private Map getRoutineOptions(updateCache = false) {
	def routines = location.helloHome?.getPhrases()
    def result = [:]
    for(routine in routines) {
    	if (routine && routine?.label) 
    		result[hashId(routine.id, updateCache)] = routine.label
    }
    return result
}

Again, webCoRE is using some hashes for IDs so that explains the hashId function there, you don’t need that, just:

location.helloHome?.getPhrases()

will give you the list of routine (objects with id and label), or if you only need the list of names:

location.helloHome?.getPhrases()*.label
3 Likes

Indeed the hardest part and should go a long way to make any future fixes/enhancements. Better to spend that time up-front before having to re-do thousands of lines of code :slight_smile:

It’d be great to have rooms from ST and “custom” rooms only available in and managed by HousePanel w/o showing up in ST. For instance I’d have my “Video Feeds” tab/room along with showing those video feeds on the pertinent room tab.

If possible, have them grouped by type is perfectly fine but ungrouping & alphabetizing is also pretty useful. Just my 2 cents :slight_smile: Grouping has it uses while a fully alphabetized list is always desired (at least by me in most cases) because that’s how “Things” tab looks in ST.

For me it looks similarly stair-stepped in Chrome and Firefox while IE was a total failure and Edge was plain ugly with fat rows under Options but also stair-stepped look ---- meaning the room name is to the side of the column with check marks.

Understood, nice to have for me certainly doesn’t mean of high priority considering that this is a one-time configuration theoretically.

Let me look into this myself. My vision for something like this is ability to add a “custom” tile of custom size and simply provide a full URL to it. With cameras it’ll be http://user:password@camera_ip/videofeed.mpg — or something like that. If you can simply throw it on the list in Options and be able to add to a room, it’d be perfect. I’ll let you know if I succeed at embedding the stream, shouldn’t be too hard.

Don’t over-engineer this piece as it’s yet another one-time config. While it’d be cool to have WordPress/Drupal style install.php, it’s quite a bit to bite off for you. Simply add the template to the package with the sample variables. It’ll eliminate n00b questions :slight_smile:

Thanks again for sharing, quite excited about having this simple/tweak-able interface!

Thanks JZ - really good stuff.

In other news, I decided today on the business model which will be free to all with donations welcome. I will soon open the front end Github to all and post a Link for donating.

I made this decision after checking out many other projects here on the community that are given away free to us all to use. It just feels like the right thing to do.

6 Likes

I like that. Thanks.

Do I have to run this on local server? Or can I use any cloud service?

1 Like

You can run it on any web service available to you where you have write access. I used it on my GoDaddy web server without any trouble, but I prefer running it local on a rPi.

Just discovered and did some studying of @ady624 's amazing webCore system. Wow is all I can say. It is now a high priority for me to add the capability to link HousePanel into a webCore piston. I don’t think this will be very difficult to do.

1 Like

Let me know what I can help with :wink: