Dear forum,
I’m using HA for about an year and now I would like to integrate my 1-wire network.
Connected to USB using a DS9490r adapter and OWFS on RPi3+
First I’ve customize the sensor.py file on onewire section adding the “1D” sensor type:
DEVICE_SENSORS = {
....
"1D": {"counter": "counter.A"},
}
SENSOR_TYPES = {
...
"counter": ["counter",""],
}
I’m not a developer, is it possible to add this device support in official release?
Now I’ve a sensor in HA with a counter that change at every sensor refresh.
The onewire counter is connected to a energy counter (DM Metering DRM75a that pulse 3200 times for each KWh).
Can you help me to create another sensor that read counts from sensor.energy_counter and with some math calculation converts counts in current energy consumption ?
In my previous home automation system I’ve a script that saves in temporary devices the last count and the timestamp, then at the next update I can easily calculate the delta time and delta count.
With HA I have already tried many times without any success.
Any help will be appreciated!
Many thanks in advance!
Lukxz.