BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Streaming video from uv4l to Blynk using nodered

#21

@Gunner, sorry i didn’t get it. Can you repeat, please?

0 Likes

#22

OK…

:stuck_out_tongue_winking_eye:

AKA read that link I showed at around post #10 of this topic.

I don’t know if that would be an option or solution for you or not… depends on what you want accomplish and what you try I guess.

0 Likes

#23

@Gunner, do you mean Image Gallery ?
I don’t see the solution there

0 Likes

#24

Was just going off your comment…

If it will not be a solution for you then no problem for me :slight_smile:

0 Likes

#25

@Gunner, trying to change the Properties, but nothing works, still not refreshing the image and not changing any properties like scaling, rotating, etc. :sob:

0 Likes

#26

Have you seen this announcement?

Pete.

0 Likes

#27

Hi janek,
see this issue for usage with “set property” node or “image gallery” node:
https://github.com/gablau/node-red-contrib-blynk-ws/issues/11#issuecomment-474626815

let us know

0 Likes

#28

thanks @gab.lau, @PeteKnight, @Gunner So far no luck, I updated the node (node-red-contrib-blynk-ws) a tried the recommended code with no result - the image is loaded at the start, but never updated. My nodered flow is:

[{"id":"993a10a.096037","type":"tab","label":"Blynk Local 1","disabled":false,"info":""},{"id":"5bed58b0.fd51c8","type":"inject","z":"993a10a.096037","name":"","topic":"timestamp","payload":"","payloadType":"date","repeat":"0.1","crontab":"","once":true,"onceDelay":"1","x":140,"y":100,"wires":[["3320257b.0e65c2","3d35cd04.b73c3a"]]},{"id":"3320257b.0e65c2","type":"debug","z":"993a10a.096037","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","x":370,"y":160,"wires":[]},{"id":"3d35cd04.b73c3a","type":"blynk-ws-out-write","z":"993a10a.096037","name":"","pin":0,"pinmode":0,"client":"5ba1ccbc.9461d4","x":350,"y":100,"wires":[]},{"id":"cd995a3c.eff658","type":"comment","z":"993a10a.096037","name":"Blynk local test 85e675fe1e544b46b20bbf260e323516","info":"85e675fe1e544b46b20bbf260e323516 ","x":220,"y":40,"wires":[]},{"id":"c6628745.81cee8","type":"http in","z":"993a10a.096037","name":"","url":"/snapshot","method":"get","upload":false,"swaggerDoc":"","x":100,"y":240,"wires":[["104fb14b.a801bf"]]},{"id":"104fb14b.a801bf","type":"file in","z":"993a10a.096037","name":"","filename":"/dev/shm/snapshot.jpeg","format":"","sendError":true,"x":330,"y":240,"wires":[["a5ecd675.8d47b8"]]},{"id":"a5ecd675.8d47b8","type":"change","z":"993a10a.096037","name":"Set Headers","rules":[{"t":"set","p":"headers","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"headers.content-type","pt":"msg","to":"image/jpeg","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":240,"wires":[["5efb6cdb.ffc184","949fb2a3.2af188"]]},{"id":"5efb6cdb.ffc184","type":"http response","z":"993a10a.096037","name":"","statusCode":"","headers":{},"x":530,"y":280,"wires":[]},{"id":"c6f57f07.ed3e2","type":"exec","z":"993a10a.096037","command":"bash /opt/snapshot.sh","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":true,"name":"snapshot from RaspiCam","x":490,"y":440,"wires":[["d07d50e1.6be63"],["19d0ffbf.2fe158","3ccb8756.81e1d"],["98a1ec8c.8c9b68"]]},{"id":"949fb2a3.2af188","type":"blynk-ws-out-write","z":"993a10a.096037","name":"","pin":"1","pinmode":0,"client":"5ba1ccbc.9461d4","x":620,"y":180,"wires":[]},{"id":"f9c29027.ab491","type":"blynk-ws-style-btn","z":"993a10a.096037","name":"Snapshot","pin":"3","prop":0,"onlabel":"ON","offlabel":"OFF","oncolor":"#000000","onbackcolor":"#ffffff","offcolor":"#ffffff","offbackcolor":"#000000","client":"5ba1ccbc.9461d4","x":80,"y":480,"wires":[["96e1c2d3.a01aa8","1ad650fd.4c311f"]]},{"id":"96e1c2d3.a01aa8","type":"function","z":"993a10a.096037","name":"make snapshot","func":"if(msg.payload==1)\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":480,"wires":[["c6f57f07.ed3e2"]]},{"id":"44595fb2.85abf","type":"blynk-ws-out-set-property","z":"993a10a.096037","name":"","pin":"1","pinmode":0,"prop":"bycode","client":"5ba1ccbc.9461d4","x":500,"y":320,"wires":[]},{"id":"3ccb8756.81e1d","type":"function","z":"993a10a.096037","name":"image property change","func":"msg = {}\nmsg.topic = \"bycode\";\nmsg.payload = \"not empty\";\nmsg.imgid=1; //index of image\nmsg.url=\"https://192.168.0.13:1880/snapshot\";\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":380,"wires":[["601afc1.d08c404","44595fb2.85abf"]]},{"id":"601afc1.d08c404","type":"debug","z":"993a10a.096037","name":"","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"true","x":450,"y":380,"wires":[]},{"id":"d07d50e1.6be63","type":"debug","z":"993a10a.096037","name":"","active":false,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","x":720,"y":440,"wires":[]},{"id":"19d0ffbf.2fe158","type":"debug","z":"993a10a.096037","name":"","active":false,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","x":710,"y":500,"wires":[]},{"id":"98a1ec8c.8c9b68","type":"debug","z":"993a10a.096037","name":"","active":false,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","x":720,"y":560,"wires":[]},{"id":"1ad650fd.4c311f","type":"debug","z":"993a10a.096037","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","x":260,"y":540,"wires":[]},{"id":"5ba1ccbc.9461d4","type":"blynk-ws-client","z":"","name":"Image Gallery","path":"wss://192.168.0.20:9443/websockets","key":"85e675fe1e544b46b20bbf260e323516","dbg_all":false,"dbg_read":false,"dbg_write":false,"dbg_notify":false,"dbg_mail":false,"dbg_prop":false,"dbg_sync":false,"dbg_bridge":false,"dbg_low":false,"dbg_pins":"","multi_cmd":true,"proxy_type":"no","proxy_url":"","enabled":true}]
0 Likes

#29

0 Likes

#30

Hi janek,
the problem I believe is no longer not node-red at this point.
From your flow I see that the url of the image is https://192.168.0.13:1880/snapshot but blynk caches images and if the link is always the same it does not update it.
A solution could be to give a unique name to the image like: https://192.168.0.13:1880/snapshot-20192103080000 simply adding the current date and time or the timestamp to filename.

let us know

1 Like

#31

@gab.lau, @PeteKnight, @Gunner - thank you for your support. I am able to make a snapshot from RaspiCam using Blynk on Android (simulator Bluestack 4), but not on my iPhone.
Attached is my NodeRed flow:

 [{"id":"993a10a.096037","type":"tab","label":"Blynk Local 1","disabled":false,"info":""},{"id":"5bed58b0.fd51c8","type":"inject","z":"993a10a.096037","name":"","topic":"timestamp","payload":"","payloadType":"date","repeat":"0.1","crontab":"","once":true,"onceDelay":"1","x":140,"y":100,"wires":[["3320257b.0e65c2","3d35cd04.b73c3a"]]},{"id":"3320257b.0e65c2","type":"debug","z":"993a10a.096037","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","x":370,"y":160,"wires":[]},{"id":"3d35cd04.b73c3a","type":"blynk-ws-out-write","z":"993a10a.096037","name":"","pin":0,"pinmode":0,"client":"5ba1ccbc.9461d4","x":350,"y":100,"wires":[]},{"id":"cd995a3c.eff658","type":"comment","z":"993a10a.096037","name":"Blynk local test 85e675fe1e544b46b20bbf260e323516","info":"85e675fe1e544b46b20bbf260e323516 ","x":220,"y":40,"wires":[]},{"id":"c6628745.81cee8","type":"http in","z":"993a10a.096037","name":"","url":"/snapshot00","method":"get","upload":false,"swaggerDoc":"","x":100,"y":220,"wires":[["104fb14b.a801bf"]]},{"id":"104fb14b.a801bf","type":"file in","z":"993a10a.096037","name":"","filename":"/dev/shm/snapshot00.jpeg","format":"","sendError":true,"x":330,"y":220,"wires":[["a5ecd675.8d47b8"]]},{"id":"a5ecd675.8d47b8","type":"change","z":"993a10a.096037","name":"Set Headers","rules":[{"t":"set","p":"headers","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"headers.content-type","pt":"msg","to":"image/jpeg","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":220,"wires":[["5efb6cdb.ffc184","949fb2a3.2af188"]]},{"id":"5efb6cdb.ffc184","type":"http response","z":"993a10a.096037","name":"","statusCode":"","headers":{},"x":750,"y":220,"wires":[]},{"id":"c6f57f07.ed3e2","type":"exec","z":"993a10a.096037","command":"bash /opt/snapshot.sh","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":true,"name":"snapshot from RaspiCam","x":490,"y":400,"wires":[["d07d50e1.6be63"],["19d0ffbf.2fe158","1a26d0a3.9dbdb7"],["98a1ec8c.8c9b68"]]},{"id":"949fb2a3.2af188","type":"blynk-ws-out-write","z":"993a10a.096037","name":"","pin":"1","pinmode":0,"client":"5ba1ccbc.9461d4","x":780,"y":160,"wires":[]},{"id":"f9c29027.ab491","type":"blynk-ws-style-btn","z":"993a10a.096037","name":"Snapshot","pin":"3","prop":0,"onlabel":"ON","offlabel":"OFF","oncolor":"#000000","onbackcolor":"#ffffff","offcolor":"#ffffff","offbackcolor":"#000000","client":"5ba1ccbc.9461d4","x":80,"y":480,"wires":[["96e1c2d3.a01aa8","1ad650fd.4c311f"]]},{"id":"96e1c2d3.a01aa8","type":"function","z":"993a10a.096037","name":"make snapshot","func":"if(msg.payload==1)\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":480,"wires":[["c6f57f07.ed3e2"]]},{"id":"44595fb2.85abf","type":"blynk-ws-out-set-property","z":"993a10a.096037","name":"","pin":"1","pinmode":0,"prop":"bycode","client":"5ba1ccbc.9461d4","x":520,"y":760,"wires":[]},{"id":"3ccb8756.81e1d","type":"function","z":"993a10a.096037","name":"image property change","func":"var filename = msg.payload;\nmsg = {};\nmsg.topic = \"bycode\";\nmsg.payload = \"not empty\";\nif(filename == \"snapshot00.jpeg\")\n    {\n        msg.imgid=1;\n        msg.url=\"http://192.168.0.13:1880/snapshot00\";\n    }else\n        {\n        msg.imgid=2;\n        msg.url=\"http://192.168.0.13:1880/snapshot01\";   \n        }\nreturn msg;","outputs":1,"noerr":0,"x":220,"y":760,"wires":[["44595fb2.85abf","fdaf87b4.e9cc"]]},{"id":"d07d50e1.6be63","type":"debug","z":"993a10a.096037","name":"","active":false,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","x":720,"y":440,"wires":[]},{"id":"19d0ffbf.2fe158","type":"debug","z":"993a10a.096037","name":"","active":false,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","x":720,"y":500,"wires":[]},{"id":"98a1ec8c.8c9b68","type":"debug","z":"993a10a.096037","name":"","active":false,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","x":720,"y":560,"wires":[]},{"id":"1ad650fd.4c311f","type":"debug","z":"993a10a.096037","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","x":260,"y":540,"wires":[]},{"id":"d8de1f32.86d9f8","type":"debug","z":"993a10a.096037","name":"","active":false,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","x":640,"y":620,"wires":[]},{"id":"2897251f.59a67a","type":"inject","z":"993a10a.096037","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":110,"y":680,"wires":[["db385c95.41558"]]},{"id":"db385c95.41558","type":"function","z":"993a10a.096037","name":"Init flow variables","func":"flow.set('count', 0);\nflow.set('image01', \"\");\nflow.set('image02', \"\");","outputs":1,"noerr":0,"x":150,"y":640,"wires":[[]]},{"id":"1a26d0a3.9dbdb7","type":"function","z":"993a10a.096037","name":"toggle","func":"if (msg.payload)\n{\n    var count = flow.get('count') || false;\n    if (count === false)\n        {\n            count = true;\n            msg.payload = \"snapshot00.jpeg\"\n        }\n        else\n        {\n            count = false;\n            msg.payload = \"snapshot01.jpeg\"\n        }\n    \n    flow.set('count', count);                \n}\nreturn msg;","outputs":1,"noerr":0,"x":470,"y":620,"wires":[["d8de1f32.86d9f8","65c5e55a.dabd5c"]]},{"id":"65c5e55a.dabd5c","type":"fs-ops-move","z":"993a10a.096037","name":"toggle filename","sourcePath":"/dev/shm","sourcePathType":"str","sourceFilename":"snapshot.jpeg","sourceFilenameType":"str","destPath":"/dev/shm","destPathType":"str","destFilename":"payload","destFilenameType":"msg","link":false,"x":440,"y":700,"wires":[["4c9d033d.800224","3ccb8756.81e1d"]]},{"id":"4c9d033d.800224","type":"debug","z":"993a10a.096037","name":"","active":false,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","x":640,"y":700,"wires":[]},{"id":"fdaf87b4.e9cc","type":"debug","z":"993a10a.096037","name":"","active":false,"tosidebar":true,"console":true,"tostatus":true,"complete":"true","x":430,"y":820,"wires":[]},{"id":"e31fdae9.7030b","type":"file in","z":"993a10a.096037","name":"","filename":"/dev/shm/snapshot01.jpeg","format":"","sendError":true,"x":330,"y":280,"wires":[["a41ed02a.d703a"]]},{"id":"c42d9ec0.c49e68","type":"http in","z":"993a10a.096037","name":"","url":"/snapshot01","method":"get","upload":false,"swaggerDoc":"","x":100,"y":280,"wires":[["e31fdae9.7030b"]]},{"id":"a41ed02a.d703a","type":"change","z":"993a10a.096037","name":"Set Headers","rules":[{"t":"set","p":"headers","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"headers.content-type","pt":"msg","to":"image/jpeg","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":280,"wires":[["5efb6cdb.ffc184","113aff0f.5cc2b9"]]},{"id":"113aff0f.5cc2b9","type":"blynk-ws-out-write","z":"993a10a.096037","name":"","pin":"1","pinmode":0,"client":"5ba1ccbc.9461d4","x":760,"y":300,"wires":[]},{"id":"5ba1ccbc.9461d4","type":"blynk-ws-client","z":"","name":"Image Gallery","path":"wss://192.168.0.20:9443/websockets","key":"85e675fe1e544b46b20bbf260e323516","dbg_all":false,"dbg_read":false,"dbg_write":false,"dbg_notify":false,"dbg_mail":false,"dbg_prop":false,"dbg_sync":false,"dbg_bridge":false,"dbg_low":false,"dbg_pins":"","multi_cmd":true,"proxy_type":"no","proxy_url":"","enabled":true}]

Cheers,
Janek

0 Likes

#32

Is there an update for iOS in a pipeline?

0 Likes

#33

Are you part of the iOS beta programme?

Pete.

0 Likes

#34

no, what is involved?

0 Likes

#35

Contact @Eugene and he’ll sort you out.

Pete.

0 Likes

#36
0 Likes

#37

The link to get ios beta builds is the same and public, I’m not adding testers individually anymore.

1 Like