HousePanel Dashboard App for Hubitat

Yea that didnt work that easily.
I reinstalled housepanel.groovy app from the git repo
git clone GitHub - kewashi/HousePanel: Node version of HousePanel to /var/housepanel/hpserver
Ran npm install in that folder.
http://192.168.1.242:3080 says "page not working"
What am i missing?

After running npm install you have to launch the Node server with:

node hpserver.js >& hpserver.log &

Or just:

node hpserver.js &

If you don’t want a log file.

i get this now...
ReferenceError: timeval is not defined
at readRoomThings (/root/hpserver/hpserver.js:344:64)
at /root/hpserver/hpserver.js:7039:17
at Layer.handle [as handle_request] (/root/hpserver/node_modules/express/lib/router/layer.js:95:5)
at next (/root/hpserver/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/root/hpserver/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/root/hpserver/node_modules/express/lib/router/layer.js:95:5)
at /root/hpserver/node_modules/express/lib/router/index.js:281:22
at param (/root/hpserver/node_modules/express/lib/router/index.js:354:14)
at param (/root/hpserver/node_modules/express/lib/router/index.js:365:14)
at Function.process_params (/root/hpserver/node_modules/express/lib/router/index.js:410:3)

well crap... this is a bug that only bites completely new users, so I of course didn't see it because I am not a new user.

Try grabbing updated version I just posted - V2.274 - just need to replace hpserver.js, housepanel.js, cutomize.js, and utils.js files

Be sure to restart your server by stopping prior one using kill -9 pid where pid is the process id returned from a ps command

1 Like

I am also having issues trying to install V2 I am using a Pi. I am following the steps from

The command "wget http://node-arm.herokuapp.com/node_latest_armhf.deb"
does not work for me, that web site does not seem to be working.

However, I was able to get Node.js and NPM installed and this is the return from the version check

root@PiBase:/home/pi# npm -v
6.14.4
root@PiBase:/home/pi# node -v
v13.14.0

I installed and started HP V2 Server as per the instructions.

Under the Final Steps you mention "A lot of people have forgotten the cURL step, so don’t forget that"
I'm not sure what this means, i don't see it in the instructions.

For the step

These look to be the files from the older version of Housepanel, Maybe this is where im going wrong, i thought we didn't have to install Apache for this based on:
I just updated the git repo last night. hpserver not HousePanel. The HousePanel repo is the old PHP version that has to run on an Apache web server. The new version as all Node.js with its own built in server. Far more robust and capable.

Even though the instruction page says:

I will skip explaining how to set up and configure a standard Linux or Raspberry Pi server. This guide assumes you know how to do this and that you have this already set up.

For the step

  • the directory above configured to read/write using ā€œchmod 777 yourdirectoryā€

I ran the command of chmod 777 hpserver from the pi directory

then for the step

  • Node middleman running, tested using ps -aux | grep housepanel

I get:

root@PiBase:/home/pi# ps -aux | grep housepanel
root       901  0.0  0.0   7348   552 pts/0    S+   12:02   0:00 grep housepanel

So that looks good so far.

When i try http://192.168.66.150/housepanel/housepanel.php
(with the IP changed to the correct one for my Pi) i get "ERR_CONNECTION_REFUSED"
Same result with http://192.168.1.50:3080/ (again adjusted for my Pi's IP) I also tried substituting hpserver for housepanel.

hpserver.log shows

internal/modules/cjs/loader.js:965
throw err;
^

Error: Cannot find module '/home/pi/hpserver/hpsever.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:962:15)
at Function.Module._load (internal/modules/cjs/loader.js:838:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack:
}

My directory looks like:

I am sure i am missing something basic, can you point me in the right direction?
Thanks, Jeff

Blockquote
Try grabbing updated version I just posted - V2.274 - just need to replace hpserver.js, housepanel.js, cutomize.js, and utils.js files

sorry to bug you so much, but now it gives this error:

root@Debian-242:~/hpserver# internal/modules/cjs/loader.js:1032
throw err;
^

Error: Cannot find module 'websocket'
Require stack:

  • /root/hpserver/hpserver.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1029:15)
    at Function.Module._load (internal/modules/cjs/loader.js:898:27)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object. (/root/hpserver/hpserver.js:32:23)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/root/hpserver/hpserver.js' ]

Did you do ā€œnpm installā€ before running the server?

This error suggests you didn’t.

Hi Jeff

You are mixing the old and the new together. The new version doesn’t use PHP at all. And none of the complicated file permissions apply any more. It’s a lot easier.

The doc online is only for the old. I’m updating it this week but not yet done. Until then follow the directions I gave @ross1 above that basically just loads the Node server and then you browse to the rPI on port 3080.

