Zemismart Roller Shade Integration

In case someone is interested, just used did the following steps to run the script as service so it starts when reboot:

sudo nano /lib/systemd/system/rollershade.service

Add the following lines into that file:

[Unit]
Description=Rollshade
After=multi-user.target
 
[Service]
Type=simple
ExecStart=/usr/bin/python /home/pi/zemirollshade/rollshade.py

Restart=on-abort
 
[Install]
WantedBy=multi-user.target

Now we need to active the service:

sudo chmod 644 /lib/systemd/system/rollshade.service
chmod +x /home/pi/zemirollshade/rollshade.py
sudo systemctl daemon-reload
sudo systemctl enable rollshade.service
sudo systemctl start rollshade.service
1 Like

Quick question why can’t we run rollershade.py on the same RPi as homeassistant? Can we install the necessary package to run everything on one RPi device?

The main reason I run in another device is because of the limit reach of Bluetooth, my shades are located far away from my Home Assistant server! Also, not sure how to install all the things in HA because of the docker! Using a separate RPi just makes things easier! :slight_smile: RPi W is cheap enough and runs well, you don’t need an RPi 3 or 4 just a RPi W that costs $10 (~ $26 at amazon with all power supply, sd card, case, etc…)

Thanks for the input on the cost of the RPI zero w. Smart choice to cheaply control the blinds from HA without having to move the HA RPi.

hi,just found this, hope that this can be install on a esp32, so will it work o home assistant(hassio), im running home assistant on a nuc with docker and ubuntu, so i dont know if a can install this

Hi, Thanks so much for the hard work!

I have this installed on a RPi -0 w and when I send the commands I can see the pi receive them (through ssh) but the pi gives an error could not connect to device with mac (mac here) try number : 507

I haven’t set the pi up to connect it to the shade in any way - it’s obviously trying to connect to something, but I’m not sure how to get it to connect.

Thanks,

Hi
I’m trying to set it up A-ok but leave the HASSIO mqtt command to leave but the blinds don’t respond?

rollshade.py : Connected to MQTT with result code 0

mqtt
Zpráva 29 přijata na blinds/02:D1:18:C8:B8:DC v 1:54 :

open

QoS: 0 - Retain: false

Thanks

Stupid question, but where/how do I find the MAC address?

Found an old android tablet and installed a Bluetooth scanner :slight_smile:

You also can try the following command on the RPI:

sudo hcitool lescan
1 Like

Awesome, works great! Could be cool to be able to set position at some point :slight_smile: But I’m just happy that I can control this now :slight_smile:

1 Like

Hm! Looks like it’s possible, the library we are using has:

.set_position(80)

I will try to implement and I let you know!

YAY! :smiley:

1 Like

If you want to try: https://github.com/ccmtozzi/zemirollshade I updated the file, the yaml would need to have another pieces:

    position_topic: "blinds/00:00:00:00:00:00/position"
    set_position_topic: "blinds/00:00:00:00:00:00/set_position"
    position_open: 100
    position_closed: 0

Unfortunately I’m can’t see if it worked since I’m away from the room I use the blinds, but I will test it later and if it work I will fix the initial topic with these directions!! :slight_smile:

I will test today :smiley:

Unfortunately I can’t get the position to work.

I get this message in the terminal: [02:34:EC:9C:XX:XX/status] Is not a valid Mac Address

Have you had a chance to try it out yourself ?

Thank you so much for creating this solution! I have 5 blinds currently hooked up to it.
One problem I have noticed since adding more than the initial blind motor, it can take quite some time for a command to land at the motor. Looking at the log within SSH in realtime, I’ve noticed that the script struggles to connect to the motor (cannot connect to mac address), but after perhaps 2+ minutes finally connects and issues the command.

Is anyone else experiencing this?
I’m running a Raspberry Pi 3 B+

Could it be the distance between your Pi and the blinds is too far away?

Thanks for your work, @ccmtozzi! Any chance you already have succesfully tested your modifications?