I wouldn't do it the way I had set it up earlier - there is a better option now. Let's break this down
-
Talk zigbee using zigbee2mqtt -> setup your mqtt gateway and get that going using zigbee2mqtt example
-
Use node red to communicate with zigbee2mqtt - couple of options, you can google them.
I am using this - requires adding a lot of modules but worth it,
Z2M Admin Panel (flow) - Node-RED -
Wiring Node-red to maker API - use this option... this was released in Feb, I did my things in Jan. There seems to be a lot of traction around this Node-RED nodes for hubitat