Integration Schellenberg

Update:
So I just made a few tests by doing connections/disconnections in a loop, and I’m getting exactly the same issue, but randomly.

Question:
Do you sometimes have a blank screen when starting the official Schellenberg or Smart Friends App?

I sometimes have this issue: the app starts, shows some logos and then freezes on a blank screen with no information.
Solution: restart the mobile app 2-3 times in order to be able to login. (I’m talking about the official app.)

On the Schellenberg API, increasing the timeout does not resolve anything. I can wait over 60 secs, the Box simply does not reply anymore and timeout still occurs.

The blank screens on the official App and the timeouts on the Schellenerg API could have the same root cause. Happens randomly and is always fixed with a few retries.

Hi @airthusiast,

I had some contact with the Support of “Smart Friends” and Schellenberg. Apparently our Box had some issues (we had to restart the box quite often because it stoped working). They send us a new Box and it runs fine. The Support also told me, that this happens quite often, as the build in storage fails.

Thanks for the feedback @MarcelNullVier.

2 years back, I also had an issue with Schellenberg SH1, it stopped working and LED kept blinking forever. Also got a replacement for it, but without further explanation from Schellenberg Support.

Internal storage issues? I’m having a few concerns regarding the reliability of these Smart Friends / Schellenberg Boxes.

Home centers, whichever they are, must be reliable, otherwise they’re useless. It’s intended to be “the brain” of your home.

The worst part, Schellenberg sell them by highlighting the “home-security” aspect, with anti-burglar devices, like window security handles, motion sensors, etc. etc…

A lot of people rely on these boxes for security purposes. People get fooled into thinking it can replace, a real robust and proper home security system…

Imagine being on vacation and the box stops working for whatever reason… It breaks down, and then what?

But anyway, thanks to Schellenberg for their good support! :+1:

That’s EXACTLY what I was trying to do with the other vendor next to Schellenberg (Rademacher, their Wireless System is called „DuoFern“ operating at 433 MHz and there also was a USB Stick).

I am so happy that I find this thread. Has someone achieved the integration using the usb stick and belt winders only?

I really don’t want any other additional bridge.

1 Like

Hi all,
I got now a working Smartfriends Box with 21110 shutters.
I got the Schellenberg add-on and configured it in HA.
From the SmartFriends App I can set the position and read it as well.

I can send the commands UP/STOP/DOWN but I can’t send the position or get the position.
If I try to get the possition I get a -1 back.

curl http://127.0.0.1:8181/rollingshutter/v2/getposition/8334
-1

some logging :

Rolling Shutter GET POSITION command received for device: 4161 (current position => -1)
Rolling Shutter GET POSITION command received for device: 8334 (current position => -1)
2021-01-13T23:02:38.829Z [SmartSocket] Send and Recieve Command: {"command":"setDeviceValue","sessionID":"XXXX","deviceID":8334,"value":80}
Rolling Shutter SET POSITION command received for device: 8334 (new position => 20)
2021-01-13T23:02:38.840Z [SmartSocket] Recieved Data: { "response" : {  }, "responseCode" : 1, "responseMessage" : "success" }
2021-01-13T23:02:41.549Z [SmartSocket] Send Command: {"command":"keepalive"}
Rolling Shutter GET POSITION command received for device: 4161 (current position => -1)
Rolling Shutter GET POSITION command received for device: 8334 (current position => -1)

any hint how what I could missed please let me know.

Hello,

I just noticed, that it is not clearly specified in the documentation.
For positioning there is a dedicated device with its own ID.

One device for Stop / Up / Down and another for positioning.

To find it:
A physical device can have multiple devices grouped by masterDeviceID.
First find the masterDeviceID of your roller shutter:

Device found:
 > deviceID:          4161
 > masterDeviceID  :  12332 <========= HERE
 > masterDeviceName:  Roller Shutter
 > deviceName:        Motor
 > deviceDesignation: Rohrmotor PREMIUM V2

Then look for a device called Position, which is linked to the same master device:

Device found:
 > deviceID:          11127 ============> DEVICE FOR POSITION GET/SET
 > masterDeviceID  :  12332
 > masterDeviceName:  Roller Shutter
 > deviceName:        Position
 > deviceDesignation: ${SchellenbergPosition_Dual}

Important notice: there have been some changes in the latest version of Smart Friends Box software, current position values are now passed to the client in a different format (getposition). Depending on the type of box and installed firmware, the GET operation might still not work.

Hello airthusiast,

thanks for the quick and good response.
I saw this already but as you said the get position isn’t working so wasn’t testing the set position.
the set position is wrong - so if I set 11% it will set it to 89% and so on.
on the get position I only get a -1 as well.

I guess I got the latest version as I installed it 2 days ago.

Thanks

Ok no worries. There is a simple fix for this, with a new addon: Smart Friends Bridge

image

Advantages:

  • uses MQTT instead of REST Api, no more polling to get current value, but instant update
  • can be used by any HA platform supporting MQTT (not only Hassio)
  • its generic, simplified and can be used for any device, not only Roller Shutters.

Already using it for months but haven’t published it yet.
Will try to do it this weekend. Stay tuned.

1 Like

Smart Friends Bridge is now available!

@chris80: Check at the end of the documentation, there is an example on how to setup a Schellenberg Rolladen with positioning (new gen).

1 Like

