BACnet Lua Scripting
Examples
-
Tutorial A walk-through of creating a lua script for the simulator, see BACnet Simulator Lua Scripting Tutorial
-
Examples These are a number of examples to help you get started with the simulator and creating your own lua scripts
API
Operational Functions
Objects
Properties
Events
Using your own script
To run the docker container with your own script you will need to mount a volume containing the script to the container. Using the --script
option, you should then pass the path to the mounted lua script. For example:
docker run --rm --name bacnet-sim -e RUN_MODE=IP/MSTP -v {path-to-scripts}:{mounted-path-to-lua-scipts} iotechsys/bacnet-sim:2.0 --instance 1234 --name BACnetSimulator --script {mounted-path-to-lua-scripts}/custom-script.lua
docker run --rm --name bacnet-sim -e RUN_MODE=IP/MSTP -v $(pwd)/lua-scripts/:/docker-lua-scripts/ iotechsys/bacnet-sim:2.0 --instance 1234 --name BACnetSimulator --script /docker-lua-scripts/custom-script.lua