gablau / node-red-contrib-blynk-ws

Old/Legacy Blynk library implementation for Node-RED using WebSockets
MIT License
31 stars 10 forks source link

unable to Set Property #11

Closed janeksz closed 5 years ago

janeksz commented 5 years ago

Hi, I need your help with changing properties of Blynk Image (a picture in Image Gallery). I want to refresh it in Blynk after taking a snapshot.

My flow is:

flow.txt

gablau commented 5 years ago

Hello, it would never have worked because the "urls" and "url" properties for the image gallery were not yet implemented in the library.

Download the new version 0.9.0 which implements these new properties!

You have to modify your flow because it is not correct, if you use the "set property" node use these examples:

msg = {}
msg.topic = "bycode";
msg.payload = "not empty";
msg.urls=[
    "https://www.iconsdb.com/icons/preview/white/test-tube-2-xxl.png",
    "https://www.iconsdb.com/icons/preview/yellow/test-tube-2-xxl.png",
    "https://www.iconsdb.com/icons/preview/blue/test-tube-2-xxl.png",
    "https://www.iconsdb.com/icons/preview/red/test-tube-2-xxl.png",
    "https://www.iconsdb.com/icons/preview/white/test-tube-2-xxl.png",
    ]
return msg;
msg = {}
msg.topic = "bycode";
msg.payload = "not empty";
msg.imgid=5; //index of image
msg.url="https://www.iconsdb.com/icons/preview/orange/test-tube-2-xxl.png";
return msg;

if you use the "image gallery" node these:

msg = {}
msg.topic = "write-property";
msg.urls=[
    "https://www.iconsdb.com/icons/preview/white/test-tube-2-xxl.png",
    "https://www.iconsdb.com/icons/preview/yellow/test-tube-2-xxl.png",
    "https://www.iconsdb.com/icons/preview/blue/test-tube-2-xxl.png",
    "https://www.iconsdb.com/icons/preview/red/test-tube-2-xxl.png",
    ]
return msg;
msg = {}
msg.topic = "write-property";
msg.imgid=3; //index of image
msg.url="https://www.iconsdb.com/icons/preview/orange/test-tube-2-xxl.png";
return msg;

let me know Greetings