Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly
  5. trying to get value of updated object id sent to telegram

NEWS

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    22
    1
    1.0k

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    9.1k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    14
    1
    2.4k

trying to get value of updated object id sent to telegram

Geplant Angeheftet Gesperrt Verschoben Blockly
10 Beiträge 2 Kommentatoren 804 Aufrufe 1 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • dony71D Offline
    dony71D Offline
    dony71
    schrieb am zuletzt editiert von
    #1

    Hi expert scripter
    I have problem in my blocky script
    I'm trying to get value of updated object id sent to telegram
    Blocky looks like below
    21d61185-ea7f-4abb-8b69-206b62161d85-image.png

    I have several mqtt.1 object, for ex. mqtt.1.bedroom, mqtt.1.classroom, etvc
    If there is update in value of one mqtt.1 object, for ex. mqtt.1.bedroom.MSG, I want telegram to send value of mqtt.1.bedroom.MSG
    However with this blocky, telegram only send word "Server" without value
    How to do this?

    dony71D paul53P 2 Antworten Letzte Antwort
    0
    • dony71D dony71

      Hi expert scripter
      I have problem in my blocky script
      I'm trying to get value of updated object id sent to telegram
      Blocky looks like below
      21d61185-ea7f-4abb-8b69-206b62161d85-image.png

      I have several mqtt.1 object, for ex. mqtt.1.bedroom, mqtt.1.classroom, etvc
      If there is update in value of one mqtt.1 object, for ex. mqtt.1.bedroom.MSG, I want telegram to send value of mqtt.1.bedroom.MSG
      However with this blocky, telegram only send word "Server" without value
      How to do this?

      dony71D Offline
      dony71D Offline
      dony71
      schrieb am zuletzt editiert von
      #2

      @dony71 btw, i can understand german, so anybody can reply in german language

      1 Antwort Letzte Antwort
      0
      • dony71D dony71

        Hi expert scripter
        I have problem in my blocky script
        I'm trying to get value of updated object id sent to telegram
        Blocky looks like below
        21d61185-ea7f-4abb-8b69-206b62161d85-image.png

        I have several mqtt.1 object, for ex. mqtt.1.bedroom, mqtt.1.classroom, etvc
        If there is update in value of one mqtt.1 object, for ex. mqtt.1.bedroom.MSG, I want telegram to send value of mqtt.1.bedroom.MSG
        However with this blocky, telegram only send word "Server" without value
        How to do this?

        paul53P Offline
        paul53P Offline
        paul53
        schrieb am zuletzt editiert von
        #3

        @dony71 sagte: I want telegram to send value of mqtt.1.bedroom.MSG

        Bild_2021-08-12_214042.png

        Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
        Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

        dony71D 1 Antwort Letzte Antwort
        0
        • paul53P paul53

          @dony71 sagte: I want telegram to send value of mqtt.1.bedroom.MSG

          Bild_2021-08-12_214042.png

          dony71D Offline
          dony71D Offline
          dony71
          schrieb am zuletzt editiert von
          #4

          @paul53 by inserting value "server", it will show all mqtt.1.* object, not only updated object
          so for ex. I have mqtt.1.bedroom.MSG and mqtt.1.classroom.MSG, then
          server = mqtt.1.bedroom.MSG,mqtt.1.classroom.MSG

          paul53P 1 Antwort Letzte Antwort
          0
          • dony71D dony71

            @paul53 by inserting value "server", it will show all mqtt.1.* object, not only updated object
            so for ex. I have mqtt.1.bedroom.MSG and mqtt.1.classroom.MSG, then
            server = mqtt.1.bedroom.MSG,mqtt.1.classroom.MSG

            paul53P Offline
            paul53P Offline
            paul53
            schrieb am zuletzt editiert von paul53
            #5

            @dony71

            Wert (object value) shows the value of the just updated datapoint. You will find it under "Trigger".

            Bild_2021-08-12_223122.png
            If you want to send the ID (for ex. "mqtt.1.bedroom.MSG") of the updated datapoint:

            Bild_2021-08-12_223333.png

            If you want to send both (id and value):

            Bild_2021-08-12_224803.png

            Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
            Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

            dony71D 1 Antwort Letzte Antwort
            0
            • paul53P paul53

              @dony71

              Wert (object value) shows the value of the just updated datapoint. You will find it under "Trigger".

              Bild_2021-08-12_223122.png
              If you want to send the ID (for ex. "mqtt.1.bedroom.MSG") of the updated datapoint:

              Bild_2021-08-12_223333.png

              If you want to send both (id and value):

              Bild_2021-08-12_224803.png

              dony71D Offline
              dony71D Offline
              dony71
              schrieb am zuletzt editiert von
              #6

              @paul53 yeap, it works, thank you
              Now I have another problem
              I notice script will not trigger if object id not exist before
              for ex. let says object "mqtt.1.diningroom.MSG" not exist yet
              Then I publish "mosquitto_pub -t /mqtt/1/diningroom/MSG -m hallo",
              script won't trigger anything (no telegram msg being sent)
              After that even if I redo publish "mosquitto_pub -t /mqtt/1/diningroom/MSG -m world",
              script still won't trigger anything.
              Is there anything I should do to fix this?

              paul53P 1 Antwort Letzte Antwort
              0
              • dony71D dony71

                @paul53 yeap, it works, thank you
                Now I have another problem
                I notice script will not trigger if object id not exist before
                for ex. let says object "mqtt.1.diningroom.MSG" not exist yet
                Then I publish "mosquitto_pub -t /mqtt/1/diningroom/MSG -m hallo",
                script won't trigger anything (no telegram msg being sent)
                After that even if I redo publish "mosquitto_pub -t /mqtt/1/diningroom/MSG -m world",
                script still won't trigger anything.
                Is there anything I should do to fix this?

                paul53P Offline
                paul53P Offline
                paul53
                schrieb am zuletzt editiert von
                #7

                @dony71 sagte: After that even if I redo publish "mosquitto_pub -t /mqtt/1/diningroom/MSG -m world", script still won't trigger anything.
                Is there anything I should do to fix this?

                It's a problem of the buffer inside the javascript instance: Restart the javascript instance.

                Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                dony71D 1 Antwort Letzte Antwort
                0
                • paul53P paul53

                  @dony71 sagte: After that even if I redo publish "mosquitto_pub -t /mqtt/1/diningroom/MSG -m world", script still won't trigger anything.
                  Is there anything I should do to fix this?

                  It's a problem of the buffer inside the javascript instance: Restart the javascript instance.

                  dony71D Offline
                  dony71D Offline
                  dony71
                  schrieb am zuletzt editiert von dony71
                  #8

                  @paul53 Restart java script won't help. I have to restart blocky script. This means each time mosquitto_pub publish new object instance, I have to restart the script then re-publish this new object then trigger works.
                  How could it be? Maybe I'm missing some setting?

                  FYI below my updated blocky script
                  2ae8ce43-4031-4512-8b0f-836b762a0508-image.png

                  paul53P 1 Antwort Letzte Antwort
                  0
                  • dony71D dony71

                    @paul53 Restart java script won't help. I have to restart blocky script. This means each time mosquitto_pub publish new object instance, I have to restart the script then re-publish this new object then trigger works.
                    How could it be? Maybe I'm missing some setting?

                    FYI below my updated blocky script
                    2ae8ce43-4031-4512-8b0f-836b762a0508-image.png

                    paul53P Offline
                    paul53P Offline
                    paul53
                    schrieb am zuletzt editiert von paul53
                    #9

                    @dony71
                    Try replacing $Selector with RegExp.

                    Blockly_temp.JPG

                    The $Selector does not recognise new data points because it uses the buffer of the Javascript instance. A subscription with RegExp captures new data points.

                    Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                    Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                    dony71D 1 Antwort Letzte Antwort
                    0
                    • paul53P paul53

                      @dony71
                      Try replacing $Selector with RegExp.

                      Blockly_temp.JPG

                      The $Selector does not recognise new data points because it uses the buffer of the Javascript instance. A subscription with RegExp captures new data points.

                      dony71D Offline
                      dony71D Offline
                      dony71
                      schrieb am zuletzt editiert von
                      #10

                      @paul53 thanks .... it's working well
                      you're really the expert

                      1 Antwort Letzte Antwort
                      0
                      Antworten
                      • In einem neuen Thema antworten
                      Anmelden zum Antworten
                      • Älteste zuerst
                      • Neuste zuerst
                      • Meiste Stimmen


                      Support us

                      ioBroker
                      Community Adapters
                      Donate

                      711

                      Online

                      32.5k

                      Benutzer

                      81.6k

                      Themen

                      1.3m

                      Beiträge
                      Community
                      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                      ioBroker Community 2014-2025
                      logo
                      • Anmelden

                      • Du hast noch kein Konto? Registrieren

                      • Anmelden oder registrieren, um zu suchen
                      • Erster Beitrag
                        Letzter Beitrag
                      0
                      • Home
                      • Aktuell
                      • Tags
                      • Ungelesen 0
                      • Kategorien
                      • Unreplied
                      • Beliebt
                      • GitHub
                      • Docu
                      • Hilfe