syssi / esphome-soyosource-gtn-virtual-meter

ESPHome component to simulate the current clamp to control the Soyosource GTN1200 limiter
Apache License 2.0
80 stars 23 forks source link

Using without RS485 board #159

Closed poky closed 11 months ago

poky commented 11 months ago

Hi, I have a display version 24V 1000W, FW STC8-23-0130 with not RS485 board. However, the RS485 header is there (5pin with tx,rx, 5V, GND), is it possible to get it to communicate directly without the RS485? Could anyone direct me how to do it? Thanks!

syssi commented 11 months ago

Is my understanding correctly: These components (RS485 converter and connector board) are missing?

rs485-module

poky commented 11 months ago

Yes, Correct! 90393

syssi commented 11 months ago

Please don't attach a ESP directly. You should use a digital isolator module (ADUM1201). The setup will look like this:

https://github.com/syssi/esphome-soyosource-gtn-virtual-meter/blob/main/docs/display-version/isolated-data-cable.jpg

Without the JST connector. Don't expect a response if you send instructions (a power demand).

poky commented 11 months ago

Please don't attach a ESP directly. You should use a digital isolator module (ADUM1201). The setup will look like this:

https://github.com/syssi/esphome-soyosource-gtn-virtual-meter/blob/main/docs/display-version/isolated-data-cable.jpg

Without the JST connector. Don't expect a response if you send instructions (a power demand).

I currently don't have ADUM lying around, can I get away with it if power from the 5V to VIN, and 1k resistor on both RX, TX?

syssi commented 11 months ago

I assume the Soyosource won't be able to power an ESP properly. Could you try to measure the resistance between the VCC pin of the display and the VCC pin of the pin header? If it's connected you have luck because the OEM WiFi dongle is powered via the display port too.

poky commented 11 months ago

I assume the Soyosource won't be able to power an ESP properly. Could you try to measure the resistance between the VCC pin of the display and the VCC pin of the pin header? If it's connected you have luck because the OEM WiFi dongle is powered via the display port too.

Yes, the VCC are all connected from RS485, display, also the CPU board! I've tested with the display TX/ RX with the display-display yaml file, just to make sure that HA, ESPhome and the ESP32 are all good!

Screenshot 2023-11-30 at 5 56 52 PM

I was able to read out the soyo's data and write the output limit successfully.

Then I moved to connect the RS485 header directly using the esp32-example yaml, but here's the error log output:

[19:16:08][W][soyosource_inverter:113]: 'firstfloor_inverter': The inverter didn't respond to the last 15 status requests [19:16:08][W][component:214]: Component soyosource_inverter took a long time for an operation (0.12 s). [19:16:08][W][component:215]: Components should block for at most 20-30ms.

Maybe the FW is too new, they change the protocol?

syssi commented 11 months ago

It's normal if your firmware / model doesn't respond to status requests on the RS485 bus. In limiter mode the Soyosource should respect the power demands transmitted using RS485 nevertheless.

poky commented 11 months ago

It's normal if your firmware / model doesn't respond to status requests on the RS485 bus. In limiter mode the Soyosource should respect the power demands transmitted using RS485 nevertheless.

Yes, I can see the blue RS485 icon shows up when sending the power demands, so I think it works fine directly without the messy rs485 conversion.

Screenshot 2023-12-01 at 9 20 18 AM

syssi commented 11 months ago

New insight: The Soyosource isn't silent (on the RS485 bus) because of a bad RS485 converter. The inverter didn't respond here too (while talking to the CPU board directly using the pin header / UART-TTL connection).