Error no host

Still using an old version of Blynk,v1.0.1 on Linux was working till this morning getting ERROR no such host? Is it down or need to finally upgrade?

I’m confused by this.

Library version 1.0.1 is a C++ library, but if you’re using a Linux based device then you would probably be using Python or NodeJS rather than C++

If you are using C++ then you’re better using library version 0.6.1 if you’re running a Legacy project.

Have you tried pinging blynk-cloud.com to see if the server is reachable?
Also, it’s always a good idea to reboot your router if you’re having connectivity issues.

Pete.

Thanks Pete yes can ping but still can not connect to cloud pasted the error below
pi@raspberrypi:~/blynk-library/linux $ ping blynk-cloud.com
PING blynk-cloud.com (45.55.96.146) 56(84) bytes of data.
64 bytes from 45.55.96.146 (45.55.96.146): icmp_seq=1 ttl=36 time=49.6 ms
64 bytes from 45.55.96.146 (45.55.96.146): icmp_seq=2 ttl=36 time=50.2 ms
64 bytes from 45.55.96.146 (45.55.96.146): icmp_seq=3 ttl=36 time=44.9 ms
64 bytes from 45.55.96.146 (45.55.96.146): icmp_seq=4 ttl=36 time=45.6 ms
64 bytes from 45.55.96.146 (45.55.96.146): icmp_seq=5 ttl=36 time=46.1 ms
64 bytes from 45.55.96.146 (45.55.96.146): icmp_seq=6 ttl=36 time=48.9 ms
64 bytes from 45.55.96.146 (45.55.96.146): icmp_seq=7 ttl=36 time=46.3 ms
64 bytes from 45.55.96.146 (45.55.96.146): icmp_seq=8 ttl=36 time=48.7 ms
^C
blynk-cloud.com ping statistics —
8 packets transmitted, 8 received, 0% packet loss, time 7010ms
rtt min/avg/max/mdev = 44.860/47.530/50.247/1.905 ms
pi@raspberrypi:~/blynk-library/linux $ ./token_rv
Welocme to RV![0]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v1.0.1 on Linux

ERROR, no such host

Also using c++ been working for months

Are you using WiringPi ?

Pete

yes

WiringPi was deprecated two and a half years ago…

http://wiringpi.com/wiringpi-deprecated/

I’m not sure if that has anything to do with it. Maybe an update to your Pi’s OS or other files has finally broken Wiring Pi.

Pete.

Found my problem was in my code! I have 2 esp8266 connected via WiFi to the Pi 4. When the esp8266 boots up it sends the ip@ via tcp/ip sockets to the pi. was executing back level code to save the ip @ to file that did not strip off the token
esp8266 code

String IP = WiFi.localIP().toString();
char Buf[50];
IP.toCharArray(Buf, 50);
connect2Raspberry(Buf);

server code

    bzero(buffer,256);
    n = read(newsockfd,buffer,255);

    if (n < 0) error("ERROR reading from socket");
    ofstream myfile;
    if (strstr(buffer,"DHT"))
        myfile.open ("/home/pi//blynk-library/linux/ip_dht.txt");
    else
        myfile.open ("/home/pi//blynk-library/linux/ip_adc.txt");

    myfile << buffer+4;
    myfile.close();

Thanks and sorry was barking up the wrong tree!

I’d strongly suggest migrating to Blynk IoT and away from WiringPi too, as both Blynk Legacy and WiringPi are no longer supported.

If you want to keep the same architecture then you should consider switching to running Node-Red on your Pi, and use the Blynk plug-in for Node Red to manage that connection.
Then, you can have two-way communication with your ESP’s via MQTT messaging.

This is how my home automation system is structured and it’s the structure I’d use again if I was starting from scratch.

Pete.

Thanks again I will look into Bynk Iot. Looked over MQTT and was not impressed I think there is more lines of code compared to sockets also I read about time lag for receiving/sending messages? Also have 2 way communications. the only benefit I see is the pseudo-broadcast mode but I would never need.

I’m not sure, but the code required for MQTT isn’t complex. Once you have routines to connect, subscribe and publish then it’s really very straightforward.

I’ve never encountered that.
Take a scenario where you have a widget button in the Blynk app sending a command to Node-Red, this is then converted into an MQTT message and published to the device, then the device picks up this message, and actions it (lets say it turns a relay on/off).
This relies on app >> server >> Node-Red >>MQTT >> device communication, but the results are instantaneous from the user’s point of view.

So does MQTT.
Your device subscribes to topics and ‘listens for messages’ on those topics, and can publish messages to any messages that it wishes.

It’s up to you which way you go, but you certainly need to move away from these deprecated systems.

Pete.

migrating to Blynk iot will be my summer project thanks!