webCoRE for Hubitat Updates

Yes, I tried that as you can see in my post I get:


and no log output (log settings is set to full)

please notice:
I edited my last post with some extra info regarding the browser requests

I went into Webcore to change something in a piston I hadn't touched in a very long time. Next to every Set Level xx% command for some zigbee bulbs there was "(?)". When I went into each command and saved it without changing anything, the question mark went away. What does (did) the question mark mean? Searched this topic and all of the HE forums and didn't find anything.

1 Like

@ipaterson any thoughts?

I'm getting this error when I control Hue bulbs with an inovelli scene. What does it mean?

org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.StackOverflowError (deviceHandler)

I would try a polite reboot of your HE hub. Not seen this before.

HE console -> settings -> reboot

You also could shutdown (politely), power off the hub for 1 min, and restart.

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

10 Likes

Just updated webcore and ran a simple rule I have to set day of week HE variables using the webcore constants. It said both HE variables were invalid, See below. It did work, however, I reset the HE variables before executing the webcore piston and they updated after running the piston to the correct values. I originally had them updating connectors, thought I would try the direct variable method? Is this not how you do it?

I received the same error and the hub variable is being updated correctly when reviewing in settings. Weird this would produce an error if it worked

I think I had the same issue, and I cleared the Webcore Cache.

I must recheck.

1 Like

I am getting this error. The piston does what it should.

10/20/2021, 5:15:03 PM +462ms
+55ms ╔Received event [Home - Hub1].test = 1634764503462 with a delay of 0ms, canQueue: true, calledMyself: false
+61ms ║RunTime initialize > 60 LockT > 1ms > rtDT > 1ms > pistonT > 0ms (first state access 58 56 4)
+66ms ║Runtime (5173 bytes) successfully initialized in 1ms (v0.3.113.20211005_HE)
+67ms ║╔Execution stage started
+70ms ║║Cancelling statement #1's schedules...
+74ms ║║Executed virtual command setVariable (2ms)
+88ms ║║Invalid variable @@Test
+91ms ║║Executed virtual command setVariable (13ms)
+97ms ║║Executed virtual command setVariable (1ms)
+101ms ║╚Execution stage complete. (33ms)
+104ms ╚Event processed successfully (51ms)

Still haven't seen the issue. I will let you know if that changes.

I have posted an update that fixes this incorrect error message.

HPM repair to get it

4 Likes

This may be a limitation of Hubitat hub variables but I want to put it out there for others to see.

The example test piston shows a string being formatted so it's output can be placed in the Hubitat Dashboard. Using webCoRE's variable I can fill a string with more than 255 characters, whereas the Hubitat Hub Variable string is limited to only 255 characters?

10/21/2021, 2:09:04 PM +39ms
+96ms ║Error executing virtual command [].setVariable: (41ms) java.lang.RuntimeException: java.sql.SQLException: Value too long for column "VALUE VARCHAR(255)": "'Temp In DewPointIn Temp Out &n... (368)"; SQL statement: update global_variable set value = ? where name = ? [22001-197] Query: update global_variable set value = ? where name = ? Parameters: [Temp In DewPointIn Temp Out DewPnt
72.3F 50F 60.6F 58.3F, WeatherTempsTile]

thx, I'll have to catch that exception better...

image

I changed my variable name on the device page from Weather_Icon to NWS_Weather. It will not update on the variables page or in webcore.

May have broken the link back to the variable…

I did the HPM repair and now I'm getting these errors endlessly...

Annoying but not an error, just a debugging message left behind…

This should be resolved in the latest update out now.

1 Like

I'm curious; Is there a way for webCoRE to utilize reading and writing to the filespace of the Hubitat hub?

2 Likes

Download the Hubitat app