maximkulkin / esp-homekit

Apple HomeKit accessory server library for ESP-OPEN-RTOS
MIT License
1.11k stars 170 forks source link

Integration with MQTT #49

Closed pburgio closed 5 years ago

pburgio commented 6 years ago

Hello,

I am trying to integrate the HK server to make it work side-by-side with an MQTT client. Unfortunately, when I run both the modules, the HK server gets stuck (doesn't even start, at least, it seems so to me..)

Did anyone ever tried to do so, or to make it work, say, with some kind other "client module", such as for instance HTTP?

Best Paolo

user623523 commented 6 years ago

I did an integration with my home automation system, which in turn uses MQTT.

I'm sending text notifications from my HA system to esp-homekit, so I had to add an additional socket that esp-homekit monitors. Depending on how your MQTT library works you need to drive both HK and MQTT, so you can't have one block the other.

I've used the lwmqtt library and it can be used in a non blocking fashion, so perhaps you could look into that.

fanlessfan commented 5 years ago

Could we have an MQTT example in esp-homekit-demo?

fanlessfan commented 5 years ago

@user623523 Could you share your sample code with non blocking fashion? thx

maximkulkin commented 5 years ago

There are no plans for a MQTT integration