fails to connect to

I'm stucked on a problem since several days and I cannot find a solution.
I need to connect the Industruino D21G with ethernet module to EmonCms.
Unfortunately, I don't succeed in connecting to "" neither using url nor the ip address.

I used as reference the example reported here:
(I use ethernet2 library because the industruino is D21G model)

note that, in comparison with the above mentioned example sketch, the ip address I tried to use for emoncms is different:
it is that corresponds to and works fine in a test I didi with esp8266.
in fact, the one used in the example ( is not reachable in any way, not only by industruino connection but also using ping from my pc.

Can anybody help me?
thank you in advance.

Giancarlo Bacchio
Giancarlo Bacchio
| 1 1 1
Asked on 8/20/18, 4:45 PM

Hi Tom,
Thank you for your prompt reply.
Yes, I use your fork for ethernet2 library.
Yes, I can connect to others sites (,
Yes, I already use the lines you suggest to connect to

The problem, is with the first line: "client.connect("", 80)"
after few seconds stuck, the function returns "0" i.e. fail to connect.
As I wrote, I tried also using the IpAddress ( ) instead of the URL, but with the same result.
please, find here the code I wrote.

Giancarlo Bacchio
Giancarlo Bacchio
| 1 1 1
Answered on 8/21/18, 8:24 AM

Hi Giancarlo, i assume you are using our fork of the Ethernet2 library as and you are able to connect to other web servers. For EmonCMS it seems the API has changed since that 2015 blog post, you can use these lines:

  if (client.connect("", 80)) {     // for


    client.print("GET /input/post.json?apikey=");      // for




| 1 1 3
Answered on 8/20/18, 11:46 PM

Your answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Ask a Question

Keep Informed

About This Forum

This community is for professionals and enthusiasts of our products and services.

Read Guidelines

Question tools

46 follower(s)


Asked: 8/20/18, 4:45 PM
Seen: 2180 times
Last updated: 8/21/18, 8:24 AM