|
[{"id":"1919bd63.e6e643","type":"serial-port","serialport":"/dev/ttyAMA0","serialbaud":"9600","newline":"\\r","addchar":"true"},{"id":"7211440f.8deebc","type":"serial out","name":"Send to PiLite","serial":"1919bd63.e6e643","x":808.8888549804688,"y":502.11109733581543,"z":"7cf9991f.830668","wires":[]},{"id":"36a45dc9.c95ba2","type":"tcp in","server":"client","host":"XXX.XXX.XXX.XXX","port":"1012","datamode":"stream","datatype":"buffer","newline":" \\n","topic":"FritzBox Telnet Calls","name":"","base64":false,"x":223.55548095703125,"y":265.19442558288574,"z":"7cf9991f.830668","wires":[["306150a8.cf9eb"]]},{"id":"306150a8.cf9eb","type":"function","name":"Parse FritzBox Telnet","func":"//Name: Parse FritzBox Telnet\n\n//\n//Requirements:\n//- TCP Input\n//- must be able to reach tcp port 1012 on your FB\n//- activate call monitor on FB by dialing #96*5*\n//\n// Output : 1\n//-If context is RING, output is PhoneNumber\n// Other calltypes - CALL - Outgoing\n// - DISCONNECT \n\ncontext.buff = context.buff || \"\";\ncontext.buff = context.buff + msg.payload;\n//context.buff = msg.payload;\n\nmess = context.buff.slice(18);\t// return rest of the buffer as the payload\nslices = mess.split(\";\");\ncalltype= mess.split(\";\",1);\n\nif (slices[2] == \"\") {\nphonenumber = \"Number withheld \";}\nelse \n{\nphonenumber = slices[2] +\" \";\n}\n\n\n//msg.payload= calltype ;\ncontext.buff = \"\";\nif (calltype == \"RING\") {\nmsg.topic = calltype;\t// return the first two chars as the topic\nmsg.payload = phonenumber;\t// return rest of the buffer as the payload\n\nreturn msg;\n}\nreturn null;\n//return msg;\n","outputs":1,"x":445.55548095703125,"y":266.19442558288574,"z":"7cf9991f.830668","wires":[["d479210b.2b86e","49ddb68c.b62248","7211440f.8deebc"]]},{"id":"95ea75ce.6a1588","type":"inject","name":"Set Scroll Speed","topic":"Scroll Speed","payload":"$$$SPEED35","repeat":"","crontab":"","once":false,"x":233.55548095703125,"y":379.77775382995605,"z":"7cf9991f.830668","wires":[["7211440f.8deebc"]]},{"id":"49ddb68c.b62248","type":"delay","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","x":836.8888549804688,"y":394.7777690887451,"z":"7cf9991f.830668","wires":[["7211440f.8deebc"]]},{"id":"d479210b.2b86e","type":"delay","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","x":832.5554809570312,"y":324.44442558288574,"z":"7cf9991f.830668","wires":[["7211440f.8deebc"]]},{"id":"261f05a7.d9e0fa","type":"comment","name":"FRITZ!box to PiLite Caller ID Display double click for more info...","info":"CallerID flow from Fritz!Box router (http://www.avm.de/en/index.php3) \nto\nPiLite display \n(http://shop.ciseco.co.uk/pi-lite-white-lots-of-leds-for-the-raspberry-pi-1206-white/) \n\nUses following nodes:\nTCP input\nfunction\ndelay nodes ( to repeat number on display)\nserial output\nInject ( to modify PiLite config if necessary)\n\n\n\nTo work first you need to activate tcp port 1012 on your Fritz!Box by dialing #96*5*\n\nChange TCP node to point at IP address of router\n\nAlso requires serialport node to be installed.\n\nSet Scroll Speed\nSet scrolling delay in mS. 1 is scrolling very fast, 1000 is scrolling very slow. Default speed is 80.\n$$$SPEED<Number>\n\n\n","x":349,"y":199,"z":"7cf9991f.830668","wires":[]}] |