webCoRE for Hubitat Updates

I'll tentatively dip my toe into this correctly labelled rabbit-hole... Without any concrete answers (I don't think)... I'll also admit most of my thoughts centre around local dashboard access, there may be limitations with cloud access. I'll also warn that none of these options are simple or fully fledged or already working, just thought-bubbles at this stage. If you want a pre-canned solution, I am not aware of one, but that doesn't mean one does not exist.

If I pick out the key parts (for me), it would be conditionally changing the display of a tile based on an attribute value.

If you want to take the approach of managing this within the individual dashboard, I expect it should be possible (without investigation or testing) via the layout JSON and Custom CSS for the dashboard, along with the custom device driver you have written. But this solution, if it works, will only be a per-dashboard solution, requiring the same tweaks to any dashboard requiring the same output.

A possible alternative may be my Status Avatar with some adjustments to suit you use case and with some changes to the requirements for background changes. If I was to entertain this option, I would opt for either using the dots around a single image, or adding a coloured ring around the image like you see in the Community against the most recent poster, adjusting the colour as needed.

Like I said, no immediate or simple answers from me.... But still possible based on my assessment.... And perhaps something I may introduce in my Status Avatar, just timing may lag for a while..... a long while....

FYI - it may be splitting this out from a webcore-specific topic... Just my 2c

1 Like

Have you considered creating a attribute within your device that generates html coding. Instead of dynamically changing the tile background, set your dashboard tile the the html attribute and just change the data (from webcore) that gets loaded into that attribute.

For example, I have dashboard tiles for several TVs that display status, application icons, etc. The data is gathered from multiple devices (i.e. Roku and Smart TV) using webcore, parsed and sent back to the custom device.

3 Likes

Thanks for pointing me in that direction! So as a proof of concept, that's gotten me to this point:

webcore piston

image

custom device function

image

dashboard tile
image

Of course the goal would be to make this reusable for multiple devices and tiles, and across multiple dashboards - but it seems like it could be done.

2 Likes

Yes, re-usability typically comes a close second.... Which is where my other recommendations came from...

1 Like

Recent updates to webCoRE:

  • changes in how missing variables are logged

    • if you have logging for the piston at medium or high, you will see log entries for missing variables. This can help you understand missing globals, or removed local variables.

      • you can quiet this down with logging off or low, as pistons can be coded to allow missing variables
  • changes in how variables with an initial value assigned in the define section operate.

    • for a piston that does set Variable on variables with initial values, these values can be maintained thru wake/resume events for the piston. Ie the initial value is initialized if the piston runs from the top/beginning only.
  • updates to IDE (on staging at this time) on displaying variables with initial values assigned in define section that are changed during runtime (set variable). You can now see the last assigned value in the IDE.

  • updates to fuel streams to use new HE methods for file access (if on more recent FW that has these methods available), otherwise it will use the built in web methods.

See: Using Variables

4 Likes

Hi I'm not sure if this is the right place to ask this question but with the recent integration of webcore into HE, Do I need to update anything on my previous webcore instance?
I noticed that the version in HE build in -app is 3.114.20230113 (jan2023) vs my current version is 3.114.20220203 . When i try to install is says to use the build in app if I want another instance of webcore... how do I update to the latest version ? do I need to install a second instance and them transfer all my pistons?
Thank you very much.


You may have two instances installed (user app) and system app.

See:

Very Clear ... thank you very much for the explanation.
I have seen times where pistons fully tested that always worked doing things that I can't explain (like no doing their actions). I know it could be many factors but I wanted to make sure I have the latest version running and I wasn't sure how this integration works.
thank you

Thanks for this post!
Do you know where I could leave my suggestions for further versions? Sometimes we could have great ideas but not sure where to leave it…:blush:
Have a nice day!

I'm running the HPM-installed version with a local web server for the IDE. I didn't see any changes to the front-end code when I did a git pull. How do I get these changes into my local server?

I'll push them up, give me a few mins

should be there now

1 Like

Thanks @nh.schottfam for pushing them up. Can you please advise what I have to do to get them on my local server? Is meant here an update via HPM or do I have to update something on my Rasp Pi?
Thanks

Note 2 of this thread has pointers to running a local web server.

You don't need to do this btw....

I already have this up and running. Set it up in the past to avoid any interruptions due to Smartthings.....
But currently struggling how to update this. Ok will check Note 2 again, already did :-/

if you git cloned the repo, you can usually update via git to get the newer files. Depends how you deployed.

Thanks, was able to figure that out. I'm up to date now.

There have been a couple of new updates to webCoRE recently, mostly bug fixes, cleanups, UI improvements.

I have realized there is one change that may affect pistons and I wanted to let folks know.

  • this issue was an improper overloading, that recent UI changes made much easier to resolve.

If you use a device that allows setVariable command, there is an edit you may need to make to your pistons to ensure you select the custom command setVariable associated with the device (vs. using a location command setVariable which is for webCoRE variable setting)

Do you mind explaining what you did? I can’t seem to get mine to update so I just gave up.

Hi I will try to explain what I did. Maybe not the most straight forward way, but at least it worked for me.

  1. I created a copy of my current SD Card.
  2. Login via SSH to your Raspberry Pi
  3. Now you can update your existing repo (which didn't work for me) from your home folder
    -> cd ..
    -> git pull https://github.com/imnotbob/webCoRE
    or rename the existing webCoRE folder and clone the current repo from git hub again.
    -> cd ..
    -> git mv "webCoRE" "webCoREbkp
    -> git clone https://github.com/imnotbob/webCoRE
    -> cd webCoRE
    -> git checkout hubitat-patches
    -> cd dashboard
    -> sudo ln -s pwd/var/webcore

I found this a year ago in another post. After that I tried a git pull and it seems to work now as well.
After that I rebooted the hub and the Raspberry Pi and all works fine.

Just a note, I had to set some config variables with my email address and GitHub username to be able to clone/pull the repo.

As I said, I'm by far not an expert but I got it to work. If someone feels to correct any of my steps, please feel free to jump in.

Hope that helps

Thanks! Will try this over the weekend.