PixelBlaze integration with Home Automation

To make long story short.
I am planning to use PixelBlaze with my Hubitat Elevation (HE) Home Automation controller.
Thanks to @zranger1 the HE Driver already exist and Jon even made some updates in
order to propagate digital io pin status from PB all the way to HE.
I just tested this setup successfully.

There is a very simple code required on the PixelBlaze side:

export var digitalIn
var dititalIn_Pin = 26
pinMode(dititalIn_Pin, INPUT_PULLUP)

export function beforeRender(delta) {
  digitalIn = digitalRead(dititalIn_Pin)

export function render(index) {


My question is:
Is it possible to run this (or whatever) code globally (i.e. outside the specific pattern)
or I must include the same code in each pattern to be used with HE?

Most likely the answer is “NO” but just in case I am asking.

Short answer is “not yet, perhaps one day”

For now, you need to add it to each pattern.

1 Like

What does this code let you do? I’ve been using the Hubitat driver, but never used this.

This PB code allows to check periodically (once per render period) status of a physical
PB pin(s) and update an exported variable accordingly.
In this case the updated HE Driver allows to check PB pin(s) status and use it in the HE RM.
(There is no Trigger Event generated, the RM needs to do some sort of polling.)

This feature is not yet in the released V2 HE Driver but will be soon in the updated
version. Many Thanks to @zranger1 for doing this.

You may have a question why do I need this in a first place?
One of the PB is used as a Balcony Lights controller managed by HE.
I already have ZWave battery powered Water Sensor which is used as a Rain Sensor.
Generally I don’t like battery powered devices/sensors.
With the option to use a PB physical pin(s) with HE I can remove this ZWave sensor
and use a PB for Balcony Lighting and Rain Sensor. It will be one less battery
powered device. More ideas are on the way.


Just released the updated driver that supports these features, along with a few small bug fixes and performance improvements. It’s available from my Github repository, or via the Hubitat Package Manager.

The main improvements for v2.0.2 are:

  • Expanded compatibility with Hubitat’s Rule Machine and other automation tools - Many more custom actions and attributes are now visible to RM.
  • The Hubitat can now use variables exported from Pixelblaze patterns - use getVariable(var name) to read the variable from the Pixelblaze, then use the getVariableResult attribute to pass the variable to your HE automations.

Just updated my HE and tested the v2.0.2 driver.
Everything looks good, no single error logged.

Excellent job!

Thank you very much for all your help and support!

Happy Holidays!,

  • Vitaliy
1 Like