Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. dondon4002

    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

    D
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 22
    • Best 0
    • Groups 0

    dondon4002

    @dondon4002

    0
    Reputation
    19
    Profile views
    22
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    dondon4002 Follow

    Latest posts made by dondon4002

    • RE: Funktion ausführen wenn Smartphone in Reichweite kommt [Gelöst]

      Klar, z.b. mit ner Fritzbox und dem Modul "node-red-contrib-fritz"

      Musst hier nur deine MAC Adresse vom Handy angeben und die Fritzbox Daten

      [{"id":"8193bec1.ab0e2","type":"function","z":"12894464.d36a6c","name":"format output","func":"msg.payload = msg.payload.NewActive\nreturn msg;\n","outputs":1,"noerr":0,"x":640,"y":160,"wires":[["e10b8db6.e65618"]]},{"id":"e10b8db6.e65618","type":"debug","z":"12894464.d36a6c","name":"","active":true,"tosidebar":true,"console":false,"complete":"false","x":850,"y":160,"wires":[]},{"id":"1df720be.9bcdb7","type":"fritzbox-in","z":"12894464.d36a6c","device":"226d6f30.6449e","name":"","service":"urn:dslforum-org:service:Hosts:1","action":"GetSpecificHostEntry","arguments":"{\"NewMACAddress\":\"value\"}","x":410,"y":160,"wires":[["8193bec1.ab0e2"]]},{"id":"a24eaab8.1743c","type":"inject","z":"12894464.d36a6c","name":"20:82:C0:26:86:FE","topic":"","payload":"{\"NewMACAddress\":\"30:X7:XD:XX:XX:XX\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":"","x":190,"y":160,"wires":[["1df720be.9bcdb7"]]},{"id":"226d6f30.6449e","type":"fritzbox-config","z":"","name":"","host":"192.168.1.1","port":"49000","ssl":false}]
      
      posted in Skripten / Logik
      D
      dondon4002
    • RE: Node-Red mit Alexa - Dimmer

      Für alle die dann noch Bedarf daran haben 🙂

      Ich mache es am Ende doch per Blockly denn es kommen ja noch Abfragen wie TurnOnRequest, TunOffRequest und was Alexa noch alles so bietet.

      ! ````
      [
      {
      "id": "6a18e5be.c9abdc",
      "type": "Blockly",
      "z": "9433ac39.c5756",
      "language": "en",
      "func": "if ((msg['command']) == 'SetColorRequest') {\n msg['payload'] = [(msg['payload']['hue']), (msg['payload']['saturation']) * 100, (msg['payload']['brightness']) * 100];\n return [msg, null];\n} else if ((msg['command']) == 'TurnOffRequest') {\n msg['payload'] = false;\n return [null, msg];\n} else if ((msg['command']) == 'TurnOnRequest') {\n msg['payload'] = true;\n return [null, msg];\n}\n",
      "workspaceXml": "<xml xmlns="&quot;http://www.w3.org/1999/xhtml&quot;"><block id="&quot;OegDmw1SSX]D=Pa(8G75&quot;" type="&quot;controls_if&quot;" x="&quot;-2037&quot;" y="&quot;-387&quot;"><mutation elseif="&quot;2&quot;"></mutation><value name="&quot;IF0&quot;"><block id="&quot;GconiS<value name="&quot;IF0&quot;"ihVrBvHEiKZu&quot;" type="&quot;logic_compare&quot;"><field name="&quot;OP&quot;">EQ</field><value name="&quot;A&quot;"><block id="&quot;qfEv5p}Q.6(4bAAhVY)t&quot;" type="&quot;node_object_get&quot;"><mutation action="&quot;GET&quot;"></mutation><field name="&quot;action&quot;">GET</field><value name="&quot;object&quot;"><shadow id="&quot;8Rf40:s+-(Iix/~rpXuB&quot;" type="&quot;node_msg&quot;"></shadow></value><value name="&quot;field_name&quot;"><shadow id="&quot;3K$0p{%[oP^XO:,{IhsI&quot;" type="&quot;text&quot;"><field name="&quot;TEXT&quot;">command</field></shadow></value></block></value><value name="&quot;B&quot;"><block id="&quot;Gu~Z4BXhmh4D%LOE{4s-&quot;" type="&quot;text&quot;"><field name="&quot;TEXT&quot;">SetColorRequest</field></block></value></block></value><statement name="&quot;DO0&quot;"><block id="&quot;Wz6Dr1k2)tZbJ[+?V+j{&quot;" type="&quot;node_object_set&quot;"><value name="&quot;object_field&quot;"><shadow id="&quot;N7nV^CQPdk8cxV}?9mWX&quot;" type="&quot;node_msg&quot;"></shadow></value><value name="&quot;field_name&quot;"><shadow id="&quot;cZ6WgGkQ{3ya8z~VBE3\&quot;" type="\&quot;text\&quot;"><field name="\&quot;TEXT\&quot;">payload</field></shadow></value><value name="\&quot;value_field\&quot;"><shadow id="\&quot;sk?O05P5ma_5vqc{!#)&quot;" type="&quot;text&quot;"></shadow><block id="&quot;Md|@A(]N!kq$=b3)[SH!&quot;" type="&quot;lists_create_with&quot;"><mutation items="&quot;3&quot;"></mutation><value name="&quot;ADD0&quot;"><block id="&quot;tu7-Qe3u+zsXsItw[,yY&quot;" type="&quot;node_object_get&quot;"><mutation action="&quot;GET&quot;"></mutation><field name="&quot;action&quot;">GET</field><value name="&quot;object&quot;"><shadow id="&quot;4WDpncvt3q4gpN@S@MfM&quot;" type="&quot;node_msg&quot;"></shadow></value><value name="&quot;field_name&quot;"><shadow id="&quot;@d+[0zA[c(D{jmlYd^%O&quot;" type="&quot;text&quot;"><field name="&quot;TEXT&quot;">payload.hue</field></shadow></value></block></value><value name="&quot;ADD1&quot;"><block id="&quot;!Q#d8F/fCDqPNsm,6Z+&quot;" type="&quot;math_arithmetic&quot;"><field name="&quot;OP&quot;">MULTIPLY</field><value name="&quot;A&quot;"><shadow id="&quot;bNOGt$4!S%VQ?:vfS1V.&quot;" type="&quot;math_number&quot;"><field name="&quot;NUM&quot;">1</field></shadow><block id="&quot;cl:38kKKmak%V3E!m2}T&quot;" type="&quot;node_object_get&quot;"><mutation action="&quot;GET&quot;"></mutation><field name="&quot;action&quot;">GET</field><value name="&quot;object&quot;"><shadow id="&quot;8+vu8BKKc)fZo;rSk0[D&quot;" type="&quot;node_msg&quot;"></shadow></value><value name="&quot;field_name&quot;"><shadow id="&quot;FzE=$C.cumV)e3g*!;0\&quot;" type="\&quot;text\&quot;"><field name="\&quot;TEXT\&quot;">payload.saturation</field></shadow></value></block></value><value name="\&quot;B\&quot;"><shadow id="\&quot;p$RJ=}@6=xX[Ekbiqfn^\&quot;" type="\&quot;math_number\&quot;"><field name="\&quot;NUM\&quot;">100</field></shadow></value></block></value><value name="\&quot;ADD2\&quot;"><block id="\&quot;K[@!p?t]Y]0YY,I]]Y=3\&quot;" type="\&quot;math_arithmetic\&quot;"><field name="\&quot;OP\&quot;">MULTIPLY</field><value name="\&quot;A\&quot;"><shadow id="\&quot;12luhGJPp}BppnOnCd]t\&quot;" type="\&quot;math_number\&quot;"><field name="\&quot;NUM\&quot;">1</field></shadow><block id="\&quot;hu/B]c6@]lE@cn^qMa!I\&quot;" type="\&quot;node_object_get\&quot;"><mutation action="\&quot;GET\&quot;"></mutation><field name="\&quot;action\&quot;">GET</field><value name="\&quot;object\&quot;"><shadow id="\&quot;$2{@U|#45m9O#sYMG_HL\&quot;" type="\&quot;node_msg\&quot;"></shadow></value><value name="\&quot;field_name\&quot;"><shadow id="\&quot;9q^k;%a@6pz!wwSL[S\&quot;" type="\&quot;text\&quot;"><field name="\&quot;TEXT\&quot;">payload.brightness</field></shadow></value></block></value><value name="\&quot;B\&quot;"><shadow id="\&quot;H7P5:v+4jC%4eNSZg1b3\&quot;" type="\&quot;math_number\&quot;"><field name="\&quot;NUM\&quot;">100</field></shadow></value></block></value></block></value><next><block id="\&quot;dj6-iR8:4O-+v*!D~,M-\&quot;" type="\&quot;node_return_message\&quot;"><field name="\&quot;OUTPUT_NR\&quot;">1</field><value name="\&quot;MESSAGE_INPUT\&quot;"><shadow id="\&quot;!e8R2#N8Jdu(EAVQ{|&quot;" type="&quot;node_msg&quot;"></shadow></value></block></next></block></statement><value name="&quot;IF1&quot;"><block id="&quot;Gt#y.gqIL,qm)]{hhHC&quot;" type="&quot;logic_compare&quot;"><field name="&quot;OP&quot;">EQ</field><value name="&quot;A&quot;"><block id="&quot;N6$q19G#S0_xYH%PxSEI&quot;" type="&quot;node_object_get&quot;"><mutation action="&quot;GET&quot;"></mutation><field name="&quot;action&quot;">GET</field><value name="&quot;object&quot;"><shadow id="&quot;x(P(iAF[acHUJa%K1WW0&quot;" type="&quot;node_msg&quot;"></shadow></value><value name="&quot;field_name&quot;"><shadow id="&quot;401Ct:?6f$=h/.@%JFf=&quot;" type="&quot;text&quot;"><field name="&quot;TEXT&quot;">command</field></shadow></value></block></value><value name="&quot;B&quot;"><block id="&quot;E:%o.01_qWbolte})n[}&quot;" type="&quot;text&quot;"><field name="&quot;TEXT&quot;">TurnOffRequest</field></block></value></block></value><statement name="&quot;DO1&quot;"><block id="&quot;6=mvJ%:D4qf|CDFfAg[z&quot;" type="&quot;node_object_set&quot;"><value name="&quot;object_field&quot;"><shadow id="&quot;ABbAcS^Mj_]u:G0bmbxl&quot;" type="&quot;node_msg&quot;"></shadow></value><value name="&quot;field_name&quot;"><shadow id="&quot;to=(u!-hoz(ZB|X@F7;&quot;" type="&quot;text&quot;"><field name="&quot;TEXT&quot;">payload</field></shadow></value><value name="&quot;value_field&quot;"><shadow id="&quot;6?#earD4R8~?M5_1Y1va&quot;" type="&quot;text&quot;"></shadow><block id="&quot;gSN[vp0Vp@iiKOCKXZxO&quot;" type="&quot;logic_boolean&quot;"><field name="&quot;BOOL&quot;">FALSE</field></block></value><next><block id="&quot;8Lt@[lrf:,v#bz#My!,~&quot;" type="&quot;node_return_message&quot;"><field name="&quot;OUTPUT_NR&quot;">2</field><value name="&quot;MESSAGE_INPUT&quot;"><shadow id="&quot;ac^):!N/SuXK+m#l6G{e&quot;" type="&quot;node_msg&quot;"></shadow></value></block></next></block></statement><value name="&quot;IF2&quot;"><block id="&quot;:%iB^77hKA%5#Y]m3(KI&quot;" type="&quot;logic_compare&quot;"><field name="&quot;OP&quot;">EQ</field><value name="&quot;A&quot;"><block id="&quot;bZZ%2UXkY4qB_Fmae68&quot;" type="&quot;node_object_get&quot;"><mutation action="&quot;GET&quot;"></mutation><field name="&quot;action&quot;">GET</field><value name="&quot;object&quot;"><shadow id="&quot;O;dMHWtpMY{zN1](^WQa&quot;" type="&quot;node_msg&quot;"></shadow></value><value name="&quot;field_name&quot;"><shadow id="&quot;C0O}w0bo=c,,_#.[I9Gf&quot;" type="&quot;text&quot;"><field name="&quot;TEXT&quot;">command</field></shadow></value></block></value><value name="&quot;B&quot;"><block id="&quot;e5e|,AqRBMdDQ|~s?uv9&quot;" type="&quot;text&quot;"><field name="&quot;TEXT&quot;">TurnOnRequest</field></block></value></block></value><statement name="&quot;DO2&quot;"><block id="&quot;|DY5/yaj[#aVyjA:qNS&quot;" type="&quot;node_object_set&quot;"><value name="&quot;object_field&quot;"><shadow id="&quot;ee@E0k_unaE#!Ss=xdAB&quot;" type="&quot;node_msg&quot;"></shadow></value><value name="&quot;field_name&quot;"><shadow id="&quot;h]@6ikfpmr#ni-9FWDmN&quot;" type="&quot;text&quot;"><field name="&quot;TEXT&quot;">payload</field></shadow></value><value name="&quot;value_field&quot;"><shadow id="&quot;6?#earD4R8~?M5_1Y1va&quot;" type="&quot;text&quot;"></shadow><block id="&quot;c3@@`D0S$O}J_N]-B5lf&quot;" type="&quot;logic_boolean&quot;"><field name="&quot;BOOL&quot;">TRUE</field></block></value><next><block id="&quot;%R}_.z4(NfAy?#=Gv44&quot;" type="&quot;node_return_message&quot;"><field name="&quot;OUTPUT_NR&quot;">2</field><value name="&quot;MESSAGE_INPUT&quot;"><shadow id="&quot;}z$f11Tsy#/HuS(JG_Z&quot;" type="&quot;node_msg&quot;"></shadow></value></block></next></block></statement></block></xml>",
      "outputs": 2,
      "name": "",
      "x": 390,
      "y": 1320,
      "wires": [
      [
      "aeec5dac.065a9"
      ],
      [
      "7bd5f7d8.5e0f58"
      ]
      ]
      },
      {
      "id": "7bd5f7d8.5e0f58",
      "type": "hue-light",
      "z": "9433ac39.c5756",
      "name": "Lampe_Buero_LedStrip",
      "bridge": "d5d520c8.c3118",
      "lightid": "9",
      "colornamer": true,
      "x": 960,
      "y": 1330,
      "wires": [
      []
      ]
      },
      {
      "id": "8259bb25.207dc8",
      "type": "alexa-home",
      "z": "9433ac39.c5756",
      "conf": "b91f3657.228818",
      "device": "43026",
      "acknoledge": true,
      "name": "Test",
      "topic": "",
      "x": 240,
      "y": 1320,
      "wires": [
      [
      "6a18e5be.c9abdc"
      ]
      ]
      },
      {
      "id": "aeec5dac.065a9",
      "type": "color-convert",
      "z": "9433ac39.c5756",
      "input": "hsv",
      "output": "rgb",
      "outputType": "array",
      "x": 570,
      "y": 1290,
      "wires": [
      [
      "84d8358e.688908"
      ]
      ]
      },
      {
      "id": "84d8358e.688908",
      "type": "change",
      "z": "9433ac39.c5756",
      "name": "-> Converter ->",
      "rules": [
      {
      "t": "move",
      "p": "payload",
      "pt": "msg",
      "to": "payload.rgb",
      "tot": "msg"
      }
      ],
      "action": "",
      "property": "",
      "from": "",
      "to": "",
      "reg": false,
      "x": 740,
      "y": 1290,
      "wires": [
      [
      "7bd5f7d8.5e0f58"
      ]
      ]
      },
      {
      "id": "d5d520c8.c3118",
      "type": "hue-bridge",
      "z": "",
      "name": "Philips hue",
      "bridge": "1.2.3.103",
      "key": "*****",
      "interval": "1000"
      },
      {
      "id": "b91f3657.228818",
      "type": "alexa-home-conf",
      "z": "",
      "username": "
      "
      }
      ]

      
      

      if ((msg['command']) == 'SetColorRequest') {
      msg['payload'] = [(msg['payload']['hue']), (msg['payload']['saturation']) * 100, (msg['payload']['brightness']) * 100];
      return [msg, null];
      } else if ((msg['command']) == 'TurnOffRequest') {
      msg['payload'] = false;
      return [null, msg];
      } else if ((msg['command']) == 'TurnOnRequest') {
      msg['payload'] = true;
      return [null, msg];
      }

      posted in Skripten / Logik
      D
      dondon4002
    • RE: Node-Red mit Alexa - Dimmer

      Perfekt 😄 dann hab ich nur den Converter falsch benutzt 😄 😄 danach noch nen Change to msg.payload.rgb und Alexa schaltet das ganze 🙂 Danke dir

      posted in Skripten / Logik
      D
      dondon4002
    • RE: Node-Red mit Alexa - Dimmer

      Alexa wirft bei "Alexa Schalte Test auf ROT" dies aus:

      "hue":0,"saturation":1,"brightness":1
      

      dies schiebe ich in den Blocky und mache ein Array daraus damit dies kommt:

      "hsv":[0,100,100]
      

      Der Converter macht aber nun ein RGB Array und zwar so:

      [3,3,3]
      

      Es müsste aber für den HUE Adapter so kommen:

      RGB [255,0,0]
      
      posted in Skripten / Logik
      D
      dondon4002
    • RE: Node-Red mit Alexa - Dimmer

      Also irgendwas passt nicht 😞

      11834_35b18fc5-c690-4195-a782-5a48ee7c4877.jpg

      if ((msg['command']) == 'SetColorRequest') {
        msg['payload']['hsv'] = [(msg['payload']['hue']), (msg['payload']['saturation']) * 100, (msg['payload']['brightness']) * 100];
        return msg;
      } else {
      }
      
      

      Ausgabe Alexa und Blocky:

      {"hue":0,"saturation":1,"brightness":1,"hsv":[0,100,100]}
      

      Ausgabe Converter (HSV to RGB)

      [3,3,3]
      
      posted in Skripten / Logik
      D
      dondon4002
    • RE: Node-Red mit Alexa - Dimmer

      Ja den habe ich ausprobiert aber irgendwie klappt es damit nicht so richtig. vielleicht mache ich es auch falsch.. Am Ende wäre es aber der richtige Converter dafür. HSV Array-> RGB als Array

      Man müsste dann aber schauen das man vorher Saturation und Brightness noch *100 nimmt..

      posted in Skripten / Logik
      D
      dondon4002
    • RE: Node-Red mit Alexa - Dimmer

      Den Hue Adapter würde ich nicht nutzen wenn du eh Node-Red nutzt denn da gibt's ja das HueMagic

      und dieses ist Flexibel, es nimmt RGB oder HEX entgegen.. aber leider gibt Alexa nur HSB/HSL Werte als HUE (Hue: 0, Saturation: 1, Brightness:1) für Rot zum Beispiel. Man müsste also einen Converter von HSB/HSL zu HEX oder RGB haben.

      derzeit Steuer ich Rot / Blau / Weiss so.. was echt nicht toll ist.

      if ((msg['command']) == 'SetColorRequest') {
        if ((msg['payload']['hue']) == '0' && (msg['payload']['saturation']) == '1') {
          msg['payload']['hex'] = '#ff0000';
        } else if ((msg['payload']['hue']) == '240') {
          msg['payload']['hex'] = '#3366ff';
        } else if ((msg['payload']['hue']) == '0' && (msg['payload']['saturation']) == '0') {
          msg['payload']['hex'] = '#ffffff';
        }
        msg['payload']['brightness'] = '100';
        msg['payload']['saturation'] = '100';
        return msg;
      } else {
      }
      
      
      posted in Skripten / Logik
      D
      dondon4002
    • RE: Node-Red mit Alexa - Dimmer

      Können wir nicht gleich noch die Farbe hinzufügen 😄 Daran hapert es derzeit bei mir.

      Leider brauch Phillips Hue einen "HUE" wert den weder der UI Colorpicker auswirft noch Alexa 😄

      posted in Skripten / Logik
      D
      dondon4002
    • RE: Flow Optimieren

      Japp genau, das mache ich dann kurz vorm Zerteilen in die einzelnen Flows.. jetzt für alles auf einmal war es einfacher in einem Flow.

      Ich muss die ganzen Link`s auch noch beschriften und dann kommen später die Comments 😉

      posted in Skripten / Logik
      D
      dondon4002
    • RE: Flow Optimieren

      HAHA jetzt wollen wir aber mal nicht übertreiben 😄

      Ich gebe mir mühe das ich auch in 2 Jahren noch weiß was ich da getan habe 😄

      posted in Skripten / Logik
      D
      dondon4002
    Community
    Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
    The ioBroker Community 2014-2023
    logo