chopwood
(Chris)
April 20, 2022, 3:29pm
43
Correct, in my case, the USB is just for power.
The green/white wires are cut and don’t connect into the USB-A connector.
Instead, they connect the RS485 converter to pin 3&4 of the COM port.
Red and black take 5v from the USB-A, over to the D1-mini and the RS485 converter.
This was the RS485 converter I used: Stable UART Serial Port to RS485 Converter Function Module RS485 to TTL Module k | eBay
And this is how its wired:
I had previously tried the ESPHOME ‘growatt_solar’ sensor platform with this hardware.
On my 1500TL-X, it read one or two values. But most were NaN.
However, with the code here, it populates all values perfectly.
substitutions:
device_name: growatt-mic-1500tl-x
device_description: "Growatt Solar Inverter Monitoring"
friendly_name: Growatt MIC 1500TL X
esphome:
name: '${device_name}'
comment: '${device_description}'
esp8266:
board: d1_mini
# Enable logging
logger:
baud_rate: 0
# Enable Home Assistant API
api:
ota:
safe_mode: true
reboot_timeout: 10min
num_attempts: 5
web_server:
port: 80
auth:
username: !secret esphome_web_username
password: !secret esphome_web_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Optional manual IP
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: '${device_name}'
password: !secret fallback_password
captive_portal:
time:
- platform: homeassistant
id: homeassistant_time
uart:
id: mod_bus
tx_pin: 1
rx_pin: 3
baud_rate: 9600
#baud_rate: 115200
modbus:
id: modbus1
uart_id: mod_bus
modbus_controller:
- id: growatt
# the Modbus device addr
address: 0x1
modbus_id: modbus1
setup_priority: -10
sensor:
- platform: modbus_controller
name: "${device_name} DcPower"
address: 5
register_type: "read"
unit_of_measurement: W
device_class: power
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${device_name} DcVoltage"
address: 3
register_type: "read"
unit_of_measurement: V
device_class: voltage
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${device_name} DcInputCurrent"
address: 4
register_type: "read"
unit_of_measurement: A
device_class: current
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${device_name} AcFrequency"
address: 37
register_type: "read"
unit_of_measurement: Hz
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.01
- platform: modbus_controller
name: "${device_name} AcVoltage"
address: 38
register_type: "read"
unit_of_measurement: V
device_class: voltage
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${device_name} AcOutputCurrent"
address: 39
register_type: "read"
unit_of_measurement: A
device_class: current
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${device_name} AcPower"
address: 40
register_type: "read"
unit_of_measurement: W
device_class: power
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${device_name} EnergyToday"
address: 53
register_type: "read"
unit_of_measurement: kWh
device_class: energy
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${device_name} EnergyTotal"
address: 55
register_type: "read"
unit_of_measurement: kWh
state_class: total_increasing
device_class: energy
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${device_name} Temperature"
address: 3093
register_type: "read"
unit_of_measurement: C
device_class: temperature
icon: mdi:thermometer
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
9 Likes
rieschard
(Riesch)
April 24, 2022, 11:18am
44
Internal: false needs to be added to all exposed sensors as of the last esphome version
WilbertV
(Wilbert Verhoeff)
April 24, 2022, 11:53am
45
Thank you for keeping an eye on the topic! In this case it is only about the homeassistant platform. So no worries.
rieschard
(Riesch)
April 24, 2022, 12:17pm
46
esphome:dev
← esphome:jesserockz-2022-133
opened 11:39PM - 10 Apr 22 UTC
# What does this implement/fix?
This makes all sensors/binary_sensors/text_se… nsors internal by default in ESPHome. Generally there is no reason to expose these back to HA as ESPHome sensors, just causing more network traffic.
This is breaking because if someone is using one of the re-exposed sensors it will disappear after updating unless they set `internal: False` in yaml.
## Types of changes
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Other
**Related issue or feature (if applicable):** fixes <link to issue>
**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#<esphome-docs PR number goes here>
## Test Environment
- [ ] ESP32
- [ ] ESP32 IDF
- [ ] ESP8266
## Example entry for `config.yaml`:
<!--
Supplying a configuration snippet, makes it easier for a maintainer to test
your PR. Furthermore, for new integrations, it gives an impression of how
the configuration would look like.
Note: Remove this section if this PR does not have an example entry.
-->
```yaml
# Example config.yaml
```
## Checklist:
- [ ] The code change is tested and works locally.
- [ ] Tests have been added to verify that the new code works (under `tests/` folder).
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated in [esphome-docs](https://github.com/esphome/esphome-docs).
Sure? It’s says All sensors. Not in line with the title of the issue
WilbertV
(Wilbert Verhoeff)
April 24, 2022, 12:32pm
47
Yes im sure. The GitHub pr is a little misleading. I updated my device today and it is al fine😉
I found a way to upload to pvoutput.org , from home assistant.
PVOuput Uploader - #26 by rieschard
Next step is to do it in esphome. That shouldnt be too hard
Is this code also working on three-phase inverters?
I’m preparing to test it out on a Growatt MOD 5000TL3-X with ShineWifi-X in a few weeks, when the inverter is powered up
2 Likes
WilbertV
(Wilbert Verhoeff)
June 8, 2022, 4:38am
50
2 Likes
For everyone that is using my previous code. This is better and far more accurate and reliable.
Grid Power Today can be used for incoming old power if you’re grid connected (input)
AC Output Today is all AC Output from the device.
Charge Power (today) is how much AC charging from the grid.
This lets you put in accurate values into the Energy tab. I’ve tested all of these values against a calibrated meter and they’re within like 1-2% of real. Let me know if there are any other values anyone would find useful. (for other inverters there are data points for multiple PV inputs etc. and this should work for all “off grid” inverters. It won’t work for grid connected.
substitutions:
device_name: growatt
friendly_name: "Growatt Inverter"
esphome:
name: ${device_name}
platform: ESP8266
board: esp01_1m
# Enable Home Assistant API
api:
ota:
password: !secret esphome_ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
captive_portal:
logger:
level: DEBUG
baud_rate: 0
web_server:
port: 80
time:
- platform: homeassistant
id: homeassistant_time
output:
# Blue Led
- id: light_bl
platform: gpio
pin: 16
# Green Led
- id: light_gr
platform: gpio
pin: 0
# Red Led
- id: light_rd
platform: gpio
pin: 2
uart:
- id: mod_bus
baud_rate: 9600
tx_pin: GPIO1
rx_pin: GPIO3
modbus:
id: modbus1
uart_id: mod_bus
flow_control_pin: GPIO4
modbus_controller:
- id: growatt
address: 0x1
modbus_id: modbus1
setup_priority: -10
text_sensor:
- platform: template
name: "${friendly_name} Status"
icon: mdi:eye
entity_category: diagnostic
update_interval: 10s
lambda: |-
if ((id(status).state) == 1) {
return {"Normal"};
} else if ((id(status).state) == 0) {
return {"Standby"};
} else if ((id(status).state) == 2) {
return {"Discharge"};
} else if ((id(status).state) == 3) {
return {"Fault"};
} else if ((id(status).state) == 4) {
return {"Flash"};
} else if ((id(status).state) == 5) {
return {"PV Charging"};
} else if ((id(status).state) == 6) {
return {"AC Charging"};
} else if ((id(status).state) == 7) {
return {"Combined Charging"};
} else if ((id(status).state) == 8) {
return {"Combined Charging & Bypass"};
} else if ((id(status).state) == 9) {
return {"PV Charging & Bypass"};
} else if ((id(status).state) == 10) {
return {"AC Charging & Bypass"};
} else if ((id(status).state) == 11) {
return {"Bypass"};
} else if (id(status).state == 12) {
return {"PV Charge and Discharge"};
} else {
return {"Unknown"};
}
sensor:
- platform: wifi_signal
name: "WiFi Signal Sensor"
update_interval: 60s
- platform: modbus_controller
address: 0
register_type: "read"
internal: true
accuracy_decimals: 0
id: status
- platform: modbus_controller
name: "${friendly_name} Solar Energy Today"
address: 48
register_type: "read"
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
icon: mdi:solar-power
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${friendly_name} Battery Discharge Energy Today"
address: 60
register_type: "read"
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
icon: mdi:solar-power
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${friendly_name} AC Charge Energy Today"
address: 56
register_type: "read"
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
icon: mdi:solar-power
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: total_daily_energy
name: "${friendly_name} Grid Energy Today"
power_id: grid_power
unit_of_measurement: kWh
icon: mdi:counter
accuracy_decimals: 1
min_save_interval: 1h
restore: true
filters:
- multiply: 0.001
- platform: total_daily_energy
name: "${friendly_name} AC Ouput Energy Today"
power_id: ac_output_power
unit_of_measurement: kWh
icon: mdi:counter
accuracy_decimals: 2
min_save_interval: 1h
restore: true
filters:
- multiply: 0.001
- platform: modbus_controller
id: "solar_voltage"
name: "${friendly_name} Solar Voltage"
address: 1
register_type: "read"
unit_of_measurement: V
device_class: voltage
state_class: measurement
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
id: "solar_current"
name: "${friendly_name} Solar Current"
address: 7
register_type: "read"
unit_of_measurement: A
device_class: current
state_class: measurement
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.02
- platform: modbus_controller
name: "${friendly_name} Solar Power"
address: 3
register_type: "read"
unit_of_measurement: W
device_class: energy
icon: mdi:solar-power
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${friendly_name} AC Output Hz"
address: 23
register_type: "read"
unit_of_measurement: Hz
entity_category: diagnostic
state_class: measurement
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.01
- platform: modbus_controller
name: "${friendly_name} AC Output Voltage"
address: 22
register_type: "read"
unit_of_measurement: V
device_class: voltage
state_class: measurement
entity_category: diagnostic
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${friendly_name} AC Output Current"
address: 34
register_type: "read"
unit_of_measurement: A
device_class: current
state_class: measurement
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${friendly_name} AC Output Power"
id: ac_output_power
address: 9
register_type: "read"
unit_of_measurement: W
device_class: energy
state_class: measurement
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 2
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${friendly_name} Grid Hz"
address: 21
register_type: "read"
unit_of_measurement: Hz
entity_category: diagnostic
state_class: measurement
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.01
- platform: modbus_controller
name: "${friendly_name} Grid Voltage"
address: 20
register_type: "read"
unit_of_measurement: V
device_class: voltage
state_class: measurement
entity_category: diagnostic
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${friendly_name} Grid Current"
address: 68
register_type: "read"
unit_of_measurement: A
device_class: current
entity_category: diagnostic
state_class: measurement
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
id: grid_power
name: "${friendly_name} Grid Power"
address: 36
register_type: "read"
unit_of_measurement: W
device_class: current
state_class: measurement
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 2
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${friendly_name} Battery Power"
address: 77
register_type: "read"
unit_of_measurement: W
device_class: power
state_class: measurement
entity_category: diagnostic
icon: mdi:flash
value_type: S_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.01
- platform: modbus_controller
name: "${friendly_name} Load %"
address: 27
register_type: "read"
unit_of_measurement: percent
state_class: measurement
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${friendly_name} Battery SoC %"
address: 18
register_type: "read"
unit_of_measurement: percent
state_class: measurement
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
- platform: modbus_controller
name: "${friendly_name} Inverter Temperature"
address: 25
register_type: "read"
unit_of_measurement: °C
device_class: temperature
entity_category: diagnostic
state_class: measurement
icon: mdi:thermometer
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${friendly_name} PV Temperature"
address: 32
register_type: "read"
unit_of_measurement: °C
device_class: temperature
state_class: measurement
entity_category: diagnostic
icon: mdi:thermometer
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${friendly_name} Bus Voltage"
address: 19
register_type: "read"
unit_of_measurement: V
device_class: voltage
state_class: measurement
entity_category: diagnostic
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
3 Likes
I’ve modified @pasarn ’s code for the ShineWiFi-X to include PV1 and PV2 power.
As it turns out DcPower presents only presents the power of string 1 (PV1). If you have a dual string inverter like me (Growatt MIN 5000TL XE), you can include the following code in the sensor part to get the DcPower of string 2 (PV2) as well.
- platform: modbus_controller
name: "${devicename} DcPowerPV2"
address: 10
register_type: "read"
unit_of_measurement: W
device_class: power
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
I would also suggest to rename DcPower (from @pasarn ’s code) to DcPowerPV1 if you have a dual string inverter.
Hi, I have a Growatt 750TL-X and a spare D1 mini and I’m trying to make the cable from @chopwood so that I can read values off my inverter with ESPHome.
I’ve just noticed my TTL to RS485 converter has different labels on it though? Yours has VCC, TXD, RXD & GND on the left, mine has DI, DE, RE, R0 on the left. Did I buy the wrong thing?
Okay after a bit of research I think I connect DE & RE together and also to the GPIO defined as the modbus flow_control_pin. DI goes to RX, RO goes to TX. Cross fingers.
Here is my configuration for a 3 phase Growatt inverter MOD 8000TL3-X-AU with 3 string input (even though it only appears as 2 DC inputs)
Pretty straight forward to flash on a Shine-wifi-x, just pop off the cover and connect your programmer to the header inside. Flash with ESPhome and load the code via OTA after that. I bought a second wifi-x module off ebay so I didn’t mess up the registered one for service/repairs.
here is the doc I used to figure out the modbus registers.
http://www.photovoltaicsolar.in/Growatt_Manual/MAX%20Series%20Modbus%20RTU%20Protocol.pdf
Just a note, where there is a high and low in the modbus map - ie the power values, you want to select the address for high (the lower address), and make sure you read as double word value_type: U_DWORD
all the others will just be a single word value_type: U_WORD
I checked what values I wanted from the shinephone app, select the datalogger, all parameters, then other data. these values match up to the modbus map perfectly. from here I could see the 3 strings, strangely it was stings 1, 3 and 4
esphome:
name: growatt-esphome
substitutions:
devicename: Growatt
esp8266:
board: esp07s
# Disable logging on Serial port
logger:
baud_rate: 0
# Enable Home Assistant API
api:
encryption:
key: "xxxx"
ota:
password: "xxxx"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Growatt-Esphome Fallback Hotspot"
password: "xxxx"
captive_portal:
time:
- platform: homeassistant
id: homeassistant_time
output:
# Blue Led
- id: light_bl
platform: gpio
pin: 16
# Green Led
- id: light_gr
platform: gpio
pin: 0
# Red Led
- id: light_rd
platform: gpio
pin: 2
uart:
id: mod_bus
tx_pin: 1
rx_pin: 3
baud_rate: 115200
modbus:
id: modbus1
uart_id: mod_bus
modbus_controller:
- id: growatt
# the Modbus device addr
address: 0x1
modbus_id: modbus1
setup_priority: -10
sensor:
- platform: uptime
name: "${devicename} Uptime Sensor"
id: uptime_sensor
update_interval: 60s
- platform: modbus_controller
name: "${devicename} PV1 DcPower"
address: 5
register_type: "read"
unit_of_measurement: W
device_class: power
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} PV1 DcVoltage"
address: 3
register_type: "read"
unit_of_measurement: V
device_class: voltage
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} PV1 DcInputCurrent"
address: 4
register_type: "read"
unit_of_measurement: A
device_class: current
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} PV2 DcPower"
address: 9
register_type: "read"
unit_of_measurement: W
device_class: power
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} PV2 DcVoltage"
address: 7
register_type: "read"
unit_of_measurement: V
device_class: voltage
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} PV2 DcInputCurrent"
address: 8
register_type: "read"
unit_of_measurement: A
device_class: current
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} AcFrequency"
address: 37
register_type: "read"
unit_of_measurement: Hz
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.01
- platform: modbus_controller
name: "${devicename} AcVoltage VAC1"
address: 38
register_type: "read"
unit_of_measurement: V
device_class: voltage
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} AcOutputCurrent IAC1"
address: 39
register_type: "read"
unit_of_measurement: A
device_class: current
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} AcPower PAC1"
address: 40
register_type: "read"
unit_of_measurement: W
device_class: power
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} AcVoltage VAC2"
address: 42
register_type: "read"
unit_of_measurement: V
device_class: voltage
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} AcOutputCurrent IAC2"
address: 43
register_type: "read"
unit_of_measurement: A
device_class: current
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} AcPower PAC2"
address: 44
register_type: "read"
unit_of_measurement: W
device_class: power
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} AcVoltage VAC3"
address: 46
register_type: "read"
unit_of_measurement: V
device_class: voltage
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} AcOutputCurrent IAC3"
address: 47
register_type: "read"
unit_of_measurement: A
device_class: current
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} AcPower PAC3"
address: 48
register_type: "read"
unit_of_measurement: W
device_class: power
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} Total Power"
address: 35
register_type: "read"
unit_of_measurement: W
device_class: power
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} Total Energy Today"
address: 53
register_type: "read"
unit_of_measurement: kWh
device_class: energy
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} Total Energy Lifetime"
address: 55
register_type: "read"
unit_of_measurement: kWh
state_class: total_increasing
device_class: energy
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} PV1 Energy Today"
address: 59
register_type: "read"
unit_of_measurement: kWh
device_class: energy
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} PV1 Energy Lifetime"
address: 61
register_type: "read"
unit_of_measurement: kWh
state_class: total_increasing
device_class: energy
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} PV2 Energy Today"
address: 63
register_type: "read"
unit_of_measurement: kWh
device_class: energy
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} PV2 Energy Lifetime"
address: 65
register_type: "read"
unit_of_measurement: kWh
state_class: total_increasing
device_class: energy
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} Temperature"
address: 93
register_type: "read"
unit_of_measurement: C
device_class: temperature
icon: mdi:thermometer
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} V String 1"
address: 142
register_type: "read"
unit_of_measurement: V
device_class: voltage
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} I String 1"
address: 143
register_type: "read"
unit_of_measurement: A
device_class: current
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} V String 3"
address: 146
register_type: "read"
unit_of_measurement: V
device_class: voltage
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} I String 3"
address: 147
register_type: "read"
unit_of_measurement: A
device_class: current
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} V String 4"
address: 148
register_type: "read"
unit_of_measurement: V
device_class: voltage
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${devicename} I String 4"
address: 149
register_type: "read"
unit_of_measurement: A
device_class: current
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
3 Likes
Maarten1
(Maarten )
August 13, 2022, 12:32pm
57
i try to flash my shinewifi-x via esphome. but it is not working. the first question is do you flash it whitin home assistants esphome orw with a different flasher (esptools or somthing). and then you need set de gpio0 to GND on the x self or do you need fom gpio0 to de gnd on the usb to ttl module?
bauke
(Bauke)
August 17, 2022, 11:34am
58
AFAIK (just managed to flash my wifi-s) I connected ground and gpio0 and connected the pins to my usb-serial converter. Had to fiddle with rx tx, but then lo and behold, it worked.
And oh, I used the USB port on my home assistant/esphome host. Flashed it through de web server.
Hope that helps?
I use a USB to serial flashing device. They are pretty cheap, and I just used jumper cables to connect to the wifi-x terminals. They are pretty clearly marked. And the gpio0 was connected between the wifi-x and the USB programmer
I did have issues jumping it to the download mode… can’t remember exactly, but I think only 2 of the 3 leds are on… Or maybe all 3 were on in the end… i was in a rush to get it done before school pickup. But I just kept hitting download and power cycling till it worked.
As the new version of ESPhome is out… and its nighttime… i decided its a great time to open up the unit and flash it via USB. this is whats inside
to flash you need to jumper GPIO0 and GND together and then plug in the USB. only 2 LED should be lit. no need for an external programmer
after this just flash via USB from ESPhome as normal.
And dont be an idiot like me and spend 10min trying to get USB logs out of the thing to make sure its working… they are disabled! it worked instantly with wireless logs
Now that I know what’s inside and have a better idea of what’s inside I think any ESP device with USB should work, like a $7.50 d1-mini. Seems a waste to spend $75 to get the pretty unit unless you need the water resistance the cover offers.
perhaps one day someone will work out the RTC and make some pretty status lights. i think it would be wise to set the time in the inverter for error logging.
2 Likes
Maarten1
(Maarten )
August 18, 2022, 2:10pm
61
i have try it but it fails it say Failed to initialize. Try resetting your device or holding the BOOT button while selecting your serial port until it starts preparing the installation. but i have try to upload the firmware to a esp8266, and that works great it runs now for 2 days and its amazing. thanks all for your help.
Yeah I did get that message a lot, then I just kept plugging in and out till it worked.
Did you get the 2 led’s or were all 3 lit? Or sometimes all were off
The most consistent way was to bridge gpio0 and gnd then plug in the USB.
Maarten1
(Maarten )
August 18, 2022, 4:41pm
63
i have 2 leds on blue and red. still not working. you need to keep the bridge between gpio0 and gnd still insert when you upload the firmware?