SmartESS (PowMr) to MQTT proxy
This project creates a proxy service that enables PowMr WiFi Plug Pro devices to send data to Home Assistant (HASS) via MQTT while optionally maintaining SmartESS cloud connectivity. It works by intercepting communications meant for ess.eybond.com through DNS poisoning.
- Modbus server implementation for device communication
- MQTT integration with Home Assistant
- Configurable update frequency
- Optional MQTT authentication
- Fake client mode to prevent cloud data transmission
- Multi-threaded operation
- Comprehensive logging with file rotation
- Error handling and recovery
- Python 3.7 or higher
- Network access to your PowMr device
- MQTT broker (like Mosquitto) for Home Assistant integration
- DNS configuration to redirect
ess.eybond.comto your proxy
- Clone the repository:
git clone https://github.com/yourusername/SmartESS-proxy.git
cd SmartESS-proxy- Install the required dependencies:
pip install -r requirements.txtCopy the sample configuration file to create your own:
cp conf.sample.ini conf.iniEdit conf.ini with your settings. The sample configuration file includes detailed comments explaining each option.
Example configuration:
[DEFAULT]
fakeClient=true
mqttServer=172.16.2.1
mqttPort=1883
enableMqttAuth=false
mqttUser=
mqttPass=
mqttTopic=paxyhome/Inverter/
updateFrequency=10fakeClient: Set to true to prevent data from being sent to SmartESS cloudmqttServer: IP address or hostname of your MQTT brokermqttPort: MQTT broker port (default: 1883)enableMqttAuth: Set to true if your MQTT broker requires authenticationmqttUser: MQTT username (if authentication is enabled)mqttPass: MQTT password (if authentication is enabled)mqttTopic: Base MQTT topic for publishing dataupdateFrequency: Data update frequency in seconds
- Configure your DNS to redirect
ess.eybond.comto your proxy's IP address - Start the proxy:
python engine.pyThe proxy will create a log file smartess_proxy.log with detailed operation information.
The project consists of several key components:
engine.py: Main orchestrator that initializes and manages all componentsmodbus_server.py: Implements Modbus server functionalitymodbus_client.py: Handles Modbus client operationsmqtt_client.py: Manages MQTT communicationprocess_inverter_data.py: Processes and transforms inverter datafake_client.py: Simulates client behavior for cloud-free operation
Run the test suite:
python -m unittest discover testsIndividual test files can be run separately:
python -m unittest tests/test_data_extract.pypython -m unittest tests/test_engine.py- Check the
smartess_proxy.logfile for detailed error messages and operation logs - Verify your network configuration and DNS settings
- Ensure your MQTT broker is running and accessible
- Confirm the PowMr device is on the same network
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.