SmartThings Community

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


(Mark C) #105

Under home control,add devices

(Mark C) #106

hi, ive done some work on the app and DH to reduce polling and to more randomize the polling (its in the DH now) with an option to choose the frequency of individual device refreshing.
let me know what you think

DH -

(Robert Doswell) #107


I’ve added everything as per the instructions and selected the devices in the smartthings app, but they dont appear as “things”

Rebooted the phone just in case - any ideas?

(Mark C) #108

Not sure if your using mine tweeked code. Have you logged into the smartapp then selected the devices you want then saved. If i rember when i 1st did it i had to change the name at the bottom of the app to allow it to save. They should then just apprear. Of not the mihome has been down most of the day today

(Robert Doswell) #109

Yes I’ve added them and saved. mihome is up now

(Robert Doswell) #110

Bingo! It’s working, I had to re-authenticate. maybe due to the downtime @ mihome

(Mark C) #111

Glad to hear. Im still doing a bit of work on the error handler and reducuing the code on the trv

(Robert Doswell) #112

I can test if you like. might remove the association from alexa/smartthing so my mihome routines don’t get in a mess

(Mark C) #113

If you have a trv try not to use the up/down buttons for the temp. Every press sends a temp change request which uses up your quota. Im thinking on how to put a lag in. Mihome have set a limit as there system is getting over loaded with frequent poll/commands

(Mark C) #114

I’ve released the adapter DH. If there is an error it should update in the app feed. Also i could do with someone who knows what there looking at have a look at my use of else.
Then it just needs some using and monitoring in the ide to make sure it dosnt throw up any random errors

Im go to look at the etrv tonight. I done loads today and the it started throwing up errors. I thought id messed it up so revered it to find out it was at there end

(Mark C) #115

O yea ps only have them in 1. With my google linked it doubled them up so she never new which i wanted

(Mark C) #116

Ive uploaded the latest versions for testing. Once installed got to the settongs to set boost temp etc. Let me know if you see any issues

(Mark C) #117

only issue i have is if it does go into the error cycle when you press boost it over rides the indications, temp is right but no boost indication ive tryed these in the process which calls the set temp but i cant get them to work
setHeatingSetpoint.waitFor(setHeatingSetpoint(temp), 45000)

tempset200 = true
tempset200.await(7*6, SECONDS)

in the set temp process

idealy id like the signal option but the signal keeps erring out
java.lang.NullPointerException: Cannot invoke method signal() on null object @line 273 (setHeatingSetpoint)

so any help…

(Mark C) #118

released - Adapter 3.0 condends code reduced send event commands removed debuging
relesed - eTRV 2.6 for testing added google voice compatability
Turn off - “turn off device name/room thermostat(s)” --Save last settings and turn off (aka 12deg)
Turn on - “set device name/room termostat(s) to heat/cool” – heat=Resume cool=boost
Set Temprature - “set device name/room thermostat(s)/temprature to number
Quiry Temprature - “what is the temprature in the device name/room/house” --response current temp and setpoint
Up/down 3 deg - “turn up/down device name/room thermostat(s)”
Boost - "set device name/room thermostat(s) to cool

Let me know any issues
Only bug i know of (but cant fix) is that when changeing the settings it looses the icon unless you reselect one


Hmm, so I’ve been using Alyc’s code for the last year and it’s been great (well as great at Energenie connections can get!). Installed one last double socket and updated to Mark’s latest code but running into problems!

The smartapp is seeing the new sockets but get an error when I save and it’s not updating my device list within ST on the mobile app or in the IDE. It is showing up in Live Logging though and when I first added it (I’ve removed and re-linked within Energenie as well), it had gotten into WebCoRE and was linking itself to my kitchen motion sensor.

So it’s nearly in but I don’t know how to get it to show as a thing! I have rolled back to Alyc’s code but it’s also not saving properly and I even tried to delete the smartapp & IDE but it won’t let me…

Really appreciate anyone’s help :slight_smile:

(Mark C) #120

Did it you add the device before change to my code? Did your new device work once added? Im not sure if you are using the adapter or adapter plus. I havent done any changes with the plus so dont know how compatible it is with the smartapp


Standard adaptor, it’s the double in wall socket. I updated first and then added it in, I’ve never had it shown as a thing so I can’t control it from ST but can from Energenie itself but it is being polled by the smart app shown in live logging.

(Mark C) #122

Ive never used a double dose it show as 2 separate things? Have you other double sockets working? What frequency is the polling? Dose it show on the device list in the IDE? Are they using the right DH?


Yes I’ve loads in the house that are working fine but added then a year ago and this is the first new Energenie device since. They get paired and listed as separate switches in all apps. I can’t see them in the My Devices list in the IDE so can’t see what device handler is being used. The only place I see the reference is in the smart app plus live logging but in the standard st UI and IDE they don’t show so I can’t look at/change any settings! I’ve got both the adaptor and adaptor plus dh loaded.


Looking more into the logs there’s this ID against the device logging,

Is some of this code a device ID I could use to manually create the devices?