[DEPRECATED] MiHome eTRV (Radiator Valves) Device Type

New MiHome (Connect) app replaces this device type.
[RELEASE] MiHome (Connect) V2.0.1 [Energenie] (not Xiaomi MiHome)

MiHome (Connect) Latest Version v1.0.4 - Updated 25/02/2016 17:30
MiHome eTRV Latest Version v1.1.2b - Updated 28/10/2016 22:40

Donations
This integration is provided completely free of charge and is open source. If however you really feel like it, you can make a donation here

Known Issues
**- The MiHome Connect SmartApp will only detect eTRV devices and not other device types from MiHome. This is just because I only have eTRV devices to test with. Would be straight forward to extend to other MiHome devices.

I invested in some of these radiator valves from MiHome and found a published API for the MiHome platform that I wanted to hook into SmartThings. The Connect app will take your MiHome credentials and detect and create eTRV devices. You can then monitor temperature and set valve temperatures for individual radiator valves from SmartThings. Let me know what you think.

  1. Add the MiHome Connect app from GitHub as a new ‘SmartApp’, select create from code option and paste. Save and Publish.

  2. Add the MiHome eTRV device type from GutHub as a new ‘My Device Types’, select create from code option and paste. Save and Publish.

  3. Add the MiHome Connect app within the ST app from the Marketplace under ‘My Apps’

  4. Add your MiHome credentials (email and password) and select ‘Done’ on top right of app.

  5. Your eTRV devices registered on the MiHome4U mobile app should appear under ‘Things’

2 Likes

I have done exactly as described copied and pasted into a new smart app from code I get the following error.

No signature of method: script1452844566827501756306.metadata() is
applicable for argument types:
(script1452844566827501756306$_run_closure1) values:
[script1452844566827501756306$_run_closure1@60f488df]
Possible solutions: getMetadata(), getState(),
setState(java.lang.Object), metaClass(groovy.lang.Closure)

My plan is to try and connect to and control a MiHome monitor plug.

Hi Tom. This device currently only works with the eTRV radiator valves so it won’t pick up the energy plugs. To get those to work would require some extra coding to the smart app and a new device handler for the plugs.

I think the error you are seeing is caused by putting the MiHome eTRV code into a new smart app rather than a new device handler.

You were correct, I am new to this so forgive my mistakes :wink:

I have now published the device handler. I am now going to look at changing it to support the smart plug monitor.

Here goes nothing.

If you get it working, happy to incorporate it into my code and share it with the community.

Brilliant,
Although I am having problems where I can access my account and see my hub, devices and your code in device handler.

If I log onto another computer / browser nothing is there no hub nothing.

Make sure you access the graph-eu01-euwest1.api.smartthings.com URL for accessing the IDE and not graph.api.smartthings.com

1 Like

Ah ha brill that sorted it.

Ok so now that I have the device handler published, what’s
next I can’t see it on my phone or anything. I would suspect that MiHome needs authorising
etc…

I know I don’t have the eTRV but I would like to understand
the process before I start coding etc…

Thanks

Great that you’ve been working on this, and keen to think about extension to sockets etc as they have some cost effective mains sockets. I assume this still requires their hub to be present?

Yes. This app does rely on the mi home gateway to be present.

Sorry, only just saw this reply. It might be a bit late but to authenticate with MiHome, you need to perform the steps below:

Add the MiHome Connect app within the ST app from the Marketplace under ‘My Apps’

Add your MiHome credentials (email and password) and select ‘Done’ on top right of app.

Well this is an awesome find!!!
The whole reason I started looking into home automation was to control radiator valves remotely. I started with z-wave but the interfaces were difficult for a novice, but the z-wave trv’s were great. Then I found ST that was compatible with my z-wave trv’s…NOPE, only whenI bought the kit did I find out. Bummer.

Then I found cheap trv’s by ‘mihome’ and wondered whether ST would work with them, woo hoo, found this.!!

I will be buying the hub and some trv’s soon.

Please update anyones experience with this - You have made my day, if this works it’s probably the most cost effective way of controlling heating in the UK.

Pete

I’d love to see something like this for the MiHome sockets. It’s the only smartthing in my home I’ve been unable to connect to Smartthings.

I know this is an old topic, but I’ve only just found it. THANK YOU, this works great. I now have my eTRVs linked to Smartthings.

1 Like

It would be straight forward to do as they have a published API. Just never got round to doing as i don’t have any to test with. I know miHome have different models of smart plugs, which one do you have?

1 Like

I’ve got some of the basic MIHO002 and one of the MIHO005 which includes energy monitoring. I’d happy send you a MIHO002 if that helps :slight_smile:

I’m actually contemplating getting the eTRVs just to work with what you’ve released already, along with Hive. I was contemplating ditching Hive for Nest, but I think it now actually offers more than Nest.

Thanks for your good work.

Alex,

Ive now purchased a couple of the Trvs, and it seems to work ok. I had it duplicate a trv shortly after setting up but I just deleted it from smart things and it hasn’t shown up again yet.

The response times from the TRVs seems to be a bit slow, around 4 or 5 minutes before it opens or closes based on temperature. The temperature also seems to be reading slightly higher than any other smart thing temperature sensors I have in the same room. Though I understand this is down the device itself not your handler. How have you found things?

Yes. The delay is down to how MiHome conserves batteries. I understand that the poll is around 5 minutes.

I also find the temperature readings are slightly higher than other sensors. Maybe I could add an offset within the device type.

1 Like

I need to find the time to do this, but with an eager guinea pig I could attempt to create a device type from the documented api.

1 Like