Post by foggy on Jul 19, 2017 12:17:13 GMT -8
I am using RasPiConnectServer on a RPi 2 to provide data to an iPad running RasPiConnect app. Page 1 in the app shows a number of pilot lights, text fields and the W-1 remote webview which all work great. Pages 2, 3, 4 & 5 (should) display 2 remote webview images each from PNG files in the RPi. One PNG image on each page is a graph created by MatPlotLib and the other is a PNG image legend file similar to attached, stored in /home/pi/RasPiConnectServer/static on the RPi. For some time, as I have worked on the app, the iPad has displayed the PNG files very nicely. All of a sudden, about two days ago, the iPad stopped displaying the PNG images on pages 2 - 5. Page 1 continues to display everything just fine. I don't think I have changed anything (Local file, Config file xml file, etc) to explain. All indications on the server and iPad seem to be good, no error messages. It seems like the file is being sent to the iPad (RasPiConnect app) but just not being displayed. I even thought maybe the iPad has done an iOS upgrade and no-longer displays PNG - so I emailed the files to myself and opened on the iPad where they displayed fine. Below is a sample of my Local.py code for these images:
#W-15 Temperature Graph Legend
if (objectServerID == "W-15"):
#check for validate request
if (validate == "YES"):
outgoingXMLData += Validate.buildValidateResponse("YES")
outgoingXMLData += BuildResponse.buildFooter()
return outgoingXMLData
imageName = "TempLegend.png"
responseData = "<html><head>"
responseData += "<META HTTP-EQUIV='CACHE-CONTROL' CONTENT='NO-CACHE'>"
responseData += "<title></title><style>body,html,iframe{margin:0;padding:0;}</style>"
responseData += "</head>"
responseData += "<body><img src=\""
responseData += Config.localURL()
responseData += "static/"
responseData += imageName
responseData += "\" type=\"jpg\" width=\"350\" height=\"400\">"
responseData += "<body>"
responseData += "<html>"
outgoingXMLData += BuildResponse.buildResponse(responseData)
outgoingXMLData += BuildResponse.buildFooter()
return outgoingXMLData
Hoping someone can help,
Foggy