Mk blinds in ine home assistant


#1

since my raspberry crashed i can not restore my original version of home assistant. So i was forced to install version 105, but unfortunately original yaml file from MK Smarthouse does not work in new home assistant. does anybody knows how to configure this blinds in esphome files or knows how to configure yaml file in configurator. thanks in advance


#2

Hi, I feel for youā€¦happend to me once, then I started dumping my config to my local NB. I just migrated off a pi3, Iā€™m on a Qotom-Q555G6 as of last week for that reason. Overkill for HA but Iā€™ve had several Samsung high end SD cards fail over time and Iā€™m going to add a bunch of things as well.

I have 4 blinds, hereā€™s my config for the V4 firmware Mountain wrote.

cover:

  • platform: mqtt
    name: ā€œRight Window Blindsā€
    command_topic: ā€œblinds/utilities/blinds1ā€
    state_topic: ā€œblinds/utilities/blinds1/stateā€
    retain: true
    payload_open: ā€œ100ā€
    payload_close: ā€œ0ā€
    payload_stop: ā€œ60ā€
    state_open: ā€œ100ā€
    state_closed: ā€œ0ā€
    tilt_command_topic: ā€œblinds/utilities/blinds1ā€
    tilt_status_topic: ā€œblinds/utilities/blinds1/stateā€
    tilt_min: 0
    tilt_max: 100
    tilt_closed_value: 0
    tilt_opened_value: 100

The only problem that I havenā€™t been able to figure out is that the google integration from HA can only pass open and closeā€¦canā€™t call out a % to adjust the blinds light you would a light bulb. not sure if itā€™s my config or google integration.

I also recently updated one of my blinds to v5 that mountain just updated (Thanks Mountain!!) so I need to tweak the config when I have some time.

Good luck.


#3

thank you for your reply vez
i tried this already but nothing shows up in my overview panel or devices or entities. Use to have switch in my main overview panel that let me control blinds (with window icon). Right now i have nothing. I guess have to try version V5. Right now running version 107.7. Is there something im missing?


#4

Iā€™m running 107.7, just noticed 108 is now out. The only thing I forgot to mention earlier is that I use Mosquitto broker v4.1. If I upgrade to v5 of Mosquitto broker they no longer work with FW v4. Havenā€™t tested it with FW v5 and I havenā€™t had time to figure out why it didnā€™t work Iā€™ve left it at v4.1


#5

thanks vez but is there anyway to downgrade to mosquitto 4 for dummies like me


#6

Note on difference between V4 and V5 of blind control software.
Version 5 of blind control software follows the same format as Tasmota for its MQTT

As follows:

State topic is stat//STATE
Command topic is cmnd//POWER

The DeviceID is the MQTT Device topicā€¦
eg
BlindControl1 MQTT Device ID
stat/BlindControl1/STATE MQTT Topic
cmnd/BlindControl1/POWER MQTT Topic

the stat and cmnd are formats that tasmota uses and are coded in the software as well as STATE and POWER ā€¦note on Upper case

as in the post above for vez727
command_topic: ā€œblinds/utilities/blinds1ā€ v4 format
state_topic: ā€œblinds/utilities/blinds1/stateā€ v4 format

command_topic: ā€œcmnd/blinds/utilities/blinds1/POWERā€ v5 format
state_topic: ā€œstat/blinds/utilities/blinds1/STATEā€ v5 format

This should help in upgrading to V5 , also when going to V5 the blind control software will need reconfig via AP mode as there are extra features in V5

I am still working on V5 firmware as we speak as a few features and twiks are needed, these are only minor changes.
one of these is the ability to store MQTT payload or command so in the event of power outage or reboot the blind is in its correct state.
I have noted on power reboot that the servo motor state reports back a random number until s servo read is preformed, which gives incorrect state to HA or Openhab.


#7

thank you Mountain
definitely i will try this in few days, also im trying new esphome. Stay safe friend


#8

Version 5.01 uploaded. Minor bug fixes.
OPEN, CLOSE, ON and OFF commands coded (MQTT commands)

MK-BlindsControl V5.01


#9

just quick update.
i was able to work my blinds with esphome. i think is much easier. Thank you guys for your inputs


#10

Could you please share your esphome yaml . I agree esphome is much easier. Thanks


#12

esphome:
name: t1
platform: ESP8266
board: d1_mini

wifi:
ssid: ā€œā€
password: ā€œā€

Enable fallback hotspot (captive portal) in case wifi connection fails

ap:
ssid: ā€œt1 Fallback Hotspotā€
password: ā€œijgscP3xnIyCā€

captive_portal:

Enable logging

logger:

ota:

Enable Home Assistant API

ESPHome configuration

api:
services:
- service: control_servo
variables:
level: float
then:
- servo.write:
id: my_servo
level: !lambda ā€˜return level / 100.0;ā€™

servo:

  • id: my_servo
    output: pwm_output

output:

  • platform: esp8266_pwm
    id: pwm_output
    pin: 05
    frequency: 50 hz
    inverted: false

cover:

  • platform: template
    name: "Living Room Left Blind "
    optimistic: true
    open_action:
    • servo.write:
      id: my_servo
      level: -80%
    • delay: 150ms
    • servo.detach: my_servo
      close_action:
    • servo.write:
      id: my_servo
      level: 46.0%
    • delay: 100ms
    • servo.detach: my_servo
      stop_action:
    • servo.detach: my_servo
      has_position: true
      device_class: blind

#13

Thank you very much.


#14

Hi Tadeusz,

I am getting error message in ESPHome for has_postion:

[has_position] is an invalid option for [cover.template]??? Any idea what indentation is required for hos_position?

Thanks.


#15


#16

Thank you very much.


#17

Iā€™m on Mountainā€™s v6.06 firmware. In Home Assistant, Iā€™m able to send integer commands from the MQTT Integration settings to the blinds with success, but I have two problems:

1) I canā€™t get the Open/Close/Stop integer mappings to work. Hereā€™s my yaml config:

    cover:
      - platform: mqtt
        name: "LivingRoomBlinds"
        command_topic: "cmnd/Home/cover/LivingRoomBlinds/set/POWER"
        state_topic: "stat/Home/cover/LivingRoomBlinds/set/STATE"
        retain: true
        payload_open: "40"
        payload_close: "100"
        payload_stop: "75"
        state_open: "40"
        state_closed: "100"

2) I canā€™t get my blinds to show up a device in HA. @tadeuszā€™s solution worked. The name had to be all lower case. Thanks!

And now it appears that the Integers are working with the options under the entity. Need to create an automation with it now.


#18

Hi everyone, are there any updates to resolving the issues seen ? Does anyone have a ā€œworking configā€ to share ?


#19

what issues you are talking about


#20

Hi tadeusz, I guess I read somewhere in this thread that folk were having issues with the latest in Home Assistant and was just trying to get more info.


#21

cover blind:

  • platform: mqtt
    name: ā€œblindsā€
    command_topic: ā€œcmnd/blinds/POWERā€
    state_topic: ā€œstat/blinds/STATEā€
    qos: 0
    retain: true
    payload_open: ā€œ100ā€
    payload_close: ā€œ0ā€
    payload_stop: ā€œ50ā€
    state_open: ā€œ100ā€
    state_opening: ā€œ100ā€
    state_closed: ā€œ0ā€
    state_closing: ā€œ50ā€
    payload_available: ā€œonlineā€
    payload_not_available: ā€œofflineā€
    optimistic: false
    value_template: ā€˜{{ value.x }}ā€™
    tilt_command_topic: ā€˜cmnd/blinds/tiltā€™
    tilt_status_topic: ā€˜stat/blinds/STATEā€™
    tilt_status_template: ā€˜{{ value_json[ā€œPWMā€][ā€œPWM1ā€] }}ā€™
    tilt_min: 0
    tilt_max: 100
    tilt_closed_value: 50
    tilt_opened_value: 100
    device_class: blind

This is my file and it works for me. Make sure you not using capitol letters in the name. It will not show up in the devices, it will show up in entities only. You can use entities in automations. Also i have blind set up in home assistant esphome and i believed its much easier.