[OBSOLETE] MiHome (Connect) V2.0.1 [Energenie] (not Xiaomi MiHome)

Announcing the new MiHome (Connect) smart app and device types. This enables you to connect Smartthings with certain MiHome Energenie products.

NOTE: This smart app requires the MiHome Gateway to function.

Author - @Alyc100
getCSSData and HTMLTile elements - @tonesto7

Tireless Testers
@Lloyd_Williams @aaf2001 @inpier

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

#Latest Versions
Ensure you install the latest versions of both the Smart App and Device Handler

IMPORTANT: If using MiHome Adapter Device Handler release dated on or before 08/11/2016, please manually remove all MiHome Adapter devices from SmartThings before upgrading to 09/11/2016 and later releases. You can re-add the Adapter via the MiHome (Connect) smart app after upgrading.

Smart App - MiHome (Connect) v2.0.1 - Updated 16/01/2017 17:00

  • Added support for MiHome Double Wall Socket

Device Handler - MiHome eTRV v2.0 - Updated 23/11/2016 09:40

  • Remove extra logging and remove BETA status.

Device Handler - MiHome Adapter v2.0a - Updated 17/09/2017 10:30

  • (2.0a) Disable setting device to Offline on unexpected API response.
  • Remove extra logging and remove BETA status.

Device Handler - MiHome Adapter Plus v2.0.1a - Updated 17/09/2017 10:30

  • (2.0.1a) Disable setting device to Offline on unexpected API response.
  • Resolve Android chart display issue.

Device Handler - MiHome Monitor v2.0.1 - Updated 12/01/2017 00:10

  • Resolve Android chart display issue.

Device Handler - MiHome Motion Sensor v2.0 - Updated 23/11/2016 09:40

  • Remove extra logging and remove BETA status.

#Supported MiHome Products
NOTE: Not all these are confirmed.

  • MiHome Light (tested)
  • MiHome Radiator Valves (eTRVs)
  • MiHome Adapter
  • MiHome Adapter Plus
  • MiHome Motion Sensor
  • MiHome Energy Monitor
  • MiHome House Monitor
  • MiHome 4 Gangway Extension
  • MiHome Wall Socket

#Notable Features

  • Full control over MiHome devices via Smartthings including usage in rules and routines (i.e, CoRE)!!
  • Set boosts for MiHome Radiator Thermostats.
  • Full reporting of device status (where API and functionality is available)
  • Summary of power usage for the last 7 days for MiHome Monitor and MiHome Adapter Plus

#Screenshots

#Installation Guide

NOTE: For those with the earlier MiHome eTRV smart app and device type, you should be able to upgrade to v2.0 by pasting over the old code.

To install the MiHome (Connect) app:

  1. Add the MiHome (Connect) app from GitHub as a new ‘My SmartApps’, select create from code option and paste. Click the ‘Create’ button. Save and Publish.

  2. Add the MiHome eTRV / MiHome Adapter / MiHome Adapter Plus / MiHome Motion Sensor / MiHome Monitor device types from GitHub as a new ‘My Device Handlers’, select create from code option and paste. Save and Publish. Repeat for each device type.

  3. Add the MiHome (Connect) app within the Smartthings mobile app from the Marketplace, then selecting the ‘SmartApps’ tab and locating the MiHome (Connect) app under the ‘My Apps’ section which should be at the bottom of the list.

  4. Log into your MiHome account via the smart app when first opened.

  5. You should be able to select your MiHome devices in the device selection screen.

  6. Once you have selected your devices, click Done on the top right.

  7. Your selected devices should automatically be configured and appear under ‘Things’ with the label [Device Name] [Device Type] e.g ‘Bedroom eTRV’ (may require SmartThings app restart).

#Github Links
Github Repository Integration details:
Owner: alyc100, Name: SmartThingsPublic, Branch: master

Smart App

Device Types

#Feedback

Your feedback is crucial during this BETA. Please post your comments and feedback on this topic below.

7 Likes

@inpier - The idea around this is that real power should display at the bottom corner of the main tile at the top. Does this happen when a device is on? (before you modified the code). See screenshot of an example below…

1 Like

Ok that’s probably why I added it as I couldn’t see it displayed anywhere so thought it was missing, I do see it in your code now as a tileAttribute of the main tile but no it isn’t displaying as far as I can see.

Screenshot please?

Also in the logs from Smartthings IDE, can you post in here or DM me the part that says ADAPTER JSON for ‘Your Device Name’. It will be under the device handler logs.

Here is my screenshoot
Logs to follow

Thanks Kevin. Try the updated MiHome Adapter device handler BETA 2 and see if a real power figure appears on the bottom left.

Yes it’s now showing fine

Brilliant.
I can’t see anything else wrong with the adaptor everything is there.
Really pleased.
Thanks

1 Like

Thanks Alyc.

Will definitely be testing this. Just in time for the Christmas lights :slight_smile:

Cheers.

Edit:

I’ve had a quick play and managed to update OK, but it only seems to be picking up my Adapter Plus and not my regular Adapters. I thought it was perhaps they are currently unplugged, but that made no difference.

Images attached for comparison.

Am I missing something?

Incredible piece of work!

Update to BETA 3 and see if it is picking up your other adapters.

Success. Thanks. Will test functionality later.

Good start. Make sure you also update the MiHome Adapter Device Handler to Beta Release 3

Just tested. Looks to work OK. Shame about the lack of state, but that’s a limitation of the switches. That’s something I’m willing to live with considering they are 3 times cheaper than the next cheapest smartthings plug adapter. I only whip these out at Christmas and use a wemo plug for anything else that I need to be more reliable.

Keep up the great work. I’ll ask the wife if I can send you some beer money :slight_smile:

I have a question about the MiHome adapters. I am using the MiHome light switch that are not supposed to keep state. If I use the physical button on the switch, it doesn’t update the state of the device within Smartthings. However, if I turn the light switch on via Smartthings or the MiHome app, it reports the state of the light correctly. Wondering if it’s the same behaviour on the MiHome Adapters?

I don’t have the Mihome yet Alex (but seriously thinking about getting some eTRV’s this weekend because of your work with this :)) That sounds about right for the light switch, smartthings & Mihome isn’t reporting the actual state, but since it’s sending a command it knows what state it should be in, the switch has no way of sending it’s actual physical state back. I think the adapter plus will but I’d be interested to know

Fairly big update overnight.

Sorry to have to do this but you need to manually remove all MiHome Adapter devices from Smartthings before upgrading to the latest beta code. I’ve had to split out the Mihome Adapter Plus device from Mihome Adapter device as the functionality difference is larger than I first thought.

Also added support for MiHome Monitor device so please test away.

Also keep an eye on the historical power chart and make sure the data looks correct as it’s very difficult to test.

Now with added support for the MiHome 4 gangway switch.

Alex,

I’ve ensured I’ve removed all trace of adapters, including deleting the device after removing it from the MiHome app. I can now seemingly add the normal adapters, but not the Adapter Plus, I get the below error when attempting to click done.

I’ll try to DM some logs…I think I’ve captured them correctly.

@aaf2001 @Lloyd_Williams @inpier
Please update your Smart Apps and Device Handlers to the latest code. Lloyd found a critical bug that occurs when trying to add and refresh Adapter Plus devices and possibly Monitor devices too.

It’s been a week and I’m assuming the radio silence is a good sign that things are working with MiHome and Smartthings. Any thing to report? If it’s stable, I’ll take the BETA label away.

1 Like