This app is designed to subscribe to the Orbit B-Hyve API and broadcast the messages out over MQTT topics and is currently a work in progress. Any help is greatly appreciated.
At this point, status and device information should be populated.
- Handle commands from MQTT to Orbit API (start/stop watering, settings schedules, etc...)
cd ./app
cp .env-sample .env
// fill out all the config details
npm install
npm start
Pretty simple, use app/.env-sample as a template and call docker accordingly:
docker run --env-file myenvfile bhyve-mqtt
key | description |
---|---|
MQTT_BROKER_ADDRESS | MQTT broker URL (eg. mqtt://localhost:1883 ) |
ORBIT_EMAIL | Broker user |
MQTT_PASSWORD | Broker password |
MQTT_UPDATE_TOPIC | Broker topic for realtime updates from AmbientWeather |
MQTT_CONNECT_TOPIC | Broker topic for initial connections to the AmbientWeather Realtime socket |
MQTT_SUBSCRIBE_TOPIC | Broker topic for successful subscription to the realtime API |
Still a work in progress, this is as it stands now.
Schema changed from bhyve/{deviceID}
to bhyve/device/{deviceID}
- bhyve/alive - json - We received a token from the bhyve API and should be ready to work
- bhyve/device/{deviceID}/status - json - If bhyve has an active event, relay this event, else null
- bhyve/device/{deviceID}/details - json - A ridiculous amount of info, most important is list of zones for the device - RETAINED
- bhyve/device/{deviceID}/zone/{num} - json - Zone detail
- bhyve/device/{deviceID}/devices - json - List of devices
- bhyve/device/{deviceID}/message - json - Relay of event from the API for the device example:
{"event":"change_mode","mode":"manual","program":null,"stations":[],"device_id":"ABC12345","timestamp":"2019-05-05T08:50:06.000Z"}`
- bhyve/message - json - Relay of event from the API
- bhyve/device/{deviceID}/zone/{num}/set - json -
{ "state": "(ON|on|OFF|off)", "time": 12 }
- turns station on/off for n minutes.time
is not used/ignored forOFF
state but is required forON
state. Examples:
// Sets zone 2 to ON for 20 minutes
bhyve/device/ABC12345/zone/2/set
{ "state": "ON", "time": 20 }
// Sets zone 2 to OFF
bhyve/device/ABC12345/zone/2/set
{ "state": "OFF" }
- bhyve/device/refresh - casues all devices to refresh details
- bhyve/device/{deviceID}/refresh - casues individual device to refresh details (not yet implemented)