Rollease Acmeda Automate Pulse hub integration

Hello all -

OK, I’m making slow but encouraging process here.

The code is not ready for serious use yet, by any means, but I have now managed to raise and lower my Rollease blinds from Home Assistant.

Basically, it’s a script which connects to the Hub over RS485 and to an MQTT broker. Position updates from the blinds are fed to MQTT, and commands from MQTT can be used to make the blinds open, close, stop or move to a particular position.

It may still be a while before it’s properly tidied up and usable as a Hass.io plugin - I’m not too proud of the code yet - but it’s becoming fun to play with. Any developers who have Python 3.7 and aren’t frightened of asyncio are welcome to have a look and suggest improvements!

Details here on github.

Quentin

Thanks for doing this. Looking forward to a possible Hass.io plugin.

OK, I have it running here as a Hassio addon, and it’s working nicely. I woke up this morning and opened all the blinds in the house using the HomeAssistant iphone app. This means I can start thinking about things like sunset-based automations, and opening the blinds when there’s motion in the room after sunrise.

If anyone wants to try it and has the necessary hardware, you can install it as a local add-on as per the add-on tutorial. Just copy the contents of the git repository into a local add-on directory.

The main things still to do are to make it more robust if there are errors, blinds going offline, etc and to make it available as a proper add-on. I’ll probably eventually split it into two git repositories: a separate rollease2mqtt package that others can use, and a homeassistant-rollease one with the add-on configuration.

More soon.
Q

FYI Rollease is about to release version 2 of their hub. See https://www.rolleaseacmeda.com/au/products/product-detail/automate-pulse-2 and https://www.rolleaseacmeda.com/docs/default-source/au/automate-controls/automate-pulse-2/pulse-2-qrg.pdf?sfvrsn=a258e93c_4

Yes, I did see that appear - it’ll be interesting to see what it offers. I note that it doesn’t have the RS485 interface any more, so I hope it offers some network-based alternative. I think it must, since they still talk about integration with things like Control4.

That may well be the easiest way to go once it’s actually available!

The documents for the Control4 interface state “The Automate Pulse Hub 2 supports Ethernet Cable (CAT 5) and Wireless Communication 2.4GHz) for home automate integration using the RJ45 port conveniently located on the back of the hub. Each hub can support integration of up to 30 shades.”

Hi,
Thanks for your work on this plugin.
I got the adapter, wired everything up, installed the plugin and it is almost working.
I have 7 blinds and only the first one is working and I am pretty sure that the startup error message is the problem as per below. Is it a timing issue?
thanks

INFO:__main__:Connecting to hub using device /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
INFO:rollease:Ask hubs to report in
INFO:rollease:Watching for serial updates
INFO:__main__:Pausing for 10 secs to allow blinds to respond
INFO:rollease:Registering hub 001
INFO:rollease:Requesting motor info for hub 001
INFO:rollease:Got address message from hub 001
INFO:rollease:Registering motor 001 on Hub 001
INFO:rollease:Requesting position info for motor 001 on hub 001
INFO:rollease:Recorded version of Hub 001 motor 001 as 'D00'
ERROR:asyncio:Task exception was never retrieved
future: <Task finished coro=<AcmedaConnection.monitor_updates() done, defined at /rollease.py:300> exception=UnicodeDecodeError('utf-8', b'!001D002\xf6!001D002vD00;', 8, 9, 'invalid start byte')>
Traceback (most recent call last):
  File "/rollease.py", line 308, in monitor_updates
    async for hub, delim, resp in self.response_iter():
  File "/rollease.py", line 294, in response_iter
    res = await self._get_response()
  File "/rollease.py", line 265, in _get_response
    return resp.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 8: invalid start byte

Hi there - sorry! I missed your message!

Mmm. I’m not sure about that one… It’s late tonight, but I’ll try to look more carefully into it soon.

There are some possible issues with overlapping reads and writes, I think; I’ve perhaps made things a bit too asynchronous! I need to insert a proper queue between requests coming in from HA and messages going out on the wire. In the meantime, I’ve found that it’s working very well for me as long as I don’t send commands to multiple blinds at the same time. In my automations, I insert a 3-second delay between asking one blind to move, and asking the next one, and that solved my problems for now. I have chunks of YAML that look like:

   - service: cover.open_cover
      entity_id: cover.kitchen_window

    - delay:
        seconds: 3

    - service: cover.open_cover
      entity_id: cover.bathroom_window

    - delay:
        seconds: 3

