Home Automation Dashboard (HAD)

So, I’m hoping this is a desirable feature add but let me know what you guys think. I’ve added some rudimentary theme functionality because I’ve grown to loathe updating my theme manually every time there is a change to the master repo. Whether that is hunting down the things I want changed back on a per widget basis, or globally. Check my repo for details as I didn’t send a Pull Request or anything yet.

Essentially, now in assets/stylesheets/ is a “themes” folder with 3 included themes. You can choose the theme you want to use by altering the: @import "blue-grey-modern-shadow.scss" line in current.scss within the theme folder, with the appropriate theme filename that you want to use.

  • grey-grey.scss - What I think is a 1:1 representation of the default theme currently in the main repo.
  • blue-grey-modern-shadow.scss - What you see pictured below.
  • blue-grey-modern.scss - What you see below without the shadowing.

Theoretically, anyone can add their own theme as well as build on what I have “themed.” So far, I didn’t add icon coloring, or very specific tile coloring but all of that is pretty trivial at this point. In addition to the themes folder, application.scss had to be modified as well as almost every .scss file in each individual widget folder. Most of the individual widget changes were small, but necessary. Even if someone doesn’t want to or doesn’t know how to share their theme, it’ll be much easier for them to “keep” their theme instead of having it get stomped on during a pull since their one file shouldn’t have any changes other than updates to include new theme functionality.

If people like this idea, I can add greater detail to the themeing and create a Pull Request and let @florianz decide if he wants to include it in the main repo.

This seemed to fix my issue thanks @florianz

Would you have the design file you used on Ponoko?
I would like to do the same exact thing as you do, but I’m terrible with illustrator.

@bmmiller I like this idea!

And in other news, i think i have fixed my issues with the tiles updating. I use a number of virtual switches to trigger scenes, and one activated the scenes turn the virtual switch off. It seems like there was some kind of race condition going on - at times it worked flawlessly, at other times the refresh never seemed to make it through and the switch stayed on. I added a 1 second delay to the switch turnoff and it is now behaving a lot better. The only issue now is that a second in the ST cloud seems to be anything between 5 and 60 seconds!

I too would like to know how you built your frame @florianz. It looks great.

@florianz I also would be interested in the design for the frame and an approx. cost. It looks great.

For those interested, dimmer widget has been updated to use the HTML range slider. It’s working pretty great for me, let me know what you think!

Nice! I’ll give it a shot shortly.

I finally got around to making a garage widget, I’ll make a pull request shortly.

This will work specifically with a Linear GD00Z-4 which is of type “Z-Wave Garage Door Opener”, it won’t work with the various homebrew sensor+relay combinations out there, and I am also not sure if it will work with other all in one solutions. The quirkyness was that the Garage opener only advertises a capability of contact, although it also has a door. To avoid conflicts, I didn’t create a new garage type for the preferences, since my garage comes up in contacts anyway.

I was able to get the opener to report 4 different event types - open, close, opening and closing, so I have the icon turn yellow if it is opening or closing, and the normal grey and pink for closed and open respectively.

Edit:

@aimc

Thanks. I’ll try merging this into my code and we’ll know real fast if it works with an “all in one” solution, which is what mine qualifies as.

A quick cursory look at the code has me optimistic it will work, but we’ll see.

EDIT: Good news. It does work for the all in one situation but I had to alter my Device Type. I think I misspoke earlier when I said that it supported open/close and I only added a push() command. Adding in an open() and close() that calls push() fixed that right up. The reason for push() was to use some of the existing Garage SmartApps out there. I’m not sure if other all in one solutions utilize push() or open/close or both like mine does now.

The only small issue, and it’s barely an issue, is that it doesn’t seem to be updating with a yellow status for “opening” and “closing” which my Device Type does support and does work in the SmartThings app. Again, it’s barely worth caring about and for all intents and purposes, this works, nice job.

1 Like

Excellent!

