1 line
12 KiB
JSON
1 line
12 KiB
JSON
|
[{"id":"c13b628d.15ca2","type":"tab","label":"Things Mobile","disabled":false,"info":""},{"id":"bb7f1af3.ad7df8","type":"function","z":"c13b628d.15ca2","name":"SIM Liste","func":"/* working curl...\ncurl -i -X POST -H “Content-Type: multipart/form-data” -F “upload=@/Users/al/artwork/pacman.gif” -F “upload-type=ANIMATED_GIF” -F “console=MAME” -F “displaynow=1”\n*/\nvar g_username = global.get('g_username') || 0;\nvar g_token = global.get('g_token') || 0;\n//set msg.headers to an {object} with property \"Content-Type\" set to \"multipart/form-data\"\nmsg.headers = {\n \"Content-Type\": \"multipart/form-data\" \n}\n \n//set payload to an {object} with properties and values\nmsg.payload = {\n \"username\": g_username,\n \"token\": g_token\n \n}; \n\n//set url\nmsg.url = \"https://api.thingsmobile.com/services/business-api/simListLite\"\n\n// return the msg to next node (the http request)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":400,"y":240,"wires":[["2a16909e.64bbf"]]},{"id":"e2e9f5bb.79a668","type":"inject","z":"c13b628d.15ca2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"0 0 * * *","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":250,"y":240,"wires":[["bb7f1af3.ad7df8"]]},{"id":"2a16909e.64bbf","type":"http request","z":"c13b628d.15ca2","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":570,"y":240,"wires":[["e36102ed.6a8548"]]},{"id":"4209b9dd.0c7928","type":"debug","z":"c13b628d.15ca2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":970,"y":240,"wires":[]},{"id":"e36102ed.6a8548","type":"xml","z":"c13b628d.15ca2","name":"","property":"payload","attr":"","chr":"","x":750,"y":240,"wires":[["155f778b.420dc","4209b9dd.0c7928"]]},{"id":"486c2e92.063708","type":"function","z":"c13b628d.15ca2","name":"","func":"var load = msg.payload.result.sims[0].sim[2].balance[0];\nvar status = msg.payload.result.sims[0].sim[2].status[0];\nvar msisdn = msg.payload.result.sims[0].sim[2].msisdn[0];\nvar traffic = msg.payload.result.sims[0].sim[2].dailyTraffic[0];\nvar type = msg.payload.result.sims[0].sim[2].type[0];\n\nvar load1 = (load/1000000).toFixed(2);\nvar msg1 = { payload: load1 };\nvar msg2 = { payload: status };\nvar msg3 = { payload: msisdn };\nvar msg4 = { payload: traffic };\nvar msg5 = { payload: type };\nreturn [ msg1, msg2, msg3, msg4, msg5 ];","outputs":5,"noerr":0,"initialize":"","finalize":"","x":320,"y":360,"wires":[["49abbe2c.50b3b"],["1ba9d3f4.00bab4"],["5db9d024.6e7a68"],["fe41ff21.e1268"],["3e54be29.5cffda"]]},{"id":"155f778b.420dc","type":"link out","z":"c13b628d.15ca2","name":"","links":["12c3159f.45fcfa","da3ed9e5.74bfb8","43479429.e38404"],"x":855,"y":240,"wires":[]},{"id":"12c3159f.45fcfa","type":"link in","z":"c13b628d.15ca2","name":"","links":["155f778b.420dc","51706310.acb04c"],"x":195,"y":360,"wires":[["486c2e92.063708"]]},{"id":"49abbe2c.50b3b","type":"ui_text","z":"c13b628d.15ca2","group":"7f7a22fa.dbc0d4","order":3,"width":0,"height":0,"name":"Karte 3","label":"Rest Datenvolumen: ","format":"{{msg.payload}} MB","layout":"row-spread","x":510,"y":320,"wires":[]},{"id":"7545ec08.3b9ae4","type":"function","z":"c13b628d.15ca2","name":"","func":"var load = msg.payload.result.sims[0].sim[0].balance[0];\nvar status = msg.payload.result.sims[0].sim[0].status[0];\nvar msisdn = msg.payload.result.sims[0].sim[0].msisdn[0];\nvar traffic = msg.payload.result.sims[0].sim[0].dailyTraffic[0];\nvar type = msg.payload.result.sims[0].sim[0].type[0];\n\nvar load1 = (load/1000000).toFixed(2);\nvar msg1 = { payload: load1 };\nvar msg2 = { payload: status };\nvar msg3 = { payload: msisdn };\nvar msg4 = { payload: traffic };\nvar msg5 = { payload: type };\nreturn [ msg1, msg2, msg3, msg4, msg5 ];","outputs":5,"noerr":0,"initialize":"","finalize":"","x":320,"y":620,"wires":[["6809b17f.868c9"],["e1597f4e.c17128"],["466f4d
|