Comments (11)
If you are using plain HTTP you can just append :8080 to the end of the server name.
from emonesp.
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=......"?
from emonesp.
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.
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.
If there anything set it the 'SSL SSH-1 Fingerprint:' field? If so remove that.
from emonesp.
No, ignore that, not the issue
from emonesp.
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.
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.
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.
> mfw
Line 76 in 0af0551
this should either be its own UI field or parse from
host:port
from emonesp.
Fixed in #102
from emonesp.
Related Issues (20)
- EmonCMS HTTPs fingerprint is not treated correctly HOT 1
- Add selectable baud rate
- Automatic Scheduled Restart HOT 1
- Timer 2 not working at all
- Release 3.1.0 on SonOff Basic WIFI switch HOT 4
- More than one package has been found by NTPClient @ 3.1.0 HOT 1
- Non standard MQTT port not saving
- No ability to change the serial baudrate HOT 2
- MQTT host IP address incorrect in debug HOT 2
- emoncms_path is missing HOT 1
- Add a 'last will' availability topic to MQTT
- State is not published to MQTT when smartplug is controlled via MQTT HOT 1
- Define HTTP Port of target emoncms server from UI HOT 2
- Time is wrong... HOT 1
- What is the purpose of the 'ctrl_update' variable ?
- Some part of the UI shown even should be hidden...
- Default values get overwritten... wrong behaviour HOT 2
- Control state On/Off/Timer is not saved if nothing else is changed in the dialog
- Current time ignores DST...
- NTP time with time zone and dst HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emonesp.