In terms of the icon updating, the way I did it was a little kluudgy and could maybe be improved with a little thought. I subscribed to both the contact and the door, they both seemed to push out different messages at different times, and its possible that for your door they are overwriting each other or competing. The reason I did it that way was that the contact gave me open and closed, but the door gave me opening and closing - your situation may be different. I added a debug line to the garageHandler to see what I was actually getting while I was experimenting- something like that may help you debug.

EDIT:

And on another subject, can any git expert advise me on the best way to get some of these pull requests into my repository so I can try them out ahead of florianz merging them into the master branch?

Honestly, I’m not sure of a great way of doing this as the pull request is for the master branch instead of your own personal fork. Perhaps if the PR’s were issued to your f0rk, it’d be relatively simple.

Since your stuff was so contained I just manually added it.

Cool, just wanted to check there wasn’t an easier way - I am liking git a lot more than any of the previous bloated source control systems I have used in the past, but I am still feeling my way a little. This project has been a great excuse to start learning it :slight_smile:

There very well might be a better way. I use it every day at work but am still far from an expert :blush:

I finally got the switching pages working. Was having an issue where the second page wasnt inheriting the CSS styles. This app is great. Out of curiosity has anyone been able to get “scenes” working with this? I know @aimc made mention he had some virtual switches controlling scenes. Not sure if anyone has any code/methodologies they would like to share :smile:

Yes, I have a take on scenes that I am reasonably happy with, at least for lights.

There are 2 pieces to it -

First, use the IDE to create a virtual Switch and name it something appropriate like “Movie” or “Downstairs Off” or whatever:

  • In the IDE go to “My Devices”
  • Click the “+ New Device” button On the “Create Device” screen
  • give it a name (e.g. “Movie”), a device network ID (e.g. “Movie”), set the Type to “On/Off Button Tile” and
    set the Location to the appropriate location from the drop down list,
  • then click the “Create” button.

This will give you a dummy button that does nothing yet, but you can make a tile for it in the dashboard like any other switch

The second part is a smart App to make the scenes:

I use a modified version of the excellent SceneMachine by @wackware. The original version didn’t support Virtual Buttons and I also added support for Hue Bulbs.

This app, when you first install it or whenever you change the options, will record the state (on/off, level, hue and color) of the bulbs or switches you tell it to. The virtual button support listens for the button being activated, sets the bulbs and switches to the recorded levels and then switches the button off for you , so it acts like a momentary switch. The idea is that you create a version of this app for each scene you want then tie it to a unique virtual button. It is a good idea to name the app something like “Scene: Movie”

When you have this all in place you can create an “stswitch” widget for the virtual button and pressing it on the dashboard will activate your scene.

The only caveat I have found, and the reason I haven’t contributed this code earlier, is that for Hue and some of the other device types you need to let the scene stay in place for a while before you record it. I believe this is related to latency in the bulbs reporting back their levels and settings, and/or polling issues in the various device types. For Hue bulbs in particular I found this to be necessary, and would welcome any insight into how to fix this. The original code sent a poll() command to each device before recording this but I had to remove it as it wasn’t supported by GE Link bulbs. Even with the poll() in place working against non-GE bulbs it still wasn’t working well unless I let the scene settle for a while. So the reliable steps to create a scene would be:

  1. Use the phone app to set all the lights and switches to the levels/colors you want
  2. Wait 5-10 minutes
  3. Create or edit the Scene App.

The Code is here:

https://github.com/acockburn/SceneMachine2/blob/master/scene-machine.app.groovy

2 Likes

Just a heads up to check out the device type in the below thread for the GE Link bulbs. Added poll() support and improved status updating. Might improve integration with Scene Machine.

Excellent - thanks, I’ll check it out later today.

That setup didn’t work for me. I edited the files listed and the dimmer shows up, but it’s not responsive to input on the dimmer slider. On/Off still works

Awesome! I will play around with this tonight. Thanks for the help, and keep up the great work!