So it would look like:

node hpserver.js &

Then launch browser and point to:
http://192.158.66.150:3080

i did, and i get this on the webpage:

TypeError: Cannot convert undefined or null to object
at Function.keys ()
at getNewPage (/root/hpserver/hpserver.js:1830:26)
at mainPage (/root/hpserver/hpserver.js:5475:25)
at /root/hpserver/hpserver.js:7058:23
at Layer.handle [as handle_request] (/root/hpserver/node_modules/express/lib/router/layer.js:95:5)
at next (/root/hpserver/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/root/hpserver/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/root/hpserver/node_modules/express/lib/router/layer.js:95:5)
at /root/hpserver/node_modules/express/lib/router/index.js:281:22
at param (/root/hpserver/node_modules/express/lib/router/index.js:354:14)

I get that error (or an extremely similar one) when I have objects on some of the tabs that are not properly recognized by HPserver. I can trace it down to specific items (otherwise identical to ones that work), but so far I haven't figured out the cure. If you are getting that after adding items to rooms in Options, you might try removing many of them, and then adding them in slowly until you find the one or ones that it doesn't like. That might mean starting over from scratch with a clean install and just adding things in one or two at a time and saving in between.

this is a clean install, i havnt been able to get to the dashboard to add anything.

a clean install on 2 machines now, both with the same error above.

1 openBSD vm server and 1 Rpi vm.

TypeError: Cannot convert undefined or null to object
at Function.keys ()
at getNewPage (/root/hpserver/hpserver.js:1830:26)
at mainPage (/root/hpserver/hpserver.js:5475:25)
at /root/hpserver/hpserver.js:7058:23
at Layer.handle [as handle_request] (/root/hpserver/node_modules/express/lib/router/layer.js:95:5)
at next (/root/hpserver/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/root/hpserver/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/root/hpserver/node_modules/express/lib/router/layer.js:95:5)
at /root/hpserver/node_modules/express/lib/router/index.js:281:22
at param (/root/hpserver/node_modules/express/lib/router/index.js:354:14)

Ok, that's better, Now i can see the home page.
Earlier i was in the wrong directory when i executed the command.

Thank you for the reply and all your hard work on this project!!

figgered out why it didn't work over the weekend
In the instructions the command is "node hpsever.js >& hpserver.log &"

Starting HP V2 Server

Next, you need to launch the HP V2 server in background mode, piping all debug and error outputs to a log file using the following command:

node hpsever.js >& hpserver.log &

The command that worked is node hpserver.js &

the r is missing in hpserver in the command in the instructions, that will teach me to cut and paste :slight_smile:

next issue is i tried to edit my hmoptions file and move it over, that didn't work :frowning:

TypeError: > Cannot read property '0' of undefined
at /home/pi/hpserver/hpserver.js:6682:150
at Layer.handle [as handle_request] (/home/pi/hpserver/node_modules/express/lib/router/layer.js:95:5)
at next (/home/pi/hpserver/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/home/pi/hpserver/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/home/pi/hpserver/node_modules/express/lib/router/layer.js:95:5)
at /home/pi/hpserver/node_modules/express/lib/router/index.js:281:22
at param (/home/pi/hpserver/node_modules/express/lib/router/index.js:354:14)
at param (/home/pi/hpserver/node_modules/express/lib/router/index.js:365:14)
at Function.process_params (/home/pi/hpserver/node_modules/express/lib/router/index.js:410:3)
at next (/home/pi/hpserver/node_modules/express/lib/router/index.js:275:10)

I will keep tinkering with it, at least i know the server is up and running now, and i don't have all that much to rebuild if it comes down to it.

Let me look into this tomorrow and let you know. Haven’t seen this before.

I'm sorry for the inconvenience but this was an error I introduced when I made other updates and failed to test things for completely new users. It is now fixed in Version 2.275 posted tonight.

The error reported was due to a bug and has nothing to do with adding multiple things at once. This is now fixed with V2.275

You should be able to add as many things as you want at a time without problems now.

Hi everyone - I recorded some videos to help people get started and troubleshoot their installations. Start here. There are several that follow with increasing complexity.

Hey, thanks for the update and the hard work. it works now, and HP webpage is there.

However, when i go thru the hub authorization and click the authorize button i get this error:

                   error - unrecognized GET api call:

I have double checked my client id and secret keys, run hpserver as both root and normal user. any ideas?

Ross

also getting this in my hubitat logs:

app:2582020-06-03 12:19:51.484 debuggroovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.Float#minus. Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.lang.Character] [class java.lang.Number]