Okay to set this up use fully kiosk browser for your tablets browser. In settings there is a setting to allow remote administration enable this and create a password for it. Its also probably best to give the tablet a static ip. Now that you enabled this it allows web commands to be sent to be sent to
http://yourtabletip:2323 on your local network. You could test that it works using any other browser by going to the web address
http://yourtabletip:2323/?cmd=loadStartURL&type=json&password=yourpassword
the browser on the tablet should reload your start page.
To set up in raspberry pints navigate to /var/www/python and with nano create a file called refresh.py and paste the following.. making sure to put your password and yourtabletip. sorry I had this part in a code block but it kept messing up my code for some reason....
This is the part at the bottom that is displaying weird so I’ll just show it here as well outside the code block in case it isn’t showing right.
response = requests.post('yourtabletip/', data=data)
Code:
#!/usr/bin/python
import requests
def refresh():
data = {
'cmd': 'loadStartURL',
'password': 'yourpassword'
}
response = requests.post('yourtabletip/', data=data)
save this file and I'm no py expert so I'm not sure if it has to be executable or not I just did it with sudo chmod + x refresh.py
next edit your flow_monitor.py file thats located in the same directory
at the top add this line to import your refresh.py function so we can call it
and then further down you will see this line where the pulse count gets past on to pours.php under that just add the line refresh.refresh() this will call the function we made called refresh from our refresh.py file that basically just sends a curl command to the fully kiosk browser.
Code:
#The following 2 lines passes the PIN and PULSE COUNT to the php script
path = '/var/www/includes/pours.php'
subprocess.call(["php", path, MCP_PIN, POUR_COUNT])
refresh.refresh()
that should be it I rebooted to make sure everything was loaded properly.