# Integrar inversor Growatt TL3 no Home Assistant

**URL:** <https://forum.cpha.pt/t/integrar-inversor-growatt-tl3-no-home-assistant/10672>\
**Category:** Tutoriais\
**Tags:** mqtt, tasmota, modbus, han\
**Created:** [12 Setembro , 2022 18:59 UTC](https://forum.cpha.pt/t/integrar-inversor-growatt-tl3-no-home-assistant/10672 "2022-09-12T18:59:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikito7](https://forum.cpha.pt/user_avatar/forum.cpha.pt/nikito7/32/18185_2.png) [@nikito7](https://forum.cpha.pt/u/nikito7)\
**Post date:** [12 Setembro , 2022 18:59 UTC](https://forum.cpha.pt/t/integrar-inversor-growatt-tl3-no-home-assistant/10672/1 "2022-09-12T18:59:35Z")

</div>

Como “leitor” seguir um tutorial da EDPBOX.

Quanto ao inversor:

Usar o pin 3 e 4 na ficha

 ![easy han growatt inverter rs485 inversor](https://forum.cpha.pt/uploads/default/original/2X/1/1c2707e6cede63dcdbad910f1c5df7782cb88d2a.jpeg)

 ![easy han growatt inverter rs485 inversor](https://forum.cpha.pt/uploads/default/original/2X/6/64c3bee9d5271cc66f43a1b7f8de3fcdc1cd08d6.jpeg)

No tasmota usar o seguinte script:

```js
>D

time=""
date=""
wfc=""
wfp=0
cnt=0

>B

=>Delay 100
=>Delay 100
=>Delay 100

tper=31
smlj=0

=>Delay 100
=>SerialLog 0
=>WifiConfig
=>WifiPower

=>Delay 100
=>Sensor53 r

>E

wfc=WifiConfig#?
wfp=WifiPower

>S

time=st(tstamp T 2)
date=st(tstamp T 1)

if cnt==40
then
smlj=1
tper=15
=>UfsRun discovery.txt
endif

if cnt<99
then
cnt+=1
endif

>W

@<b>NTP </b> %date% %time%
@<b>Vars </b> cnt=%0cnt% tper=%0tper% smlj=%0smlj%
@<b>Wifi </b> %wfc% <b> Power </b> %0wfp% <b> Topic </b> %topic%
@<br>

; inverter growatt

>M 1

; esp32 19/18 (hardware serial)
; esp8266 3/1 (hardware serial)
; change to your gpios and mode
; power off is required
; v v v
+1,3,mN1,1,9600,PV1,1,15,r010400000002,r010400370002

; 0x0000

1,010404xxuu@i0:1,Inverter Status,,*,0

; 55-56 0x0037

1,010404UUuuUUuu@i1:10,Total Energy,kWh,PV_Energy,1

; eof meter

#

; eof script 14:57

```

Discovery personalizado:

Criar um ficheiro discovery.txt no ufs file manager com:

```txt
; switch
Publish2 homeassistant/switch/nikito7-PV1/restart/config {"name":"PV1 ESP Restart","unique_id":"PV1_ESP_Switch","command_topic":"cmnd/pv1/restart","payload_on":"1","payload_off":"1","icon":"mdi:restart","device":{"identifiers":"nikito7-PV1","name":"PV1","model":"Easy HAN RS485","manufacturer":"nikito7"}}
; sensor
; esp
Publish2 homeassistant/sensor/nikito7-PV1/uptime/config {"name":"PV1 ESP Uptime","unique_id":"PV1_ESP_Uptime","state_topic":"tele/pv1/STATE","value_template":"{{ ( value_json.UptimeSec / 3600 ) | round(1) }}","unit_of_measurement":"h","icon":"mdi:alarm","availability_topic":"tele/pv1/LWT","payload_available":"Online","payload_not_available":"Offline","device":{"identifiers":"nikito7-PV1","name":"PV1","model":"Easy HAN RS485","manufacturer":"nikito7"}}
Publish2 homeassistant/sensor/nikito7-PV1/freeheap/config {"name":"PV1 ESP Free Heap","unique_id":"PV1_ESP_Heap","state_topic":"tele/pv1/STATE","value_template":"{{ value_json.Heap }}","unit_of_measurement":"kB","icon":"mdi:chip","device":{"identifiers":"nikito7-PV1","name":"PV1","model":"Easy HAN RS485","manufacturer":"nikito7"}}
Publish2 homeassistant/sensor/nikito7-PV1/signal/config {"name":"PV1 ESP Signal","unique_id":"PV1_ESP_Signal","state_topic":"tele/pv1/STATE","value_template":"{{ value_json.Wifi.Signal }}","unit_of_measurement":"dB","device_class":"signal_strength","device":{"identifiers":"nikito7-PV1","name":"PV1","model":"Easy HAN RS485","manufacturer":"nikito7"}}
Publish2 homeassistant/sensor/nikito7-PV1/vcc/config {"name":"PV1 ESP Vcc","unique_id":"PV1_ESP_Vcc","state_topic":"tele/pv1/STATE","value_template":"{{ value_json.Vcc|float(0.000) }}","unit_of_measurement":"V","device_class":"voltage","state_class":"measurement","device":{"identifiers":"nikito7-PV1","name":"PV1","model":"Easy HAN RS485","manufacturer":"nikito7"}}
; PV Total kWh
Publish2 homeassistant/sensor/nikito7-PV1/totalkwh/config {"name":"PV1 Total Energy","unique_id":"PV1_TotEne","state_topic":"tele/pv1/SENSOR","value_template":"{%% set x = value_json.PV1.PV_Energy|float(0) %%} {%% if x > 0 %%} {{ x }} {%% endif %%}","unit_of_measurement":"kWh","device_class":"energy","state_class":"total_increasing","device":{"identifiers":"nikito7-PV1","name":"PV1","model":"Easy HAN RS485","manufacturer":"nikito7"}}
; eof

```

Isto é apenas o básico, o suficiente para adicionar ao Energy do Home Assistant.

Manual de registers:

[https://github.com/nikito7/easyhan/raw/dev/growatt/Growatt-v120.pdf](https://github.com/nikito7/easyhan/raw/dev/growatt/Growatt-v120.pdf)

 ![20220913-141000](https://forum.cpha.pt/uploads/default/original/2X/f/fe03f78eeb0279f40c26a5244db1198c2c31dc01.jpeg)

 ![20220913-140952](https://forum.cpha.pt/uploads/default/original/2X/7/7ac6ecfdc8feac02d89251a68b93836932f707a6.jpeg)

---

<div class="post-metadata">

**Author:** ![nikito7](https://forum.cpha.pt/user_avatar/forum.cpha.pt/nikito7/32/18185_2.png) [@nikito7](https://forum.cpha.pt/u/nikito7)\
**Post date:** [13 Setembro , 2022 13:39 UTC](https://forum.cpha.pt/t/integrar-inversor-growatt-tl3-no-home-assistant/10672/2 "2022-09-13T13:39:18Z")

</div>

![Easy HAN RS485 Modbus Tasmota Growatt Inverter Solar](https://forum.cpha.pt/uploads/default/original/2X/d/d2fcecea7f356235ac1b3137556d5dee63e1ec4f.jpeg)

 ![Easy HAN RS485 Home Assistant](https://forum.cpha.pt/uploads/default/original/2X/6/634345670bcd247212d42ca183d36dd390479050.jpeg)

---

<div class="post-metadata">

**Author:** ![nikito7](https://forum.cpha.pt/user_avatar/forum.cpha.pt/nikito7/32/18185_2.png) [@nikito7](https://forum.cpha.pt/u/nikito7)\
**Post date:** [16 Agosto , 2023 11:31 UTC](https://forum.cpha.pt/t/integrar-inversor-growatt-tl3-no-home-assistant/10672/3 "2023-08-16T11:31:42Z")

</div>

Fixed \> HA 2023.8 warnings

[https://github.com/nikito7/easyhan/blob/dev/growatt/pv1-discovery.txt](https://github.com/nikito7/easyhan/blob/dev/growatt/pv1-discovery.txt)

---

<div class="post-metadata">

**Author:** ![nikito7](https://forum.cpha.pt/user_avatar/forum.cpha.pt/nikito7/32/18185_2.png) [@nikito7](https://forum.cpha.pt/u/nikito7)\
**Post date:** [10 Outubro , 2023 07:59 UTC](https://forum.cpha.pt/t/integrar-inversor-growatt-tl3-no-home-assistant/10672/4 "2023-10-10T07:59:16Z")

</div>

Offtopic:

> **[ESPHome modbus Growatt ShineWiFi-S](https://community.home-assistant.io/t/esphome-modbus-growatt-shinewifi-s/369171?u=nikito7)**
>
> Hello all. I have a growatt solar inverter. This has a ShineWiFi-S module to read the inverter with modbus. i found https://github.com/otti/Growatt\_ShineWiFi-S and converted the arduino code to esphome. I would like to share the ESPHome yaml. ...
