Integration Schellenberg

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

Hey again,
do you have any other idea why it might not work? It can’t be the model of the roller shutter motor, isn’t it the latest model with radio / smart home functionality? Thanks a lot for your help.

HI there,

your issue is the MQTT connectivity.

  • The Smart Friends bridge does communicate with the Box. That’s OK. :ok_hand:
  • The Smart Friends bridge does NOT receive any messages from the MQTT broker. That’s your problem.

Did you cross-checked the MQTT config? Basically there are 3 major steps as specified in the MQTT mosquitto add-on documentation:

  1. installation of the MQTT Add-on
  2. create MQTT users
  3. add MQTT integration: configuration > integration > Add integration “MQTT”

The MQTT integration page is useful and if you don’t have any client, you can use it instead.
Go to Integration page and open MQTT > Configure.

There you’ll be able to simulate your cover actions, try to open cover from there:

  • topic = schellenberg/device/value/update/***** <==== device for open/close
  • payload = 0 or 1 or 2

At the same time you can listen to all bridge related topics: schellenberg/device/value/#

If you still not able to get it working, send me a message in private… I’ll help you further if needed.

Great, that helped. All 9 shutters work after I deleted the MQTT broker and reinstalled it. As a URL I did not enter myhassio.local but the IP address of the broker. Now it works perfectly.
Many thanks for your help!!!

1 Like