Develop BL10 code procedures - liskcenterutrecht/lisk.bike GitHub Wiki

introduction

If you are working at a site where you have the ability to forward external data to your development laptop, this is the easiest/most efficient way to start. Otherwise it is better to use an external VPS so that the lock can communicate with your server backend. Both procedures are documented below:

develop on local dev machine

setup routing

  • make sure that your dev machine is reachable from the internet
    • setup external address using dyndns or use external ip of router
  • setup port forwarding to your machine from the local router (fe external:7777 to local:3005)
  • allow port from the router through the local firewall:
    sudo ufw allow from 192.168.xxx.xxx to any port 3005 (xxx.xxx -> your router)

test routing

use the test-send.js script in the bikebrainz folder to check if the lock will be able to reach your dev server:
...YADDA YADDA...

setup lock to use VPS xxxx

-> set server to VPS instance by sending SMS command to lock server,1,xxxx.lisk.bike,3005,0#

develop on lisk.bike V3 VPS

setup lock to use VPS xxxx

-> set server to VPS instance by sending SMS command to lock server,1,xxxx.lisk.bike,3005,0#

login to the vps

-> cd lisk-bike/bike-brainz
-> ratom index.js
-> ratom concox-bl10.js
-> npm run startdev
(restarts on edits in relevant files)