Shelly Duo goes Homematic - with the original firmware

    • Offizieller Beitrag

    © 2020 Stefan K. (aka 66er) All rights reserved!


    Today I can introduce the integration of the Shelly Duo into the homematic world.


    technical requirements:

    • compatible with the Homematic systems CCU2, CCU3, Charly, as well as all offshoots such as RaspberryMatic and piVCCU.
    • installed addon CUxD
      (The knowledge of how to use CUxD, such as creating devices, I assume at this point, otherwise this manual "explodes". Thank you for your understanding.)


    The advantages from my point of view:

    • all Shelly Duo properties are retained because I operate all actuators and sensors with the original manufacturer firmware
    • all future Shelly Duo updates / updates will be available
    • Full Shelly app usability parallel to Homematic automation
    • Operation as a local solution or via Shelly cloud, additionally Homematic


    I have implemented the following functions on the Homematic page:


    • Display of the switching status (ON / OFF)
    • Online status display
    • wattage display
    • Brightness and color temperature controllable and update when operated via app
    • optional operation only ON - OFF (= connection without dimming functions)


    The view of the connection:

    Gesamtansicht.png

    (The picture shows a favorite, consisting of a switch and DIM Exec device)


    I would like to recommend you, especially beginners, to take a look at this thread before implementing:


    Otherwise, as always:

    If not yet available, please create a device (28) System Exec! The commands are issued above this. (No entries are made in the CUxD-Exec!)

    If necessary, there is an

    instruction for creating the CUxD-Exec device.


    Have fun and good luck with it.:thumbup:

    • Offizieller Beitrag

    © 2020 Stefan K. (aka 66er) All rights reserved!


    The implementation:


    First of all, we need 1 channel of an existing or newly created (40) CUxD-16 channel universal control as switch for ON-OFF:

    CUxD Universalsteuerung.png

    The channel used is set as follows:

    Einstellungen Schalter.png


    Settings for SWITCH|CMD_SHORT:

    Code
    wget -q -O - 'http://192.168.1.125/light/0?turn~3doff'

    Settings for SWITCH|CMD_LONG:

    Code
    wget -q -O - 'http://192.168.1.125/light/0?turn~3don'

    Adjust IP-Adress

    So you can already switch the Shelly DUO ON and OFF. :)

    (still without feedback when switching via the app!)

    • Offizieller Beitrag

    © 2020 Stefan K. (aka 66er) All rights reserved!


    Power display:

    To display the performance, we need a system variable, which we connect to the CUxD switch channel (assign channel) so that it is displayed there:

    Leistung SV.png

    The variable is filled automatically by the script (see below).

    Thanks at this point SparkyMaster, he has given me the decisive push for evaluating the performance in the script. :thumbup:

    Next we need a system variable for the online status.

    Important:

    Online monitoring is not optional with this coupling.


    It is required to cycle the Shelly when the Shelly is switched off (switched off with a wall switch). Prevent the query and thus prevent delays in the remaining Homematic processes.

    Online SV.png

    The variable is linked to the channel of the CUxD switch so that it is displayed there.


    As usual, the monitoring is carried out by 1 channel of a CUxD ping device:

    Ping.png

    Adjust IP-Adress

    Setting SWITCH|CMD_EXEC_TRUE:

    Code
    extra/timer.tcl OS_Duo_AZ 1

    Setting SWITCH|CMD_EXEC_FALSE

    Code
    extra/timer.tcl OS_Duo_AZ 0

    Adjust the name of the system variable (here: OS_Duo_AZ)


    Now the online status is monitored and updated automatically.:)

    • Offizieller Beitrag

    © 2020 Stefan K. (aka 66er) All rights reserved!



    The sliders for brightness and color:

    If you only want to switch ON or OFF via Homematic, you can simply skip this part and do not need to create a multi-dimming device.

    Then, it is important, however, to set the appropriate parameter to "N" (no dimming device available) in the setup script below.

    If you want to use the slider, create a multi-dimming device:

    Multi-Dimm.png

    and make these settings:

    Multi DIM Einstellunge.png

    CMD_EXEC:

    Code
    wget -q -O - 'http://192.168.1.125/light/0?white~3d$1$~26brightness~3d$2

    Adjust ip-adress!

    Now you can control the color and brightness. :)

    (still without feedback for changes via the app!)

    • Offizieller Beitrag

    Update:

    So that the whole thing is really fun, the switching status and slider must of course still update, even if operated via the app. ;)

    The update interval can be chosen freely. It also makes no difference to the function whether you use a channel of a CUxD timer or the homematic internal time control.

    In the following program you simply use the selected device as a trigger (1st IF)

    Programm.png

    And finally, the script:

    At the beginning of the script, work through the "Setup" section and make any necessary adjustments.


    And now have fun with it. 8)


    ____________________________________________________________

    The instructions including the scripts and pictures are subject to copyright. Anyone who infringes the copyright (for example, pictures or texts illegally copied and published on other websites), according to §§ 106 ff UrhG punishable, can also be warned for a fee and must pay damages (§ 97 UrhG).


    © 2020 Stefan K. (aka 66er)

    All rights reserved

  • 66er 26. Februar 2020 um 13:16

    Hat das Thema freigeschaltet.
  • 66er 26. Februar 2020 um 13:16

    Hat das Thema geschlossen.