Housepanel 2 (Node.js) not refreshing

I've been playing around with Housepanel the past week. Got it up and running on my Synology NAS and has been working just fine. However it stopped auto-refreshing yesterday. If I change something via HP it will refresh status across all browsers (have a laptop and a tablet connected). but if some status changes outside of HP (something changed via HE), HP will never refresh. I have to manually refresh it with the refresh tab in HP.

My assumption is that I mucked some setting up but cannot figure out what. What could I look at before reinstalling? My Hub Auth page has refresh timer is set to 300000 (I have tried various settings to no avail). I don't think it is related to user settings. It does the same thing with a new user.

Tagging @kewashi.

Thanks for trying it out. First, the refresh timers don't do much to help and for the most part can be ignored and set to zero. HP will refresh the clients if you have the IP and port numbers set correctly in the HousePanel groovy app. The IP must be set to the IP of your NAS installation of the HP server. The port can be anything as long as you remember what you used and then use the same thing on the Options page. Also this port must be open for sending post messages on your local network.

1 Like

I assume the port I need to enter is the app port, not the websocket port? I've tried both and neither work. Is there something I can do to enable logging that would show if the POST is going through or not (either on the node or in the app)? I set app logging to debug but don't see any messages related to that. I reinstalled the app on HE and re-authenticated, no change. I'm not opposed to re-installing the node app but I'm stubborn and want to know what I did wrong :slight_smile: It could even be possible it never was refreshing properly. Not sure now.

I reinstalled and I'm still not getting changes from HE posting over to HP. Must be something with my settings on the NAS. I'd prefer to have this on a Rpi anyway but just can't find them now. My son loaned me his so I might try to get that up and running and see if it's just related to my NAS install.

I've never installed it on a NAS so that may be the issue. You want the port for the app installation not the websocket. The websocket is for communication between your server and the clients, while the app port is for communication between Groovy and your server. The default I think is 3280.

As for debugs, you can enable a debug line for groovy update pushes by editing line 38 in the housepanel.js file to read: cm_Globals.logwebsocket = true; The default is false.

Also, make sure your router is not blocking the 3280 port since that is coming from the open Internet into your NAS.

HE and NAS are on the same local LAN. Enabled logging for logwebsocket and not seeing anything being logged until I perform an action in HP itself. I'll fiddle with the Rpi later this evening and see if I can get that up & running. Is there anything I can change in the HE app to show the POST being sent, or at least the full URL of the POST? Seems like HE is not sending anything out unless responding to a request from HP.

Well, got it up on an Rpi and still same result. So I've reinstalled on both HE and my NAS, installed HP on Rpi and pointed the HP app in HE to new Rpi installation. same results. Bummed because I really wanted to use this setup. I had some really cool tabs starting to take place in HP (IMO). Not sure what else to look at. Did a vanilla install on both HE and Rpi (didn't tweak anything but settings required for install and Auth).

Did you confirm that http posts can make it through your firewall? Also check that nothing else is using that same port.

both devices are on the same LAN so there shouldn't be a firewall involved. Unless this involves some cloud service I'm unaware of. I was wondering if there was some conflict on my NAS, but didn't see anything remotely close. It's running on a Rpi now so shouldn't be anything conflicting on that.

Cloud is only involved if you use the cloud endpoint to activate your hub. If you use the local IP then the cloud isn't involved.

The next thing to check is to turn on the logs in your HousePanel groovy app install to "info" and then open the logs window. Activate some switches or motion detectors and you should see something like:

I have two callback IP's set and one isn't active so I get one connection refused. The other connection goes through and works fine. Note the port number which has to be the same as in your hpserver.js setting. For example, in your hmoptions.cfg file, you should see two settings that look like:

"port": 3280
"webSocketServerPort": 1339

the 3280 must match one of the IP settings in the groovy file. Also, 1339 is used between your server and your tablet clients so if something else on your network is using that port nothing will work. That may be the issue. This number can be changed to anything - it was randomly picked.

EDIT:
I enabled my second HP instance just to confirm that it works, and it does. Here is the log of the callback working on both IP's. Notice the connection refused error is gone.

Sorry yours isn't working, but hopefully this info will help you sort it out.

EDIT:

One last thing... in hpserver.js, set DEBUG12 to true and relaunch the server. When you launch the server be sure to pipe the output to a log file like: hpserver.js >& logfile.log &

This will print out debug statements to logfile.log of when the server receives notifications from the groovy app. Do this and report back here what it says. It should look something like this in your log file on the server.

image

Good luck with this.

Hey Ken, thanks for helping. Pretty sure the HE app is not sending anything out. Just to summarize/refresh my configs...

HE: 192.168.1.58
HP on NAS: 192.168.210:3280 (I left it up after installing on Rpi and configured as the alt host)
HP on Rpi: 192.168.1.68:3180

Housepanel.groovy settings:

HousePanel.groovy startup log:

And portion of the HMOptions.cfg file:

After getting it all up and running, I never see any POST messages in the HE log for the app. I generated several events from several devices, both physical (motion sensors, etc) as well as digital via the devices panel in HE (some switches). When I do a refresh from from a browser connected to either HP Node, I do see an entry for "Getting mode tile" in the HE app. And I never see any entries in Hpserver.log for an incoming connection from HE (192.168.1.58).

Thanks again for your help, I know you are busy.

Still trying... first, it's been a long time since I was a coder and that was not in groovy but I've been trying to read through the code to see where i "should" be seeing log events. I know the devices are registering/subscribing as I see entries in the log for all the devices, as well as in the app status subscriptions. I have logging set to debug.

But I think I should be seeing some log entries from the changeHandler(evt) section...
logger("handling id = ${deviceid} type = ${devtype}", "debug")

but i never see any of these.

I assume this is where the POST is sent out to the two housepanel servers (I'm still running both):

postHub(state.directIP, state.directPort, "update", deviceName, deviceid, attr, devtype, value)
if (state.directIP2) {
postHub(state.directIP2, state.directPort2, "update", deviceName, deviceid, attr, devtype, value)

Is there a way to determine if the app is indeed seeing Hub change events?

Solved... sort of. Finally figured out that if I select any modes, the event handler (changeHandler) seems to ignore all events. I wasn't really planning on utilizing modes for HP, so no biggie but I'm not sure why that isn't working. If I selected all of the modes, it still didn't work. Oh well, I learned a lot about groovy in the process :slight_smile:

I have a couple of virtual switches to show whether my washer or dryer is still running. All good now, and my HP dashboards are updating as expected.

Thanks for sharing your experience. I use HP every day and it works but I have a version that works over the cloud. It uses the same groovy code so it shouldn’t matter. My modes seem to work. I use a trimmed down version of hpserver.is called hpconnect.is that just sends events to my cloud version of HP. Happy to share that with you.

1 Like

Download the Hubitat app