This mod adds only 2 blocks to the game. One monitors whatever it's facing, the other can output redstone signals or change filters on create machines.
for the blue block (the monitor), you can get a JSON output of whatever it's monitoring like this curl http://<IP>:<port|27100>/<ID>
or if it's password protected curl http://<IP>:<port|27100>/<ID>?password=<password>
This supports most mod's blocks that have NBT as well as FE electrics.
for the red one (the output), you can set a redstone signal, pulse, or set create filters.
set redstone strength curl -X POST http://<IP>:<port|27100>/<ID> -d '{"redstone":<0-15>}'
pulse the block … -d '{"pulse":}''
set a create machine's filter … -d '{"filter":""}'
or multiple (must have a create filter in the filter slot) ... -d '{"filter":["item ID 1","item ID 2"...]}'
clear filter ... -d '{"clearFilter":true}'
single-line address (typical for packagers)
... -d '{"sign":"warehouse/station1"}'
up to 4 lines (Create joins non-blank lines with no separator)
... -d '{"sign":{"lines":["wh","station1"]}}'
optional: pick which adjacent sign
... -d '{"sign":{"text":"addr","side":"up"}}'
clear sign data
.. -d '{"clearSign":true}'
local d = require("devices")
local t = d:find("boiler") -- or d:find("telemetry")
print(t:getJson())
local a = require("devices"):find("gate") -- your device name, or "telemetry_actuator"
a:setRedstone(15)
print(a:getRedstone())
a:pulse(20)
a:setFilter("minecraft:cobblestone")
-- multi-item needs a real Filter already in the machine:
a:setFilter('["minecraft:iron_ingot","minecraft:gold_ingot"]')
a:clearFilter()
a:setSign("warehouse/station1")
a:clearSign()
You can also run commands on OC2 computers from HTTP actuators
# run a shell command on the OC
curl -X POST http://127.0.0.1:27100/gate -d '{"run":"uptime"}'
# → {"ok":true,"jobId":"...","queued":true,...}
# wait for the daemon
curl 'http://127.0.0.1:27100/gate?job=<jobId>'
# → status DONE/ERROR + result
curl -X POST http://127.0.0.1:27100/gate \
-d '{"writeFile":{"path":"/home/out.txt","content":"hello","encoding":"utf8"}}'
curl -X POST http://127.0.0.1:27100/gate \
-d '{"readFile":{"path":"/home/out.txt"}}'
#OC2: Modern <-> CC: Tweaked bridge
uses a daemon on the client computer to run stuff sent to it by a host (experimental)
OC2 -> CC: Tweaked
local b = require("devices"):find("cc_oc_bridge")
local id = b:submitCc("return 2+2")
-- wait a tick or two
print(b:poll(id))
CC: Tweaked -> OC2
local b = peripheral.find("cc_oc_bridge")
-- enqueue (returns job id)
local id = b.submitOc("return 2+2")
you need the respective lua daemon on the client computer. OC2 has it on the filesystem, but CC: Tweaked you'll need either the daemon disk, or to extract the CC: Tweaked daemon from the jar and drag it onto the computer.