Skip to content
Command-and-control server for CHIPotherm
Go JavaScript CSS HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

CHIPotherm server

This is the server side component of the Chipotherm thermostat.

It's purpose is to basically act as a command-and-control server for the Chipotherm program.

Building / Running

Build via go build. Runs on port 43001.


State format: [enabled | disabled] [temperature]

poll () -> state_format

Blocks until the state on the server changes, in which case responds with either: Formatted state (see "State format" above) or "refresh": Expects a subsequent call to updateState(state_format) notifying the server of the current state

updateState (state_format) -> ()

Called by the CHIP: Updates the server's cached state.

refreshState () -> (state as json)

Called by the server: notifies the CHIP that the server requests an updateState. Blocks until we hear back via updateState, then returns the new state.

Client APIs

These APIs are used by the "client", which in this case is the static webpage served by the CHIPotherm Server.

getCachedState () -> (state as json)

Immediately returns the server's cached state as JSON

setState (state_format) -> ()

Called by clients to the server: updates the server's cached state and notifies observers (via poll) about the new state.

You can’t perform that action at this time.