A Home Assistant add-on designed to act as a proxy between Ecoqube radon devices.
Ecoqube devices seem to make requests to the Ecosense API every ~10 minutes. They do not verify the servers ceritifcate though which means we can man in the middle the Ecosense server and capture the data.
This sets up a webserver that will intercept queries from the EcoQube device, forward them to the Ecosense server, capture the data, and publish it over MQTT. Note that all measurement data will still be forwarded to ecosense, and you will still be able to view it in EcoQube app.
- Ecoqube Device
- A 2.4Ghz WiFi Network
- Ability to Control DNS on your Network
- Home Assistant Or Ability to run docker containers
Install a MQTT Broker(if you dont already have one setup)
If using Home Assistant you can do so with the following steps:
- Navigate to the add-ons section of Home Assistant
- Search for and then install "Mosquitto broker"
- Create credentails to connect to the broker under configuration tab once installed. The format is as follows:
- username: YOUR-USERNAME-HERE
password: YOUR-PASSWORD-HERE
- Ensure you set Mosquitto broker to Start on Boot and Enable Watchdog
Installing the Ecosense Add-On. This communicates directly with the Ecoqube device.
- Navigate to the add-ons section of Home Assistant
- Click the 3 dots in the top right followed by Repositories
- Add this to your repository list: https://github.com/starsoccer/ecosense
- Next click the 3 dots in the top right again followed by Check for Updates
- You should now be able to search and find Ecosense as an add-on. If you can not try force refreshing the webpage using f5.
- Install the Ecosense add-on
- Once installed navigate to the configuration tab.
- Enter the MQTT Server port, by default this is 1883 and you can leave it as is
- Enter the MQTT Servers IP address. Assuming you are using the Mosquitto Broker you can just enter Home Assistants IP Address
- Enter the MQTT Username you set in the prior steps followed by the password
- Finally Start Ecosense, set it to Start on Boot, and Enable Watchdog
You need to add to your network DNS (via Pi-hole, pfSense, AdGuardHome or some other method) the following domain to point to your Home Assistant IP address:
- api.cloud.ecosense.io
This tells the Ecosense device connected to your network that when it does an update instead of talking to the Ecosense api, to instead talk to the Ecosense add-on instead.
Note: If you want to continue to use the EcoQube app while you are connected to your lan, you will want to make sure your DNS only redirects the EcoCube device to your home assistant instance, the EcoCube app on your phone will still need to be able to get the actual IP of the ecosense server.
If you've done all of this correctly, the controller should begin reporting data to the Addon/Container, which in turn reports it to Mosquitto broker. Entities should be automatically created in your Home Assistant.