Hubitat Best Practices


#1

I thought it might be helpful to have a thread to discuss some best practices for webcore on hubitat. I’ve run into some resource limitations, that seem to be due to piston design, which ultimately caused my hub become unresponsive.

I changed my lighting automations from “if motion is active” to “if motion changes to active” and this seems to have made difference.

does anyone else have any thoughts on how to best write pistons so they minimize overhead on the hub?


#2

From a coding perspective I write my if statements to target specific situations. So instead of doing “if on then do A else do B” I would do something like “if on then do A else if off then do B else do C”.

I found in a number of situations a switch would not be on or off but be something else like offline which caused me headache with debugging why lights were turning on randomly.


#3

well, I’ve learned that you need to be super aware of triggers vs conditions. I suppose this is pretty basic and just good practice with webcore period, but hubitat can really get bogged down if you don’t pay attention to this.