Jump to content

What response is required by the ISY for a network resource?


Broyd

Recommended Posts

I have an ESP32 device running micro-python to which I send a network resource as shown below.

http://192.168.1.150/qry

The IP address of the ESP32 is '192.168.1.150' and the command is 'qry'.

The resource is sent correctly by the ISY and received correctly by the ESP32.
The ESP32 process the 'qry' command just the way it is supposed to.

However, I get the following response from the ISY when I test this network resource:

"TCP client read response failed. Net Module Rule: 68"

MY question is:  Does anyone know what is required to be sent back to the ISY
such that it will form a valid response to receiving the network resource?

I'd just like to get a 'clean' response.

What I am currently sending back as a response to the ISY, using Python in the ESP32 is as follows:

conn.send('HTTP/1.1 200 OK\n')
conn.send('Content-Type: text/html\n')
conn.send('Connection: close\n\n')
conn.send('<html><head>')
conn.send('<link rel="icon" href="data:,">')  # prevent browser from requesting favicon.ico
conn.send('</head>\n\n')
conn.close()

I have tried removing the three lines about favicon, but I am getting the same error message:

conn.send('<html><head>')
conn.send('<link rel="icon" href="data:,">')  # prevent browser from requesting favicon.ico
conn.send('</head>\n\n')

This response works fine when I send the network resource from a browser (Firefox).

Thanks for any insight on this :). (I'm not sure resolving this is actually required because the ESP32 processes the command fine.) 

Link to comment

I've tried all variations of sending an 200 OK status and there has been no change. I am still getting the exact same message. Incidentally I send network resources to other Python scripts and also get a similar message, only Rule: 65 ...

It would be satisfying to be able to send an accepted response, but it actually doesn't seem to matter because the receiving device handles the content of the network resource exactly the way I intended, in all cases.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...