Giter VIP home page Giter VIP logo

node-red-contrib-blynk-iot's People

Contributors

gablau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-red-contrib-blynk-iot's Issues

Coming out of beta

As blynk will be stopping the legacy version on 01.01.2023, when do you expect this node to be coming out of beta?

Dynamically set Auth Token

Hi,

Since the Auth token is defined per device on the Blynk side it would make sense that we could set this property dynamically.
But this would require a connection per auth token if I understand correctly.

Something isn't right with this design.

Thanks.

BLYNK_WRITE not triggered on Device

I would like to use my Node-Red dashboard to control a Blynk IOT ESP32 that is connected through Bklynk.cloud.

I installed the blynk-iot Node-Red library and connected using the 3 required identifiers: Template ID, Template Name and Auth Token (same token associated with the ESP32 hardware).

I created a Node-Red dashboard that attempts to mimic my existing Blynk App in functionality and appearance.

However, where my old Blynk App widgets receive data changes in an event-driven manner, the node-red-contrib-blynk-iot requires polling with the “sync” node for data to flow in for display.

Additionally, when I change a virtual pin value, say pin V2 from 300 to 350 using a slider widget on the node-red dashboard, this change of value does not trigger the BLYNK_WRITE callback function to run on the ESP32. The value is changed on the blynk-cloud server and the value is propagated for display on both the APP and the dashboard interfaces, but the change event is not triggered on the device.
Project Setup
Microcontroller Device:

ESP32 DEV Module
Blynk 1.3.2 - Arduino lib with these Blynk #defines:

    #define BLYNK_TEMPLATE_ID “XXXXXX”
    #define BLYNK_TEMPLATE_NAME “Quickstart Template”
    //#define BLYNK_AUTH_TOKEN “XXXXXXXXXXXXXXXXX”

    #define BLYNK_FIRMWARE_VERSION “0.1.0”
    #define BLYNK_PRINT Serial
    #define APP_DEBUG
    #define USE_ESP32_DEV_MODULE
#include “BlynkEdgent.h”

2 User Interfaces:
iPad Air

Blynk IOT App 3.6.6 (1) on iOS 17.1.1 via blynk.cloud (ny3)
Node-Red Dashboard

node-red-contrib-blynk-iot1.0.0 on
node-red 3.0.2 on
node.js 16.20.2 on
Raspbian GNU/Linux 11 (bullseye) on a pi4

Blynk ioT style button

The node has two Button ON property's

The first one works correctly by indicating "ON" in the debug.

The second one also indicates "ON" in the debug even though it is set to be "OFF".

Can you check it out?

Thanks, Joe
[email protected]

Node.js out of date

Hello i have an orange pi zero with node red installed and when i go to install the new blink library i get this error

