Hi Guys,
I'm letting my AI2 app communicate with a RaspberryPi and the functionality works without a flaw but I get an 1101 error even though I can sucessfully send a GET Request, please have a look at my error handling:
On error:
Hi Guys, thank you for your friendly feedback!
ABG : in mastr_ip is just the address of the Raspberry in the local network (it is running a simple http.server): 192.168.4.1:8080, which can also be reached by the app.
@ChrisWard
You are right, I just kept that errorhandling from a previous app and don't remember it's purpose anymore but the 1109 error is never called, just checking this post as a reference:
Here is what Timer1 is doing:
It sends a query to the http.server each 3000ms and stores the values from the received list into two variables, people_inside and max_people.
@TIMAI2
Thank you for the nice comment, where I learnt sth. practical, I've connected my WIN10 Laptop to the network and sent a GET request as follows: http://192.168.4.1:8080/people_inside-10
in firefox
The python code processes it nicely without an error but I think Firefox is getting an error: Connection interrupted
It is a different error than if I try to access Google without internet connection because there it says check your internet connection Network timeout:
One option would be that I simply ignore the error message 1101 in AI2. I think I can still work an app that fits my needs since the problem is really only that I receive an unnecessary error message rather than an actual crash occurs.
Btw.: I have also tried using windows CMD and telnet:
telnet 192.168.4.1 8080
GET people_inside-10
GET /people_inside-10
tried a few but I am not finding the right syntax.
Follow-up: I found the correct telnet syntax:
telnet 192.168.4.1 8080
GET /QUERY-ALL HTTP/1.1
The python script also accepts connection from my Laptop but kicks me out after a single GET request:
You also can create a fault at any time by having both the Timer and User (buttons) call the server within the same time interval. What if the Button disables the Timer, calls the server, enables the Timer?