webCoRE for Hubitat Updates

Thanks ...sorry for being so dense...
I did the change and it appeared to work.... will try a few more times : )

Can you show us the piston?

working it out with nh.schottfam, ill remove the post.

1 Like

I have looked for a while now, but I didn't find anything, so here it goes: is there a way to set tile icons and background images in the Hubitat Dashboard from webcore?

Webcore and the dashboard are both seperate apps. They do not talk to each other in that way.

Are you trying to set / update the background image of an HE Dashboard tile dynamically using a WebCoRE piston? I'd also like to ask where the existing BG image(s) reside... on the Web or stored on your hub's on-board file system?

But @kristufer is right... this is more of a Dashboard app question than a WebCoRE one, IMHO, and should probably be its own topic.

RECOMMENDED READING

Ideally, I would like to set a custom icon and the background color for a tile dynamically from webcore.

So far, I've created a very simple custom device that I can address from webcore. This allows me to display a tile on the dashboard and update the text from webcore - for example for my washing machine

  • loading
  • running
  • clean

What I would like to do would be to also display a custom icon for each state, and to also change the background color for each state (let's say e.g. green, yellow, red).

I guess the question at this point is: would I add tile background color and icon as additional custom attributes to my custom device and then write them from webcore? And if that's the way to go: how would I read those attributes from the dashboard side of things and display them?

If that's not the way to go: is there another way to manipulate resources used and displayed by the dashboard from webcore - and if yes, then: how so?

(I've installed and played around with the Conditional Image Server option, but it didn't seem like the right approach, so I thought I would ask here before going down that rabbit hole.)

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....