Homekit-bridged + mDNS issue

Unfortunately you can't, but as a workaround for example I have some homekit only devices that communicate via bluetooth, via homebridge mqtt i have set up switches that act like triggers. In short what I did: in homekit automations, if homekit-only device turns on then trigger the homebridge switch and vice versa: If homebridgemqtt switch turns on, then switch the real homekit device on.

1 Like

Thanks for the quick reply!
Yep-I just tried what you said, works fine. Bit harder to do with the temp-sensor;-)

Thanks again👍

You can use the technique as @bakman2 described or depending on the sensors you are using additionally connect them to node-red. E.g. all my temperature/humidity, window contact, motion sensors (xiaomi) are connected to node-red via xiaomi-mqtt.

I also use philips hue which supports homekit and additionally node-red-contrib-huemagic.

Which sensors are you using?

Well, the sensors I am referring to are Elgate eve door sensor and eve degree sensor.

I have z-wave sensors on the other doors, but am trying to get rid of the z-wave altogether as I think it is too unreliable and maintenance intensive.

Therefore I got the eve sensor as I would like to go the homekit (and homebridge) way, but I hadn't thought of this issue beforehand.
I have only bought 1 eve door sensor so far, so I can still change the plan. I have no experience with xiaomi - are they ok?

I'm using xiaomi devices for months and I'm very happy.

There are several ways to add xiaomi devices to node-red. I use the xiaomi-gateway via xiaomi-mqtt.
At the moment I've approx. 30 devices (sensors).

Compared with other devices the price is amazing! see aliexpress.

Edit:

By the way I also use zwave and enocean but my intention is to replace them all and go this way:

a) xiaomi for sensors and generally input devices with battery.
b) esp8266 based devices like sonoff and shelly for actuators.

A picture to show the idea

1 Like

Ah - nice! Thanks - think I am going to go that way too. Just checked the price of the Xiaomi - it is like half price of the eve door sensors...nice:-)

One last thing...:slight_smile:
Got my current temperaturesensor coming into node-red via openhab and now I am trying to get that into homebridge via mqtt. On all the other items it has worked fine since they have all been either/or. E.g a switch or a door, so I can use a switch and a change node, to get it into the correct format for mqtt.
But how does it work with a variable, like temperature?
02
The payload in the above is like this

{"name":"Terrasse_L","service_name":"Terrasse_L","characteristic":"On","value":true}

But can't really figure out how to do it with temperature? I have added a temperature service like this.

{"name":"Temperatur","service":"TemperatureSensor"}

e.g. temp = 20.5

topic:

homebridge/to/set

payload:

{"name":"Temperatur","service_name":"Temperatur","characteristic":"CurrentTemperature","value":20.5}

Edit:

Note: you didn't define the service_name when you added the accessory, so the default is the same as the name.

Ah of course-thanks, that works😃
The temperature from the sensor is output as a string- in this case something like “20.5”.

Since that value can vary, can i use a change node, to get that into the above format?
With on/off it was easy since I knew it was either/or -in this case the temp is like X (unknown).

You can insert a template between the sensor output and the mqtt-out:

{"name":"Temperatur","service_name":"Temperatur","characteristic":"CurrentTemperature","value":{{payload}}}

But this is really node-red basic, so you should invest some time to learn node-red :wink:

Jep - know what you mean. Going through the forums now - thanks again for all your help:-)

Don’t forget to look at the excellent documentation.

That's pretty much my setup too @cflurin, except for zigbee2mqtt instead of xiaomi-mqtt and xiaomi-gateway (the latter replaced by TI's CC2652R1). In addition I have Sonoffs flashed with Tasmota (MQTT) and also a Modbus-to-wifi (MQTT) gateway.

Have you elegantly solved converting the different MQTT devices to Homebridge-MQTT somehow ? Or is that a manual process when a new device is added ?

I am asking because it's tempting to use Redmatic-HomeKit (alternative to homekit-bridged in the topic) because of it's automatic creation of homekit accessories from zigbee-herdsman (if you use node-red-contrib-zigbee instead of external zigbee2mqtt (same core)), but my hope is to elegantly make my own converter from zigbee/MQTT to Homebridge-MQTT, because of the latter's stability and dynamic nature.

This in turn made me think of adopting the homie-convention for MQTT to standardise all info and states in MQTT and node-red, before attempting to automatically convert to Homebridge-MQTT.

EDIT: Didnt mean to hijack thread so started a new one for this: Thoughts on a general Zigbee to Homebridge (HomeKit) converter