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
Tried it on the ShineWifi-X, works to some extend. #1
Comments
Hi DerpyDoom, I am running the ShineWiFi-S with an "Growatt 1000S" inverter. Regards, |
Hey Otti, Sadly I have not found any information on a different procotol so I assume it should be the same. To flash the Stick I also had to Mod the GPIO0 Pin with a 1k resistor, that worked exactly like the ShineWifi-S. LEDs, Wi-Fi, MQTT is all working without a problem. If I plug the stick in the Inverter the only return I get from the stick is Disconnected, green light blinking, blue light on. I've attached some pictures for You. I'll test the Simulation and will come back to you with the results. Greetings André |
Hi André, the XR21V1410 chip on the ShineWiFi-X is just a UART to USB converter. So it is possible, that it is otherwies fully compatible to the ShineWiFi-S and also with the code in this repository. But this is only an assumption and I can not prove it, because I don't own the stick and the inverter. The Growatt documentation is very bad. But I think that Pin 3 and 4 of the connector will speak Modbus RTU. Do you have an oscilloscope or logic analyser and some hardware hacking skills? Regards, |
Hey, sorry for the really really late reply! Sadly I am currently not able to look at signals because I don't have an oscilloscope. It would be really awesome to get the data into MQTT for Home Assistant to use, I'm quite the data hoarder :D |
Hello Andre and Otti, do you have any new to this topic? I also have a ShineWifi-X with MIC 1000TL-X and the same issues. I also attached a Wemos D1 and a ESP-07 with USB UART/TTL to verify my observations, but no success util now. I have also attached the USB UART/TTL with 3.3V mode directly to the COM PIN 3 and 4 (ref. 6.5 instruction) and I could see some dataflow with hterm (all data zero). Next step is to attach an RS485 to TTL conveter to COM. But it was not possible to receive any data from the USB interface of the inverter. Best Regards Jannis |
Hi Jannis. Nope my stick is still sitting in my inverter doing practically nothing 😄 I currently do not have the funds to get myself a decent oscilloscope. (eBay Kleinanzeigen in Germany) also has nothing interesting listed. To continue experimenting/measure some stuff like Olli suggested. Going the WeMos route should result the same goal as mine since the stick is basically just a WeMos. (You probably figured that out already seeing my attached images :P) Please keep us updated if you find anything new we don't know yet 👍🏻 Greetings Andre |
Hi Andre, If have attached a RS485 to TTL module to PIN 3 and PIN 4 without any success until now. I've tried to receive data with an TTL/USB device directle connected (by hterm) to the RS485 module [RO to RX, RI, DI to GND). With a Webmos D1 also no success. I've test my seput by sending data from one PC (USB/TTL) to RX of Webmos D1 -> USB on another PC. That worked. Best regards, Jannis |
Hi all, I can actually see two topics wthin this discussion thread: Topic A): To debug, I was sniffing the serial connection at the RX0 and TX0 pins of the ShineWifi-X, using a serial Terminal a PC (like gtkterm/minicom/putty). Note, that on the RX0 and TX0 pins on the PCB, you have standard RS232-signals with 3.3V Level. It might be as simple as just using the wrong Baudrate, but I did not get to test this (yet). Does anybody have a copy of the stock firmware of the ShineWifi-X, to restore/flash ist? @Jannis, Topic B): I have successfully used the mbmd from Volkszähler (see here ) as a simple Modbus Client on the commandline. (I use this already for my energy meter. Implementing the Growatt protocol in mbmd for readout using RS485 with wires should not be so hard). The Register Description perfectly matches the "Modbus RTU Protocol v1.05 2018.pdf" (found somewhere at forum.iobroker.net), as far as my box supports it. I am mainly interested in getting the ShineWifi-X to work. Happy hacking, |
Hi again, reading my own post again after publishing it, I simply changed the baudrate for the ShineWifi-X for talking across the USB interface in setup(): My conclusion for now: [edit:] Here's the code snippet from growatt.cpp that works for me:
I think, using #ifdef would be sensible here. @André: this may help you. Also, extending the amount of used registers for those haveing a 3-phase Growatt system seems not too hard. Happy hacking, |
Hi Florian, thousand thanks for your intuition!!! It works perfect on my USB/TTL -> ESP07 setup. Thus I will skip all my further RS485 on COM investigations... On my ShineWifi-X I have (the not correct working) growatt stock firmware, because unfortunately I am not able to flash the stick. Next step for me is to find out why the stick refused my flashing. Regards, Jannis |
Hi Jannis, glad to hear, it also works for you. Personally, i use esptool.py on Linux, which is supplied along with esp8266 libraries for the Arduino IDE, but to read back you need to run it on the commandline. Bringing the stick to Flash Mode: Out of curiosity: What chipset does your USB-TTL have? Happy hacking, |
Hi Flo, thanks for your reply and hints. I think i am not able to create a firmware backup for you for the same reason why I am not able to flash the stick. I think the stick has some malfunctions. I tried to ask connected boards with esptool.py flash_id for some infos. My Wemos D1 and ESP07 answer this quite well, but the stick does not answer. [Yes: I connected GPIO0 to GND on powerup] Getting firmware from ESP07 by "esptool.py --baud 115200 --port COM10 read_flash 0x0 0x100000 fw-backup-1M.bin" was successful. With stick only exceptions / no connection. To say it in german "Das Scheißding fliegt jetzt in die Tonne..." ;-) |
Hi Jannis, you could give the Stick a last try: Check if the USB-Serial chip works and is visible an working (Drivers from Exar / MaxLinear ?) in your OS:
You might as well disable the onboard USB-Serial by removing (un-soldering) R30, and connect your USB-TTL to RX0 and TX0. For reference, here's some reverse Engineering of the board; showing what is attached to the pins of the ESP-07
Ansonsten: hau wech das Teil. Oder schick es mir ;-) Cheers, |
Do it right the first time and...I'm so so sorry. You first point was the solution. Driver was not installed correctly. I loaded a new version from MaxLinar (https://www.maxlinear.com/support/design-tools/software-drivers) and everything works fine now. How shall I send you the firmware? Do you want to contact me by email? I don't find PM at github. Best Regards, Jannis |
Hey Beo, Great findings, I'll try and see if they also work on mine. I also flashed my Stick before dumping the firmware... Tho the program that was on it didn't really seem to work. I got a code from my dealer and tried to register but nope no success. Schön Abend noch :) |
Hi all, i have pushed a new firmware. Other new features:
@BeoQ Thanks for your investigations Gruß, |
Would an ESP8266 board with its own USB-Serial chip (tested with CP2102 so far) work as is? _eDevice = Undef_stick;
Serial.begin(9600);
Modbus.begin(1, serial);
res = Modbus.readInputRegisters(28, 2); // dummy read total energy
if( res == Modbus.ku8MBSuccess )
{
_eDevice = ShineWiFi_S; // Serial
}
else
{
delay(1000);
Serial.begin(115200);
Modbus.begin(1, serial);
res = Modbus.readInputRegisters(55, 2); // dummy read total energy
if( res == Modbus.ku8MBSuccess)
{
_eDevice = ShineWiFi_X; // USB
}
} |
Answering myself, made it work on an ESP8266 board by just removing the initial attempt at 9600 baud meant to detect the Serial Shine stick connection. |
has anyone modified the registers for a SPH Storage inverter? adding the registers for discharge / charge / State + Export / Import to grid? |
can you please share your code with me? i only get "update.Data not sucessfull", manual reding of the register input / Soc / DC / AC /Power is working fine. i dont see my problem and need help. |
hugocrank: On the web interface, this adds access not only to holding registers (r/w) but also to input registers (ro); Works for me, YMMV For converters with batteries, the holding registers around 1000 may be of interest, I had also prepared to access many more registers that are described in the protocol definition, but only got to list them in the header file. Cheers, |
Hallo Florian, Hi Florian, I found the SOCregisters starting @ 1000 / last week. ;-) |
Servus Hugo, while German is fine for me, let's stick to English for everybody else to read. The webpage's register read/write introduced by otti only accesses the holding registers. Make sure that the holding register you want to write to is actually writable, and that the value is withing acceptable range. If you struggle with the firmware's auto-detection of the Stick (actually, which baud-rate to use), you can hardcode it in Growatt::begin(). While you#re at it: could you read out some holding registers on your converter for me? Thanks and good luck, |
Hi everybody, i would like to learn the way for reading my growatt min 6000tl-xh without the delay every 5min by app shinephone, currently i use shinewifi-x firmware version 3.1.0.5, before update firmware mod what is the way to do backup original firmware? Let me know. Thanks a lot |
Hello Adme84. |
Still need it? Got a copy. |
Yes, please.
Thank you.
…On 2022-12-19 21:11, aTommyC wrote:
>
Still need it? Got a copy.
--
Reply to this email directly, view it on GitHub [1], or unsubscribe
[2].
You are receiving this because you commented.Message ID:
***@***.***>
Links:
------
[1]
https://github.com/otti/Growatt_ShineWiFi-S/issues/1#issuecomment-1358133491
[2]
https://github.com/notifications/unsubscribe-auth/AFAE2EE2LU2HUKL7XAHV6GDWOCXO5ANCNFSM453ETMTQ
|
Hey.
Just got my solar system setup today and I found out that the Growatt system sucks... Since I already have a smarthome with Home Assistant Your project looks very very promising.
I got the ShineWifi-X flashed and the pinouts are all the same like in the S. But it is not connecting to the Inverter. I'm using a Growatt MIC 1000TL-X. Any chance you could help me get this to work?
The text was updated successfully, but these errors were encountered: