Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Pushbullet klappt nicht im Script

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Pushbullet klappt nicht im Script

    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jhuebner1 last edited by

      Hallo,

      ich würde mir gerne eine Pushbullet Nachricht schicken, wenn einzelne Kriterien gelten.
      Z.B. Temperatur Sauna hoch genug, aktuelle Wetterwarnung, usw.

      Der Adapter ist installiert, die Empfänger sind korrekt.
      Sobald ich die Nachricht nur mit sendto mache klappt es auch.

      Aber zum einen klappt es nicht, sobald ich Bedingungen einfüge, zum anderen klappt es mit Blockly nicht, weil ich keine AHnung habe, wo dann der Empfänger rein muss. Ja, der Adapter ist eigentlich richtig mit Empfänger konfiguriert, aber es klappt auch manuell nur, wenn ich es als JS mache.

      Hier das was klappt:
      19af1f14-b0f8-4026-86b4-146a1ccbf648-grafik.png

      Das hier klappt nicht (und die 10 Grad habe ich nur genommen, damit er testweise auslöst. Nach meiner Meinung ändert sich der Temperaturwert ja auch jede Minute, sofern müsste er doch was senden, oder?):

      7976d547-ac2b-4073-a68d-601cfa81d891-grafik.png

      Das gleiche mit DWD, auch da sendet er nichts:
      73be1565-3928-4726-9b18-4c398268cac7-grafik.png

      Wo ist mein Denkfehler?

      Vielen Dank im Voraus.

      liv-in-sky 1 Reply Last reply Reply Quote 0
      • liv-in-sky
        liv-in-sky @jhuebner1 last edited by

        @jhuebner1 falls blockly gewünscht ? damit geht's bei mir

        Image 1.png

        sendTo("pushbullet.0", "send", {
           "message": 'von iobroker',
           "title": 'alarm',
           "type": 'note',
           "receiver": 'ujC6xxxxxxxxxxUvRI'
        });
        

        wie es mit nicknames funktioniert, weiß ich nicht - die id's der geräte bekomme ich über :

        Image 3.png

        der curl befehl benötigt den api key von pushbullet

        curl --header 'Access-Token: o.YKeXkxxxxxxxxxxxxxxxxxxxxxxxxxpi9v' \https://api.pushbullet.com/v2/devices
        

        import blockly- get ids:

        <xml xmlns="http://www.w3.org/1999/xhtml">
         <variables>
           <variable type="" id="X9`at:-6IX;0sDS`vu/E">helferlein</variable>
           <variable type="" id="QLuvwmsEww5Fznot.S{!">j</variable>
           <variable type="undefined" id="timeout">timeout</variable>
           <variable type="" id="-K|h*y)J9|h*rDQQ%e|P">result</variable>
         </variables>
         <block type="variables_set" id="gnns*UySjAihC$AX;b3w" x="-1112" y="-362">
           <field name="VAR" id="X9`at:-6IX;0sDS`vu/E" variabletype="">helferlein</field>
           <value name="VALUE">
             <block type="text" id="{I`+g`T[I@zENqX;;o!0">
               <field name="TEXT"></field>
             </block>
           </value>
           <next>
             <block type="exec" id=";yZH3#4j@m)x(t!KuStM">
               <mutation with_statement="true"></mutation>
               <field name="WITH_STATEMENT">TRUE</field>
               <field name="LOG"></field>
               <value name="COMMAND">
                 <shadow type="text" id="K*pR(O]dqF1O(}@!LIev">
                   <field name="TEXT">curl --header 'Access-Token: o.YxxxxxxxxxxxxxxxxxxePpi9v' \https://api.pushbullet.com/v2/devices</field>
                 </shadow>
               </value>
               <statement name="STATEMENT">
                 <block type="controls_forEach" id="}45?^T}515sMBQ[9+rp#">
                   <field name="VAR" id="QLuvwmsEww5Fznot.S{!" variabletype="">j</field>
                   <value name="LIST">
                     <block type="get_attr" id="g#}Mg=I#s(4vWWq(II2(">
                       <value name="PATH">
                         <shadow type="text" id="lvy#gM@GMJmU6sqK4;Au">
                           <field name="TEXT">devices</field>
                         </shadow>
                       </value>
                       <value name="OBJECT">
                         <block type="convert_json2object" id="^e-2X)-]Dl8)KBIeQ+vt">
                           <value name="VALUE">
                             <block type="variables_get" id="=y9:hJMk$HLBGLvwB`OF">
                               <field name="VAR" id="-K|h*y)J9|h*rDQQ%e|P" variabletype="">result</field>
                             </block>
                           </value>
                         </block>
                       </value>
                     </block>
                   </value>
                   <statement name="DO">
                     <block type="variables_set" id="5u9~XTcCx{}}7Q:J=k0A">
                       <field name="VAR" id="X9`at:-6IX;0sDS`vu/E" variabletype="">helferlein</field>
                       <value name="VALUE">
                         <block type="text_join" id="gpsM_T@}yjr45rdzKK.m">
                           <mutation items="5"></mutation>
                           <value name="ADD0">
                             <block type="variables_get" id="h:0p@OQ`@JvUV}u^Y1mB">
                               <field name="VAR" id="X9`at:-6IX;0sDS`vu/E" variabletype="">helferlein</field>
                             </block>
                           </value>
                           <value name="ADD1">
                             <block type="get_attr" id="tnYkgo0?Tt1Qb|2j6Ml0">
                               <value name="PATH">
                                 <shadow type="text" id="k7N];QQ5LG{H{T,|Ds~0">
                                   <field name="TEXT">nickname</field>
                                 </shadow>
                               </value>
                               <value name="OBJECT">
                                 <block type="variables_get" id="{Wz7*Z$egMShSYfjw.T)">
                                   <field name="VAR" id="QLuvwmsEww5Fznot.S{!" variabletype="">j</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                           <value name="ADD2">
                             <block type="text" id="56*eie?xG4]zM1BL.(NL">
                               <field name="TEXT"> --- </field>
                             </block>
                           </value>
                           <value name="ADD3">
                             <block type="get_attr" id="Smr3j5NG,YL*VhcsYZmK">
                               <value name="PATH">
                                 <shadow type="text" id="Aof*I9O]2!PwmVoCZ#mh">
                                   <field name="TEXT">iden</field>
                                 </shadow>
                               </value>
                               <value name="OBJECT">
                                 <block type="variables_get" id="FL/:*P7N$CoEn~xKYRix">
                                   <field name="VAR" id="QLuvwmsEww5Fznot.S{!" variabletype="">j</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                           <value name="ADD4">
                             <block type="text" id="K9fBFZ.(:3$h*8DM|U=v">
                               <field name="TEXT">:</field>
                             </block>
                           </value>
                         </block>
                       </value>
                       <next>
                         <block type="debug" id="gLB@GV}#T*q:rTg5K@}P">
                           <field name="Severity">log</field>
                           <value name="TEXT">
                             <shadow type="text" id="qyF=Jns;Wi3ZK3iLx}1N">
                               <field name="TEXT">test</field>
                             </shadow>
                             <block type="variables_get" id="96)S72)K=mhT{tZRyEb-">
                               <field name="VAR" id="X9`at:-6IX;0sDS`vu/E" variabletype="">helferlein</field>
                             </block>
                           </value>
                         </block>
                       </next>
                     </block>
                   </statement>
                 </block>
               </statement>
               <next>
                 <block type="timeouts_settimeout" id="KCcV{V~[8)Z8+}hiyTev">
                   <field name="NAME">timeout</field>
                   <field name="DELAY">2</field>
                   <field name="UNIT">sec</field>
                   <statement name="STATEMENT">
                     <block type="control" id="WqE+|K=ofWlAr`Xh38a_">
                       <mutation delay_input="false"></mutation>
                       <field name="OID">controll-own.0.PUSHBULLET.ClientIDs</field>
                       <field name="WITH_DELAY">FALSE</field>
                       <value name="VALUE">
                         <block type="variables_get" id="GHNwY(=_htqEeECE7}Lm">
                           <field name="VAR" id="X9`at:-6IX;0sDS`vu/E" variabletype="">helferlein</field>
                         </block>
                       </value>
                     </block>
                   </statement>
                 </block>
               </next>
             </block>
           </next>
         </block>
        </xml>
        

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        Support us

        ioBroker
        Community Adapters
        Donate

        633
        Online

        31.8k
        Users

        79.9k
        Topics

        1.3m
        Posts

        blockly communication javascript
        2
        2
        301
        Loading More Posts
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes
        Reply
        • Reply as topic
        Log in to reply
        Community
        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
        The ioBroker Community 2014-2023
        logo