Open imbaimbaimba opened 4 years ago
This would be a nice feature but have no time for it right now :(
I’m currently building my HomeKit setup around zwave2mqtt. I’m using node red with this plugin to handle the HomeKit side. I currently have outlets, dimmers, and on/off switches running great.
I spend a lot of time supporting that plugin, I’d be happy to help out if you want to open an issue over there.
@crxporter Would you like to help with a PR or what else?
@robertsLando it's not a change to anything on zwave2mqtt. It's simply using the zwave messages to connect to homekit through node red. Here's what it looks like:
For those not familiar with node-red: each purple box is an MQTT connection (subscribe on the left, publish on the far right), each salmon color ƒ node is a function to adjust for the very specific commands needed in homekit, and the orange ones in the middle are homekit items.
I'll be finishing up my switches/dimmers then adding a few outlets, motion detectors, and a motor curtain. The "magic" happens in the ƒ (function) nodes. They're doing the work like changing a brightness>0 to tell homekit "on" plus a brightness and holding on to brightness for times when homekit only sends "on" instead of a brightness value.
For anyone who wants to see where I'm at currently, here's the code from nodered for my screenshot:
[{"id":"c3a7ac6.f19425","type":"mqtt out","z":"e88791ff.5a188","name":"","topic":"zwave/Bedroom/Sconce/38/1/0/set","qos":"1","retain":"false","broker":"b0dfe17d.08cb28","x":1160,"y":940,"wires":[]},{"id":"a8d1df38.50fea","type":"mqtt in","z":"e88791ff.5a188","name":"","topic":"zwave/Bedroom/Sconce/38/1/0","qos":"1","datatype":"json","broker":"b0dfe17d.08cb28","x":150,"y":940,"wires":[["3b6d6148.2f3ece"]]},{"id":"3b6d6148.2f3ece","type":"function","z":"e88791ff.5a188","name":"ZWAVE TO HK","func":"const b=msg.payload.value;\nvar newMsg = {};\nif(b === 0){\n newMsg.payload = {\n \"On\": false\n }\n}\nif(b > 0){\n newMsg.payload = {\n \"On\": true,\n \"Brightness\": b\n }\n}\nreturn newMsg;\n","outputs":1,"noerr":0,"x":420,"y":940,"wires":[["7bc93c51.c34be4"]]},{"id":"c8e82d8b.039f2","type":"mqtt out","z":"e88791ff.5a188","name":"","topic":"zwave/Bathroom/Fan/37/1/0/set","qos":"1","retain":"false","broker":"b0dfe17d.08cb28","x":1170,"y":100,"wires":[]},{"id":"99868b31.38b5e","type":"mqtt in","z":"e88791ff.5a188","name":"","topic":"zwave/Bathroom/Fan/37/1/0","qos":"1","datatype":"json","broker":"b0dfe17d.08cb28","x":140,"y":100,"wires":[["15b284c8.c60603"]]},{"id":"15b284c8.c60603","type":"function","z":"e88791ff.5a188","name":"In function","func":"newMsg = {};\nif(msg.payload.value === true){\n newMsg.payload={\n \"On\":true\n }\n}\nif(msg.payload.value === false){\n newMsg.payload={\n \"On\":false\n }\n}\nreturn newMsg;\n","outputs":1,"noerr":0,"x":410,"y":100,"wires":[["27d5abec.cc5e5c"]]},{"id":"130b70b9.4f7377","type":"function","z":"e88791ff.5a188","name":"Out function","func":"newMsg = {};\nif (msg.hap !== undefined && msg.hap.context !== undefined) {\n newMsg.payload = msg.payload.On;\n return newMsg;\n}\nreturn;","outputs":1,"noerr":0,"x":870,"y":100,"wires":[["c8e82d8b.039f2"]]},{"id":"22794e8.f5bcd32","type":"function","z":"e88791ff.5a188","name":"HK TO ZWAVE","func":"var b = context.get('b')||99;\nnewMsg = {};\n\nif(msg.payload.Brightness !== undefined){\n b = msg.payload.Brightness;\n if(b === 0){\n context.set('b',99);\n }\n else{\n context.set('b',b);\n }\n if (msg.hap !== undefined && msg.hap.context !== undefined) {\n newMsg.payload = b;\n return newMsg;\n }\n}\n\nif (msg.hap !== undefined && msg.hap.context !== undefined) {\n if(msg.payload.On === false){\n newMsg.payload = 0;\n return newMsg;\n }\n if(msg.payload.On === true){\n newMsg.payload = b;\n return newMsg;\n }\n}\nreturn;\n","outputs":1,"noerr":0,"x":880,"y":940,"wires":[["c3a7ac6.f19425"]]},{"id":"7bc93c51.c34be4","type":"homekit-service","z":"e88791ff.5a188","isParent":true,"bridge":"6bd92034.8c2118","parentService":"","name":"Sconce","serviceName":"Lightbulb","topic":"","filter":false,"manufacturer":"Honeywell","model":"39351","serialNo":"Default Serial Number","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{\n \"Brightness\": {\n \"maxValue\": 99\n }\n}","x":660,"y":940,"wires":[["22794e8.f5bcd32"],[]]},{"id":"55230060.615f68","type":"mqtt in","z":"e88791ff.5a188","name":"","topic":"zwave/Bathroom/Ceiling/38/1/0","qos":"1","datatype":"json","broker":"b0dfe17d.08cb28","x":150,"y":760,"wires":[["8c2851f1.b2363"]]},{"id":"8c2851f1.b2363","type":"function","z":"e88791ff.5a188","name":"ZWAVE TO HK","func":"const b=msg.payload.value;\nvar newMsg = {};\nif(b === 0){\n newMsg.payload = {\n \"On\": false\n }\n}\nif(b > 0){\n newMsg.payload = {\n \"On\": true,\n \"Brightness\": b\n }\n}\nreturn newMsg;\n","outputs":1,"noerr":0,"x":420,"y":760,"wires":[["99116aa8.38ce7"]]},{"id":"99116aa8.38ce7","type":"homekit-service","z":"e88791ff.5a188","isParent":true,"bridge":"6bd92034.8c2118","parentService":"","name":"Bath Ceiling","serviceName":"Lightbulb","topic":"","filter":false,"manufacturer":"Honeywell","model":"39351","serialNo":"Default Serial Number","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{\n \"Brightness\": {\n \"maxValue\": 99\n }\n}","x":650,"y":760,"wires":[["6b681390.9ac414"],[]]},{"id":"6b681390.9ac414","type":"function","z":"e88791ff.5a188","name":"with error control","func":"var b = context.get('b')||99;\nnewMsg = {};\n\nif(msg.payload.Brightness !== undefined){\n b = msg.payload.Brightness;\n if(b === 0){\n context.set('b',99);\n }\n else{\n context.set('b',b);\n }\n if (msg.hap !== undefined && msg.hap.context !== undefined) {\n newMsg.payload = b;\n return [newMsg,null];\n }\n}\n\n// if (msg.hap !== undefined && msg.hap.context !== undefined) {\n if(msg.payload.On === false){\n newMsg.payload = 0;\n return [newMsg,null];\n }\n if(msg.payload.On === true){\n newMsg.payload = b;\n return [newMsg,null];\n }\n// }\nerrorMsg = {\"payload\":\"error\"};\nreturn [null, errorMsg];\n","outputs":2,"noerr":0,"x":890,"y":760,"wires":[["427e80c7.152ae"],[]]},{"id":"427e80c7.152ae","type":"mqtt out","z":"e88791ff.5a188","name":"","topic":"zwave/Bathroom/Ceiling/38/1/0/set","qos":"1","retain":"false","broker":"b0dfe17d.08cb28","x":1160,"y":760,"wires":[]},{"id":"a308dfe5.8e183","type":"mqtt in","z":"e88791ff.5a188","name":"","topic":"zwave/Bathroom/Mirror/38/1/0","qos":"1","datatype":"json","broker":"b0dfe17d.08cb28","x":150,"y":820,"wires":[["4b45a5fd.1484ac"]]},{"id":"4b45a5fd.1484ac","type":"function","z":"e88791ff.5a188","name":"ZWAVE TO HK","func":"const b=msg.payload.value;\nvar newMsg = {};\nif(b === 0){\n newMsg.payload = {\n \"On\": false\n }\n}\nif(b > 0){\n newMsg.payload = {\n \"On\": true,\n \"Brightness\": b\n }\n}\nreturn newMsg;\n","outputs":1,"noerr":0,"x":420,"y":820,"wires":[["ff566916.becdd"]]},{"id":"ff566916.becdd","type":"homekit-service","z":"e88791ff.5a188","isParent":true,"bridge":"6bd92034.8c2118","parentService":"","name":"Mirror","serviceName":"Lightbulb","topic":"","filter":false,"manufacturer":"Honeywell","model":"39351","serialNo":"Default Serial Number","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{\n \"Brightness\": {\n \"maxValue\": 99\n }\n}","x":650,"y":820,"wires":[["27a6cf1a.bc08f8"],[]]},{"id":"27a6cf1a.bc08f8","type":"function","z":"e88791ff.5a188","name":"HK TO ZWAVE","func":"var b = context.get('b')||99;\nnewMsg = {};\n\nif(msg.payload.Brightness !== undefined){\n b = msg.payload.Brightness;\n if(b === 0){\n context.set('b',99);\n }\n else{\n context.set('b',b);\n }\n if (msg.hap !== undefined && msg.hap.context !== undefined) {\n newMsg.payload = b;\n return newMsg;\n }\n}\n\nif (msg.hap !== undefined && msg.hap.context !== undefined) {\n if(msg.payload.On === false){\n newMsg.payload = 0;\n return newMsg;\n }\n if(msg.payload.On === true){\n newMsg.payload = b;\n return newMsg;\n }\n}\nreturn;\n","outputs":1,"noerr":0,"x":880,"y":820,"wires":[["b448da1a.cc7ba"]]},{"id":"b448da1a.cc7ba","type":"mqtt out","z":"e88791ff.5a188","name":"","topic":"zwave/Bathroom/Mirror/38/1/0/set","qos":"1","retain":"false","broker":"b0dfe17d.08cb28","x":1160,"y":820,"wires":[]},{"id":"110283a.7571e7c","type":"mqtt in","z":"e88791ff.5a188","name":"","topic":"zwave/Bathroom/Closet/38/1/0","qos":"1","datatype":"json","broker":"b0dfe17d.08cb28","x":150,"y":880,"wires":[["57289807.97068"]]},{"id":"57289807.97068","type":"function","z":"e88791ff.5a188","name":"ZWAVE TO HK","func":"const b=msg.payload.value;\nvar newMsg = {};\nif(b === 0){\n newMsg.payload = {\n \"On\": false\n }\n}\nif(b > 0){\n newMsg.payload = {\n \"On\": true,\n \"Brightness\": b\n }\n}\nreturn newMsg;\n","outputs":1,"noerr":0,"x":420,"y":880,"wires":[["93c6679a.75d66"]]},{"id":"93c6679a.75d66","type":"homekit-service","z":"e88791ff.5a188","isParent":true,"bridge":"6bd92034.8c2118","parentService":"","name":"Closet","serviceName":"Lightbulb","topic":"","filter":false,"manufacturer":"Honeywell","model":"39351","serialNo":"Default Serial Number","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{\n \"Brightness\": {\n \"maxValue\": 99\n }\n}","x":650,"y":880,"wires":[["d292a57e.e25a58"],[]]},{"id":"d292a57e.e25a58","type":"function","z":"e88791ff.5a188","name":"HK TO ZWAVE","func":"var b = context.get('b')||99;\nnewMsg = {};\n\nif(msg.payload.Brightness !== undefined){\n b = msg.payload.Brightness;\n if(b === 0){\n context.set('b',99);\n }\n else{\n context.set('b',b);\n }\n if (msg.hap !== undefined && msg.hap.context !== undefined) {\n newMsg.payload = b;\n return newMsg;\n }\n}\n\nif (msg.hap !== undefined && msg.hap.context !== undefined) {\n if(msg.payload.On === false){\n newMsg.payload = 0;\n return newMsg;\n }\n if(msg.payload.On === true){\n newMsg.payload = b;\n return newMsg;\n }\n}\nreturn;\n","outputs":1,"noerr":0,"x":880,"y":880,"wires":[["1d751926.981a57"]]},{"id":"1d751926.981a57","type":"mqtt out","z":"e88791ff.5a188","name":"","topic":"zwave/Bathroom/Closet/38/1/0/set","qos":"1","retain":"false","broker":"b0dfe17d.08cb28","x":1160,"y":880,"wires":[]},{"id":"27d5abec.cc5e5c","type":"homekit-service","z":"e88791ff.5a188","isParent":true,"bridge":"6bd92034.8c2118","parentService":"","name":"Master Fan","serviceName":"Fan","topic":"","filter":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","x":650,"y":100,"wires":[["130b70b9.4f7377"],[]]},{"id":"1869ae21.7dd22a","type":"mqtt out","z":"e88791ff.5a188","name":"","topic":"zwave/Bedroom/Ceiling/38/1/0/set","qos":"1","retain":"false","broker":"b0dfe17d.08cb28","x":1160,"y":1000,"wires":[]},{"id":"ca8d1179.f470e8","type":"function","z":"e88791ff.5a188","name":"HK TO ZWAVE","func":"var b = context.get('b')||99;\nnewMsg = {};\n\nif(msg.payload.Brightness !== undefined){\n b = msg.payload.Brightness;\n if(b === 0){\n context.set('b',99);\n }\n else{\n context.set('b',b);\n }\n if (msg.hap !== undefined && msg.hap.context !== undefined) {\n newMsg.payload = b;\n return newMsg;\n }\n}\n\nif (msg.hap !== undefined && msg.hap.context !== undefined) {\n if(msg.payload.On === false){\n newMsg.payload = 0;\n return newMsg;\n }\n if(msg.payload.On === true){\n newMsg.payload = b;\n return newMsg;\n }\n}\nreturn;\n","outputs":1,"noerr":0,"x":880,"y":1000,"wires":[["1869ae21.7dd22a"]]},{"id":"a2c2ec03.4d8d08","type":"homekit-service","z":"e88791ff.5a188","isParent":true,"bridge":"6bd92034.8c2118","parentService":"","name":"Bedroom Ceiling","serviceName":"Lightbulb","topic":"","filter":false,"manufacturer":"Honeywell","model":"39351","serialNo":"Default Serial Number","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{\n \"Brightness\": {\n \"maxValue\": 99\n }\n}","x":650,"y":1000,"wires":[["ca8d1179.f470e8"],[]]},{"id":"1a5d0317.2e8bfd","type":"function","z":"e88791ff.5a188","name":"ZWAVE TO HK","func":"const b=msg.payload.value;\nvar newMsg = {};\nif(b === 0){\n newMsg.payload = {\n \"On\": false\n }\n}\nif(b > 0){\n newMsg.payload = {\n \"On\": true,\n \"Brightness\": b\n }\n}\nreturn newMsg;\n","outputs":1,"noerr":0,"x":420,"y":1000,"wires":[["a2c2ec03.4d8d08"]]},{"id":"30a1d36.724d1ac","type":"mqtt in","z":"e88791ff.5a188","name":"","topic":"zwave/Bedroom/Ceiling/38/1/0","qos":"1","datatype":"json","broker":"b0dfe17d.08cb28","x":150,"y":1000,"wires":[["1a5d0317.2e8bfd"]]},{"id":"dbaf2e30.8bd86","type":"comment","z":"e88791ff.5a188","name":"SWITCHES","info":"","x":110,"y":40,"wires":[]},{"id":"dde6008b.42b448","type":"comment","z":"e88791ff.5a188","name":"DIMMERS","info":"","x":100,"y":700,"wires":[]},{"id":"4cf13727.1c4a98","type":"mqtt in","z":"e88791ff.5a188","name":"","topic":"zwave/Kit/Ceiling/37/1/0","qos":"1","datatype":"json","broker":"b0dfe17d.08cb28","x":130,"y":160,"wires":[["efc04949.1a021"]]},{"id":"efc04949.1a021","type":"function","z":"e88791ff.5a188","name":"In function","func":"newMsg = {};\nif(msg.payload.value === true){\n newMsg.payload={\n \"On\":true\n }\n}\nif(msg.payload.value === false){\n newMsg.payload={\n \"On\":false\n }\n}\nreturn newMsg;\n","outputs":1,"noerr":0,"x":410,"y":160,"wires":[["9a5c1b6d.f448b8"]]},{"id":"9a5c1b6d.f448b8","type":"homekit-service","z":"e88791ff.5a188","isParent":true,"bridge":"6bd92034.8c2118","parentService":"","name":"Kitchen","serviceName":"Lightbulb","topic":"","filter":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","x":640,"y":160,"wires":[["a4d14ad5.0c3e2"],[]]},{"id":"a4d14ad5.0c3e2","type":"function","z":"e88791ff.5a188","name":"Out function","func":"newMsg = {};\nif (msg.hap !== undefined && msg.hap.context !== undefined) {\n newMsg.payload = msg.payload.On;\n return newMsg;\n}\nreturn;","outputs":1,"noerr":0,"x":870,"y":160,"wires":[["6b388ac5.9e6e14"]]},{"id":"a233986f.cd466","type":"mqtt in","z":"e88791ff.5a188","name":"","topic":"zwave/Kit/Dining/37/1/0","qos":"1","datatype":"json","broker":"b0dfe17d.08cb28","x":120,"y":220,"wires":[["c975fa52.b0fa98"]]},{"id":"c975fa52.b0fa98","type":"function","z":"e88791ff.5a188","name":"In function","func":"newMsg = {};\nif(msg.payload.value === true){\n newMsg.payload={\n \"On\":true\n }\n}\nif(msg.payload.value === false){\n newMsg.payload={\n \"On\":false\n }\n}\nreturn newMsg;\n","outputs":1,"noerr":0,"x":410,"y":220,"wires":[["5f8f122e.b6a0a4"]]},{"id":"5f8f122e.b6a0a4","type":"homekit-service","z":"e88791ff.5a188","isParent":true,"bridge":"6bd92034.8c2118","parentService":"","name":"Dining","serviceName":"Lightbulb","topic":"","filter":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","x":630,"y":220,"wires":[["ac87331a.621838"],[]]},{"id":"ac87331a.621838","type":"function","z":"e88791ff.5a188","name":"Out function","func":"newMsg = {};\nif (msg.hap !== undefined && msg.hap.context !== undefined) {\n newMsg.payload = msg.payload.On;\n return newMsg;\n}\nreturn;","outputs":1,"noerr":0,"x":870,"y":220,"wires":[["eae57f0e.545e08"]]},{"id":"eae57f0e.545e08","type":"mqtt out","z":"e88791ff.5a188","name":"","topic":"zwave/Kit/Dining/37/1/0/set","qos":"1","retain":"false","broker":"b0dfe17d.08cb28","x":1160,"y":220,"wires":[]},{"id":"45522e2b.ff3b38","type":"mqtt in","z":"e88791ff.5a188","name":"","topic":"zwave/Down/Office/37/1/0","qos":"1","datatype":"json","broker":"b0dfe17d.08cb28","x":130,"y":280,"wires":[["4983346c.308b2c"]]},{"id":"4983346c.308b2c","type":"function","z":"e88791ff.5a188","name":"In function","func":"newMsg = {};\nif(msg.payload.value === true){\n newMsg.payload={\n \"On\":true\n }\n}\nif(msg.payload.value === false){\n newMsg.payload={\n \"On\":false\n }\n}\nreturn newMsg;\n","outputs":1,"noerr":0,"x":410,"y":280,"wires":[["e8855d93.5870c8"]]},{"id":"e8855d93.5870c8","type":"homekit-service","z":"e88791ff.5a188","isParent":true,"bridge":"6bd92034.8c2118","parentService":"","name":"Office","serviceName":"Lightbulb","topic":"","filter":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","x":630,"y":280,"wires":[["59d71a76.5d627c"],[]]},{"id":"59d71a76.5d627c","type":"function","z":"e88791ff.5a188","name":"Out function","func":"newMsg = {};\nif (msg.hap !== undefined && msg.hap.context !== undefined) {\n newMsg.payload = msg.payload.On;\n return newMsg;\n}\nreturn;","outputs":1,"noerr":0,"x":870,"y":280,"wires":[["33458b0e.29e16c"]]},{"id":"33458b0e.29e16c","type":"mqtt out","z":"e88791ff.5a188","name":"","topic":"zwave/Down/Office/37/1/0/set","qos":"1","retain":"false","broker":"b0dfe17d.08cb28","x":1170,"y":280,"wires":[]},{"id":"296d9af9.50606e","type":"mqtt in","z":"e88791ff.5a188","name":"","topic":"zwave/Down/Living/37/1/0","qos":"1","datatype":"json","broker":"b0dfe17d.08cb28","x":130,"y":340,"wires":[["52c5578c.183278"]]},{"id":"52c5578c.183278","type":"function","z":"e88791ff.5a188","name":"In function","func":"newMsg = {};\nif(msg.payload.value === true){\n newMsg.payload={\n \"On\":true\n }\n}\nif(msg.payload.value === false){\n newMsg.payload={\n \"On\":false\n }\n}\nreturn newMsg;\n","outputs":1,"noerr":0,"x":410,"y":340,"wires":[["5f714273.000734"]]},{"id":"5f714273.000734","type":"homekit-service","z":"e88791ff.5a188","isParent":true,"bridge":"6bd92034.8c2118","parentService":"","name":"Living Room","serviceName":"Lightbulb","topic":"","filter":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","x":650,"y":340,"wires":[["ce673353.b01ec8"],[]]},{"id":"ce673353.b01ec8","type":"function","z":"e88791ff.5a188","name":"Out function","func":"newMsg = {};\nif (msg.hap !== undefined && msg.hap.context !== undefined) {\n newMsg.payload = msg.payload.On;\n return newMsg;\n}\nreturn;","outputs":1,"noerr":0,"x":870,"y":340,"wires":[["bb4e04b6.86c91"]]},{"id":"bb4e04b6.86c91","type":"mqtt out","z":"e88791ff.5a188","name":"","topic":"zwave/Down/Living/37/1/0/set","qos":"1","retain":"false","broker":"b0dfe17d.08cb28","x":1170,"y":340,"wires":[]},{"id":"ccc65428.b5c7d8","type":"mqtt in","z":"e88791ff.5a188","name":"","topic":"zwave/Down/Bath/37/1/0","qos":"1","datatype":"json","broker":"b0dfe17d.08cb28","x":130,"y":400,"wires":[["b89175d4.8b4968"]]},{"id":"b89175d4.8b4968","type":"function","z":"e88791ff.5a188","name":"In function","func":"newMsg = {};\nif(msg.payload.value === true){\n newMsg.payload={\n \"On\":true\n }\n}\nif(msg.payload.value === false){\n newMsg.payload={\n \"On\":false\n }\n}\nreturn newMsg;\n","outputs":1,"noerr":0,"x":410,"y":400,"wires":[["cfa08505.d3a2f8"]]},{"id":"cfa08505.d3a2f8","type":"homekit-service","z":"e88791ff.5a188","isParent":true,"bridge":"6bd92034.8c2118","parentService":"","name":"Small Bath","serviceName":"Lightbulb","topic":"","filter":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","x":650,"y":400,"wires":[["3c2a85e3.c9b4da"],[]]},{"id":"3c2a85e3.c9b4da","type":"function","z":"e88791ff.5a188","name":"Out function","func":"newMsg = {};\nif (msg.hap !== undefined && msg.hap.context !== undefined) {\n newMsg.payload = msg.payload.On;\n return newMsg;\n}\nreturn;","outputs":1,"noerr":0,"x":870,"y":400,"wires":[["81c4fda8.5c9508"]]},{"id":"81c4fda8.5c9508","type":"mqtt out","z":"e88791ff.5a188","name":"","topic":"zwave/Down/Bath/37/1/0/set","qos":"1","retain":"false","broker":"b0dfe17d.08cb28","x":1160,"y":400,"wires":[]},{"id":"c7059ba7.94222","type":"mqtt in","z":"e88791ff.5a188","name":"","topic":"zwave/Down/Fan/37/1/0","qos":"1","datatype":"json","broker":"b0dfe17d.08cb28","x":130,"y":460,"wires":[["ab4004ca.3206e8"]]},{"id":"ab4004ca.3206e8","type":"function","z":"e88791ff.5a188","name":"In function","func":"newMsg = {};\nif(msg.payload.value === true){\n newMsg.payload={\n \"On\":true\n }\n}\nif(msg.payload.value === false){\n newMsg.payload={\n \"On\":false\n }\n}\nreturn newMsg;\n","outputs":1,"noerr":0,"x":410,"y":460,"wires":[["b7df4b8b.b22428"]]},{"id":"b7df4b8b.b22428","type":"homekit-service","z":"e88791ff.5a188","isParent":true,"bridge":"6bd92034.8c2118","parentService":"","name":"Small Fan","serviceName":"Fan","topic":"","filter":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","x":640,"y":460,"wires":[["6b17bd73.b51f2c"],[]]},{"id":"6b17bd73.b51f2c","type":"function","z":"e88791ff.5a188","name":"Out function","func":"newMsg = {};\nif (msg.hap !== undefined && msg.hap.context !== undefined) {\n newMsg.payload = msg.payload.On;\n return newMsg;\n}\nreturn;","outputs":1,"noerr":0,"x":870,"y":460,"wires":[["36ad343a.e69d9c"]]},{"id":"36ad343a.e69d9c","type":"mqtt out","z":"e88791ff.5a188","name":"","topic":"zwave/Down/Fan/37/1/0/set","qos":"1","retain":"false","broker":"b0dfe17d.08cb28","x":1160,"y":460,"wires":[]},{"id":"6b388ac5.9e6e14","type":"mqtt out","z":"e88791ff.5a188","name":"","topic":"zwave/Kit/Ceiling/37/1/0/set","qos":"1","retain":"false","broker":"b0dfe17d.08cb28","x":1160,"y":160,"wires":[]},{"id":"b0dfe17d.08cb28","type":"mqtt-broker","z":"","name":"MQTT","broker":"10.1.1.0","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","willTopic":"","willQos":"0","willRetain":"false","willPayload":""},{"id":"6bd92034.8c2118","type":"homekit-bridge","z":"","bridgeName":"zwave2mqtt","pinCode":"111-11-111","port":"","allowInsecureRequest":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","customMdnsConfig":false,"mdnsMulticast":true,"mdnsInterface":"","mdnsPort":"","mdnsIp":"","mdnsTtl":"","mdnsLoopback":true,"mdnsReuseAddr":true,"allowMessagePassthrough":true}]
And for anyone with more questions, feel free to ask on this thread or on the node-red-contrib-homekit-bridged github page. Please mention me so I will see and I'll help where I can!
Would love this
@simplenotezy if you’re interested I’d be happy to guide you through the setup as I have built it. I’m running all my Zwave (sensors, switches, curtain, dimmer) through nodered into homekit.
Here’s a link to our nodered homekit project, if you head to the discord linked on the readme, that’s where you’ll find me pretty much every day.
Awesome @crxporter. I'll message you directly
Is your feature request related to a problem? Please describe. I currently only use Home Assistant a last resort, when I cannot get something straight into HomeKit. Would love to be able to skip HA altogether by getting Z-wave straight into HomeKit.
Describe the solution you'd like An integration with HomeKit, possibly through a HomeBridge plugin.
Describe alternatives you've considered Using the MQTT plugin for HomeBridge that already exists, but it will be a hassle to create everything from the ground.
Additional context