Integration with Orbit B-Hyve Irrigation System

I signed up on their forums in order to reply to this thread…

https://bhyve.orbitonline.com/topic/api/

Seems to be a waiting period after signing up but I want to keep this thread going. The last reply on there is spot on. The b-hyve line has some great products for fairly reasonable cost and it would only help their product sales to release an api.

Its soooo frustrating that there is OBVIOUSLY an API that they refuse to publish. I started picking it apart, will post whatever I find. I can at least login and get some devices, now just working on control. Seems like the web version is posting JSON over a websocket… Could definitely be emulated but I imagine there’s a way to do this with pure REST.

Me too Bill - here’s the fruits of my labour below:

FIRST ESTABLISH A SESSION – GETS API KEY FOR ALL FUTURE CALLS
POST https://api.orbitbhyve.com/v1/session

HEADER TAGS FOR SESSION CALL
orbit-app-id=Orbit Support Dashboard Content-Type=application/json

REQUEST
{ "session": { "email": "{your email/account_id}", "password": "{your password}" } }

RESPONSE
{ "orbit_api_key": "{orbit_api_key}", "user_id": "{user_id}", "user_name": "{Your Name}", "bhyve_account_id": null, "bhyve_account_roles": null, "bhyve_account_groups": null, "roles": null }

HEADER TAGS FOR ALL CALLS BELOW
orbit-app-id=Orbit Support Dashboard orbit-api-key={orbit_api_key returned from session call} Content-Type=application/json

VARIOUS CALLS TO GET INFO
GET https://api.orbitbhyve.com/v1/users/{user_id} GET https://api.orbitbhyve.com/v1/user_feedback?user_id={user_id} GET https://api.orbitbhyve.com/v1/devices?user_id={userid} GET https://api.orbitbhyve.com/v1/sprinkler_timer_programs?device_id={device_id} GET https://api.orbitbhyve.com/v1/device_history/{device_id} GET https://api.orbitbhyve.com/v1/zone_reports/{device_id} GET https://api.orbitbhyve.com/v1/watering_events/{device_id} GET https://api.orbitbhyve.com/v1/landscape_descriptions/{device_id} GET https://api.orbitbhyve.com/v1/event_logs/{device_id} GET https://api.orbitbhyve.com/v1/meshes/{mesh_id}

1 Like

Doesn’t seem to be a way to POST anything to the API to control anything (that i’ve been able to guess), so it seems like a websocket interface will be the only path… I’ve just been using the web interface for a bit, capturing the websocket traffic. It seems like it wouldn’t be too difficult. Have a little time today, going to see what I can put together.

The websocket messages are all JSON and look pretty simple to predict…

{"event":"watering_in_progress_notification","program":"c","current_station":3,"run_time":45,"started_watering_station_at":"2019-02-24T07:20:01.000Z","rain_sensor_hold":false,"device_id":"blahblahblah","timestamp":"2019-02-24T07:20:01.000Z"}

Manual run of Station 2 for 10 minutes:

{"event":"change_mode","device_id":"blahblahblah","timestamp":"2019-02-24T13:47:30.983Z","mode":"manual","stations":[{"station":2,"run_time":10}]}

Response:

{"event":"change_mode","mode":"manual","program":null,"stations":[{"station":2,"run_time":10}],"device_id":"blahblahblah","timestamp":"2019-02-24T13:46:40.000Z"}

{"event":"watering_in_progress_notification","program":"manual","current_station":2,"run_time":10,"started_watering_station_at":"2019-02-24T13:46:40.000Z","rain_sensor_hold":false,"device_id":"blahblahblah","timestamp":"2019-02-24T13:46:40.000Z"}

The client sends a “ping” every 25 seconds:

{"event":"ping"}

To initialize the websocket connection, you need to do a POST first to /v1/session as you’ve outlined above, then to auth the websocket connection you use:

wss://api.orbitbhyve.com/v1/events

{"event":"app_connection","orbit_session_token":"...thesecrettoken..."}

Turn everything off:

{"event":"change_mode","device_id":"...blahblahblah...","timestamp":"2019-02-24T14:03:06.803Z","mode":"manual","stations":[]}

Zone/Station 2 for 10 minutes
{“event”:“change_mode”,“device_id”:“5a8b5b084f0c9ba809f1b55b”,“timestamp”:“2019-02-24T14:04:06.803Z”,“mode”:“manual”,“stations”:[{“station”:2,“run_time”:10}]}

It’s pretty responsive, phone app updates real-time (since they’re using websocket connections). I think we can make this work…

The next question… MQTT gateway or integrate as a component? I feel like a docker container that uses MQTT would be a bit better to start with, easier to test and can work with other tools…

3 Likes

@billchurch great work!

I’m from the UK, but have ordered a couple of the Orbit B-hyve 21005 Bluetooth Hose Faucet Timers, now wondering if I should order the wifi hub too, as I assume this will allow them to be operated via the api? I did plan to sniff the packets, it’s a great little device with built in flow meter etc.

@billchurch I’ve noticed you’re working on this via GitHub, are you making good progress?

My devices are due be sent to me via Amazon this week - excited to get them.

Do you know if the flow rate is available via the API?

Great progress… Now someone needs to make a component out of it for HomeAssistant.

Thanks for your efforts…

There are a lot of stats available. Not sure how the WiFi hub works (my sprinkler has integrated WiFi) but I imagine the API is the same.

@billchurch, I’m up and running via Node Red, valve control seems to work perfect!

The only thing is I cannot keep flow related updates active once the app is closed :frowning:

Edit 3: So I’ve narrowed it down, everything is working with exception of the flow related messages, I assume the app sends a payload when you click “tap for more water details”, it then times out when I close the app and Node Red stops receiving updates, how can I find out the payload which is sent?

Decompiled the app to locate all endpoints and payloads, to enable flow:

  "event":"enable_flow_sensor",
  "device_id":"xxx",
  "duration_sec": 30,
  "interval_ms": 1000
1 Like

My landscaper just installed one for me, despite I asked for rachio, and say “I saved your 50 bucks, man”

Then iit will cost one of my weekend to integrate it in.

If nobody is writing code for this, I will start something this weekend.

4 Likes

Hello, looking for a smart hose device and wondering, instead of using the cloud api , wouldnt it be possible to use a bluetooth backend and controlling the hose locally and directly like for example the xiaomi flora plugins?

1 Like

Great work this sounds promising!

Do you by chance have a list of all api endpoints?

Would love to see this component added! I have several hubs and hose faucet timers and happy to help test.

+1 would love that too !

Add me to the custom component testing when it’s ready! Now that the snow is finally melted I’ll be using my sprinkler system again :slight_smile:

About to buy a B-Hyve from Bunno’s here is Australia. Let me know if you want me to test with a presumably international unit!

Excited for the outcome of all the hard work you guys are doing.

1 Like