Heatmiser neohub "v3" (websocket/token) client
A (currently) low-level wrapper for the neoHub websocket API.
Upstream docs are available, with a free account, from https://dev.heatmiser.com/. They are not very complete or accurate.
Status
The original author of this library no longer has hardware to test against, nor any reason to continue with development. General library upgrades may happen, but no new features or bug fixes can be expected, as they cannot be tested.
Warning
All certificate information is ignored. The hub does not have a valid cert, and the client is set up to accept this. You must not trust data transmitted over an untrusted network.
Usage
Find your hub's address. Supposedly they respond to broadcast, but mine won't:
|
I pulled the IP from my router's dashboard. Let's say the IP is 192.168.13.37.
Next, create a token in the mobile app. The name doesn't matter. It looks like a uuidv4.
Export both of these as environment variables:
Then, you can use the library:
let mut client = from_env?;
let result: Value = client.command_void.await?;
println!);
Or one of the examples:
>> GET_LIVE_DATA
{
"CLOSE_DELAY": 0,
"COOL_INPUT": false,
"HOLIDAY_END": 0,
"HUB_AWAY": false,
"HUB_HOLIDAY": false,
Examples
dump-live-datacontinually exports the GET_LIVE_DATA tozstd'djsonlinesfiles.
Contributing / Future
I don't think the API is stable enough to provide structs, like the (generated)
LiveData struct, so I don't think adding those to the crate's API is a good idea.
Github issues or PRs, please.
License
MIT OR Apache-2.0