The simulator allows you to test your integration without the need of a physical station.
Only available on the pre-production environment.
Starting the simulator
To start simulating a station you need to go to the page listing your stations (red). Expand the station's details by clicking on the double arrows (green) which will display a button named
Simulate (pink). Clicking on this button will start the simulator.
Using the simulator
Upon arrival on the simulator's page, the station is disconnected and all actions (except connecting the station) are disabled.
The first thing to do is connecting the station by clicking on the toggle switch next to the current state (which should be 'disconnected'). This will connect the simulator to the station backend like it is a real station and so will send an event to your backend about a station connecting.
The simulator is divided in three columns.
The left column contains the mains toggles (switching to advanced mode & connection the station) and the badge reader. The last one allows you to enter a badge identifier and send it like someone used his badge on the station to unlock a vehicle.
In the middle there is the list of all spots of the station with the locker state (represented by a lock icon opened or closed) next to the spot's led (which color matches the one on the real station). Underneath each spot you have the contained vehicle if there is one.
Under all spots, you have the list of your vehicles that are not currently locked in a station.
To simulate a vehicle locking into a spot you need to drag and drop a spot from the bottom list in the spot in which you want to lock the scooter.
To unlock a vehicle in a spot (that's where you need to work a little) you need to send an unlock request on the station API from your backend.
Finally, on the right, you have the requests zone. By default all requests are automatically successful but by un-checking the
automatic success toggle, you can choose which requests succeed and fail. Requests that will show here are, but not limited to,
Those requests appear when you call the station API from your backend.
You can access an advanced mode which display more actions mainly used in specific cases by toggling the
advanced toggle switch.
On the left, two buttons allow simulating a power failure (when the station is unplugged) and someone shaking the station (because when trying to steal a vehicle, you will shake the station and start an alarm). In the middle, under each spot, buttons that allows you to simulate multiple things:
- Unexpected unlock, or an unlock with is not requested by your backend, like when someone is doing repairs on the station and need to remove the vehicles manually.
- Defect, or an error while the station is trying to communicate with the spot.
- Temp, or the spot overheating due to high external temperature and charging a vehicle at the same time.
Stopping the simulator
Closing the browser window automatically stop the simulator.