Blynk and Node-Red

Using Blynk cloud server,Android and Raspberry Pi running Node-Red with a wired ethernet connection to my router. Blynk ws nodes will connect to Blynk cloud server and everything functions as expected. If the router is power cycled or rebooted it uses a different static IP address. I edited the Paspberry PI file dhcpcd.conf so it would use the same static IP address, after that change the Blynk nodes will no longer connect to Blynk cloud server. Any help or suggestions would greatly be appreciated.



I don’t understand this:

If the IP address changes then its not static. Sounds like it is using DHCP.

OP was showing a before and after result of setting up Static IP. And I suspect the reference to using a different “static” IP before changes was just a typo when meaning “dynamic” instead.

@PWK I do not use Node Red… but perhaps your issue in editing your RPi file may have affected the DNS routing as well?

Also, I have often had better results in setting the Static IP control (based on the devices IP) on the router itself

If your router is rebooted it will often be given a different public (WAN) IP address by your ISP, but unless you’re doing something unusual or very clever, this won’t have any effect on Node-Red.

In the same way, your router will most likely allocate different IP addresses to various devices within your internal (LAN) network when it reboots.
This will have no effect on Node-Red, as it makes no difference what IP address your Pi is allocated for the Node-Red to Blynk cloud nodes to operate correctly, but having your Pi on a known internal IP address obviously makes life easier when it comes to editing your Node-Red flows.
The Node-Red to Blynk cloud connection doesnt need any specia port forwarding, uness of course you’ve locked-down the ports on your router and you need to route specific traffic to your Pi for it to be able to talk to the Blynk server.

My guess is that you’ve set-up the Pi’s static IP incorrectly, either with the wrong IP, Subnet, Gateway or DNS data, or with an IP address that conflicts with another device on your network.
If this is the case then your Pi wont be able to talk to the outside world, and the easiest way to check this is by pinging an outside IP address/URL.



Thank you, those three short paragraphs really helped me understand the network side. I went back an examined the four lines I added to my PI dhcpcd.conf file. The lines came from Raspberry PI Learning Resources. see below.

interface eth0

static ip_address=
static routers=
static domain_name_servers=

I really only understood the second line which was the address I pointed my browser to for Node-Red and the address for my MQTT nodes. With the information you provided I started to look at my LAN information. I logged into my router and looked at the LAN Port IP address and it was changed lines three and four to that address and everthing is working. It really does make life easier keeping the Node-Red flows at the same address. Like you said I must of locked down the ports and did not allow Blynk or PI to the outside world. One more question, If I am running my PI and Node-Red on LAN do I need any security? I learned alot about networking the last few days.

Thank You


Glad you figured it out.
I wouldn’t worry too much about security, but take care of you’re opening your Node-Red port and doing port-forwarding to allow you to edit your flows from outside of the network as Taina people have experienced hacking attempts with this setup (me included).

Obviously you should take normal precautions and change your Pi password from raspberry and doubt use admin/password as your Node-Red login. The same goes for your MQTTT user/password, assuming that you’re using MQTT (and if you aren’t, then you should be :grinning:).