Anyway, that may not be your issue, but it might be worth trying to insert a short pause or two…

Quentin

Thanks for the reply.
Actually, the error msgs that I posted are when starting the add-on. I have since tweaked the code slightly (with my very primitive py skills) to prevent the errors. I can get my shades to open/close and like you suggested I have a delay between commands although 1 second was enough.
Thanks for your work on this.

1 Like

OK, I’ve finally managed to find the time to build this as a proper Hassio add-on.

(I’ve also added a 1-second delay between outgoing motor commands, so inserting extra delays may be unnecessary.)

You should now be able to go to the Add-on Store, and add a new repository:

https://github.com/quentinsf/rollease2mqtt

After which you should find that the add-on is available to your system.

Lots of room for improvement to the code, but it’s working pretty well for me now…

Oh, but @fantangelo, and anyone else who may have tried it so far, please note: the root MQTT topic has changed, and the covers now appear under ‘homeassistant’ rather than ‘home-assistant’, which is much more standard.

You’ll need to adjust your configuration.

thanks for doing this!

Would it be possible to update the add-configuration settings to pass the mqtt username/password as hassio secrets instead of in the open? Instead of passing the raw connection string, maybe do something like this

{
  "mqtt_host": "192.168.0.31",
  "mqtt_user": "hassio-mqtt",
  "mqtt_pass": "!secret mqtt_password",
  "mqtt_topic": "homeassistant",
  "device": "/dev/serial/by-id/usb-Silicon_Labs_CP2104_USB_to_UART_Bridge_Controller_018DF044-if00-port0"
}

Guys I don’T know if you still need this but in my case what I did was to tap into the RS485 interface of the hub and then used a DT-06 (wifi-to-ttl) in order to control the unit remotely…
Have a look here :
http://forum.micasaverde.com/index.php/topic,123000.msg446947.html#msg446947

cheers !

1 Like

Got my hands on a pulse 2 (finally) I have three motorised blinds at home, wasn’t going to dive down the rabbit hole until I got these working then I will probably buy more.

At present the app is clunky but functional - looking forward to trying to get it working with home assiatant. It detected in HA automatically as a homekit device


but I couldnt pair with the number on the sticker - appparently the integration wants to see a code like XXXX-XX-XXXX but my code is just 1234 1234 format - wondering when i get more time if i scanned the QR code if it may actually have the other digits hidden?

I got my pulse 2 hub as well and was able to successfully pair it with HA using the HomeKit integration. The integration does ask for XXX-XX-XXX and the sticker has 1234 1234, but I just entered the numbers in the integration as 123-41-234 and everything worked flawlessly. I have 6 roller shades and they all show up in HA. I can open and close the rollers, plus set a position. They simply show up as a cover type entity.

The battery level is missing from the entity right now, but that’s something that I can work with.

cover.front_winder_roller 	open 	current_position: 97
                                        friendly_name: Front Window Roller
                                        supported_features: 7
1 Like

Hi all,

Good news, I’ve got a version 1 hub and have managed to reverse engineer the direct interface that the iPhone app uses to communicate directly with the hub. I’ve published a python module that includes a fairly basic demo app. The demo app discovers any hubs on the local network and provides basic up/down/stop/moveto control of blinds.

I also am fairly well progressed in creating a home assistant add-on but for now need people with a hub and a basic level of python skills to test out the module to confirm it works for them.

You can checkout the module and demo from github here:

Any feedback appreciated.

2 Likes

Forgot to mention, I have absolutely no idea if this will work with the pulse 2.

This is great work.
How would I go about implementing this on HA Supervised (aka hass.io), running on a NUC?
thanks

Good work! Looks nicely-written, too.

At the moment, I’m afraid, it doesn’t discover my hub, though it’s clearly seeing some UDP traffic - I get messages starting, for example, with:

WARNING:aiopulse.hub:Unknown type: b'62000091'...
...
WARNING:aiopulse.hub:Unknown type: b'04000091'...

These look as if they might be of the right form for the things you’re expecting, but not actually one of the anticipated responses…

I can send more info if it would help.