I have set up a cloudflare tunnel with my raspberry pi. I would like to send motion sensor data to the android phone app that listens to http://<:/xxxx. I’m able to send messages to the raspberry pi from the app easily but unable to send the motion sensor data to the app. Can someone provide any guidance on where the problem could be?
What steps have you taken to resolve the issue?
my python code: from flask import Flask, request, jsonify
app = Flask(name)
Endpoint to receive prompts from Android on port 8080
Hi Fritex. thanks for the reply. I have the cloudflare tunnel set up on cloudflare dashboard and not on the CLI. I set up public hotnames http://localhost:8080 and http://localhost:8090. the nginx webserver is working but still can’t get the messages trhough from raspberry pi to the android app. do you have an example on how this can be set up?
Thanks
Could you give it a try with below one, if it would work for you, so you’d just have to adjust some things?:
So it’s working over public hostname?, but messages aren’t coming
And you’re not sending them via e.g. WebSockets, correct?
From the code you’ve provided you’re using HTTP request.
Since proxied , everything goes over 443 via public, despite the routing is done via tunnel and can be over other different port to the inside app.
You get some error while debugging the Android app from Android studio from console output or graddle? Did you changed code in Android maybe?