hobbyquaker / homekit2mqtt

HomeKit to MQTT bridge 🏡📱
MIT License
349 stars 71 forks source link

Need HELP to config Fan accessory #130

Closed turbidWaters closed 5 years ago

turbidWaters commented 6 years ago

Hello!

I am fairly new to both homekit and GitHub.

Thank you @hobbyquaker for this application!!

I have installed homekit2mqtt and have access to the web interface.

I have mosquito installed and working, and I am currently using it with homebridge.

I am endeavoring to add a Fan accessory (this is a Sonoff iFan02 with tasmota) and I am unable to set it up correctly. The device is working as per its specifications with mqtt and I am listing the properties below here.

The following are the mqtt topics / commands, that the fan switch responds to and uses for commands:

Setting the Fan to OFF state: Topic: cmnd/IF_Study_FanLight/FanSpeed Payload: 0

Status received when the Fan goes OFF: Topic: stat/IF_Study_FanLight/FanSpeed Payload: { "FanSpeed":0 }

Setting Fan SPEEDs: Topic: cmnd/IF_Study_FanLight/FanSpeed Payload: 1 OR 2 OR 3 i.e. When Payload is 1 the fan speed is set to Low, When Payload is 2 the fan speed is set to Medium, When Payload is 3 the fan speed is set to High

Status when a Fan SPEED is Set: Topic: stat/IF_Study_FanLight/FanSpeed Payload: { "FanSpeed": 1 OR 2 OR 3 } i.e. When fan speed is set to Low, the payload received is { "FanSpeed":1 } When fan speed is set to Medium, the payload received is { "FanSpeed":2 } When fan speed is set to High, the payload received is { "FanSpeed":3 }

Is my understanding correct as in:

I would be grateful to receive a json config from anyone who already has an understanding about adding accessories and services for the above scenario so I can add it to my config, and once I do that I should get a better idea about how to add other accessories and services using the web interface, and hopefully endeavour to add more accessories to homekit2mqtt. I understand that I can do this myself with iterative trial and error, but I have chosen to reach out for help instead of crawling up the learning curve for the very basics, going back and forth between homekit2mqtt, tasmota, homekit, mosquito, and probably nodered too!!!

hobbyquaker commented 6 years ago

You only need one fan service in your accessory. Maybe it's necessary to transform your payloads so you can control speed and get useful speed display in the Home App.

turbidWaters commented 5 years ago

@hobbyquaker thank you for your reply. I managed to it with additional logic in nodered. This question can be closed.