forked from Nerdiyde/NodeRedSnippets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FritzBoxCalllist.txt
1 lines (1 loc) · 2.74 KB
/
FritzBoxCalllist.txt
1
[{"id":"32cd67ae.029ae8","type":"inject","z":"bcba3320.cf832","name":"Daten abrufen","topic":"","payload":"","payloadType":"date","repeat":"60","crontab":"","once":true,"onceDelay":0.1,"x":200,"y":1060,"wires":[["46bb5573.caef2c"]]},{"id":"46bb5573.caef2c","type":"fritzbox-calllist","z":"bcba3320.cf832","device":"eef817a2.74b848","name":"","max":"10","x":410,"y":1060,"wires":[["c233249c.6864f8"]]},{"id":"c233249c.6864f8","type":"function","z":"bcba3320.cf832","name":"","func":"\nvar IO=[];\nvar Datum=[];\nvar Nummer=[];\n\n for (var i = 0; i<10; i++) \n {\n if (msg.payload.Call[i].Type!==undefined)\n {\n if(msg.payload.Call[i].Type==1)\n {\n //Eingehender Angenommener Anruf\n IO[i]=\">\";\n Datum[i]=msg.payload.Call[i].Date;\n Nummer[i]=msg.payload.Call[i].Caller;\n } else if(msg.payload.Call[i].Type==2)\n {\n //Eingehender Nicht-Angenommener Anruf\n IO[i]=\">>\";\n Datum[i]=msg.payload.Call[i].Date;\n Nummer[i]=msg.payload.Call[i].Caller;\n } else if(msg.payload.Call[i].Type==3)\n {\n //Ausgehender Nicht-Angenommener Anruf\n IO[i]=\"<<\";\n Datum[i]=msg.payload.Call[i].Date;\n Nummer[i]=msg.payload.Call[i].Called;\n }\n }\n }\nmsg.payload.IO=IO;\nmsg.payload.Datum=Datum;\nmsg.payload.Nummer=Nummer;\nreturn msg;\n","outputs":1,"noerr":0,"x":590,"y":1060,"wires":[["2003f3b6.15134c"]]},{"id":"e0650f9.89875f","type":"comment","z":"bcba3320.cf832","name":"Anrufliste anzeigen","info":"","x":150,"y":1020,"wires":[]},{"id":"2003f3b6.15134c","type":"ui_template","z":"bcba3320.cf832","group":"c2bf12a7.ce122","name":"Anrufliste","order":1,"width":"6","height":"4","format":"Anrufliste\n<table>\n <tr>\n <th>Nr</th> \n <th>IO</th> \n <th>Datum</th>\n <th>Nummer</th> \n </tr>\n <tbody>\n <tr ng-repeat=\"x in msg.payload | limitTo:10:0\">\n <td>{{$index+1}}</td>\n <td>{{msg.payload.IO[$index]}}</td>\n <td>{{msg.payload.Datum[$index]}}</td>\n <td>{{msg.payload.Nummer[$index]}}</td> \n </tr>\n </tbody>\n</table>","storeOutMessages":true,"fwdInMessages":false,"templateScope":"local","x":740,"y":1060,"wires":[["c335fc2a.10892"]]},{"id":"c335fc2a.10892","type":"debug","z":"bcba3320.cf832","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":890,"y":1060,"wires":[]},{"id":"eef817a2.74b848","type":"fritzbox-config","z":"","name":"FabsFritzBox","host":"fritz.box","port":"49000","ssl":false},{"id":"c2bf12a7.ce122","type":"ui_group","z":"","name":"Status","tab":"b29a978f.019318","disp":true,"width":"6","collapse":false},{"id":"b29a978f.019318","type":"ui_tab","z":"","name":"Home","icon":"dashboard"}]