Shelly Flood goes Homatic- with original firmware

Lass dich durch uns Informieren
Wir Informieren dich über neuigkeiten und Angebote von Allterco.
Melde dich beim Newsletter an !
Diesen findest du rechts in der Menueleiste ganz unten.
  • © 2019 Stefan K. (aka 66er) - detailed information about this at the end of the manual (#3)





    #1 Introduction

    #2 failure monitoring

    #3 Data transfer in Homematic



    Hello everybody,


    It was a very stony way, but below I can now introduce my solution with the original firmware.


    The implementation of the transmit-detection was the first hurdle. Details were explained at this point.(only in German)


    technical requirements:


    • compatible with the homematic systems CCU2, CCU3, Charly, as well as all offshoots like RaspberryMatic and piVCCU.
    • installed add-on CUxD
      (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 Flood features are preserved, as I operate all the actuators and sensors with the original manufacturer firmware
    • all future Shelly Flood updates will be usable
    • Full Shelly app usability in parallel with homematic automation
    • Operation as local solution or via Shelly-Cloud, additionally Homemati


    The only compelling disadvantage is a shorter battery life!



    I implemented the following functions on the Homematic page:


    • Display of status (sleep or alarm condition)
    • battery status
    • Temperature (at the time of the last transmission)
    • in addition to the possibilities of the cloud: failure monitoring


    A view of the connection:

    Geräteansicht.png


    Why the integration as a switch:


    It would have been nicer to present the Shelly Flood as a threat detector in Homematic. Why this does not work, I have already explained in this thread.(only in German)


    After much trial and error (hence the name "VG Shelly Flood V4 in the picture), this solution seemed to me the most plausible:


    OFF -> no alarm

    ON -> water alarm



    I would like to recommend you, especially newcomers, at this point to take a look at this thread before the implementation:

    It should also be noted that the procedure of the transmitter detection is completely different than known from previous couplings! In this respect, please work carefully from top to bottom when rebuilding the instructions. ;)


    as usual:

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



    Have fun and success with it :thumbup:

  • In another thread,there was the question "How do I know if the Shelly flood fails and stops sending?" .


    I have found a solution for homematic-user, which at the same time forms the basic for also getting the data of the Shelly Flood into the Homematic and for being able to process it there.


    The principle of failure monitoring:


    Meanwhile, the Shelly Flood sends a status message after 12 hours without any other events. This is recorded and if not available, a system variable is set after 13 hours without message / update, with which you can then send a push or e-mail message, however. Of course, any conceivable other homematic control can be activated.



    The implementation:


    We need a system variable that will later be assigned to the CUxD channel of the switch.


    SV Ausfall.png


    To set this to "no alarm", we use the "Actions" function of the Shelly Flood, which can only be set in the WEB UI via browser.


    At this point, the hint that currently the data can not be transferred directly via Actions to Homematic.


    Shelly Action.png

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

    Adapt the IP address to your own homematic center.

    Adapt the name of the system variable.


    Now we need 1 CUxD Timer-channel / Shelly Flood.


    One channel of an existing CUxD timer can be used. Or you create your own CUxD timer device for the flood. Thus, with a device CUxD timer a maximum of 16 Shelly Flood could be monitored.


    Create CUxD timer:

    CUxD-Timer.png



    The used channel is preset as follows:

    Timer Einstellungen.png

    entry for SYSTEM|CMD_EXEC::

    Code
    extra/timer.tcl Shelly-Flood_Ausfall_KG 0

    Adapt the name of the system variable!


    What happened so far is the following:


    • The timer counts down the 13 hours
    • If the Shelly answers during this time, the timer is reset to 13 hours
    • If a message remains and the timer is set to "0", it sets the system variable to "Fail?" (or whatever text you have deposited.


    We can use that to trigger a homematic program:

    Programm Teil 1.png


    The IF section always resets the timer.

    The Otherwise IF section will send (as an example) an email.


    Thus, the failure monitoring is realized and created the basic for the data transfer Shelly-Flood -> Homematic.:)

  • Take over the data of the Shelly Flood in the Homematic



    To take over the data of the Shelly Flood in Homematic, we need 2 more system variables, which are also assigned to the CUxD channel of the switch:


    SV Temp.png

    (Depending on the place of installation the temperature values can of course be adjusted)


    SV Bat.png


    The variables are assigned to the used channel of an existing or newly created (40) CUxD-16 universal control panel.


    CUxD-Schalter.png

    With 1 universal control a maximum of 16 Shelly Floods can be integrated.


    Of cause there is nothing to operate on the Shelly Flood, no settings are made in the CUxD switch. ;)

    The data transfer:


    In order to take over the data from the flood, the already created program has to be extended:


    Programm Teil 2.png(The ELSE part at the end remains empty)


    The script is still missing in the 1. IF:

    In the script, adjust the IP address, CUxD-Exec address, CUxD switch address and system variable name!



    Each time the Shelly Flood is sent, the current data is transferred to the Homematic.:thumbup:


    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


  • I have just released the new V2.0 update script.



    Modification:


    simplified setup (completely at the beginning of the script)



    Have fun with it.:thumbup: