Updated March 11, 2019
New version
- Reduces thread usage by pistons significantly
- Added new functions from latest webcore
- has HE version number in addition to webcore version
Feb Release:
- Should be much faster, especially if Parallel execution is turned (left) off for your piston
- use Async http calls for http commands
- should fix HSM command issue reported
Note:
- the piston bin (backup code) is located in state and settings variables for a piston (you can see these in Hubitat dashboard by "Apps" -> select settings gear next to the application /piston.
Here is an updated webcore forked from the original in this thread.
It has quite a few changes, primarily to add pauses into long running pistons so as to not hang the hub.
This version is a bit faster in that a lot of parent/child calls have been removed, and several bugs fixed.
I also removed code for lifx, a lot of comments (that caused problems compiling/saving on hubitat).
While a noble goal to keep the source the same as ST, this is impractical because of sheer code size, and the inherent higher horsepower ST has running in the cloud (Pistons don't compete with each other as much as they do on hubitat).
Pistons that run a long time will automatically "be nice" and release the cpu so other things can run / operate.
As mentioned in other notes, it is a good idea to control your use of:
-
global variables - limit subscriptions (if you use multiple, see if you can subscribe to less variables for a trigger)
-
How many events a piston receives
-
avoid enabling parallel execution in a piston, - this should not be needed as hubitat has much less available CPU than a cloud. (and this is a big hog of hub resources)
-
I suggest you not enable log piston executions in the WebCoRE app as this adds a bit of overhead on the hub and database (this is a webcore setting; not a piston/code setting).
-
Control use of logging, both in code in your piston, and in the dashboard when enabling logging on pistons. It is a good idea to leave it on "none" once you are done debugging to reduce load on the hub and the database. (I have thought about auto turning it down, but that may be a bridge too far for some)
Notes:
-
It is a good idea to reboot your hub before installing, and let it settle the db for a few mins.
-
The storage app is not used on Hubitat, so you can just not bother installing it.
-
You only need fuel stream installed if you enable local fuel streams.