-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docs to explain the display component (TTL-WIFI
)
#50
Comments
Can i flash the wlan interface (V1.7) with the esphome display component, |
I didn't tried it yet because I still need the stock firmware for reverse engineering. In general it should be possible and it would be the good choice because the wifi interface board is equipped with a logic level shifter because the 5V TTL of the STM32 at the Soyosource mainboard. Please keep in mind: At the moment you cannot control the Soyosource using the display component. You can just retrieve all measurements. The "write all config regidterst" frame isn't implemented yet. But it's no big thing to do it. |
Another thought: I never traced the connection between the USB jack, the microcontroller used as a level shifters (this is a guess) and the ESP. It's possible the RX and TX lines aren't connected to GPIO1 and 3 of the ESP. May be another GPIO using software serial is used here. In other words: If flashing using the USB jack doesn't work you should connect the FTDI directly to the ESP. As next step you have to identify the GPIOs "connected" to the USB jack to configure the UART component accordingly. |
Feel free to ask for details. I will have a look at the WiFi interface and try to provide some support. In best case I can backup the stock firmware and can give it a try too. |
You're probably right. I get on grip1+3 only this message AT+INFO=ok The payload pins seem to be different. |
I also made some progress. I've attached a logic analyzer to all soldered pins of the ESP8266. It looks like this: If I power the board (5V) and listen to the traffic at the TX pin of the USB connector I can see periodic requests:
If I check the logic analyzer there is no traffic at the GPIOs of the ESP8266. If I connect to the WiFi accesspoint now and open the Soyosource app the blue LED of the ESP8266 flickers and I can see requests + responses on GPIO1/GPIO3: Funny thing: The requests at the USB connector are still different ( Long story short: You cannot flash the ESP8266 via the USB connector. You have to use GPIO1 and GPIO3 directly. The 4+1 pin header at the PCB doesn't expose the GPIOs of the ESP. The header is connected to the Nuvoton uC. As soon ESPHome is flashed to the ESP the Nuvoton shouldn't notice the difference and communication using the display protocol should be possible. |
Cool. I try it. |
I've added some more details about the WiFi Dongle V1.7 here: https://github.com/syssi/esphome-soyosource-gtn-virtual-meter/tree/main/docs/wifi-dongle |
I've added some instructions how to dump the flash content: https://github.com/syssi/esphome-soyosource-gtn-virtual-meter/tree/main/docs/wifi-dongle I learned: The message |
When I use uart in the config, the ESP disappears from router. |
This sounds like the ESP crashs. Could you attach a USB-to-TTL adapter to GPIO1/GPIO3 to monitor the boot process? You should see the reason for not joining the WiFi here. |
I didn't find any other connections next to the serial line between the ESP and the Nuvoton MS51 yet. This means the MS51 isn't able to reset/reboot the ESP or control some other import GPIOs. Only the serial line is used for communication/instructions between the microcontrollers. Let's call the MS51 the "primary" because the LEDs and the button are attached to this microcontroller and this uC decides about the operation mode of the ESP (by sending some AT command to switch the mode). |
I know, the sticks are available as spare parts, but only at crazy prices. The esphome flasher could not connect to log. P.S. Log from the stock firmware on a D1 Mini: |
Funny! :-) But good to know: One of my statements above was wrong. The 51byb.com message is from the ESP and not from the MS51:
|
Some new findings: The frames between the Soyosource and Nuvoton MS51 are different to the frames between the ESP8266 and MS51. Every frame from the Soyosource inverter starts with I've flashed this configuration to my WiFi dongle now. It's stable and responsible but I've to improve the display component to be able to decode this new kind of frames: https://github.com/syssi/esphome-soyosource-gtn-virtual-meter/blob/add-wifi-dongle-support/docs/wifi-dongle/nuvoton-esp8266-pdus.txt I will give it a try but I'm unsure it's worth the effort. The dongle can be easily replaced. There are ESP8266 boards available equipped with a level shifter (recommended because of the 5V TTL): https://de.aliexpress.com/item/32848420391.html |
I get these log messages My ESPHome does not know esphome::soyosource_display::SoyosourceSelect->at and ->index_of. I commented Select in the config. |
Do you use a recent ESPHome version? If so please try |
Please use the feature branch by changing the external component URL slightly:
This feature branch is able to decode the status frames. I will add the settings frames soonish. |
schon gesehen |
I was on the March version, the repo moved. I updated esphome, it can read :o) |
It's possible to control the settings of the inverter via the WiFi dongle now. I've merged the feature branch. Please change your config back to |
something is broken, |
I've deleted the branch at this repository. Please change your configuration back to |
It was a bad soldered contact. |
TTL-WIFI
)
See #45. Mention the pinout of the TTL-WIFI connector: 5V, TX, RX, GND
The text was updated successfully, but these errors were encountered: