Using webCoRE with Hubitat

I read multiple posts in the forum mentioning that webCoRE runs well on Hubitat, barring some minor issues. Could someone please guide me on how they achieved this and what limitations would come with it?

I tried to install the code from Ady's repository and updated the few lines that referring to SmartThings functions. The interface for webCoRE works fine, however none of the pistons execute. What could I be doing wrong?

Background: I have a large number of pistons written on webCoRE controlling everything from my thermostat to lights, security, safety sensors, IR and RF devices etc. So even after migrating all of my devices (non-cloud based ones), it would still be an uphill task to patiently move the logic for all of these pistons, over to Rule-Machine (assuming the same provisions exist) :frowning_face:
So, as much as I am impressed with Rule Machine, I still miss not being able to run my webCoRE pistons any more. I am guessing I would need more weekends to completely port everything over.

Update: For anyone arriving on this thread in search of how to get webCoRE working, a fully functional version of webCoRE is now available on the below thread thanks to the efforts of multiple contributors.


Keep in mind that using webcore defeats much of the point of using a local server for automation, since if you lose internet, you lose control of your automations. As long as that’s not a consideration for you…

Are you getting any error messages in your realtime log when you try to execute pistons? That’d be a good place to start looking. (open an extra tab to keep your log open, it doesn’t keep any historical data unless there’s an active page open)

1 Like

Yes, that is a good point. Thanks!
So my plan was to offload some of the processing that needs quick real-time responses over to the local side, using Rule Machine, while retaining the more complex ones needing multiple global variables shared across pistons etc. on the cloud (webCoRE) itself. Additionally, webCoRE with its webhooks makes it easy to trigger automations from external systems.

As for logs, I did try that but couldn’t make much of it :frowning:
The webCoRE main program throws the following error…
Cannot set property 'status' on null object

while the actual piston spits out this one…
No signature of method: app1519362111377552123078.setTimeoutRecoveryHandler() is applicable for argument types: (java.lang.String) values: [timeoutRecoveryHandler_webCoRE] on line null

My understanding is that webCoRE still runs all of its automations within the context of the user’s account on SmartThings. The “web” portion of webCoRE is just used to create/edit the Pistons, correct? The Pistons would still run locally on your Hubitat hub, if someone was to get this app working. You might lose the ability to modify a Piston, but they should still run.


@ajayjohnm - have you been able to get webCoRE on Hubitat to actually allow you to select devices when creating a piston? I was able to get all of the pieces of webCoRE to install, and I am able to create a piston in the dashboard, but when I try to add a condition and action, none of the devices that I initially selected will show up. I do not see any errors in the Hubitat Logs.

The only changes I have made thus far are to comment out the include ‘asynchttp_v1’ statements as they throw errors when saving, as well as changing physicalgraph. to hubitat. in the very few places I found it.

What other changes did you make?

I had the exact same issue as you, but I think I resolved it by accident.

Here is what I think I did...
I made the same code changes as you did, primarily with the intent to eliminate errors to get the code saved.
When I first got into webCoRE and selected the Available Devices option and chose my devices, it all saved fine but none of the devices would show up when I tried to access them in the editor.
So I went back into webCoRE and realized that the Settings portion of webCoRE now also shows another entry for the parent app itself (Shown below)

Going into this entry gives me another select devices option, where none of my previously selected devices were in selected state. So I selected all relevant devices again on this screen and clicked done/next.
Now when i returned to the editor, I could see all my devices listed with their correct capabilities.

I think I may have written the above statements in a confusing manner, so let me know if it didn't make sense. I'll try to structure the flow better.

Ok, that helped a lot! I then ran into an issue after creating a simple piston which caused an error to be thrown in the Logs.

To fix it, I changed the following code in the webCoRE Piston app:

First, comment out the 'timeoutRecoveryHandler_webCoRE(event)' function, and uncomment the 'timeRecoveryHandler(event)'

