HousePanel Dashboard App for Hubitat

I am resigned to the fact that the auto install script doesn’t work for setting up the Node.js server middleman. Start with setting up Node and NPM using any online how to reference. Then get housepanel-push working manually. Then make a .service file. Then install the service using sudo systemctl start. Each of these steps will require some patience and online research. These are the steps that the install script attempts to do automatically but something must be missing. Fixing this is a high priority for me so please be patient. If anyone has experience with writing bash scripts I would be grateful for some advice or help. I personally have very little so I am bumbling my way through making this install script work and robust to errors. I will get there over time. Until the. A manual install is your best bet. By the way, this only impacts the new hub push feature. The rest seems to work fine with the install script.

Also, to disable the hubpush, enter zero for the webSocket port on the HousePanel auth page. Otherwise you will get repeated JavaScript errors during runtime.

Fairly major update to the doc page is also coming later today.

I'm going to pop on back when it's settled down a bit...

That’s a good strategy. With the new skin I am finding a few other things needing attention. I estimate I will have a new stable release in about two weeks. This will include a refine modern skin and hopefully an improved install script. Tonight I fixed a skin swap bug and update the housepanel.net doc website. Expect other changes over the next two weeks. When I feel it is stable I will post a major new version called 2.0.

V1.992 posted tonight with tweaks to modern skin and other minor bug fixes. An important bugfix is included that handles switching skins properly. Prior to this fix the customtiles setting didn't change. Now it changes to match the selected skin. This means that each skin must have it's own set of custom styles. This is the designed behavior. Because each skin can be very different the customtiles file is unique to that skin. Also added security icons to the modern skin.

attempting to setup the node push system, i receive the folowing:
pi@raspberrypi:/var/www/html/housepanel/housepanel-push $ node housepanel-push.js
housepanel-push installed. Elements being updated from 1 hubs to http://192.168.1.205:80/housepanel/housepanel.php
config port not valid. port=
webSocket port not valid. port=
success reading 46 elements from hub ID: 1 hub type: Hubitat hub name: Hubitat Hub

some kind of error with the port, any ideas how to fix this??

Go to reality page in housepanel and make sure you enter a valid port number like 19234 for the first port entry. This will save to your config file that the hubpush module reads.

If that fails, just edit housepanel-push.js and hardwire the proper value. I’m still fiddling with getting this to work right.

double checked, the setting in hubitat are as shown

where in housepanel-push.js do I enter the port??

On the web app on your computer after you install the web server part. Screen will look something like this:

Around line 142 -- should look like this. Just set config.port = "19234'" just before this block. Also can set config.webSocketServerPort = "1337" in same place.

So I think I saw this error. I am 90% sure the ports got switched somewhere. Where I had 1337 the first time I used 19234 and vice versa.

made the changes recommended, but the updates are still not happening on housepanel, still takes about a minute for updates to be reflected when I have it open, I do see information changing in putty when pressing switches physically or through housepanel... I think i'm close but not yet there, i also verified the listen on port on the webapp is 19234.

any other advice??? or should i just wait for the updated install script that will hopefully install everything automatically??

thanks for all your help!!!

Got HP setup last night and it's great! Getting housepanel-push going was a bit rough, but mostly because my ubuntu 16.04 server had an outdated nodejs, and npm didn't install any of the dependencies. But after manually installing request, express, websocket, and body-parser, it fired right up.

One suggestion if I may. Provide a config item for an IP address to listen on, for those of us with multi-homed servers. Probably not a significant amount of users, but it would just require adding something like:

 if ( app && config && config.port && config.ipaddr ) {
         app.listen(config.port, config.ipaddr, function () {
             console.log("App Server is running on port: " + config.port);
         });
     } else {
             console.log("config port not valid. port= ", config.port);
     }
 if ( server && config && config.webSocketServerPort && config.ipaddr ) {
         server.listen(config.webSocketServerPort, config.ipaddr, function() {
             console.log((new Date()) + " webSocket Server is listening on port " + config.webSocketServerPort);
         });
     } else {

Also, is there any way to have tiles snap to a grid? I know having free reign over tile placement is great, but I'm semi-OCD, and getting stuff to line up exactly, with similar spacing, is something that's likely going to drive me bonkers. I realize the stock HE dashboards are more my speed in this regard, but the other limitations made me seek out an alternative solution. I was a former ActionTiles user on ST, so something to that effect would be nice.

I believe if you choose reorder tiles you get a snap to grid

1 Like

you are really close... basically there. Looks like the Node.js app is running as a service and then it crashes when trying to do a sendUTF command. This command should be available if you installed housepanel-push.js using npm. Try running npm update housepanel-push and then restarting your service using sudo systemctl restart housepanel-push. You might also have an old Node version. I honestly don't know why sendUTF isn't working for you but that is the last step you need to get this going.

That is correct Chris. Just pick reorder and reorder one tile and then refresh the browser page and everything will snap into place. Then future reorders will move tiles around by snapping them in place. The new skin-modern skin sizes everything to fit a nice grid so you might try that too.

[EDIT] I added a 10x10 pixel grid snap feature to the free form drag mode also. This will show up in the next release planned for this coming weekend.

1 Like

yea that would be a problem. be sure to use 19234 as the port for the hub to talk to the Node app via a simple HubAction POST, and port 1337 as the port for the two-way websocket conversation between the Node app and the housepanel.js script file that updates the screen.

I think your idea is a good one but the implementation would involve installing the housepanel-push.js Node app on the server where you want to listen. Right now I assume this server is the same as the IP of our rPI where HousePanel is hosted. To change that the config would be in the groovy file where the HubAction is taken. Let me noodle on this and consider it for a future release.

I host both HousePanel (via Apache) and the housepanel-push nodejs component on the same Linux server, but have multiple IPs on a single network interface (via aliases; eth0:0, eth0:1, etc). I was just referring to the app.listen() and server.listen() methods not specifying an IP by default, and thus listening on the unspecified IPv4 address of 0.0.0.0 (or :: for v6).

Eh, probably not a lot of people that would have a need for that extra configuration item. And those that would (like me) could easily just edit the code. I just have to remember to do that every time I/you update the js file.

well, i gave it a shot, seems I cannot get it working, i attempted your latest suggestion and when running sudo systemctl restart housepanel-push, i get an error, It seems that I will have no choise but to wait for a better install script...

if anyone gets this running and can please create an image of their sd card , intructions from pihut at (Backing up and Restoring your Raspberry Pi's SD Card | The Pi Hut) it would be greatly appreciated from thos of us that are less technically inclined,,

thanks for all your help anyway, I will patiently (not really, lol) wait for an updated install script..