Skip to content

Set up Cloud Agent dev environment (AGENTS.md) - #7

Draft
frahlg wants to merge 1 commit into
cursor/lua-driver-physical-plant-6d9dfrom
cursor/setup-dev-environment-308a
Draft

Set up Cloud Agent dev environment (AGENTS.md)#7
frahlg wants to merge 1 commit into
cursor/lua-driver-physical-plant-6d9dfrom
cursor/setup-dev-environment-308a

Conversation

@frahlg

@frahlg frahlg commented Aug 20, 2026

Copy link
Copy Markdown
Member

Summary

Sets up and verifies the Cloud Agent development environment for the Go device simulator, and documents Cloud-specific run/test caveats in a new AGENTS.md.

No application code was changed β€” only environment setup and docs.

What was verified

  • go mod download β€” dependency refresh (used as the environment update script)
  • go vet ./... β€” clean
  • go test ./... β€” all packages pass
  • CGO_ENABLED=0 go build ./cmd/simulator/ β€” server binary builds
  • Ran the server (port 8762) and exercised the REST API + Modbus TCP:
    • Created a sungrow-hybrid inverter, started automation
    • Raw Modbus FC4 read of input register 13022 returned 780 (= 78.0% SoC), matching the API state
    • Web dashboard renders devices with live data

Notes for future agents

AGENTS.md documents the key non-obvious caveats:

  • Server mode HTTP port defaults to 8762 in the VM (not 80).
  • Desktop/Wails mode is not runnable here (needs CGO + GTK/WebKit + display); use server mode.
  • Protocol servers bind lazily when simulators are created (Modbus 5000+, MQTT 1883+, OCPP 9000+).
  • Set DEVICE_SIMULATOR_DATA_DIR to a writable path.

Demo

device_simulator_dashboard_demo.mp4

To show artifacts inline, enable in settings.

Open in WebΒ Open in CursorΒ 

Co-authored-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants