HousePanel Dashboard App for Hubitat


#524

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.


#525

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


#526

I'd be curious if you can start the push server manually from command line.


#527

I am researching this as we speak. I'm learning that I didn't implement the systemctl stuff correctly. I rebooted my rPI and ran into all the same issues you are seeing. I fixed them manually using the following procedure. I'm now in the process of changing the install script to do this.

First - remove all instances of prior housepanel-push.service files. You probably have one in your main folder where you have node_modules installed.

Next, disable the old daemon using: sudo systemctl disable housepanel-push

Then navigate over to /etc/systemd/system
There you will find a housepanel-push.service file. If not, copy the one over from the repo to here.
Edit that file and change the directory pointers to:

WorkingDirectory=/var/www/html/housepanel/housepanel-push
ExecStart=/usr/bin/node housepanel-push.js

Now navigate over to /var/www/html/housepanel/housepanel-push
remove any prior node_modules folder there. sudo rm -r node_modules

manually install the housepanel-push dependencies
npm install body-parser
npm install express
npm install request
npm install websocket

Run housepanel-push manually to make sure it works:
node housepanel-push

after confirming that it works, Control-C out of it and restart the service by doing this:

cd /etc/systemd/system
sudo systemctl enable housepanel-push
sudo systemctl daemon-reload
sudo systemctl start housepanel-push

There is clearly an easier way but I know this works so I'm sharing it now. Working on figuring out the easier way and coding it into the install script.


#529

Okay folks - I cleaned up the install script to properly install the Node app. This still does not include any auto install of NPM and Node so be sure to have that installed first. Once that is on your rPI the install script should properly install the push function now. While in the subfolder it invokes "npm install" which automatically handles all of the required dependencies. It then creates a .service file pointing to the directory where you installed HousePanel and the housepanel-push subfolder. Then it enables the service and restarts the daemon and restarts the service.

For those of you who want to do a manual install, just grab the latest housepanel-push.js file and config.json file and do the install as usual with any Node program. There are four dependencies noted in the config.json file.

to get the new install script, do the following as usual:

cd ~
sudo wget https://raw.githubusercontent.com/kewashi/HousePanel/master/install.sh
sudo chmod 755 ./install.sh
bash ./install.sh

Hope this works for people better than the last try.


#531

[RELEASE] HousePanel V 1.996 with new Rule Engine feature

If anyone grabbed V1.995, please update to V1.996. This fixes a multihub bug in housepanel-push.

This version also implements a simple "rule engine" in that any motion detector or contact added to another tile using the customize feature will trigger that tile if it is a switch. Motion turns the switch on but inactive doesn't turn if off. Open and close turn it on and off. Also, second switches added to a tile turn it on and off too. The trigger items can be hidden using the editor so you get a pure rule feature. By default they are shown after you add them in the cusomizer.

If you haven't played with the tile customizer yet, this new rule engine feature is a good reason to try it out. Using this I added my office motion sensor to my office light and now it turns on instantly when I walk into the room. Because this uses the hub push feature it is quite fast. Faster than cloud based rules but slower than a local lighting rule.

The framework is there for more complex rules, so expect that to come in the future. For now only lighting rules are supported triggered by motion, contact, or other switches.

As a reminder, here is a screen shot of the tile customizer dialog box. In this box you see where I added both my door and a motion sensor to light up my office.


#532

[RELEASE] HousePanel V1.997

This version contains tweaks to the customizer rule engine that invokes the rule only from the last client because only one client needs to do the rule.

I also updated the documentation screen shots to the latest version.

As usual this version also includes a number of minor bug fixes

The code stability is finally settling down and I'm happy with the performance of the main features and the relatively new hub push feature. It still takes effort to install if you are a newbie but its totally worth it. Hang in there and ask for help.

I will be releasing V2.0 later this week and it will be the last release for some time because I'm heading into a few weeks of marathon travel for work, so if you want some new feature or have some bug to squash please let me know asap.


#533

Macro Rules are now supported in the Tile Customizer. This is done with a new custom field type called "RULE" selected in the drop down box. Pick a unique field name and then in the text field enter any number of macros separated by a comma. A macro is a tile number followed by an equal sign followed by a field name, another equal sign, and then a command such as on or off. For example:

38=switch=on, 12=switch=on, 17=level=30, 9=switch=off

If you enter this string above as a macro rule, it will turn on switches 38 and 12, set the level of switch 17, and turn off switch 9 all with a single click. You can then style this macro rule custom field with the Tile Editor to have whatever icon you want. By default the macro will show text with RULE:: followed by the name of the macro.

Here is a screen shot of my test case that turns on tiles 38 and 9 with a single click. I put this into a custom tile that also captures the weather feels like temperature using the LINK function. This showcases the massive flexibility of HousePanel.

The only catch is using this feature requires you to know your tile numbers. Eventually I will make a nice GUI for this, but for now power users can use this by finding their tile numbers on the Show Info page.

This feature graduated from beta status with the last push. feedback is still appreciated as always.


#534

[RELEASE] HousePanel 2.0

This version fine tunes the new macro feature. This is a powerful feature. I hope people enjoy it.


#535

First, thank you for all your hard work... If I may ask a dumb question; how do I update? I ran the RPI package updater and when that didn't work, I re-ran your linked install script. It does not seem to have installed the latest version as I show I'm on 1.995... Thanks in advance... :blush:


#536

If you have an existing working install, no need to rerun the install script. To update download the latest from the GitHub repo and replace the following:

housepanel.php
add any new icons in the skin folders
Save your customtiles.css
Save your hmoptions.cfg
*.js
update your groovy file in the API
restart the housepanel-push service

You could rerun the script and it should work. I think you got an old version because GitHub takes a few days to update the zip file that the installer uses. You can force it by downloading the zip and then re running the installer.


#537

cool... i will give it a shot. thank you!


#538

Got it updated and continually customizing... Can I integrate HSM? If so, can you point me to a tutorial?


#539

HSM is already fully supported. Start by ensuring you enable it in your Hubitat account. Then add it to HP as usual using the HP app in Hubitat followed by a refresh in HP. After that you will have it as a tile to add to any page in the Options page or from the drag and drop catalog.


#540

The main website at www.housepanel.net has a full user manual.


#541

Ok, I went through the list of devices to add into HP. I have already added in the smoke detectors, motion sensors, etc. I don't seen anywhere to add the alarm setting options such as armed-away, armed-home, etc. I've been able to setup my various rooms with the sensors and door locks displaying, but I'd like to add options to turn on or off alarms from the HSM. I need to do some reading on how to add custom tiles... I'm getting there... But I don't see alarms as devices I can enable from the HP app inside the hub... Am I on the right track or missing something?


#542

There is a Hubitat HSM application that you need to add to your account. Go to add Apps and find HSM in the list and proceed from there.


#543

Yes sir, I have HSM installed and using it... Working out some details with my keypads that won't be ready until the next hub firmware release. Was hoping to automate the security and safety features through House Panel. I have everything setup but have not figured out how to get that into House Panel. I can see and add individual devices such as the motion sensors and door locks... That part I'm not getting is the actual setting of the alarms on and off...


#544

You should be able to add the HSM tile to any page on HP and then when you click on it the state changes to the next mode until it cycles back to where you started. not Sure why it isn’t working for you. I’m away from my home this week so I can’t troubleshoot Hubitat stuff. Sorry.

Are you able to add the HSM tile? Do you see it on the list when you go to the Options page? You will need to click the HSM box or the All box on the top to see it.


#545

[RELEASE] HousePanel V2.020

This release includes a crazily powerful macro capability. As always a number of bug fixes and tweaks are also included. There is no GUI yet for the macro feature but the power makes manual editing of hmoptions.cfg worth it for the power user. Keep reading if interested.


Macros are a more powerful alternative to automation than the RULE system
provided by the Tile Customizer. With Macros you can string together any number of action calls that HousePanel supports and connect it to any field on any tile. The catch is there is no GUI for defining Macros (yet). Macros must be hand-written and saved in your hmoptions.cfg file, so this is a feature only for power users. Macros are defined in a section of the hmoptions.cfg file called "macros". That section looks something like:

"macros":{
"custom|custom_4|test":
[
  ["-","7","switch","switch","toggle"],
  ["-","8","switch","switch","off"],
  ["-","16","switchlevel","level","on","60"]
],
"switch|23|switch":
[
  ["-","23","switch","switch","toggle"],
  ["-","17","switchlevel","level","on","60"]
]
}

The keys are a string composed of the type, the id, and the field, separated by the "|" symbol. The type|id pair is the "connected tile" that is used to trigger the macro. This should be one of the tiles listed in the "index" section of the hmoptions.cfg file. The field specified is the field that is clicked on to invoke the macro. An array of arrays follow. Each array entry has up to 6 fields. The first array element is the hub id. If "-" is entered, the hubid of the connected tile is used. The second element is the id of the thing to automate. The third element is the type of thing. The fourth element is the field to control. The fifth element is the command or value to pass to HP.

For example, it could be "on", "off", "open", or "close". A sixth element is attribute that is sent for some tiles to be controlled. For example, level can be sent this way.

Any number of macros can be defined and they can be tied to anything, including custom fields as is shown in the above example. The only restriction is they cannot be mixed with RULE custom fields.