[RELEASE] - Hive (Connect) V3.0 (British Gas Hive)


First off, well done an thank you for your hard work.

Everything appears to work so far. However it seems that some TRVs drop off and “cannot be reached” in smartthings. Not sure why, as soon as i hit refresh they come back online.

If you are linking this to google home via smartthings there seems to be a charachter limit on the name of the TRVs. When i reduced the name down, google home was then able to see it.

Thanks again!

How are the drop-off’s looking? Can’t say I’ve noticed any for mine… If they do it frequently could you run the live logging from smartthings web & see if any errors are coming back?

Hi, all i can see is the attached. If i reduce the refresh rate would it help?


strong text

That doesn’t look quite right with all the ping commands, mine shows “Refreshes” sent via the Hive (Connect) Smartapp like this:

Could you get some “Live logging” (in the top menu on the ST Web info page & filter for the TRV & Hive Connect apps?


So in the live logging i’m struggling to pin down where smartthings realises it doesnt have site of something.

Having a go at some efficiencies in the DH to see if it helps, but I’m a bit hamstrung by the Hive API capabilities.

Effectively there are two types of calls for everything, a “product” call and “device” call. Product contains temperature info etc… Device includes calibration, battery & signal information.

In the API for Device you can request information for a specific device but for Product you must call everything and then filter what you want.

I’ve got a version that is more efficient for the “device” details by only calling what is needed rather than taking the everything & filter approach it originally was.

I’ll run this for a bit then update if I find it any better. I’m trying to explore the API to see if there is a better way to call the Product data too

Ok updated the smartapp & TRV DH in my github (so you need to update both for this to work).

I’ve added a new function just for the TRVs that caches the “products” API call for 3 minutes to try and reduce the ammount of calls out & processing that happens. Been running it for a few hours and now 13 out of my 15 TRVs are showing online… so hopefully its a bit better.

@barron can you test & let me know how it goes?

Yeah mate will do ASAP!

Ok so…

Went slightly backwards on this one for me as now i can see all of the trv’s but they are all off line?

Tried to remove the app to reinstall but i get an error message in the app.

if you refresh manually do they still come back online?

In the log for Hive(Connect) can you look for a “using cached data” or “getting new data” when they do a refresh?

Ok, go at it

SA updated to 3.3 - bunch of streamlining & device refresh now only updates children DH’s that haven’t updated in last 5 minutes

DH updated to 1.3 - added refresh timer directly in DH rather than relying on SA.

I’ve had mine solid online overnight with this.

Now that things are more stable (certainly for me at least!) I’ve been able to put some work into some dashboards using InfluxDB & Grafana to see what is happening with the heating.

It’s handy to see the lag between boiler turning on, the TRV operating temperature chagning & the actual real-world temperature changes

And to see what is operating when in relation to the boiler being on:

1 Like

Looks good I’ve been meaning to set that up.
In what order does it need setting up our does it not matter.
Can InfluxDb and grafana both run from a Raspberry pi

Looks like it should be okay to run from a Pi - seems to be plenty of people talking about it for other IoT projects. The logger I’m using is this one - [RELEASE] InfluxDB Logger. I run mine out of Docker on my NAS which makes it a bit simpler for upgrades & maintenance but has it’s own downsides too (Think you can Docker from Pi as well).

You don’t need to worry about Telegraph (will see it mentioned in some of the other internet posts) to gether the data, the above SA will log straight into the DB.

Grafana was okay but has a bit of a learning curve - I ended up installing Chronograf to help explore the datasets when learning what queries I wanted.

1 Like

Thanks for the info.
Looks good :+1:t2:

I still can’t refresh the trv’s. I’ve tried adding one at a time but no luck.

Will post live log later.


So, the error i get from the live logging is :

16:08:25: error java.lang.NullPointerException: Cannot execute null+180000 @line 1292 (getDeviceTRVStatus

The strange thing is, if i move the trv to manual in smartthings. hive recognises that and changes the TRV accordingly so it does respond?

This is the latest app i have


Hey all,

this is my first post… just thought I would comment what I change I made to the code to stop the TRVs from displaying offline. I noted I was getting an error in my logs so I went and dug around and noticed that the line


in the def refresh() was the source of the error.

I simply commented out this line and now it appears to be working perfectly and my TRVs never go offline.

Perhaps the developer of this code could comment on what the purpose of this line was for and what impact removing it might have. Hopefully its not now refreshing too often (and effecting battery life).

for clarity the whole def now looks like this

def refresh() {
log.debug “Executing ‘refresh’”
// unshedule(‘poll’)

did you ever get the battery and temperature sensors working (from the hive door sensors), if not do you have any easy way to remove the code so that its not even trying to get it?

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.