Skip to main content

Discovery and state sharing with HOME CHANNEL

#search and #notify are application conventions used by the Remocon examples. IOSignal supplies routing; your application defines discovery payloads and commands.

Discover devices​

A device subscribes to #search when ready and publishes its CID to #notify. It publishes that CID again whenever it receives #search.

The web app subscribes to #notify before sending an EMPTY #search. It builds a device list from replies and receives announcements from newly connected devices. This flow requires matching HOME CHANNEL scope; see HOME CHANNEL.

Once a CID is known, direct commands target that device. CID publications let many observers share state from one publisher.

Obtain the device UI​

The UI can be built into the app, loaded from a server, or described by the device. A minimal description is on,off,toggle.

PatternRequest/subscriptionDevice response
Direct request/replySend deviceCID@ui with the web client's CIDSend webCID@ui with UI data; web receives @ui
CID publicationSubscribe to deviceCID@$uiPublish @$ui with the UI description

For direct replies, the device reads the requesting web CID from the payload. For retained publication, later subscribers can receive the saved UI subject to server retention policy.

Share actual state​

After applying on, off, or toggle, the device publishes @$state with its state. Observers subscribe to deviceCID@$state and receive that full tag. This separates a command from the device's report of what it applied.

@state and @$state are reserved state topics: on a device disconnect, the server can notify subscribers with close. Storage and lifetime remain server/service policy. #search, #notify, @$ui, and @$name are application conventions, not an enforced universal device model.

Try it​

Install Remocon and its IOSignal, Boho, Crypto, and example-specific dependencies. Upload a matching board sketch, then connect a browser on the same network to Remocon. Check both physical output and reported state.

Follow ESP32 CID control, group control, or choose from board examples.