Hello to all!
This is my first post and I’ very happy to join this community
I’m a noob, but I want to share my integration; it works after many tests and searches, but if there are some fix are welcome!
I’ve purchased this battery meter for my little photovoltaic system, 400A shunt version, but it too much for me
KG140F
It has a secondary serial port plug RJ10 (not rs485 modbus), I can read the values throught Tasmota and send them to Home Assistant.
This is the manual: Manual KG-F
The Tasmota firmware is standard, no sensors, display, etc… only config MQTT.
Connect A pin to RX Wemos pin
Connect B pin to TX Wemos pin (if you wont write settings, I want only read the values)
Connect GND pin to GND Wemos pin
PS: hope I’m right, I don’t remember!
Set on Tasmota consolle:
Setoption19 1
Baudrate 115200
SendSerial 1
It send a text string like this, we need r50 values.
tele/BatteryMonitor/RESULT = {"SerialReceived":":R50=1,\n:r50=1,243,1242,0,11000,70,63,55062,125,0,0,0,0,0,\r\n"}
on Home Assistant in configuration.yaml, for test, I written this:
mqtt:
- name: BatteryMonitor
topic: tele/BatteryMonitor/RESULT
After many searches and study (I’m a noob), I written this:
template:
- trigger:
- platform: mqtt
topic: tele/BatteryMonitor/RESULT
sensor:
- name: Temperatura
unit_of_measurement: "°C"
state: "{{ (trigger.payload.split(',')[9] | float-100) }}"
- name: Tensione
unit_of_measurement: "V"
state: "{{ (trigger.payload.split(',')[3] | float/100) }}"
- name: Corrente
unit_of_measurement: "A"
state: "{{ (trigger.payload.split(',')[4] | float/100) }}"
- name: Potenza
unit_of_measurement: "W"
state: "{{ (trigger.payload.split(',')[6] | float/100) }}"
- name: Capacità
unit_of_measurement: "%"
state: "{{ (trigger.payload.split(',')[5] | float/11000*100) }}"
- name: Consumato
unit_of_measurement: "kWh"
state: "{{ (trigger.payload.split(',')[6] | float/10000) }}"
According to manual and it show this:
…changed value in red circle with percentage, my test battery is 11Ah
Hope this is usefully to someone and, of course, if anyone want change anything is welcome