tzapu / node-red-contrib-blynk

Blynk app integration with Node Red
MIT License
17 stars 5 forks source link

Ouestion/issue #12

Closed Toshibass closed 8 years ago

Toshibass commented 8 years ago

When I make a new project in the blynk app it requires me to choose the Hardware Model, what effect does that ultimately have, do I need to choose the hardware node-red is running on ?

For example my current project was originally set-up to control a ESP8266 (with a couple of relays and a few sensors) so the hardware choice was setup as ESP8266 however now I reconfigured it so blynk talks to node-red which talks to mqtt which talks to the ESP it all work fine, but on some occasions like first connection in a morning blink cannot connect and says ESP8266 offline - actually the ESP is online, mqtt is on line and node-red is online its the blynk nodes that show no connection.

Would changing the hardware choice to Raspberry pi2 make a difference to this problem ?

Toshi

tzapu commented 8 years ago

i use generic device as far as i know the device type only defines the analog and digital pins availability, it shouldn t matter much as we are using only virtual pins really.

Toshibass commented 8 years ago

Hmmm yes I understand we essentially use just the virtual pins in node-red-contrib-blynk but your response leaves me wondering if, by choosing Raspberry pi2 (the hardware running node-red), the Blynk app would see the pi's digital pins and connect as opposed to the current situation were it fails to connect.!

I will try it later, when I have some time and report back.

tzapu commented 8 years ago

please try. technically i am running the full blynk js library in the node, and as far as i remember they say they auto detect the hardware, so you might be onto something, making rpi's gpio work would be an added bonus to all this :)

Toshibass commented 8 years ago

OK so I did the test, conclusion : it makes no difference choosing raspberry pi 2 ... other than giving 64 virtual pins which I guess is a bonus, one thing I notice, since the blynk update everything became more stable

Toshibass commented 8 years ago

Oh I spoke to soon although the blynk app has 64 virtual pins available node-red-contrib-blynk can only access upto v31 the rest say node incorrectly configured.

tzapu commented 8 years ago

added fix for virtual pins higher than 31 in node-red-contrib-blynk@0.0.13

cheers

Toshibass commented 8 years ago

Hi Tzapu Just a really small thing (no big deal as I know your busy) so put it on the back burner for future release, when I set blynk to raspberry pi 2 I can access 64 virtual pins, thank you for added support for pins higher than 31 and it works as far as virtual pin 63, but if I try to use virtual pin 64 I get ... node incorrectly configured.

tzapu commented 8 years ago

aren t they from 0 to 63 ? is there a pin 64 in the app?

Toshibass commented 8 years ago

yep surprisingly in the app you can choose v0 to v64 .. thinking about it you would have thought it would have been 0 to 31 like 32 pins or 0 to 63 like 64 pins, maybe its a blynk app error, anyway in reality I don't plan to use 65 virtual pins in one app, I am using currently 46 so no problem for me.