Description of the Issue
I’m currently working on integrating custom-made smart blinds with Home Assistant using an ESP32 and MQTT. My goal is to control these blinds via a slider in the Home Assistant UI and also expose this control to HomeKit for Siri integration. However, I’m encountering issues in setting up the MQTT cover in configuration.yaml
and properly exposing it to HomeKit. I am able to send commands and receive the state of the blinds properly and can control the blinds through the virtual slider I set up in Home Assistant. However, when I try to expose the slider to Homekit, it doesn’t show up. I believe that the MQTT configuration is the main issue causing it not to show in Homekit. This is the MQTT error:
Invalid config found for mqtt cover item
Home Assistant detected an invalid config for a manually configured item.Platform domain: cover
Configuration file: /config/configuration.yaml
Near line: 39
Configuration found:
platform: mqtt
name: Smart Blinds
command_topic: home/esp32/set_servo
position_topic: home/esp32/servo_position
set_position_topic: home/esp32/set_servo
payload_open: '100'
payload_close: '0'
position_open: 100
position_closed: 0
Error: extra keys not allowed @ data[‘platform’].
Make sure the configuration is valid and reload the manually configured MQTT items or restart Home Assistant to fix this issue.
Hardware and Software Details
- Microcontroller: ESP32
- Blinds Control: MG995 Servo
- Communication Protocol: MQTT
- Home Automation Platform: Home Assistant
- Intended Integration: HomeKit (for Siri control)
Current Configuration
Here is a snippet of my current configuration in configuration.yaml
for the MQTT cover:
yamlCopy code
input_number:
slider1:
name: Bedroom Blinds
initial: 0
min: 0
max: 100
step: 5
mqtt:
sensor:
- name: "Blinds Battery Voltage"
state_topic: "home/esp32/servo_position"
value_template: "{{ value.split(':')[1] }}"
unit_of_measurement: 'V'
cover:
- platform: mqtt
name: "Smart Blinds"
command_topic: "home/esp32/set_servo"
position_topic: "home/esp32/servo_position"
set_position_topic: "home/esp32/set_servo"
payload_open: "100"
payload_close: "0"
position_open: 100
position_closed: 0
automation:
- alias: "Adjust Blinds Position"
trigger:
platform: state
entity_id: input_number.slider1
action:
- service: mqtt.publish
data_template:
topic: "home/esp32/set_servo"
payload: "{{ states('input_number.slider1') }}"
- alias: "Update Battery Status"
trigger:
platform: time_pattern
hours: "/2"
action:
- service: mqtt.publish
data:
topic: "home/esp32/set_servo"
payload: "volt"
homekit:
- name: "Home Assistant Bridge"
filter:
include_entities:
- cover.smart_blinds
Request for Help
I am seeking advice or solutions on the following points:
- Correct configuration for MQTT cover in Home Assistant.
- Ensuring that the MQTT cover appears as a slider (like a lightbulb brightness control) in HomeKit.
I appreciate any insights or guidance that you can provide. Thank you for your time and assistance!