`-----------------------------------------------------------
2023-02-07T12:32:20.251Z Install : node-red-contrib-blynk-iot 1.0.0

2023-02-07T12:32:20.406Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production [email protected]
2023-02-07T12:33:58.829Z [err] npm
2023-02-07T12:33:58.831Z [err]  WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=12.22.12"} (current: {"node":"10.24.1","npm":"6.14.12"})
2023-02-07T12:33:58.831Z [err] npm 
2023-02-07T12:33:58.832Z [err] WARN notsup Not compatible with your version of node/npm: [email protected]
2023-02-07T12:33:58.859Z [err] npm 
2023-02-07T12:33:58.861Z [err] WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
2023-02-07T12:33:58.881Z [err] npm
2023-02-07T12:33:58.883Z [err]  WARN [email protected] No repository field.
2023-02-07T12:33:58.910Z [err] npm 
2023-02-07T12:33:58.911Z [err] WARN [email protected] No license field.
2023-02-07T12:33:58.914Z [err] 
2023-02-07T12:33:58.929Z [out] + [email protected]
2023-02-07T12:33:58.929Z [out] added 1 package from 1 contributor in 91.368s
2023-02-07T12:33:59.031Z `rc=0`

Looks like i have to update node.js.

This orange pi is connected with cellular is very limited on data.

So my question is, what would be the most data friendly option to fix this error?

Nodes show disconnected after 1-2 minutes, but still work

After a node-red-start, or a Deploy, the nodes show as "Connected to pin Vx" with a green dot. After 1-2 minutes the nodes change to "Disconnected" with a red dot.

The debug log shows:

26 Jun 17:36:30 - [info] [blynk-iot-client:Blynk 2.0 test] TLS: close
26 Jun 17:36:30 - [info] [blynk-iot-client:Blynk 2.0 test] Socket closed: blynk.cloud

but pings continue, and the nodes continue to receive and send data to Blynk.

Here's the full debug log...

26 Jun 17:35:05 - [info] Started flows
26 Jun 17:35:05 - [info] [blynk-iot-client:Blynk 2.0 test] TLS: connect
26 Jun 17:35:05 - [info] [blynk-iot-client:Blynk 2.0 test] TLS: ready
26 Jun 17:35:05 - [info] [blynk-iot-client:Blynk 2.0 test] login -> ***************************9QwAM
26 Jun 17:35:05 - [info] [blynk-iot-client:Blynk 2.0 test] SEND -> Cmd: HW_LOGIN, Id: 1, len: 32, data: "***************************9QwAM"
26 Jun 17:35:05 - [info] [blynk-iot-client:Blynk 2.0 test] Connection authorized by a Certificate Authority.
26 Jun 17:35:05 - [info] [blynk-iot-client:Blynk 2.0 test] RECV <- Cmd: RSP, Id: 1, responseCode: OK
26 Jun 17:35:05 - [info] [blynk-iot-client:Blynk 2.0 test] Client logged
26 Jun 17:35:05 - [info] [blynk-iot-client:Blynk 2.0 test] SEND -> Cmd: INTERNAL, Id: 2, len: 125, data: "ver|1.0.0|h-beat|45|buff-in|32767|dev|node-red|con|blynk-tls|fw-type|TMPLSCn-V8qq|fw|2.0.0|build|2021-06-15|tmpl|TMPLSCn-V8qq"
26 Jun 17:35:05 - [info] [blynk-iot-client:Blynk 2.0 test] RECV <- Cmd: RSP, Id: 2, responseCode: OK
26 Jun 17:35:50 - [info] [blynk-iot-client:Blynk 2.0 test] ping
26 Jun 17:35:50 - [info] [blynk-iot-client:Blynk 2.0 test] SEND -> Cmd: PING, Id: 3, len: 0, data: ""
26 Jun 17:35:50 - [info] [blynk-iot-client:Blynk 2.0 test] RECV <- Cmd: RSP, Id: 3, responseCode: OK
26 Jun 17:36:30 - [info] [blynk-iot-client:Blynk 2.0 test] TLS: close
26 Jun 17:36:30 - [info] [blynk-iot-client:Blynk 2.0 test] Socket closed: blynk.cloud
26 Jun 17:36:35 - [info] [blynk-iot-client:Blynk 2.0 test] ping
26 Jun 17:36:35 - [info] [blynk-iot-client:Blynk 2.0 test] SEND -> Cmd: PING, Id: 4, len: 0, data: ""
26 Jun 17:36:35 - [info] [blynk-iot-client:Blynk 2.0 test] RECV <- Cmd: RSP, Id: 4, responseCode: OK
26 Jun 17:37:20 - [info] [blynk-iot-client:Blynk 2.0 test] ping
26 Jun 17:37:20 - [info] [blynk-iot-client:Blynk 2.0 test] SEND -> Cmd: PING, Id: 5, len: 0, data: ""
26 Jun 17:37:20 - [info] [blynk-iot-client:Blynk 2.0 test] RECV <- Cmd: RSP, Id: 5, responseCode: OK
26 Jun 17:38:05 - [info] [blynk-iot-client:Blynk 2.0 test] ping
26 Jun 17:38:05 - [info] [blynk-iot-client:Blynk 2.0 test] SEND -> Cmd: PING, Id: 6, len: 0, data: ""
26 Jun 17:38:05 - [info] [blynk-iot-client:Blynk 2.0 test] RECV <- Cmd: RSP, Id: 6, responseCode: OK
26 Jun 17:38:14 - [info] [blynk-iot-client:Blynk 2.0 test] RECV <- Cmd: HW, Id: 71, len: 7, data: "vw|1|21"
26 Jun 17:38:14 - [info] [blynk-iot-client:Blynk 2.0 test] writeEvent: -> cmd {"type":20,"typeString":"HW","msgId":71,"len":7,"msgLength":12,"body":"vw\u00001\u000021","operation":"vw","pin":"1","value":"21","array":["21"]}
26 Jun 17:38:14 - [info] [blynk-iot-client:Blynk 2.0 test] writeEvent: -> output {"payload":"21","pin":"1","arrayOfValues":["21"]}
26 Jun 17:38:25 - [info] [blynk-iot-client:Blynk 2.0 test] virtualWrite: -> ["vw","1","73"]
26 Jun 17:38:25 - [info] [blynk-iot-client:Blynk 2.0 test] SEND -> Cmd: HW, Id: 7, len: 7, data: "vw|1|73"

The nodes don't change from "Disconnected", but continue to function normally, and the web dashboard and app show the device as "Online".

Pete.

Missing Node - Sync

I've noticed that the Sync node is missing.

Blynk are changing the way that Blynk.syncAll() works in C++, and at the moment is doesn't work at all.
See this for more info...

blynkkk/blynk_Issues#139

However, Blynk,syncVirtual(vPin) does still work, and the ability to send a sync request on a single virtual pin would be extremely useful in Node-Red.
Is it possible to add this back-in, without the "All" option (at least for now)?

Pete.

Feedback on nodes after initial testing

I've tested each node and here's my feedback/observations....

Working nodes

Write Event
Works as expected.

Write
Works as expected.

Set Property
Works as expected, but not all attributes tested yet.
Note that Blynk 2.0 now uses the datastream to define the minimum/maximum values, and all values outside of this range are ignored. As a result, the ability to set min/max values for widgets from the hardware/Node-Red side is redundant (although it's still currently possible and that can lead to confusion).
Read this issue for more info...
blynkkk/blynk_Issues#151

I'd suggest removing the min/max attributed from the Set Property node.

LCD
Works as expected.

Styled Button
Works as expected.

Non-Working nodes

App Event
I can't get any output from the App Event node, and don't see any incoming messages when the app is killed/relaunched.
I suspect that this functionality is no longer supported.
The question was asked here:
https://community.blynk.cc/t/how-to-know-if-app-is-connected/54551?u=peteknight
but so far there hasn't been a proper answer.

Read Event
I can't get any output from the Read Event node, but the pin number is available in the incoming data;

[blynk-iot-client:Blynk 2.0 test] writeEvent: -> cmd {"type":20,"typeString":"HW","msgId":15243,"len":6,"msgLength":11,"body":"vw\u00003\u00000","operation":"vw","pin":"3","value":"0","array":["0"]}

I suspect that this isn't being parsed and passed to the node.

LCD
This node doesn't appear to send any data out to Blynk - there is no SEND -> output to the console.
[EDIT] Ignore the comments about the LCD node not working, this was operator error!

ZeRGBa
Once again, I can't get any of data sent from Node-Red to the ZeRGBa widget to update the widget is in Merge mode and I suspect that this is an issue on the Blynk side.
Blynk allows data types of Int, Float and String to be defined, and the Blynk returns an "Illegal Command" if anything other than a String datatype is selected.
I suspect that the data in the string isn't being handled correctly by Blynk. I will do some testing using C++ to test this theory.

Not Yet Tested

Image Gallery
I've not had chance to test this yet.

Hope this helps, I'll add updates as I discover more.

Pete.

notify

Just wondering when the blynk notify will be coming or is is not on the road map?

Inconsistencies with the new "Log Event" Node

I've just upgraded to release 1.0.0 and done some testing of the Log Event node. The node functions correctly as far as logging the event in Blynk is concerned, but there are some issues with the documentation, the node name, and the "Description" field.

The documentation says...

log event
Blynk logevent node.

For use with Blynk app logevent Widget in merge mode.

To select the color you can use the following methods:

Set msg.hex with hex notation color. (ex. #ff0000 for red)
Set msg.r msg.g msg.b with the relative integer value. (ex. msg.r = 255; msg.g = 0; msg.b = 0; for red)
Set msg.payload to string with rgb values separated by semicolons or "\0". (ex. 255;0;0 for red)
This node also captures write events!

Example output:
{
    "payload":[
        0,
        178,
        77
    ],
    "pin":"0",
    "hex":"#00b24d",
    "r":0,
    "g":178,
    "b":77,
    "rgb":"0;178;77"
}

This appears to be copied from the ZeRGBa node, but makes no sense because there is no "Blynk app logevent Widget", no "merge mode" and no ability to specify the color of the event.

The documentation should probably say that the event needs to be created in the web console. Blynk documentation for this is here:
https://docs.blynk.io/en/blynk.console/templates/events/custom-events/events-general-setting

and that msg.payload appears as the event text (limit 300 characters).

Normally in Node-Red the if the "Name" field is populated it appears as the name of the node, but in this case the name of the node is taken from the Event Code field and the Name filed is ignored...

image

Here the node name is "doorbell" rather than "Log Event - Not shown as node name"
image

Also, the "Description" field is rather confusing, and doesn't appear to server any purpose. It's confusing because the additional (optional) 300 characters of text that appears in the logged event and/or notification is know as the "Description" in Blynk speak, but this comes from the message payload, not from this field.

It's probably worth mentioning in the documentation that there is a limit of 100 events per 24 hour period, so care should be taken to limit the frequency of event logging, possibly using the standard Node-Red Filter and Limit nodes.

This testing was done using Node-Red v3.0.2

I've not properly tested the new Metadata widget yet, but there seems to be similar issues with the documentation and node name (which always says "by code").

Pete.

Palette Manager shows red exclamation mark

The Palette Manager shows a red triangle with an exclamation mark, and the message [object Object] when the contrib is installed.

There seems to be a missing entry about half way down the list of nodes, with one "disable" button partly hidden behind another...

image

Pete.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.