I have posted a new release (but have not forced it on everyone).
- use HPM repair to install it
It adds support for hub variables to webCoRE.
You should be running recent HE firmware to use this. (I suggest 2.2.9.134 or later)
Hub variables are referenced in webCoRE via @@variablename
So if you have a hub variable called 'foo'
in webCoRE you would reference this via @@foo
These work like other variables in webCoRE
- you can get events (trigger on them) if they change
- you can see them in the webCoRE IDE
Note that HE requires you to create hub variables via the HE console -> settings -> 'Hub Variables'
- once created, webCoRE can use them (read, or update, or trigger from them)
- also note that types are limited. (integer, bigdecimal, boolean, string, datetime (which for webCoRE should work for time, date, and datetime))
- webCoRE automatically maps webCoRE types to HE hub variable types.
- the webCoRE IDE can change the value of a @@ variable while you are in piston edit mode.
This change did not break webCoRE global variables @variable name
If you were using webCoRE super variables (the previous @@ format) - my apologies.
Feedback welcome
Few Q&A
-
do I do anything special to use them?
- not really - just use them like other webCoRE variables (albeit only for types supported) and webCoRE will handle and conversion between HE formats and webCoRE formats. Ie you can just assign values to them the way you do today with other variables.
- you can assign a webCoRE date, time or datetime to hub datetime type seamlessly
- same for string, integer, boolean and decimal webCoRE types
- you need to create them in HE console before you can use them
- not really - just use them like other webCoRE variables (albeit only for types supported) and webCoRE will handle and conversion between HE formats and webCoRE formats. Ie you can just assign values to them the way you do today with other variables.
-
how do they update?
- they update in realtime, and changes can cause change events to be generated by the HE firmware.
-
should I use these all the time?
- your call, but if you don't want to clutter the hub variable view (or deal with name collisions), I suggest use them when you need to share data across apps (that are not webCoRE). Otherwise local variables and webCoRE globals are useful.
- scopes
- piston local variables - only piston sees them
- webCoRE global variables - only webCoRE pistons on this node can see them
- HE hub variables - all apps on this hub can see them, and perhaps other hubs in the future
- scopes
- your call, but if you don't want to clutter the hub variable view (or deal with name collisions), I suggest use them when you need to share data across apps (that are not webCoRE). Otherwise local variables and webCoRE globals are useful.
-
Can I create them in the webCoRE IDE? (when editing a piston)
- you use to be able to create them from the webCoRE IDE, but the HE folks have restricted this (for a variety of good reasons) that you can only create them from the HE console -> settings
- you can modify their value in the webCoRE IDE
- the webCoRE IDE will show their values
-
these also should work for remote access
webCoRE for Hubitat Updates - #904 by nh.schottfam