Thanks very much it’s working!!

only one question how to get the list of all devices?
I only see it on the start of the add-on and as it also publish all the mqtt changes I can’t scroll back.
even without debug mode it’s too much so I can’t see all my devices.

found it you only need to use Portainer and check the log of the docker container, as you can show more than 100 lines.

Yes indeed the default log window only shows the last 100 lines.
And yes, only solution is to check the container logs. But still, not the easiest way, and it can be a hassle for some users…

So to simplify the task, a new feature has just been added.
Now the add-on has a web UI showing the device list:

image

You can sort the list and search, easier to find the information.
Available in v.1.1.1

That’s great now I can find all the ID’s.

it’s running great now. No issues so far.

thanks

Hi,
thanks for the great tip, I’ve been looking for a long time.

I have completed the integration of the MQTT broker and the Smart Friends Bridge and both seem to work. Unfortunately, I can’t get a connection to the shutters, at least there is no reaction when using the cover. The entity Shutter_Test is activated and the cover is added to Lovelace.

I’m not sure what I’m doing wrong, so I’ll include the associated screenshots with the individual configurations and outputs (in the following posts).

Do you have any idea what might be wrong or what is wrong?
I would be very grateful for your help.

Thanks!

Hello @RGaiser ,

you need to specify the mqtt URL and credentials:
image
Those are sample values.

If you have MQTT Mosquitto add-on running, then simply add:

mqtt:
  url: 'mqtt://<hassio ip or dns>'  # Example: mqtt://myhassio.local
  username: mqtt
  password: mysecretpassword

For the user, you have 2 options:

  • Create dedicated mqtt user in Hassio (easiest: Configuration > Users > + Add user)
  • Declare locally the user directly on the MQTT Mosquitto add-on configuration

Thank you for your quick answer.

Sadly it still does not work.

Which deviceIDs have to be entered in the configuration.yaml?
When I get the following deviceIDs for a roller shutter:

MasterDeviceID = 1812
StatusID = 2254
MotorID = 3645
PositionID = 15785

Which deviceID do I have to enter in the lines command_topic :, position_topic: and set_position_topic:?

cover:

  • platform: mqtt
    name: Shutter_Test
    device_class: shutter
    retain: false
    qos: 0

    Payloads

    payload_open: “1”
    payload_close: “2”
    payload_stop: “0”

    State

    command_topic: "schellenberg / device / value / update / ???"

    Position

    position_topic: "schellenberg / device / value / ???"
    set_position_topic: "schellenberg / device / value / update / ???"
    position_open: 0
    position_closed: 100

Configuration MQTT Broker:

logins:

  • username: mqttuser
    password: mysecretpassword
    anonymous: false
    customize:
    active: false
    folder: mosquitto
    certfile: fullchain.pem
    keyfile: privkey.pem
    require_certificate: false

Network
Container host description
1883 / tcp
1883
1884 / tcp
1884
8883 / tcp
8883
8884 / tcp
8884

Configuration Smart Friends Bridge:

connexion:
host: 192.168.1.245
port: 4300
username: Admin
password: mysecretpassword
advanced:
enableDebug: true
cSymbol: D19033
cSymbolAddon: i
shcVersion: 2.21.3
shApiVersion: ‘2.20’
mqtt:
url: ‘mqtt: //hassio.local
username: mqttuser
password: mysecretpassword

That should all fit so far or what do you think?
Do you still see an error besides maybe the wrongly used deviceID’s?

The log of the Smart Friends Bridge shows this:

Smart Friends Bridge

2021-01-26T22:49:59.176Z [SmartSocket] Send Command: {“command”:“keepalive”} 2021-01-26T22:50:04.178Z [SmartSocket] Send Command: {“command”:“keepalive”} 2021-01-26T22:50:09.179Z [SmartSocket] Send Command: {“command”:“keepalive”} 2021-01-26T22:50:14.179Z [SmartSocket] Send Command: {“command”:“keepalive”} 2021-01-26T22:50:19.180Z [SmartSocket] Send Command: {“command”:“keepalive”} 2021-01-2…


Is that okay?

Yep, with those logs, connection to the box is fine :+1:

2 questions:

  • Just to be sure… in your configuration, does your MQTT Url looks exactly like that:
    url: 'mqtt: //hassio.local' ?
    If that’s the case, you need to remove the space in the url after mqtt:

To check if the bridge is property connected and receiving messages from the MQTT broker, simply click on open/close/position on your cover within Hassio. Immediately after the click, go check the bridge logs. You need to see a message like this:

...
2021-01-27T00:29:02.871Z [String] New message on topic schellenberg/device/value/update/1223: 2
...

It indicates a new message has been received. If not, then there is an issue with the MQTT broker. In that case, download any MQTT client, for instance MQTT.fx (Windows Java Client) and test if the MQTT is working providing the same MQTT credentials.

  • The second question: regarding the deviceIDs, what exact model of Rolladen are you using?

No, there isn’t a space in the code that fits.

When I click on the arrows on my cover element, NO entry actually appears in the Smart Friends Log, analogous to your example …
(2021-01-27T00: 29: 02.871Z [String] New message on topic schellenberg / device / value / update / 1223)

Okay, then it’s the MQTT broker, I thought to myself. Which client would you choose for the Mac?

I use the following roller shutter motors:
Schellenberg No. 21240 and 22767