Thanks to jlennox/Heartrate.
- Install Python 3.10 at python.org if you don't have Python installed.
- Clone this repo or Download Zip.
- Open /HRMonitor/HeartRate.exe.
- Right click, Edit settings xml.
- Find
<UDP>
Things. Fill it with "127.0.0.1:8909", like this:
...
<HeartRateFile />
<UDP>127.0.0.1:8909</UDP>
</HeartRateSettingsProtocol>
- Run these following command for first time configuration:(Powershell recommended)
cd .\Python_Data_Monitor\
python -m venv .\3104venv\
.\3104venv\Scripts\activate
python -m pip install -r .\PyScripts\requirements.txt
- Run Start.bat.
- Open http://127.0.0.1:8919.
** Recommend using WebSocket than Js API. **
All Right.
Write your html in Pyscripts/www
.
Recommend to use websocket, which is ws://127.0.0.1/ws/hr_json.
If you use legacy api mode, The api is http://127.0.0.1:8919/api/hr_json.
You can add js files in Pyscripts/js
.
These file will be automatically mounted while the server runs.
Open http://127.0.0.1:8919/{yourhtmlname}.html to see it.
Easy.
Instead of running Heartrate.exe
, just run test.bat
.
It will send random data to UDP port, then run start.bat
and open the url.
Gif:
Maybe we can use websocket?
Finished...?