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

devicetype
smartapp
dth_pocketsocket
dth_sensors
dth_hvac

(Graham Beale) #145

Same thing here. Very annoying.

I’m also unable to edit the mihome smart app Device list. Seems broken


(Alex Lee) #146

May be something on the Mihome side as the code hasn’t changed in a while. I will investigate.


#147

Hi, thank you for sharing. Sorry but a bit new to this. I already added this device handler accordingly and the option to choose this device handler is available on my ST app. However when i click on it, it keeps showing the error message. “Cant connect to device. Check device and try again.”

May i request for a bit of help on this?


(Graham Beale) #148

Just to add to this:
My MiHome Smartapp is unresponsive - it can neither be edited nor removed. I have emailed ST to see if they can delete it at their end so I can try a reinstall.


(Alex Lee) #149

I believe the error is preventing the app to be edited and uninstalled. I can’t be certain but it looks like it may be a change on the Smartthings platform side that’s causing an SSL error when the smart app is communicating with the MiHome API. The MiHome API works perfectly when invoking via another platform which seems to be pointing the finger to Smarttihings.

I will investigate the possibility of a workaround.


(Graham Beale) #150

I’ve managed to delete all the device handlers and smart apps by deleting each device individually first.

Now I’m trying to reinstall. Device handlers installed fine, the smart apps spring up this error every-time I try to install from Github.


(Kraeg) #151

That looks like what I get when using Google Chrome and SmartThings IDE, try in a different browser and it might work fine.


(Mark C) #152

I’m seeing what I can do. Could you send me a example of a correctly formatted message. When ever i try and drop what I’m making into a browser the mihome end send a not authorised message.


(Graham Beale) #153

Same issue in safari I’m afraid :frowning:


(Neil Mc Rae) #154

I have removed all devices. added the smart app and device handlers again. I cannot login anymore. Is anyone else chaing the same issues?


(Alex Lee) #155

Every API call to MiHome including login fails at the moment with an SSL exception. Will look into a workaround this week or hope ST fixes things their side. It has something to do with changes to httpGet method and doing a quick Google looks like maybe something in the underlying groovy engine. Maybe they’ve updated the groovy version?


(Mark C) #156

I can try work something up as well. But it dont know what a correctly formatted message to mihome looks like to try and recreate it. Every thing I’ve tryed in a browser just gets rejected by mihome.
Can you send me an example of a request to mihome


(Kevin Coulson) #157

I’ve looked into this a bit and can’t see anything obviously wrong with the code. If I change it to call a different API (not MiHome) it works fine so it seems to be some issue with that Uri. Obviously the recent Smartthings firmware upgrade changed something to break it but I’ve no idea what. The only thing that seems to be different in the MiHome Uri to the others I tried is that the “v1” part of the Uri seems to be a wildcard, you can put anything in there and it will still come back. Calls to the API via Postman with the exact same details and headers work fine.


(Kevin Coulson) #158

This post was flagged by the community and is temporarily hidden.


(Alex Lee) #159

Does the different API you tested use the Authorization Basic header as well?


(Alex Lee) #160

By the way the exact exception created is
javax.net.ssl.SSLException: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error

When I Googled this it looked like an underlying JVM issue rather than a coding one.


(Mark C) #161

when im using postman its coming back access denied using
GET /api/v1/users/profile HTTP/1.1
Host: mihome4u.co.uk
Authorization: Basic usernameandpasswordremoved
Cache-Control: no-cache
Postman-Token: c21e33ab-d2d8-96e5-8b25-e007d9da9185


(Kevin Coulson) #162

I didn’t even send an authorisation header, got a unauthorised response, I can’t even get that using the MiHome API.


(Kevin Coulson) #163

Re Postman: The username and password can’t be set in plain text, are you entering them on the authorisation tab so they get encoded and added to the headers?


(Mark C) #164

snipit yea adding on authorsition tab on chrome plugin
Basic bWFyay5jb2NrY