//new and improved timeout recovery management
def timeoutRecoveryHandler_webCoRE(event) {
	timeHandler([t:now()], true)

def timeRecoveryHandler(event) {
	timeHandler(event, true)

Next, in the 'handleEvents(event)' function (just below the code you edited above), change the following two lines as shown below:

	runIn(30, timeRecoveryHandler)

Finally (for now), change the following line in the webCoRE Piston app

runIn(t, timeHandler, [data: next]) in Piston.

change it to:

runIn(t.toInteger(), timeHandler, [data: next])

After making these simple changes (which appear to be reverting a recent change), my webCoRE Piston worked! I am sure there are probably other issues, especially with some of the integrations. I really never used webCoRE for much of anything in ST, but enjoy the challenge of trying to make things work. Hopefully this helps others as they experiment. For me, Rule Machine on Hubitat does everything I need thus far.

Here is what my simple piston looks like:



I did that but after I select the devices and click the 'Done' Button I go back to the screen below that does not have a 'Done' button. When I go back to the app list and create a piston there are no devices listed?

Any clues? Thanks.

@ogiewon Thanks a ton! Am glad we have really helpful folks like you over here :blush:
Your code changes helped me get webCoRE running and I imported an initial batch of lamp control pistons, all of them working fine.

As you mentioned, there are some errors still thrown in the log and one of my pistons still doesn’t run due to a runIn related error. But I am guessing these things can be fixed with a little bit of trial and error.

Cannot invoke method put() on null object

No signature of method: app15194998489101212252708.runIn() is applicable for argument types: (java.math.BigDecimal, java.lang.String, java.util.LinkedHashMap) values: [18439.858, timeHandler, [overwrite:false, data:[t:1519518360000, ...]]] Possible solutions: run(), run(), println(), println(), dump(), any() on line null

I’ll try digging into the code a bit to see if I can figure out the issues.


You are right, there is no done button on the screen you shared. You just need to click on '<< App List'.
I am not sure why you do not see any devices within webCoRE though :slightly_frowning_face:

Let me callout the steps I followed once again if it helps...

  1. Go to the Apps page with the Hubitat portal.

  2. If you have already installed webCoRE, you should be able to see it listed as shown in the image below...
    Here, 'Hubitat webCoRE Director' is the name I had given to the webCoRE instance, at the time of installation.

    Here, don't click on the parent level 'Hubitat webCoRE Director' link. Instead, click on the nested child level 'Hubitat webCoRE Director' link (Or whatever is the name you had given your instance).

  3. On the following screen, you would see the Available Devices option shown in the screenshot you shared. Selecting it would take you to the Device selection list. Over here, do you see your devices already selected?

1 Like

Thanks. I think I was clicking on the parent app. I have it working now. Appreciate the help.

As an aside, the latest version of Hubitat now syncs selectable devices in ST. I have a few pistons which I can’t let go of now, so I wrote them to turn on-off virtual switches. Now I can see and use those switches in Hubitat Rules now. That upgrade made things a lot easier for me. YMMV


I agree. I have been doing the same thing.
Glad we have uni-directional sync from both sides now.

Followed the advice here and also got webCoRE installed and mostly working; it appears that time triggers do not work and produce the error noted by ajayjohnm:

An error has occurred while subscribing: groovy.lang.MissingMethodException: No signature of method: app15195358982511898645948.runIn() is applicable for argument types: (java.math.BigDecimal, java.lang.String, java.util.LinkedHashMap) values: [61.915, timeHandler, [data:[t:1519591380000, s:1, i:-1, cs:[], …]]] Possible solutions: run(), run(), println(), println(), dump(), any()

But time conditions seem to work and that makes for a lot of useful automations. I also noticed that the Aeotec Doorbell doesn’t have the ‘playtrack’ capability (apparently due to the way the driver is coded) but that can be worked around using ‘speak’ with a numerical value for the track number.

More significantly, I haven’t found a way to use the Aeon minimote as a trigger; it doesn’t seem to show ‘button’ as an option when choosing it.

I also noticed that using the web dashboard somehow had the ability to bounce me into my SmartTiles instance of webCoRe; this in spite of having logged out of the dashboard the first time I noticed this. It actually offered me the option of copying a ST piston into my Hubitat dashboard (when I did this, it copied the piston with numerical strings where the normal ST device names would have been). I have to confess I really don’t understand how interacts with the ST and Hubitat instances and am a little leery of corrupting the environments.

try converting the delay value sent to runin to an integer using toInteger()

You’ll need to modify the capability used for buttons, our implementation is here:

Thanks, I will pursue this advice with my feeble programming skills. Hopefully someone smarter than me will beat me to it :grinning:

webCoRE seems to have stopped loading for me all of a sudden. I also see that Adrian has released an updated version of the app (which again does not load for me post all the hubitat related modifications).

Is anyone else facing the same?

It still seems to be working for me; at least for the simple piston I just created. I see the changelog for 2/24/18 refers to a dashboard redesign.

Just resolved my issues by reinstalling webCoRE and adding oAuth to the app again. Not sure what went wrong.
Thanks for sharing your status.

You are right, I did not realize that.
I did test this by disconnecting my hub from the internet and my pistons still ran well :+1:t3:

I see that the asynchttpv1 library that we simply comment out, seems to be used in multiple lines, especially in the piston app. Isn’t this affecting the execution of the overall app?
Just an uneducated guess, but would it be possible to add this library into the Hubitat environment, to ensure better compatibility with webCoRE?

1 Like