This lets you control factorio constant combinators via a simple REST API.
- Enable RCON in Factorio
- hold
Ctrl
+Alt
and click on Settings in the Factorio menu - go to "The Rest"
- set
local-rcon-socket
andlocal-rcon-password
- start a new multiplayer game (single player has no rcon)
- hold
- Rename
settings_sample.ts
tosettings.ts
- Adjust settings
- run
npm install
andnpx ts-node-dev src/main.ts
The constant combinators are identified by the signal R set in slot 20. In the image below you would use /cc/995/signals
GET /cc/:id/signals
- Get all signals of the circuit network connected to this combinator
GET /cc/:id/signal/:signalSlot
- Get signalSlot
POST /cc/:id/signal/:signalSlot
- Set signalSlot
. Body must formatted like this
{
"signalName": "iron-plate",
"signalType": "item",
"signalCount": "1"
}
DELETE /cc/:id/signal/:signalSlot
- Unset signalSlot