Get cover state and position at the moment of change through custom mqtt topic (SOLVED)

  • Hello,

    I need help regarding the title. I am not a mjs expert and I want a script that publishes a custom mqtt topic when

    Shelly Plus 2PM in cover mode, changes state or changes position.

    The only thing that I managed to write, combining bits from here and there is the below scipt


    But of course this is not what i want. I understand I should use a statusHandler or eventHandler but I really don;t understand how to do it...

    So, if anybody could help me I would appreciate it.

    Thank you in advance.

  • Hallo,

    thats is easy to do, but first I need some event debug data from you.

    Use this script, active debug output of the console under the script and controlle your cover, while your script window is open, to get some event data.

    Einmal editiert, zuletzt von _[Deleted]_ (24. September 2023 um 18:03)

  • OK, here are the debug results, first stopped and then opened :


    Thank you again.

  • Gerat,

    now please run the following script and fully move your covers up and down at least once. Then, share the console output.

    There were no closing events, so I had to guess what they are called, and thats why we have to double check now if my gussing was right.

    If there is still no closing message inside the console output, change the debug config option to true and run it again, but I'm 70% confident that I guessed it right. ^^


  • Dieses Thema enthält 7 weitere Beiträge, die nur für registrierte Benutzer sichtbar sind, bitte registrieren Sie sich oder melden Sie sich an um diese lesen zu können.