Installation How To


#1

It looks like the arduino ino file downloads are actually binary images to be flashed on to the ESP8266 and not something that can be opened in the arduino IDE.

I hope this is just an oversight.

But if this is an attempt to hide the source code to prevent copying then I would urge you to reconsider. The source will only benefit from multiple eyes on it. And I would prefer to run something that I can change and audit myself.

Either way the web site that the MK-Blinds Control kit links to is out of date. I manged to install the v2 and v501 binaries using esptool, But that relies on my prior experience with programming for ESP8266s, not something everyone has. I would be happy to provide a write up on how to install the binaries.

Also OpenHAB has changed considerably in v2. I was able to setup integration with MQTT, mosquitto, and OpenHAB through the PaperUI. It’s not obvious but might be easier than editing configuration files. I believe the instructions in the Youtube videos by MK require you to enable v1 support in OpenHAB.

It’s entirely possible that I’m just missing something. Please correct me if I’m mistaken about the source code or about how to configure OpenHAB.

It would also be nice to have documented how to test the device using only MQTT. I guessed that the command topic used a single integer to represent the tilt value and was able to test it using mosquitto_pub and watch for respones on the state topic with mosquitto_sub. Having this documented might help people getting started.

Again I’m happy to help document these things if there’s interest and it’s not documented elsewhere.


#2

@TreyDempsey I grabbed the INO from the website for the v2 and was able to open it right away in both Arduino editor and VS Code. Are you sure you grabbed the INO and not the precompiled BIN file? Or perhaps you grabbed the pre-compiled version (v501) that @Mountain posted to a different thread (Blinds with Tasmota firmware)? That version is forked and under the control of @mountain. I suggest asking kindly for the source files from that person and respecting their answer.

As for testing, I use mqtt.fx and sometimes just hash together some quick Node-Red recipes for quick proof of concept and advanced testing purposes.


#3

I’m fully aware that the V2 firmware from Matt and the V501 firmware from Mountain are different and that Mountain forked the V2 firmware to create their own versions.

I requested the source code to @Mountain firmware in the thread just prior to this.

I was mistaken and missed the link to the INO V2 file on the downloads page. I was just able to download the Arduino project file containing the source for Matt’s code.

As far as mqtt goes I think what is missing is a description of the message formats for each topic. Mqtt.fx might be great if you’re using a Mac or Windows but in my case I’m using a Linux laptop.

I didn’t need instructions for installing an mqtt client but structuring the documentation such that it describes the topic names and message formats would be useful for anyone, regardless of mqtt client or OS.

And for openhab it might be useful to update the documentation to match the newest version openhab.

And for all of the documentation moving away from a conversational style to a structured outline with a table of contents would make it easier to find what you need if you’re looking for a specific item. It would also be good to separate the how to use Unix stuff from the rest of the information.

I mention these criticisms because I am offering to help and I’m wanting to gauge interest.


#4

Thanks for the post, I have taken Matts code and added a lot of features and still developing the software, even allowing for external switch to open/close the blinds.

Below is the new config for openhab for the version I have created which works on the latest version of openhab

Blinds.things

Bridge mqtt:broker:mosquitto “Mosquitto” [ host=“192.168.0.100”, port=1883, secure=false, username=“openhabian”, password=“password”, clientID=“openHAB2” ]{

///Kitchen Door eg
Thing topic MK-BlindControl2 “MK-BlindControl1-2” @ “Kitchen” {
Channels:
Type string : reachable “Reachable” [ stateTopic=“tele/BlindControl2/LWT” ]
Type dimmer : power “Power” [ stateTopic=“stat/BlindControl2/STATE”, commandTopic=“cmnd/BlindControl2/POWER” ]
Type string : speed “Speed” [ stateTopic=“stat/BlindControl2/SPEED”, commandTopic=“cmnd/BlindControl2/SPEED” ]
Type number : rssi “WiFi Signal Strength” [ stateTopic=“tele/BlindControl2/STATE”, transformationPattern=“JSONPATH:$.Wifi.RSSI” ]

}

}

blinds.items file
//Back Door Blind

Dimmer Blind_Back_Door “Back Door Blind [%s]” (GF_Kitchen, Blinds, RollerBlind, G_Restore) { autoupdate=“false”, alexa=“Lighting”, ga=“Light” }
String Blind_Back_Door_Reachable "Back Door Blind " (LWT)
String Blind_Back_Door_Speed “Back Door Speed” (GF_Kitchen, Blinds, RollerBlind, G_Restore) { autoupdate=“false”, alexa=“Lighting”, ga=“Light” }
Number Back_Door_rssi “Back Door Blind [%d %%]” (RSSI)

sitemap

Switch item=Blind_Back_Door label=“Door” icon=“rollershutter” mappings=[0=“Open”, 50=“Half”, 100=“Close”]
Switch item=Blind_Back_Door_Speed label=“Blind Speed” icon=“rollershutter” mappings=[SLOW=“SLOW”, FAST=“FAST”]