Manual everHome integration

I managed to connect my everHome CloudBox for controlling shutters using proprietary protocols and thought I’d share the steps in case they are helpful for anyone else. I had found GitHub - DrHouseIT/everHome2MQTT but it seemed fairly complex to set up given that I only want to integrate a handful of devices and no changes are planned.

  1. Go to https://everhome.cloud/en/developer/applications and create an application. Use some meaningful name and http://localhost:12345 for the application website. Take note of the client id {client_id} and secret {client_secret}

  2. In a browser, open the URL https://everhome.cloud/oauth2/authorize?client_id={client_id}&response_type=code&redirect_uri=http://localhost:12345&state=state, log in and authorize the request.

  3. Wait for the request to time out and take note of the code in the address bar. E.g., for http://localhost:12345/?code=12345_67_abcdefgh&state=state the code is 12345_67_abcdefgh for which I’ll use the placeholder {code}

  4. Submit a POST request to the URL https://everhome.cloud/oauth2/token with data client_id={client_id}&client_secret={client_secret}&grant_type=authorization_code&code={code}&redirect_uri=http://localhost:12345. E.g., using curl: curl https://everhome.cloud/oauth2/token -d "client_id={client_id}&client_secret={client_secret}&grant_type=authorization_code&code={code}&redirect_uri=http://localhost:12345".

  5. From the response get the access token value. E.g., in {"access_token":"12345_67_ijklmno","expires_in":86400,"refresh_token":"12345_67_pqrstuvw","token_type":"Bearer","userid":12345} the access token is 12345_67_ijklmno ({access_token}). Note: According to the response the token is only valid for 24 hours. However, I am using the same token for several months and it is still working fine.

  6. Access the URL https://everhome.cloud/device?include=properties providing the HTTP header Authorization: Bearer {access_token}. E.g., using curl: curl https://everhome.cloud/device?include=properties -H "Authorization: Bearer {access_token}".

  7. In the JSON response find the ID values for the devices that you need to control. E.g., in the following example 3 is the ID that we need. You can also see a block "actions" with "key" values for the actions to execute. For a shutter these are state-set, up, down, stop.

{
  "actions": [{
    "key": "state-set",
    "style": "",
    "type": "state",
    "subtype": "",
    "reactable": true,
    "statetransforms": null,
    "visibility": {
      "single": false,
      "singleextra": false,
      "list": false,
      "learn": false
    }
  }, {
    "key": "up",
    "style": "positive",
    "type": "button",
    "subtype": "",
    "plannable": true,
    "reactable": true,
    "statetransforms": [{
      "type": 0,
      "key": "general",
      "value": "up"
    }],
    "visibility": {
      "single": true,
      "singleextra": false,
      "list": true,
      "learn": false
    }
  }, {
    "key": "down",
    "style": "negative",
    "type": "button",
    "subtype": "",
    "plannable": true,
    "reactable": true,
    "toggleaction": true,
    "statetransforms": [{
      "type": 0,
      "key": "general",
      "value": "down"
    }],
    "visibility": {
      "single": true,
      "singleextra": false,
      "list": true,
      "learn": false
    }
  }, {
    "key": "stop",
    "style": "secondary",
    "type": "button",
    "subtype": "",
    "reactable": true,
    "statetransforms": null,
    "visibility": {
      "single": true,
      "singleextra": false,
      "list": true,
      "learn": true
    }
  }],
  "address": 123456789,
  "confirmonmobile": false,
  "disabled": false,
  "features": null,
  "gatewayid": 2,
  "homeid": 1,
  "iconkey": "shutter",
  "id": 3,
  "isnow": false,
  "manufacturerid": 123,
  "name": "Shutter kitchen",
  ...
}
  1. Add the access token to secrets.yaml as everhome_authorization: Bearer {access_token}

  2. Define rest actions in configuration.yaml. I’m doing this via an include rest_command: !include rest_command.yaml. In the include file put the commands where 3 in https://everhome.cloud/device/3/execute is the ID obtained above and also the actions like up in '{"action":"up"}'.

shutter_kitchen_up:
    url: "https://everhome.cloud/device/3/execute"
    method: post
    headers:
        authorization: !secret everhome_authorization
    content_type: "application/json"
    payload: '{"action":"up"}'
shutter_kitchen_down:
    url: "https://everhome.cloud/device/3/execute"
    method: post
    headers:
        authorization: !secret everhome_authorization
    content_type: "application/json"
    payload: '{"action":"down"}'
shutter_kitchen_stop:
    url: "https://everhome.cloud/device/3/execute"
    method: post
    headers:
        authorization: !secret everhome_authorization
    content_type: "application/json"
    payload: '{"action":"stop"}'

This part can get long if you have many devices. There’s probably a nicer way of listing multiple devices that have the same actions. Any feedback how to improve is welcome.

Hello!

I’m thrilled to see others exploring the integration of everHome into Home Assistant. :blush:
I understand that installing everHome2MQTT might not be as straightforward as a native integration, but I’m confident that, with your skills, you’ll be able to get everHome2MQTT up and running on your Home Assistant.

I warmly invite you to give it a try! If you create an additional application in the everHome Developer Portal, you can even run both options – the official app and everHome2MQTT – side by side.

Your feedback is very important to me, especially when it comes to improving the installation guide. Every suggestion helps make the project better and more accessible.

One additional idea: You could synchronize the device statuses with Home Assistant in your version. However, this is only necessary if you still control devices via the everHome app. If you’re exclusively using Home Assistant, you can skip this step.

I look forward to hearing your feedback and wish you great success with the setup!

Thanks for your input, @DrHouseIT-Daniel. I’ll see if I have a chance to try everHome2MQTT. The main obstacle so far was that I have never used Node-RED. That’s why I preferred to stick with stuff I do know (REST, OAuth, etc.) :wink:

Hi,
Maybe this video will make it easier for you.