MCPcopy Index your code
hub / github.com/W-Floyd/ha-mqtt-iot

github.com/W-Floyd/ha-mqtt-iot @0.6.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.6.1 ↗ · + Follow
377 symbols 853 edges 59 files 48 documented · 13% updated 2y ago0.6.1 · 2023-02-05★ 4315 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

HomeAssistant MQTT IOT

In need of a better name

A simple Golang program that allows commandline based MQTT entities. It uses HomeAssistant MQTT autodiscovery, thinly wrapping all of the native json fields for each object, handling topic creation, subscription, updating, and so on. See sample.config.json and sample.secrets.json for examples. Run ./ha-mqtt-iot -help for help.

Automatic Code Generation

Most of this tool is automatically generated from the Home Assistant documentation. As such, should this documentation change, the code may be regenerated using go generate, or go run ./helpers/. If this has been run before, clear the cache found in ./helpers/cache/.

Writing new configs

View the sample config for examples. Most fields are inherited from the Home Assistant documentation, but to double check one can check the ./devices/internaldevice/*.go files for the struct. The program will fail on finding unknown fields.

Extension points exported contracts — how you extend this code

Device (Interface)
Do not modify this file, it is automatically generated
devices/internaldevice/types.go
Device (Interface)
Do not modify this file, it is automatically generated
devices/externaldevice/types.go

Core symbols most depended-on inside this repo

GetTopic
called by 129
devices/externaldevice/generics.go
ConstructStateFunc
called by 66
devices/common/shared.go
Subscribe
called by 64
devices/externaldevice/types.go
ConstructCommandFunc
called by 63
devices/common/shared.go
GetUniqueId
called by 24
devices/externaldevice/climate.go
Translate
called by 22
devices/internaldevice/types.go
GetUniqueId
called by 22
devices/externaldevice/light.go
GetDiscoveryTopic
called by 22
devices/externaldevice/generics.go

Shape

Method 302
Struct 49
Function 24
Interface 2

Languages

Go100%

Modules by API surface

devices/externaldevice/vacuum.go13 symbols
devices/externaldevice/update.go13 symbols
devices/externaldevice/text.go13 symbols
devices/externaldevice/tag.go13 symbols
devices/externaldevice/switch.go13 symbols
devices/externaldevice/siren.go13 symbols
devices/externaldevice/sensor.go13 symbols
devices/externaldevice/select.go13 symbols
devices/externaldevice/scene.go13 symbols
devices/externaldevice/number.go13 symbols
devices/externaldevice/lock.go13 symbols
devices/externaldevice/light.go13 symbols

For agents

$ claude mcp add ha-mqtt-iot \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page