-
Notifications
You must be signed in to change notification settings - Fork 2
Full setup instructions
pablotoledo81 edited this page Apr 25, 2017
·
3 revisions
Set up the server
- The bellhouse needs internet access:
- If connected directly via ethernet no action is required
- If connecting to a known wifi access point (e.g. at Kaleider) it will connect automatically
- If connecting to a new wifi access point you will need to configure the pi while it has internet access (e.g. configure it at Kaleider before deploying to a new site).
- Edit /etc/wpa_supplicant/wpa_supplicant.conf with the WiFi ssid and password
- Pi will automatically connect to Roop’s ngrok.io account. Log into ngrok to find the address (or with a paid account it will be a static address).
- ssh pi@ -p [ngrok port]
- cd Tom/server/euporias-video-stream-sampler-master/server/
- nohup python server.py > nohup.out&
- python config.py # this will create config for the existing bells (a.k.a. servos)
- For each bell:
- Get the existing config (GET to /servos/[id])
- Try striking the bell (POST to /strike)
- Tweak the config (POST to /servos with the new config as the son body)
Set up the client
- git clone https://github.com/met-office-lab/euporias-video-stream-sampler.git
- cd into the directory where you cloned the code
- Follow installation instructions in README.md (npm install etc)
- Open src/js/main.js and change const BELL_SERVER = “http://....ngrok.io” to match the new ngrok url (with a paid ngrok account this step is not needed as you’ll have a static address).
- Follow running instructions in README.md (i.e. gulp serve)
- Your browser will be launched automatically. We have only tested the front end in Chrome. If your browser doesn’t open automatically the front end url is ‘http://localhost:3000/‘.
- The client requires access to a webcam. You may need to select ‘allow access’ in the chrome pop up.
Run the client
- Click ‘Start sampling’ to start sending requests to the bell house
- You can modify the sampling interval / threshold for different effects. The default interval is 3 seconds, but this can sound a bit robotic and lowering it can make for interesting results. If you change a value you’ll need to click outside the input box for the change to take effect.
- Click ‘Start recording’ to record for later playback. You’ll receive a pop up asking for a recording name. Don’t use any special characters! E.g. a forward slash will break everything
- Click ‘Stop recording’ to stop recording
- Select a recording from the drop down list and click play to playback a recording. Currently you can’t stop playing a recording once its started, it just plays through.
Sampling video rather than webcam See sample-video git branch. This feature is very rough. You have to manually add videos, and they have to be local videos. We also don’t resize the video, so it needs to be resized before hand using a video editing tool (I use ffmpeg on the command line).