SHELLY DIMMER GOES HOMEMATIC - WITH ORIGINAL FIRMWARE

    • Offizieller Beitrag

    Hello Homematic Friends,


    to integrate the Shelly Dimmer into Homematic, you do not need any third-party firmware, that you have to flash.

    Below my solution with the original firmware:

    techn. Requirements:

    • compatible with the Homematic systems CCU2, CCU3, Charly, as well as all offshoots like RaspberryMatic and piVCCU.
    • installed add-on CUxD in current version

    (The knowledge about the handling CUxD, such as devices create, I assume at this point, otherwise "exploded" this guide Thank you for understanding.)

    The advantages from my point of view:

    • all Shelly Dimmer properties are preserved as I operate the actuators with the original manufacturer firmware
    • all future Shelly Dimmer updates / updates will be usable
    • Full Shelly app usability in parallel with Homematic automation
    • Operation as local solution or via Shelly-Cloud, additionally Homematic


    I implemented the following functions on the Homematic page:

    • #1 ON / OFF
    • #1 Optional: Switch on with predefined brightness value (%)
    • #2 Update of the current switching state in a freely adjustable interval, regardless of whether the operation is via Homematic or Shelly app or button
    • #3 Optional monitoring of current brightness value (%)
    • #3 Optional monitoring of the online status (accessibility via WLAN)
    • #3 Optional monitoring of current power (W) new! -> spicial thanks to 66er (Stefan) for helps and creation the Skript! :thumbup:
    • Dimming the lighting (brighter / darker)  -> not yet possible! We are working on it!


    A view to the connection:

    Ansicht Anbindung Dimmer.png

    I would like to recommend you to take a look at these threads before the implementation:

    At the appropriate place in the manual, everyone has to decide for themselves which route the switching status monitor wants to use. ;)


    The implementation:

    (On the description of the creation of the CUxD devices I give up at this point, of course there is the CUxD document!)

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

    Creation of a CUxD (40) 16-channel universal control as a button

    CUxD Dimmer.png

    With each channel of the CUxD device, 1 Shelly Dimmer can be mapped.


    The settings:

    CUxD Schaltkanal.png

    KEY|CMD_EXEC: Check mark!

    Settings for KEY|CMD_SHORT:

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


    Settings for KEY|CMD_LONG:

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

    Adapt the IP address of the Shelly Dimmer in each case!


    This makes the Shelly Dimmer ready for use and can be switched on and off. :)


    Optional:

    Switch on with predefined brightness value (%)

    The procedure is the same as described before, only the code changes, this is expanded.

    For this an additional channel of the CUxD (40) 16-channel universal control is required as a button. Of course, any number of buttons / channels can be created with predefined brightness values. For scene creation in programs this would be e.g. very useful!

    With a CUxD channel can be mapped two separate "Brightness button"!


    Settings for KEY|CMD_SHORT:

    Code
    wget -q -O - 'http://192.168.178.20/light/0?turn~3don~26brightness~3d40'

    example for brightness value 40%


    Settings for KEY|CMD_LONG:

    Code
    wget -q -O - 'http://192.168.178.20/light/0?turn~3don~26brightness~3d68'

    example for brightness value 68%

    Adapt the IP address of the Shelly Dimmer in each case!

    So you can activate any brightness value at the push of a button. :)


    ____________________________________________________________

    The instructions including the scripts and pictures are subject to copyright. Who violates the copyright (for example, images or texts illegally copied and published on other websites), makes itself gem. §§ 106 ff UrhG punishable, can also be warned with costs and must pay damages (§ 97 UrhG).

    © 2019 SparkyMaster

    • Offizieller Beitrag

    Update the switch-state


    The update is important, so that in Homematic the switching state is also correct, if e.g. via the Shelly app;) Pros and cons are described in # 1 linked thread.

    For the autom. Updating the switching status we need 1 timer ...

    CUxD Timer Dimmer.png

    Update every 60 seconds (time variable)


    ... that triggers the update program:

    Programm Aktualisierung Dimmer.png

    Alternatively, in the IF, it is also possible to trigger on the "Timerevent" of the timer.


    Missing only the script for the 1st THEN line:

    According to the instructions in the script have to be adapted:

    IP of the Shelly Dimmer

    CUxD Exec channel

    CUxD channel of the Shelly Dimmer


    Now, the switching state of the Shelly Dimmer is also updated in Homematic when switching via the app or Shelly scenes.:)

    ____________________________________________________________

    The instructions including the scripts and pictures are subject to copyright. Who violates the copyright (for example, images or texts illegally copied and published on other websites), makes itself gem. §§ 106 ff UrhG punishable, can also be warned with costs and must pay damages (§ 97 UrhG).

    © 2019 SparkyMaster

    • Offizieller Beitrag

    Optional ads:

    1.) Current brightness value:

    Evaluates the brightness of the Shelly Dimmer, displays it in the CUxD device and of course the value can also be used in programs.

    To display the brightness value, 1 system variable is required:

    SysVar Helligkeit Dimmer.png

    The variables are assigned to the corresponding channel of the Shelly CUxD device. This makes it visible as shown in Figure 1 in # 1.

    In the status updating program (see picture in # 2) we add a 2nd THEN line to update the brightness value data.

    Attention:

    The names of the system variables must not contain any "spaces" !

    The script for this:

    According to the instructions in the script have to be adapted:

    IP of the Shelly Dimmer

    CUxD Exec channel

    System variable (Shelly_Dimmer_Vivian_Helligkeit)


    In the set interval of the timer, the current brightness value is now updated. :)


    2.) Online Status:

    As with all other couplings, the opt. display of the online status is also made using the system variable and CUxD ping device (28).

    To display the online status, 1 system variable is required:

    SysVar Onlinestatus Dimmer.png

    The variable is linked again to the corresponding channel of the CUxD device and thus displayed there.

    The online status is monitored and controlled by a CUxD ping channel. That, with 1 CUxd Ping device (28) up to 16 Shelly Dimmer can be monitored. Of course, a free channel of an existing CUxD ping can be used.

    CUxD Ping Dimmer.png

    Adjust IP!

    Settings for: SWITCH|CMD_EXEC_TRUE:

    Code
    extra/timer.tcl Onlinestatus_ShellyDimmer_Vivian 1


    Settings for SWITCH|CMD_EXEC_FALSE:

    Code
    extra/timer.tcl Onlinestatus_ShellyDimmer_Vivian 0

    Adapt the name of the system variable in each case! (here: Onlinestatus_ShellyDimmer_Vivian)

    In the set interval of the timer, the online status is now updated. :)


    3.) Current power display:

    evaluates the current power of the Shelly Dimmer, displays it in the CUxD device and of course the value can also be used in programs.

    For this we need 1 system variable for the current power values:

    SysVar Leistung Dimmer.png

    The variables are assigned to the corresponding channel of the Shelly CUxD device. This makes it visible as shown in Figure 1 in # 1.

    In the status updating program (see picture in # 2) we add a 2nd THEN line to update the current power values.


    Attention:

    The names of the system variables must not contain any "spaces" !

    The script for this:

    According to the instructions in the script have to be adapted:

    IP of the Shelly Dimmer

    CUxD Exec channel

    System variable (Shelly_Dimmer_Vivian_Leistung)

    In the set interval of the timer, the current power is now updated. :)


    And now good luck and fun with the implementation! :thumbup:


    ____________________________________________________________

    The instructions including the scripts and pictures are subject to copyright. Who violates the copyright (for example, images or texts illegally copied and published on other websites), makes itself gem. §§ 106 ff UrhG punishable, can also be warned with costs and must pay damages (§ 97 UrhG).

    © 2019 SparkyMaster

    • Offizieller Beitrag

    --reserve--

  • SparkyMaster 29. Dezember 2019 um 16:13

    Hat das Thema freigeschaltet.