Zemismart Roller Shade Integration

Tags: #<Tag:0x00007f739aa19590>

Hi,

Complete novice. Is it possible to run this on HassIO?
If not what is the best way using a RPi 0 w?

Appreciate any help here. Limited or no experience with python or linux cli.

Hi @Kaisercelt right now it needs to run in a separate machine, I’m using RPi 0 w! The best way to start from zero is to follow this guide: Monitor Install and after you have the system running install the zemirollshade using this link: Zemirollshade

How can i have the python rollshade.py still running when i close the putty window?
It works when the window is still open but not when i close it

I use nohup to keep it running, you need to guarantee rollshade.py has +x first:

chmod +x rollshade.py
nohup /home/pi/zemirollshade/rollshade.py &

Replace /home/pi/zemirollshade/rollshade.py with your full path to the file.

Thanks that works

Thanks ccmtozzi. Working my way through that now.

Thanks for help on this. Again, I’m a complete novice with home automation and CLI etc.
So far I have my RpiW0 running rollshade.py which gives me the connection “Connected to MQTT with result code 0”.

When I look at my Hassio Mosquito Mqtt log I see the correct IP connecting etc.

My question is, how do I now set up the Cover entity to control my blind??
I tried a generic MQtt Cover in Config.yaml but while it brought in the entity it remained unavailable.

An assistance would be appreciated.

The Cover entity should be:

cover:
  - platform: mqtt
    name: "Blinds Bedroom"
    state_topic: "blinds/00:00:00:00:00:00/status"
    command_topic: "blinds/00:00:00:00:00:00"
    qos: 0
    state_open: "on"
    state_closed: "off"
    payload_open: "open"
    payload_close: "close"
    payload_stop: "stop"
    retain: false
    optimistic: false

Replace the 00:00:00:00:00:00 with the Mac address of your blind!

You can also send an MQTT command to ‘blinds/00:00:00:00:00:00’ with the payload open, close or stop to test it. You can find it inside “Developer Tools” / “MQTT” Publish a Packet.

Usually my start as unavailable but when I send a command it works and start tracking status.

Thanks again for the help.

That’s pretty much the Cover config I had. Copied and pasted your version exactly (with my MAc address inserted) into my Config.yaml and still the same.

The ‘State’ is still ‘Unknown’ in the Dev tools section. The filter attributes says supported features 11 and my friendly name - Kitchen Blinds.

Tried to wake it up by publishing the MQTT command also but no joy. But it does seem to work. I’m getting…


open

QoS: 0 - Retain: false ```

What do you think?

Do you get any message on the CLI? You need to keep the CLI open after rollshade.py… after is working you can run using:

nohup /home/pi/zemirollshade/rollshade.py &

That will keep things running after you close the CLI.

Sorry I made a mess of c&p of my Mqtt test results. I get the below when listening to the command.

Message 6 received on blinds/02:EB:78:D9:DA:7F at 1:22 AM:

open

QoS: 0 - Retain: false

I ssh to my Pi 0 w and it just sits with the message “Connected to MQTT with result code 0” when I run ‘python3 Rollshade.py’

Should I run ‘python rollshade/py’ instead?

After you ssh to your Pi 0 w, try to run the command in home assistant without close the Pi, see if the Pi show any status, usually you should get some message in the CLI.

Also, just to double check, are you using the latest version that is on https://github.com/stcbus/zemirollshade?

I get no response on my Pi when I run Rollshade. Just the message “connected with message 0” and no state found in Home assistant.

I’ve run the whole thing on a new Pi 0 now and the same thing happens at the same point.
It strikes me though, should I be editing the Zemirollshade file at some point to add my own Mac Address?? I just allowed the requirements file to pull these files into my config.

Thanks again for the help.

The way the script works is that it connects to the MQTT server and “listen” to a command, when a command is issue in the specific topic (standard is blinds/) it execute a command to the blind, with that you don’t need to add the MAC address directly into the script because it’s in the command itself. The odd part is that, when you issue a command in HA it should show in the script (for debug purpose), so someone the script is not getting the MQTT command. I’m away from my pc right now, but when I’m back I can show a screen with the info the script would show after a command.

What topic/parh do you have in the config file? Is it still blinds or did you change? The line is: mqtt_path = “blinds”.

I’VE GOT IT WORKING!! Thanks ccmtozzi.

Thanks so much for taking the time to go through this with me and for creating the Script etc.
I’ve no idea why it didn’t work before as I haven’t changed anything other than rebooting both my Home assistant Pi and my Pi W 0 running these files. I was playing with the native ‘Blind Engine App’ and noticed my blind doesn’t work on the timer function available there so perhaps there’s a fault somewhere on the Motor Engine.

Anyway, It’s working, I’m thrilled. Thanks.

Great news!! I bought 6 of them for my bedroom and one of them worked manually but never connected to the app, I sent an email to Zemismart and they send me a new one, great service!! So if you keep having issues you might want talk with them! :slight_smile:

Yes, I’ve emailed them to complain about the problems.

Other things I’m noticing now I have this working. When I use Home assistant to open or close it opens/closes the blind for too long and wraps the roller around itself a few times. So it’s clearly not picking out the same top/bottom settings as I have created on the unit or when I used the native app. Again, this could be a faulty unit.

I pushed it into Homebridge and similar issues occurred there. Can I set limits in a yaml file in any way, to stop the extended over running??

Again, thanks, this is brilliant, I’m a lot further down the road of of automating the house than I expected a few weeks ago!

Hi, I’m almost certain the limits are in the motor itself not in the app or the control. I usually set the limit directly in the motor (without the app), so when I push the buttons it work.

Yes, I set the limit using the instructions that came with them (without the app) and made sure I didn’t factory reset it when adding to HASS and they seem to be retained. However, I did notice issues if I kept it paired in the app.