Giter VIP home page Giter VIP logo

Comments (11)

jeremypoulter avatar jeremypoulter commented on June 14, 2024

If you are using plain HTTP you can just append :8080 to the end of the server name.

from emonesp.

E-NINA avatar E-NINA commented on June 14, 2024

Hello,

I've already try that but no connection maybe is something wrong with my built.
I've built with arduino IDE to a D1 mini board.
I get information from serial port but seems http url isn't passing correctly.
below screen shot of esp output:
Is supossly correct display only "/input/post.json?json=......"?

image

from emonesp.

sindudas avatar sindudas commented on June 14, 2024

Hello,

I flashed a new Wemos D1 Mini to test connection to server on port 8080.

Got 'CT1:3935,CT2:325,T0:20.5'
/emoncms/input/post.json?json={CT1:3935,CT2:325,T0:20.5,psent:1,psuccess:0,freeram:22952}&node=EmonOUT&apikey=xxxxx
Plain old HTTP
ok
Got 'CT1:3935,CT2:325,T0:20.5'
/emoncms/input/post.json?json={CT1:3935,CT2:325,T0:20.5,psent:2,psuccess:1,freeram:23056}&node=EmonOUT&apikey=xxxxx
Plain old HTTP
ok

It worked for me adding ":8080" to "Emoncms Server", and without HTTPS.

Maybe there is connection issues from EmonESP to EmonCMS server.

from emonesp.

E-NINA avatar E-NINA commented on June 14, 2024

Hello,
My emoncms server is running I think correctly as I'm running without issues an iotawatt posting correctly to them and also if I manual post inputs like:

xxxxxxxxx.xxxx.xx:8080/input/post.json?json={ct1: 0.15, ct2: 0.00, ct3: -0.00, ct4: -0.03, V: 1.01,psent:5,psuccess:0,freeram:25704}&node=esptest&apikey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

(exactly the same as display on serial log from emonesp)
I see immediate input on my emoncms server.
I’ve no clue what can be wrong and already tested compile emonesp with esp8266 lib 2.4.2; 2.4.0; 2.3.0 always compile correctly upload and can see webpages, configure, etc… but never a connection to emoncms server

from emonesp.

jeremypoulter avatar jeremypoulter commented on June 14, 2024

If there anything set it the 'SSL SSH-1 Fingerprint:' field? If so remove that.

from emonesp.

jeremypoulter avatar jeremypoulter commented on June 14, 2024

No, ignore that, not the issue

from emonesp.

E-NINA avatar E-NINA commented on June 14, 2024

Hello, today I spent a litle bit more time on my issue and I'm preaty sure I've no problem with my emoncms server side. As i mentioned before manually typing posts data.
I end up with error "400"

/input/post.json?json={ct1: 615.29, ct2: 517.25, ct3: 430.61, ct4: 383.29, V: 310.32,psent:2,psuccess:0,freeram:25368}&node=emonesp&apikey=xxxxxxxxxxxxxxxxxxxxxx
Plain old HTTP
Emoncms error: server error: 400

Looking on "ESP8266HTTPClient.h" seems is a bad request

HTTP_CODE_BAD_REQUEST = 400,

On that file mentions different ways to make request and seems emonesp uses 1st (see below), 2nd should be the one where we can define port number. I'm not a programmer I'm not able to change code (I tried already without sucess ...)

....
// Plain HTTP connection, unencrypted
bool begin(String url);
bool begin(String host, uint16_t port, String uri = "/");
......

from emonesp.

dudman avatar dudman commented on June 14, 2024

I have simular problem, to me it seems that the host can't have a port added to it because in http.cpp the port 80 is passed through to get_http_internal() and isn't parsed out and sent. Simplest I think would be to add into the interface an adition GUI field which would default to 80 but can be changed.
I'll just try and hard code 81 instead of 80 and see if that works for me.

// -------------------------------------------------------------------
// HTTP GET Request
// url: N/A
// -------------------------------------------------------------------
String get_http(const char *host, String &path){
  WiFiClient client;
  return get_http_internal(client, host, path, 80, false);
} // end http_get

from emonesp.

roscoegray avatar roscoegray commented on June 14, 2024

Running into this issue also, as an add-on has been created for Home Assistant, having the ability to define the port would be great, and only if it omitted default to port 80. Originally raised an issue with hassio-addon-emoncms, but it would be better dealt here i would think.

from emonesp.

qm3ster avatar qm3ster commented on June 14, 2024

> mfw

return get_http_internal(client, host, path, 80, false);

this should either be its own UI field or parse from host:port

from emonesp.

qm3ster avatar qm3ster commented on June 14, 2024

Fixed in #102

from emonesp.

Related Issues (20)

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.