ESP 8266 Insecure Mode, Port, API, Code
I I'm doing a project on my ESP8266 and I need to specify the port in it, how do I get this port in the application on Raiway?
45 Replies
Project ID:
d657d7cf-8a1b-4250-ba51-c248ff710b4a
d657d7cf-8a1b-4250-ba51-c248ff710b4a
process.env.PORT
or something
oh I was right?
Yeup
but, where i put this?
I mean
of course I was
wherever you need the port
You would put it where you have 443
i'll try, just a sec
what the hell are you two on about
y, im confused now
you specify port 443 when connecting from the esp8266 to a service on railway, just like you are doing, so i assume theres an issue elsewhere
Oh damn! My bad. Didn’t read it fully
😅
but i need specify the port, i used 443 bc it's default
yes thats correct
theres an issue elsewhere
but not work with Railway API
please send the url your esp is trying to connect to
i tried with another API example and thats works
cafofo.up.railway.app/dev_esp
try with
https://cafofo.up.railway.app/dev_esp
insteadjust a sec
also what esp lib are you using for the http client
i'm using https lib
are you using the
ESP8266HTTPClient.h
lib too?yes
no, sorry just ESP8266WiFi.h
that lib doesnt have anything to do with making http requests
so you arent using
ESP8266HTTPClient.h
?i tried a lot of examples and examples but none works
im using this libs
you really should be using
ESP8266HTTPClient.h
it would make your life so much easieri think i tried use this lib
i i'll try again
are you aware that the esp8266 does not contain ssl client certs to validate the request? you will either need to provide a fingerprint or enable insecure mode
hmmmm, how can i enable insecure mode?
Solution
this is using
ESP8266HTTPClient.h
and WiFiClientSecure.h
im trying
that's works
hell yeah!
i i'll put code here
are you using
ArduinoJson.h
absolute amazing libraryy, i tried too
but with information about insecure mode, i'll try again with this lib
makes working with json on arduino just as easy as any other statically typed language
I looked it up, it's a good library
tks for help @Brody!!!!!
except for the use of delay() (use
SimpleTimer.h
) code looks relatively goodOk, thx for the tip
no problem, im glad i was able to help you!
good title change!