This is my first “hack” project with a ceiling fan that has an RF frequency of 303.9. SO I used a D1 Mini and wired it to a spare remote. I’ve been able to manually send successful MQTT requests to the fan but all of my requests through the lovelace setup “below” end with MQT: stat/Office_Fan/RESULT = {“Command”:“Unknown”} in the Tasmota console. Could someone tell me what I’ve done wrong? Special thanks to Controller DC fans / Fan light combo - RF controlled for providing an example of how this could work.
#DC Fan Control
input_select:
fan_office:
name: Office fan
icon: mdi:fan
options:
- 'Off'
- 'One'
- 'Two'
- 'Three'
- 'Four'
- 'Five'
- 'Six'
#Automations for Home Assitant
automation:
- alias: 'Office Fan'
trigger:
- platform: state
entity_id: input_select.fan_office
action:
- service: mqtt.publish
data_template:
topic: >-
{% set topics = {'Off':'0,326,328,656,328,656,328,656,328,656,328,656,328,656,658,328,656,328,658,328,658,328,328,656,658,328,11510,326,328,656,328,656,328,656,328,656,328,656,328,656,658,328,656,328,658,328,658,328,328,656,658,328,11510,326,328,656,328,656,328,656,328,656,328,656,328,656,658,328,656,328,658,328,658,328,328,656,658,328,11510,326,328,656,328,656,328,656,328,656,328,656,328,656,658,328,656,328,658,328,658,328,328,656,658,328,11510', 'One':'0,328,326,656,328,656,326,656,328,656,326,656,328,656,654,328,654,328,656,328,654,328,656,326,656,328,11472,328,326,656,328,656,326,656,328,656,326,656,328,656,654,328,654,328,656,328,654,328,656,326,656,328,11472,328,326,656,328,656,326,656,328,656,326,656,328,656,654,328,654,328,656,328,654,328,656,326,656,328,11472,328,326,656,328,656,326,656,328,656,326,656,328,656,654,328,654,328,656,328,654,328,656,326,656,328,11472', 'Two':'0,328,328,656,328,656,328,656,328,656,328,656,328,656,656,328,656,328,328,654,658,328,328,656,656,328,11476,328,328,656,328,656,328,656,328,656,328,656,328,656,656,328,656,328,328,654,658,328,328,656,656,328,11476,328,328,656,328,656,328,656,328,656,328,656,328,656,656,328,656,328,328,654,658,328,328,656,656,328,11476,328,328,656,328,656,328,656,328,656,328,656,328,656,656,328,656,328,328,654,658,328,328,656,656,328,11476', 'Three':'0,326,328,654,328,656,328,656,328,656,328,656,328,654,658,328,328,656,656,328,656,328,658,328,656,328,11502,326,328,654,328,656,328,656,328,656,328,656,328,654,658,328,328,656,656,328,656,328,658,328,656,328,11502,326,328,654,328,656,328,656,328,656,328,656,328,654,658,328,328,656,656,328,656,328,658,328,656,328,11502,326,328,654,328,656,328,656,328,656,328,656,328,654,658,328,328,656,656,328,656,328,658,328,656,328,11502','Four':'0,328,328,656,328,656,328,656,328,656,328,656,328,656,658,328,328,656,328,656,658,328,658,328,658,328,11522,328,328,656,328,656,328,656,328,656,328,656,328,656,658,328,328,656,328,656,658,328,658,328,658,328,11522,328,328,656,328,656,328,656,328,656,328,656,328,656,658,328,328,656,328,656,658,328,658,328,658,328,11522,328,328,656,328,656,328,656,328,656,328,656,328,656,658,328,328,656,328,656,658,328,658,328,658,328,11522', 'Five':'0,326,328,656,328,656,328,656,328,656,328,656,328,656,328,656,656,328,656,328,656,328,328,656,656,328,11506,326,328,656,328,656,328,656,328,656,328,656,328,656,328,656,656,328,656,328,656,328,328,656,656,328,11506,326,328,656,328,656,328,656,328,656,328,656,328,656,328,656,656,328,656,328,656,328,328,656,656,328,11506,326,328,656,328,656,328,656,328,656,328,656,328,656,328,656,656,328,656,328,656,328,328,656,656,328,11506', 'Six':'0,328,328,654,328,656,328,656,328,656,328,656,328,656,328,656,658,328,656,328,658,328,656,328,658,328,11510,328,328,654,328,656,328,656,328,656,328,656,328,656,328,656,658,328,656,328,658,328,656,328,658,328,11510,328,328,654,328,656,328,656,328,656,328,656,328,656,328,656,658,328,656,328,658,328,656,328,658,328,11510,328,328,654,328,656,328,656,328,656,328,656,328,656,328,656,658,328,656,328,658,328,656,328,658,328,11510'} %}
cmnd/Office_Fan/irsend{{ topics[trigger.to_state.state] if trigger.to_state.state in topics.keys() else 'unknown' }}
payload: ""
I’ve used irrecv to sniff the codes from the remote and now I’m using irsend to hijack the remote’s 303.9 crystal. It works really well, I just can’t get it to interface with HA.