WebHook on local server

I have a Blynk server installed on a Raspberry Pi 2. I have a project with Arduino / ESP8266 in WiFi that works, I can turn on / off a LED via the Adroid application. BUT if I want to go through a URL (or IFTTT webhook), nothing happens. My local server is well accessible via the Internet, ports dedicated to Blynk are open and redirected to the server.
I tested in the browser:
http://MyLocalIP/MyBlynkToken/update/d10?value=1
http://MyPublicIP/MyBlynkToken/update/d10?value=1

Thanks for help !

I’ll stick my neck out and ask: say are you sure?

Much depends on how you have configured the ports (and possible redirects) on the RPi.

Accessing the server as in your examples, it will connect to port 80 Standard configuration has this configuration:

http.port=8080
https.port=9443

To check which ports your RPi is listening on:

# netstat -plnt

Print (dump) a description of incoming packets (i.e. is your browser actually reaching the server):

# tcpdump -Q in portrange 8080-9443

Good luck!

(@Gunner - some more exotic commands for your binder :nerd_face:)

3 Likes

Hye…
I’m notice that there are un Nginx server and Resilio Syncro on the Raspi…
my netstat

The TCPdump

Here a scan from my PC to my raspi
netstat02
If I made tcp dump port 8080 and after, type in my browser : 192.168.0.30/b5da940cef064a4aa76cae053cb93eb2/update/d10?value=1
there are 0 packets captured

You’re not telling your browser to access port 8080! This will access the nginx server at the default http port (80):

http://192.168.0.30/b5da940cef064a4aa76cae053cb93eb2/update/d10?value=1

Try this for SSL (secure connection) on port 9443:

https://192.168.0.30:9443/b5da940cef064a4aa76cae053cb93eb2/project

Or insecure on port 8080:

http://192.168.0.30:8080/b5da940cef064a4aa76cae053cb93eb2/project

The rightmost column in the netstat output tells you which program is listening on the specific port. 80 is nginx, not Java :stuck_out_tongue_winking_eye:

Yes… your great ! :grinning:

http://192.168.0.30:8080/b5da940cef064a4aa76cae053cb93eb2/update/d10?value=1
work fine !

But
http://MyPLubllicIP:8080/b5da940cef064a4aa76cae053cb93eb2/update/d10?value=1
or
http://MyPublicIP:9443/b5da940cef064a4aa76cae053cb93eb2/update/d10?value=1
doesn’t work, It’s a shame because the ultimate goal is to use the IFTTT webhook to drive the Raspberry.
However, I put the Raspi IP in a demilitarized zone in my router.
Do you think it’s a story of redirection or conflict with Nginx? I’m not good at it.

I know I know…! :innocent:

You need to start pay attention to what I write :stuck_out_tongue_closed_eyes: and learn the difference between:

https - (please note the S) secure, uses port 9443 and http - (no S!) insecure, uses port 8080. The last URL will not work for this reason alone.

As I have said to other [in your situation], this is most likely a network misconfiguration somewhere on “your side” and not an error due to Blynk. The snag is that the Blynk people wants this forum to be about Blynk, and not a general support for more or less unrelated issues. So they might close the topic for further discussion (just so you don’t get surprised if it happens).

Network issues can be very hard to solve thru a forum, it’s a more hands-on business. But I’ll give you some pointers and help you where I can.

I smell disaster! :sunglasses: Are you sure your router let’s you access the public IP from within the local subnet? NAT, VLAN, DMZ… :sleeping: Ask a friend and see if he can access the pages from the outside world. Don’t forget about the ports and https.

Not unless you have added some rules to forward certain connections (ports) to say :80. But if that where the case, nginx should be answering the call.

Good resource https://portforward.com/

Ho… my mistake,
I followed your advice and delete the demilitarized zone. I redirected the ports 8441,8442,8443,8080,9443 to my server, add "server.host=192.168.0.30
" to server.properties and it works … Via browser and via an IFTTT webhook, cons with 5sec latency. I will work on it.
Thank you for your help anyway.

Don’t get me wrong, it’s not that I don’t want to help you, but my experience is that these problems can be very tricky to sort out without actual access to the hardware. The forum admins are kind people and will normally not bother. It was more a heads up because I can’t control them with my Jedi mind tricks yet :sunglasses:

Just released I forgot to tell you how my setup is, without DMZ and other crap :flushed: But from the look of it, you managed to copy it anyhow :rofl:

I’m using two nets, one “exposed” 192.168.0.0, and one for everything else 192.168.1.0. From the router 192.168.0.1, I have a single port forward to 192.168.0.60:8443 so the app can connect to the server from the outside. That’s about it!

If you could, skip the non SSL ports and keep these:

app.ssl.port=8443
hardware.ssl.port=8441
https.port=9443

WOW! That’s nasty! :scream: And strange… I mean… that’s just not right. You must have forgotten something, somewhere. :thinking:

With IFTTT Widget to Webhook there are latence, but with Assistant to Webhook it’s pretty cool !

The next step is triggering a RX433 module for the light and a IR led for the remote… will see !

Nice!

But 5 seconds? Sounds crazy!

Been there, done that! :smile:

Cheap(est) RF 433 Mhz bridge for home automation with both Tx and Rx

There are a lot…

Sure is, but mine is a bridge, which is not that common :wink:

A post was split to a new topic: Garage Door Opener with Google Home integration