Integration Schellenberg

Hi!
I’m using shutter belt winders from schellenberg (https://schellenberg-shop.de/produkte/rolladenantriebe/elektrische-gurtwickler/rollodrive-smart-home/2259/rollodrive-65-premium-smart-home-gurtwickler?number=22767). Currently I can control it with the schellenberg box (Smartfriendsbox --> http://www.schellenberg.de/smart-home-produkte/smart-home-steuerzentralen/smart-friends-box/detail/smart-friends-box-26000.html) and the belonging android app.
I want to integrate them into HA. Is there a way to do it?

My first idea was to do it with an alexa workaround. But I dont know, how to control my alexa devices from HA. I tried iobroker - it was quite easy to integrate alexa devices and it just works (but I dont like the iobroker-system). HA looks much better for me, nice UI on any devices. And of course, all my other devices with zigbee, z-wave, wifi and automations works perfectly - besides my shutter belt winders.

Thanks for your help or ideas!
Heinrich

2 Likes

Hi @der_heinrich,

I managed to get our Schellenberg Shutters (Rollos for us germans :wink: ) into Home Assistant by using different workarounds. It’s not perfect but it works.

In HA in looks like this:
Bildschirmfoto 2020-05-11 um 13.49.05

If you are still searching for a solution I could show you mine, just let me know.

1 Like

Hi Marcel,
I’m really glad somebody made it just now. Sure, I’m very interested! I can’t wait to see how you did it. So, give me the info.
Thanks a lot and best regards,
Heinrich

Ok, here we go. As I assuming from your initial post you are using the Alexa Skill for Smart Friends, because it is neccessary to use this, though we can trigger it over Alexa. I will try organize the steps, so everyone can understand.

1 Base to install in HA

First thing you need in HA is to install HACS. Shouldn’t be a big deal to install, you only need a GitHub token, but everything is documented there.

So with HACS installed, we can use it to install Alexa Media Player. They also describe it on the linked GitHub Page how to configure. I think the most important thing is the correct url. As I am using Alexa in Germany i use amazon.de.

2 Configure a Shutter

2.1 Alexa Routine

First we need to setup two routines in the Alexa App. One to open and one to close the Shutters.
I called one Routine “Gästezimmer hoch” and set “Alexa, Gaestezimmer hoch” as the trigger. As Action I used SmartHome, searched for the right Shutter and set the right state, in this case “offen”.


For everyone who is not speaking German: Gästezimmer --> Guestroom / offen --> open.

So for closing, I setup a second routine.

2.2 Input boolean and sensor

As we have to somehow manage the state of the Shutter in HA i used template sensors which are linked to input boolean.
This is my input boolean gaestezimmer.

gaestezimmer:
    name: Gaestezimmer
    icon: mdi:window-shutter

And the sensor, which is in state open if the input boolean is on, otherwise it is closed

  - platform: template
    sensors:
      gaestezimmer:
        value_template: >-
          {% if is_state('input_boolean.gaestezimmer', 'on') %}
            open
          {% else %}
            closed
          {% endif %}

2.3 Scripts to open and close the shutter

Now we need a script to call the Alexa Routine, which we setup prior. My Script to close the shutter looks like this:

rollo_gaestezimmer_down:
  alias: Rollo Gaestezimmer Down
  sequence:
  - service: media_player.play_media
    data:
      entity_id: media_player.marcels_2_echo_dot
      media_content_id: Gaestezimmer runter
      media_content_type: routine
  - service: input_boolean.turn_off
    data:
      entity_id: input_boolean.gaestezimmer

This Script does two things:

  1. It Calls the Service media_player.play_media with the given data. In the data we specify the entity_id (which is the ID from one of my echo dots), the media_content_id (which is the name of the routine) and the media_content_type (which specifies, that we are calling a routine)
  2. It turns off the input boolean, though the sensor will change its state to closed

My Script to open the shutter looks like this:

rollo_gaestezimmer_up:
  alias: Rollo Gaestezimmer Up
  sequence:
  - service: media_player.play_media
    data:
      entity_id: media_player.marcels_2_echo_dot
      media_content_id: Gaestezimmer hoch
      media_content_type: routine
  - service: input_boolean.turn_on
    data:
      entity_id: input_boolean.gaestezimmer

2.4 The template cover in HA

In HA we can define template covers, which I used to bring it all together.

My cover looks like this:

cover:
  - platform: template
    covers:
      rollo_gaestezimmer:
        device_class: shade
        friendly_name: "Gästezimmer Rollo"
        value_template: "{{is_state('sensor.gaestezimmer', 'open')}}"
        open_cover:
          service: script.rollo_gaestezimmer_up
        close_cover:
          service: script.rollo_gaestezimmer_down

I used the device_class: shade, as it fits best for my type. The value_template is set to use the template sensor. I couldn’t use the input boolean directly, as the state on/off would not fit. To open or close the cover it used the scripts.

As the scripts change the states of the input boolean, there is a short delay of a second or two, until the status is visible in Lovelace.

I hope this helps to integrate it to you HA. It’s real pity, that the Smart Friends Box does not have a clear API to use, but sometimes we need to do it a dirty way to have a good SmartHome.

1 Like

Great, It works! First Schellenberg Shutter is configured.

Thanks a lot!!!

Hi everyone,

I have been struggling myself with Hassio and Schellenberg products.
My target was to create a direct communication between Hassio and Schellenberg Box without third party intermediate solutions.

Schellenberg Box being a closed system I gave up and ended up using an Android Emulator (VM) with ADB sending touch command to the Emulator. Those commands allowed to virtually control the Schellenberg app.
It worked but not 100% reliable, but at least not using cloud-services.

But thanks to LoPablo who reverse-engineered a client and created the Schellenberg API with NodeJS, it is now possible to create a connection to the box and interact with it.

Starting from there I built a simple REST API on top of it, which led to the creation of the Schellenberg add-on for Hassio.

Capture

For those who are interested, more information and further instructions can be found here

Note that this works also with Smart Friends Box.
It’s the first version and I will add more features soon.

2 Likes

that’s great news.
i have integrated the repository and configured it for my smartfriendsbox. There were no problems.
But unfortunately my devices are probably not supported yet. But I can see these devices with DeviceID in the debuglog.
Can I support you for more devices with the information from the log?
I use these:
https://www.schellenberg.co.uk/smart-home/smart-roller-shutter-drives/additional-operating-elements/detail/radio-receiver-module-20030.html
https://www.schellenberg.co.uk/smart-home/smart-roller-shutter-drives/wireless-roller-shutter-belt-drive/detail/rollodrive-65-premium-22767-6.html

Great job!

Heinrich

Mistake on my part. I only had to take version “v1” and I could control the devices.

Great to hear that!

I was checking the RolloDrive devices and just saw your reply.
In the internal configuration I saw that they are operated with the same values (up / down / stop). Same as for the standard roller shutters.

V1 is for the first generation which are not bidirectional, the box sends a command but does not receive any feedback from the device. This means you cannot know the exact position of the Rollos.

Schellenberg released the second generation of devices this year.
Example: 21106, 21107, 21110, 21111, 21210, 21211, 21220, 21221, 21240, 21241

There will be support for positioning of first gen devices also. The positioning (in %) will be driven from the add-on and memorized there. I’ll keep you posted in the next days.

Now I have tried to integrate all my blinds into HA. Strange behaviour: Some can be operated correctly as expected. Others react with every action in HA by moving up.
I bought all devices at the same time and so they should be the same batch. It is definitely the old version v1.
Here is the log from a belt winder that does not behave correctly. Maybe you have an idea :wink:

Rolling Shutter STOP command received for device: 13968
2020-07-22T17:13:49.626Z [SmartSocket] Recieved Data: { "response" : {  }, "responseCode" : 1, "responseMessage" : "success" }

2020-07-22T17:13:52.555Z [SmartSocket] Recieved Data: { "currentTimestamp" : 20200722191352, "response" : { "counter" : 0, "deviceID" : 13968, "masterDeviceID" : 5577, "value" : 0, "valueTimestamp" : 20200722191352 }, "responseCode" : 2, "responseMessage" : "newDeviceValue" }

2020-07-22T17:13:53.178Z [SmartSocket] Send Command: {"command":"keepalive"}
Rolling Shutter GET POSITION command received for device: 14268 (current position => 100)
Rolling Shutter GET POSITION command received for device: 3920 (current position => 100)
Rolling Shutter GET POSITION command received for device: 5114 (current position => 100)
Rolling Shutter GET POSITION command received for device: 8840 (current position => 0)
Rolling Shutter GET POSITION command received for device: 9951 (current position => 0)
Rolling Shutter GET POSITION command received for device: 16106 (current position => 100)
Rolling Shutter GET POSITION command received for device: 13968 (current position => 0)
2020-07-22T17:13:58.176Z [SmartSocket] Send and Recieve Command: {"command":"setDeviceValue","sessionID":"PBFQPNoa5TMJfMYmpOwI","deviceID":13968,"value":1}
Rolling Shutter OPEN command received for device: 13968
2020-07-22T17:13:58.179Z [SmartSocket] Send Command: {"command":"keepalive"}
Rolling Shutter Positions saved to file: ./positions.json
2020-07-22T17:13:58.198Z [SmartSocket] Recieved Data: { "response" : {  }, "responseCode" : 1, "responseMessage" : "success" }

Rolling Shutter GET POSITION command received for device: 14268 (current position => 100)
Rolling Shutter GET POSITION command received for device: 3920 (current position => 100)
Rolling Shutter GET POSITION command received for device: 5114 (current position => 100)
Rolling Shutter GET POSITION command received for device: 8840 (current position => 0)
Rolling Shutter GET POSITION command received for device: 9951 (current position => 0)
Rolling Shutter GET POSITION command received for device: 16106 (current position => 100)
Rolling Shutter GET POSITION command received for device: 13968 (current position => 100)
2020-07-22T17:14:01.032Z [SmartSocket] Recieved Data: { "currentTimestamp" : 20200722191401, "response" : { "counter" : 0, "deviceID" : 13968, "masterDeviceID" : 5577, "value" : 1, "valueTimestamp" : 20200722191401 }, "responseCode" : 2, "responseMessage" : "newDeviceValue" }

2020-07-22T17:14:03.179Z [SmartSocket] Send Command: {"command":"keepalive"}

Heinrich

Hello Everyone,

I was quite happy to find the Schellenberg products today online so I could control my blinds without actually changing them :slight_smile: but I was even happier to find this thread because this means that using home assistant I could even automate them :smiley:
However could you please confirm that I would need the Smart Friends box for this? (I am assuming that I need it as well as this is not even zigbee, it is some closed system).

Thanks!
B

1 Like

Hello,

yes you need one of those:

  • Smartfriends Box
  • Schellenberg SH1 Box (some functionality missing, position for instance)

I definitely recommend the SmartFriends Box.

There is also an “hardcore” alternative: using a Schellenberg USB Stick, which is not more for sale. But can be found on ebay. So first you need to find it. Then on Github there was a project (perhaps still is) where opensource code has been written to interact with the USB Key… It is more complex to get it up and running… but the end result: you only need to plug a simple USB stick to interact with Schellenberg devices.

1 Like

Hello Heinrich, sorry for this very late reply… Wasn’t receiving any notification.
Did you finally managed to get it working?

Hello! Is this the one you are referring to? https://www.amazon.de/-/en/Schellenberg-21009-SmartHome-Wireless-Controlling/dp/B0784NSF6S

Thanks!
Botond

1 Like

Yes indeed it is this one… I confused with another stick from Rademacher (different brand). This one is still on sale.

About the project, you can find more information here: https://github.com/LoPablo/schellenberg-qivicon-usb

But personally never took that path… but it could be interesting.

2 Likes

Hi airthusiast,

I’m considering getting Rollotron 75 Premimum. Preferred solution would be using the Schellenberg USB stick with my Raspberry PI. I’m willing to write some Python code for a custom integration. Whilst I’m still a newbie, I was able to write an integration for Modbus RTU devices using a USB stick… so there’s hope :slight_smile: .

  1. Is the Rollotron 75 Premium also sending feedback signals?
  2. Any idea, how to get them via the USB stick?
  3. Did you actually try the described USB stick solution yourself successfully?

Many thanks,
Matthias

Hello magicmatt007,

I guess you are talking about Rollodrive 75? Rollotron comes from Rademader, which will not communicate with the Schellenberg USB Stick.

The Schellenberg Rollodrive 75 Premium can be controlled remotely via the App (using the Box). I just checked the product page, it states that it is possible to put it in the desired position as well. So I would say yes. There should be feedback signals sent back to the box, in order to know the current position of the rollodrive. (To be confirmed by someone owning one.)

I never tried the USB solution, only via Smart Friends Box (and Schellenberg Box SH1) using the Schellenberg Addon for Hassio.
It should be possible using the USB stick, but I have no clear answer to that. LoPablo (https://github.com/LoPablo) has certainly more answers to that. I would try to contact him directly.

Good luck with your custom Hassio integration :+1:

Don’t hesitate to share :wink:

Yes, I meant Rollodrive :slight_smile:

I asked Schellenberg if they are willing to share the API for their USB stick. They said, they are discussing if they would do so in future, but at the moment it’s a “no”.

So I’m not so sure, if I’m willing to buy those relatively expensive actuators, without being certain if I can integrate them in HA with a USB stick. Btw: Homematic seems to be much more open with their platform, but unfortunately don’t have a suitable product for me…

1 Like

Hi together, I’m a bit hyped because of the Add-on. But something is not running fine and I wanted to know if anybody else has seen this.

After starting the Add-On everything runs fine but after a few Minutes I get these log entries:

2020-11-11T11:43:24.973Z [SmartSocket] Error: read ECONNRESET
2020-11-11T11:43:24.978Z [SmartSocket] Error: read ECONNRESET
2020-11-11T11:43:24.987Z [SmartSocket] Socket Close

2020-11-11T11:23:51.855Z [SmartSocket] Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed

When I try to trigger the api again I get this:

(node:185) UnhandledPromiseRejectionWarning: timeout
(node:185) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:185) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Has anybody experienced the same?

Hello,

there could be a few explanations, I’m thinking for instance:

  • your Schellenberg Box (or Smart Friends Box) is rejecting the session, and not allowing new connections to be made. Do you use the same user account on your mobile app and on the Hassio Addon? Connecting with the same account disconnects user from the other device and vice-versa.

  • does this happened once, or is it easy to reproduce? Temporary network issue between Hassio and the Box…?

  • the Box itself is having trouble. Any update made to the Box lately? New devices, or any update perhaps?

I already had the same behavior once during tests. For some reason the Box was running very slow and I had to increase the timeout to 60 secs. (default is 5 sec). Unfortunately this is hard-coded in the SchellenbergAPI, currently not customizable via config.