HA Custom Integration: Alfa by Sinapsi energy monitoring device
This project is not endorsed by, directly affiliated with, maintained, authorized, or sponsored by Sinapsi
Introduction
HA Custom Component to integrate data from Sinapsi Alfa device.
Tested on my Alfa to monitor the power/energy consumption and photovoltaic power/energy production directly from the energy provider’s OpenMeter 2.0.
Alfa is a great product, it provides official measurements, and it provides local API to get the data (for now it’s through ModBus).
So finally here we are with the first official version of the HA custom integration for Alfa devices.
Features
Installation/Configuration through Config Flow UI
Sensor entities for all data provided by the device
Configuration options: Name, hostname, tcp port, polling period
Reconfigure options (except device name) also at runtime: no restart needed.
Installation through HACS
This integration is available in HACS official repository. Click this button to open HA directly on the integration page so you can easily install it:
Either click the button above, or navigate to HACS in Home Assistant and:
‘Explore & Download Repositories’
Search for ‘Alfa by Sinapsi’
Download
Restart Home Assistant
Go to Settings > Devices and Services > Add Integration
Search for and select ‘Alfa by Sinapsi’ (if the integration is not found, do a hard-refresh (ctrl+F5) in the browser)
Proceed with the configuration
Manual Installation
Download the source code archive from the release page. Unpack the archive and copy the contents of custom_components folder to your home-assistant config/custom_components folder. Restart Home Assistant, and then the integration can be added and configured through the native integration setup UI. If you don’t see it in the native integrations list, press ctrl-F5 to refresh the browser while you’re on that page and retry.
Configuration
Configuration is done via config flow right after adding the integration. After the first configuration you can change parameters (except device name) at runtime through the integration page configuration, without the need to restart HA.
custom name: custom name for the device, that will be used as prefix for sensors created by the component
ip/hostname: IP/hostname of the inverter - this is used as unique_id, if you change it and reinstall you will lose historical data, that’s why I advice to use hostname, so you can change IP without losing historical data
tcp port: TCP port of the device. tcp/502 is the only known working port, but I preferred to leave it configurable
polling period: frequency, in seconds, to read the registers and update the sensors
Sensor view
Coffee
If you like this integration, I’ll gladly accept some quality coffee, but please don’t feel obliged.
Hi, I have another alpha installed on a three-phase meter with 80kw power. From alpha they had to modify the reading values per app by multiplying by 25 so as to have the real values, but I notice that these multiplied values on the alpha app are not read on your integration which still reads the non-multiplied values. Would it be possible to multiply by 25? It would be nice to include in the configuration both the alpha IP and another field whether or not to multiply by 25 which would be the K coefficient. K=25 is also talked about on the internet. Thank you
Ask Sinapsi to publish these values in modbus. Probaly the register map changed and they added these specific values in other addresses. I have to stick to the default register map.
Meanwhile, if it’s just a *25 problem, you can create template sensors and multiply the alpha sensors by 25.
I would need the debug log to know what’s happening, but I’m 99% sure it’s DNS: try using the FQDN hostname and also IP address instead of the simple hostname. Remember it’s HA having to resolve the hostname, the test on another system is not valid, you should test from the HA shell. Furthermore you used PING, try to use host to solve it “host alfa.domain”.
Hi, I installed the integration without problems, congratulations for the excellent work, I wanted to know if it was possible to use the sensor.alfa_power_consumed in the energy card, I tried but it doesn’t see that sensor while in the device the sensor exists and correctly collects the data
The energy integration only accepts energy sensors, not power sensors. You need to choose the energy sensors provided by the integration (production, consumption, return to grid).
Hi, I integrated Alfa without any problem.
However, I often get “entity not available” in home assistant.
Alfa is connected by checking through its app. Reloading the integration solves the problem temporarily. Do you know any fixes for the issue?
I just installed the alfa device on my home and put the adviced configuration in configuration.yaml as i was not aware of the alfa integration. Now, if i install the integration, will i have the sensors created by yaml mode migrated to the UI Flow or do i miss all the sensors and forced to create a new entry through GUI?
Ok, i installed alfa, but i loose the previous daily values.
One question, having a mono-oraria cost do i need to put into the energy dashboard source only the sensor.alfa_energia_prelevata or do i need to put all the 3 peaks (F1,F2,F3) ?
The energy integration needs the total energy consumption (or production) sensor. F1/F2/F3 sensors are useful if you need to keep track of when you consume energy, they’re not relevant for the energy integration.