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


(Kevin Coulson) #165

That’s just your username encoded by the look of it?

(Mark C) #166

abit more… i wasnt posting it all
Basic bWFyay5jb2NrY3JvZnRAZ21haWwuY29tOmV4YW1wbGVwYXNzd29yZA==

(Kevin Coulson) #167

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

(Mark C) #168

ive save it to notepad, what extension should i give it?

(Kevin Coulson) #169

Save it to a .json file then in Postman there is an import button at the top

(Mark C) #170

it tryed but this is what i get

“id”: “909b9776-b260-afe7-3276-40517acb04b6”,
“name”: “MiHome”,
“description”: “”,
“order”: [
“folders”: [],
“folders_order”: [],
“timestamp”: 1531226559662,
“owner”: “4763463”,
“public”: false,
“requests”: [
“id”: “77727819-16ae-8504-4c20-5921ef85ee4f”,
“headers”: “Authorization: Basic encodeddetails\n”,
“headerData”: [
“key”: “Authorization”,
“value”: “Basic encodeddetails”,
“description”: “”,
“enabled”: true
“url”: “http://mihome4u.co.uk/api/v1/subdevices/list”,
“queryParams”: [],
“pathVariables”: {},
“pathVariableData”: [],
“preRequestScript”: null,
“method”: “GET”,
“collectionId”: “909b9776-b260-afe7-3276-40517acb04b6”,
“data”: null,
“dataMode”: “params”,
“name”: “MiHome Devices”,
“description”: “”,
“descriptionFormat”: “html”,
“time”: 1531226563873,
“version”: 2,
“responses”: [],
“tests”: null,
“currentHelper”: “normal”,
“helperAttributes”: {}

(Kevin Coulson) #171

hmm, something is weird, it works on mine. Are you using the Chrome app version of postman?

(Mark C) #172

yea, thats where i installed and launched it from, its in its own dedicated window though

(Kevin Coulson) #173

I don’t know then! It works for me!

GET: https:// mihome4u . co . uk / api / v1 / subdevices / list
Headers: Authorization = Basic abc123

That’s it, returns my devices

(Mark C) #174

this is what i have

(Kevin Coulson) #175

That’s weird. Definitely using the correct credentials?

(Mark C) #176

Just got a response back from mihome

Almost all messages from SmartThings to our server are not being received. This is not due to something on our end, there is no rate-limited blocks in place. His best guess is that something at SmartThings has changed and the existing MiHome integration code (which is maintained by the SmartThings community) will need to be fixed in some way.

As mentioned, some queries are still coming through from SmartThings and he assumes that there are one or two users who have done their own modification of the community code.

We would recommend looking into the current community code available as the disconnect appears to be there.

(Mark C) #177

postman works at home, must have been work firewall

(Graham Beale) #178

I’m reverting to IFTTT until we find a solution to this :frowning:

(Mark C) #179

if i change the uri to “https://wap.tplinkcloud.com” i get a differnt message

8:09:45 AM: error groovy.lang.MissingPropertyException: No such property: data for class: java.io.StringReader @line 650 (getMiHomeAccessToken)
8:09:45 AM: debug apiGET respones groovyx.net.http.HttpResponseDecorator@615a03b

its like it dosnt like the mihome address (i tryed a .co.uk as well)

(Mark C) #180

differance i can see is

there is no revers dns address
there is no recored location

do we know if smartthings do a rDNS lookup?


(Kevin Coulson) #181

I’ve exhausted my knowledge of groovy so it I think it’s up to Alyc100 to fix it. I was going to get rid of my Energenie stuff anyway, the one way communication is too annoying.

The only unusual thing I can see about the MiHome url is that the “v1” part of it is a wildcard but it does seem like the httpGet has an issue with their SSL cert specifically.

(Mark C) #182

I feel the same, im moving over to z-wave, … but Energenie havent washed there hands yet (i wouldnt mind it working save me buying new eTRV’s)

see response
Thank you for the update. Can we ask for some more information please:

  1. Which address is the SmartThings integration hitting? Is it using ‘https://mihome4u.co.uk’ or ‘https://www.mihome4u.co.uk’ or is it hitting another address?

  2. What error number are you getting back from the requests being made? Since you mention Cloudflare, it sounds like you have some visibility of the response that you are getting from Cloudflare.

(Kevin Coulson) #183

Interestingly I get an Access Denied’ response when I use Postman with the ‘https://www.mihome4u.co.uk’ address but not with the ‘https://mihome4u.co.uk’ address.

(Mark C) #184

just messaged them back with this (nb Cloudflare hoests mihome)
There is something strange with your setup causing the issue
If I use postman at home to https://mihome4u.co.uk/api/v1/users/profile it works (https://ww.mihome… doesn’t) , if I try using postman at work (lots of security) I get a 200 but { “status”: “access-denied”, “time”: null, “flags”: {}, “data”: { “message”: “Access to users/profile is not permitted.” }}

In smarthings, if I have the code calling [uri:https://mihome4u.co.uk/api/v1/users/profile, headers:[authorization:Basic ….]] I get javax.net.ssl.SSLException: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error . BUT if I change JUST the address [uri:https://yale.co.uk, headers:[authorization:Basic …]] , it doesn’t come up with an error and I get a response

Could it be something to do with security certificates (SSL) or java versions on cloudfair, googling the error I found this in a post

“It looks like Cloudflare would use an ECDHE cipher with Java 7, but the EC cipher suites aren’t supported by default on OpenJDK 7 (at least as packaged by Debian and Ubuntu). Compare https://packages.ubuntu.com/trusty/amd64/openjdk-7-jre-headless/filelist (no libsunec.so or sunec.jar) vs https://packages.ubuntu.com/xenial/amd64/openjdk-8-jre-headless/filelist (the openjdk8 used by Travis actually comes from https://launchpad.net/~openjdk-r/+archive/ubuntu/ppa, but I suppose it contains SunEC).”