Shelly Door/window goes Homematic - with the original firmware

    • Offizieller Beitrag
    • Autor

    ©2019 Stefan K. (alias 66er)

    Attention:

    This coupling is no longer executable with the firmware 1.6.3

    Hello everybody,

    to integrate the Shelly Door / Window in Homematic, you don't need any 3rd party firmware that you have to flash.

    Below is my solution with the original firmware:


    techn. requirements:

    • compatible with the Homematic systems CCU2, CCU3, Charly, as well as all offshoots such as RaspberryMatic and piVCCU.
    • installed addon CUxD in current version
      (At this point, I assume that I know how to use CUxD, e.g. how to create devices, otherwise this manual "explodes". Thank you for your understanding.)


    The advantages from my point of view:

    • very low price (19.90 €) compared to the Homematic original (from 29.95 €)
    • more properties can be used
    • all Shelly Door / Window properties are retained because I operate the Shelly with the original manufacturer firmware
    • all future Shelly Door / Window updates / updates will be available
    • full Shelly app usability parallel to Homematic automation
    • Operation as a local solution or via Shelly cloud, additionally Homematic


    So far I have implemented the following functions on the Homematicsystem:

    • Status display of the magnetic contact (open / closed)
    • Update of the integrated values with every transmission (battery status, brightness)
    • Optional monitoring of the cycl. reporting = failure monitoring and in case of failure e.g. email delivery


    The view of the connection:

    Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.


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


    Please follow the instructions carefully from top to bottom when copying. ;)


    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!) 


    Have fun and good luck with it.:thumbup:

    • Offizieller Beitrag
    • Autor

    Query start and (optional) failure monitoring:


    Of cause the Shelly Door / Window is also battery operated, it is only online when it is sending data.


    In order for Homematic to know the time of transmission and to update the data accordingly, we first need a system variable that is updated by Shelly when it is sent.


    This system variable (here: Shelly-MK_Ausfall_WeFi) as well as the other variables must be created in advance:

    Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.

    Now we need the actions in the Shelly Door / Window that serve as the trigger for the update process:

    Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.

    The entry:

    Code
    http://192.168.1.93:8181/x.exe?Antwort=dom.GetObject("Shelly-MK_Ausfall_WeFi").State(1)

    Adapt the IP of the CCU and the name of the system variable to your own system. ;)


    Every time the Shelly is sent, the failure variable is updated, which we can now use as a trigger for updating the values in Homematic.


    However, since failure monitoring can also be optionally implemented with this variable, let's look at this first.


    We need a free channel of an existing device "CUxD-Timer" or create a new timer

    Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.

    The time entry (preset) corresponds to 13 hours. The value may have to be adjusted later.


    (Since the official document for the Shelly Door / Window is not yet available, I assume a 12 hour interval for "routine reporting" of the Shelly.)


    And a program:

    Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.

    The timer is reset every time the Shelly has sent any data. The variable keeps the value "in order".


    (Later in this program, the values are updated via another THEN line.)


    You can do without the optional ELSEIF branch. I use it for an email notification if the Shelly fails.

    • Offizieller Beitrag
    • Autor

    Data transfer in Homematic:


    And now we come to the essentials.;)


    We create a 16-channel universal control in CUxD:

    Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.

    A maximum of 16 Shelly Door / Windows can be mapped in Homematic with one 16-channel universal control . We need 1 channel for each Shelly Door / Window.


    The system variables desired in the view are linked to the channel (see picture in # 1) so that they become visible in the channel.


    We extend our program from # 2 in the THEN branch of the 1st IF condition by a 2nd line that executes the update script. It looks like this in the detail:

    Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.

    And last but not least, the script, which is to be worked through from top to bottom as usual. And as specified, IP of the Homematic, CUxD device address and CUxD Exec address must be adjusted:

    And now good luck with the reconstruction and above all have fun with it. :)

    ____________________________________________________________

    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).


    © 2019 Stefan K. (aka 66er)

    All rights reserved

    • Offizieller Beitrag
    • Autor

    -- reserved --

    • Offizieller Beitrag
    • Autor

    For information:


    The update script was released in a new version today.


    Reason:

    • simplified setup (adapting the CUxD addresses etc.)
    • Prepare for new features
  • Dieses Thema enthält einen weiteren Beitrag, der nur für registrierte Benutzer sichtbar ist.