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.
where in housepanel-push.js do I enter the port??
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
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.
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..
Working on it and should have it soon. In the meantime it looks like you just need the .service file which is in the repo. Thanks for trying. As for the SD card, I do like that idea as a way to distribute HousePanel for non technical people. Thanks for the idea. This could also create a modest income stream to support my hobby.
I keep trying but im not having much luck. my Node and NPM are installed and appear to be working fine.
My issue seems to revolve around getting the housepanel-push.service working
> sudo systemctl restart housepanel-push
Failed to restart housepanel-push.service: Unit housepanel-push.service not found.
I moved the housepanel-push.service file to /lib/systemd/system/ and that got me some more traction:
root@PI_3BP:/usr/bin# systemctl enable housepanel-push
Failed to enable unit: File housepanel-push.service: Bad message
I edited the file (with no idea what i am doing ) and removed the /n from after [service]
[Unit]
Description=housepanel-push NodeJS Application
After=network-online.target \n\n
[Service] \n
That got rid of the bad message, and the command completes without any errors but a status shows:
● housepanel-push.service - housepanel-push NodeJS Application
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)
Mar 02 09:24:09 PI_3BP systemd[1]: [/lib/systemd/system/housepanel-push.service:6] Failed to parse service restart specifier, ignoring: on-failure\n
Mar 02 09:24:09 PI_3BP systemd[1]: [/lib/systemd/system/housepanel-push.service:8] Executable path is not absolute, ignoring: node /var/www/html/housepanel/housepanel-push/housepanel-push.js
Mar 02 09:24:09 PI_3BP systemd[1]: housepanel-push.service: Service lacks both ExecStart= and ExecStop= setting. Refusing.
Mar 02 09:33:38 PI_3BP systemd[1]: [/lib/systemd/system/housepanel-push.service:5] Failed to parse service restart specifier, ignoring: on-failure\n
Mar 02 09:33:38 PI_3BP systemd[1]: [/lib/systemd/system/housepanel-push.service:7] Executable path is not absolute, ignoring: node /var/www/html/housepanel/housepanel-push/housepanel-push.js
Mar 02 09:33:38 PI_3BP systemd[1]: housepanel-push.service: Service lacks both ExecStart= and ExecStop= setting. Refusing.
Mar 02 09:34:18 PI_3BP systemd[1]: [/lib/systemd/system/housepanel-push.service:4] Failed to add dependency on \n\n, ignoring: Invalid argument
Mar 02 09:34:18 PI_3BP systemd[1]: [/lib/systemd/system/housepanel-push.service:7] Failed to parse service restart specifier, ignoring: on-failure\n
Mar 02 09:34:18 PI_3BP systemd[1]: [/lib/systemd/system/housepanel-push.service:9] Executable path is not absolute, ignoring: node /var/www/html/housepanel/housepanel-push/housepanel-push.js
Mar 02 09:34:18 PI_3BP systemd[1]: housepanel-push.service: Service lacks both ExecStart= and ExecStop= setting. Refusing.
Any Ideas? am i totally going in the wrong direction?
I also tried just running the .js file with poor results also
root@PI_3BP:/usr/bin# node /var/www/html/housepanel/housepanel-push/housepanel-push.js
internal/modules/cjs/loader.js:615
throw err;
^
Error: Cannot find module 'websocket'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:613:15)
at Function.Module._load (internal/modules/cjs/loader.js:539:25)
at Module.require (internal/modules/cjs/loader.js:667:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (/var/www/html/housepanel/housepanel-push/housepanel-push.js:5:23)
at Module._compile (internal/modules/cjs/loader.js:738:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
at Module.load (internal/modules/cjs/loader.js:630:32)
at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
at Function.Module._load (internal/modules/cjs/loader.js:562:3)
Any help or direction will be appreciated




