Node-red-contrib-chatbot 1.2.4

Hallo Zusammen
Ich würde gerne die GPS Daten via telegram aufs Handy schicken, so wie ich das in der Beschreibung gelesen habe, macht man das mit der location-node. In der Hilfe steht das man den Node mit einer Funktion Node füttern kann, sodas auf dem Handy ein Google Maps Bild erscheint.

msg.payload.latitude = 45.00;
msg.payload.longitude = 23.00;
return msg;

Leider bkomme ich das nicht hin.

[{"id":"c1d76ea2.67c3d","type":"gpsd","z":"67f4ff1d.729ad8","name":"Adafruit Ultimate GPS","hostname":"localhost","port":"2947","tpv":true,"sky":true,"info":false,"device":true,"gst":false,"att":false,"x":140,"y":440,"wires":[["f3f48c5d.b76e5","ff349659.7127f8","2e1212b1.cb86f6","6560f5f6.c0ed8c"]]},{"id":"6560f5f6.c0ed8c","type":"switch","z":"67f4ff1d.729ad8","name":"","property":"payload.class","propertyType":"msg","rules":[{"t":"eq","v":"TPV","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":390,"y":460,"wires":[["4d22a0bd.63dda","202c890a31817d08","8f6fe0eb3a69a995"]]},{"id":"4d22a0bd.63dda","type":"change","z":"67f4ff1d.729ad8","name":"","rules":[{"t":"set","p":"payload.name","pt":"msg","to":"Worldmap","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":460,"wires":[["23b5e03.345882"]]},{"id":"23b5e03.345882","type":"worldmap","z":"67f4ff1d.729ad8","name":"","lat":"","lon":"","zoom":"","layer":"OSMG","cluster":"","maxage":"","usermenu":"show","layers":"show","panit":"false","panlock":"false","zoomlock":"false","hiderightclick":"false","coords":"none","showgrid":"false","allowFileDrop":"false","path":"/mapui","overlist":"DR,CO,RA,DN,HM","maplist":"OSMG,OSMC,EsriC,EsriS,EsriT,EsriO,EsriDG,NatGeo,UKOS,OpTop","mapname":"","mapurl":"","mapopt":"","mapwms":false,"x":870,"y":460,"wires":[]},{"id":"2cf3ed7c.bd6ad2","type":"ui_worldmap","z":"67f4ff1d.729ad8","group":"88f77589.0122d8","order":2,"width":"14","height":"14","name":"Worldmap ","lat":"","lon":"","zoom":"","layer":"OSM grey","cluster":"","maxage":"","usermenu":"show","layers":"show","panit":"true","panlock":"false","zoomlock":"true","hiderightclick":"false","coords":"deg","showgrid":"false","allowFileDrop":"false","path":"/mapui","x":870,"y":420,"wires":[]},{"id":"202c890a31817d08","type":"function","z":"67f4ff1d.729ad8","name":"function 3","func":"var latitude = msg.payload.lat ;\nvar longitude = msg.payload.lon;\nvar time = msg.payload.time;\n\n\nmsg.payload = {}\nmsg.payload.latitude = latitude\nmsg.payload.longitude = longitude\nmsg.payload.Latitude = latitude\nmsg.payload.Longitude = longitude\nmsg.payload.time = time\n\n\nreturn msg;\n\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":580,"wires":[["ce1c533fdb5932a5","7c13dca0957e6e19"]]},{"id":"7291affecb5132aa","type":"debug","z":"67f4ff1d.729ad8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1190,"y":580,"wires":[]},{"id":"23f235bc864d837f","type":"debug","z":"67f4ff1d.729ad8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1170,"y":640,"wires":[]},{"id":"47b7da2d9bc870a9","type":"link out","z":"67f4ff1d.729ad8","name":"link out 4","mode":"link","links":["b6a1d30a3b14db4b"],"x":1095,"y":440,"wires":[]},{"id":"ce1c533fdb5932a5","type":"rbe","z":"67f4ff1d.729ad8","name":"","func":"deadbandEq","gap":"0.001","start":"","inout":"out","septopics":true,"property":"msg.payload.latitude","topi":"topic","x":750,"y":580,"wires":[["7291affecb5132aa","14f01f7180fc8060","b522a03f2df703bb","bee964af7d78261d"]]},{"id":"14f01f7180fc8060","type":"function","z":"67f4ff1d.729ad8","name":"function 4","func":"var time = msg.payload.time;\n\n\n\nmsg.payload.time = time\n\n\nreturn msg;\n\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":980,"y":640,"wires":[["23f235bc864d837f"]]},{"id":"ef9703cdff9c5d54","type":"chatbot-location","z":"67f4ff1d.729ad8","name":"","latitude":"","longitude":"","place":"","x":760,"y":500,"wires":[["47b7da2d9bc870a9","88b0258811ee77b2"]]},{"id":"b1c2e04daf5e400f","type":"debug","z":"67f4ff1d.729ad8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1190,"y":540,"wires":[]},{"id":"8f6fe0eb3a69a995","type":"function","z":"67f4ff1d.729ad8","name":"function 5","func":"var latitude = msg.payload.lat ;\nvar longitude = msg.payload.lon;\nvar time = msg.payload.time;\n\n\nmsg.payload = {}\nmsg.payload.latitude = latitude;\nmsg.payload.longitude = longitude;\n//msg.payload.Latitude = latitude;\n//msg.payload.Longitude = longitude;\n//msg.payload.time = time;\n\n\nreturn msg;\n\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":500,"wires":[["ef9703cdff9c5d54"]]},{"id":"b522a03f2df703bb","type":"function","z":"67f4ff1d.729ad8","name":"set Global","func":"\nglobal.set(\"GPSlatitude\", msg.payload.latitude);\nglobal.set(\"GPSlongitude\", msg.payload.longitude);\nglobal.set(\"GPStime\", msg.payload.time);\n\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":970,"y":600,"wires":[[]]},{"id":"7c13dca0957e6e19","type":"rbe","z":"67f4ff1d.729ad8","name":"","func":"deadbandEq","gap":"0.001","start":"","inout":"out","septopics":true,"property":"msg.payload.longitude","topi":"topic","x":750,"y":620,"wires":[["b522a03f2df703bb","14f01f7180fc8060"]]},{"id":"bee964af7d78261d","type":"function","z":"67f4ff1d.729ad8","name":"get GPS Telegram","func":"msg.payload.content = global.get(\"GPSlatitude\").toString() +\"\\n \"+ \n                     global.get(\"GPSlongitude\").toString() ;\nmsg.payload = msg.payload.content;\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":950,"y":540,"wires":[["47b7da2d9bc870a9","b1c2e04daf5e400f"]]},{"id":"88b0258811ee77b2","type":"debug","z":"67f4ff1d.729ad8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1190,"y":500,"wires":[]},{"id":"88f77589.0122d8","type":"ui_group","name":"Karte","tab":"c4c17961.4519f8","order":1,"disp":true,"width":"15","collapse":false,"className":""},{"id":"c4c17961.4519f8","type":"ui_tab","name":"GPS","icon":"dashboard","disabled":false,"hidden":false}]


Mit der Function "get GPS Telegram" bekomme ich wenigsten die Zahlen von latitude longitude geschickt
Kann mir einer sagen wo mein Fehler liegt???
Gruß Arno

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.