-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Describe the bug
While trying to add a RCT solar instance, the validation would always get stuck and eventually timeout. The validation would succeed if I open the RCT app which lead me to believe there might be a subtle error in the connection library.
Here is what I believe happens. I'm fairly new to GO so not sure what's the correct approach to fix it.
https://github.com/evcc-io/rct/blob/d962947a776e1b712a13713444e935b90523036c/connection.go#L134-L147
The validation would get stuck on conn.Read(buf) as it expects some kind of message from the inverter. This will only happen as a response to a read request though which isn't send for the initial pairing. Subsequently errC isn't set to nil and thus we don't exit out of the select inside NewConnection.
https://github.com/evcc-io/rct/blob/d962947a776e1b712a13713444e935b90523036c/connection.go#L86-L91
Moving errC <- nil before conn.Read(buf) does indeed fix the issue.
--
Workaround: As mentioned above evcc waits for some message from the inverter. Since it doesn't matter which client sent the read request, it's enough to open the RCT app the moment you perform the validation and it succeeds. Not sure that's a good UX though as this would also be needed on every restart of evcc AFAICT.
Steps to reproduce
- Run
evcc configure - ->
Advanced mode - ->
Single device - ->
PV inverter - ->
RCT Power - Enter IP address and wait
Configuration details
_None_Log details
$ ./evcc configure
[main ] INFO 2025/11/09 12:56:11 evcc 0.209.7 (0760db8d4)
Let's go:
In which mode should this process guide you through the configuration? Advanced mode (Ask more details, requires technical know-how)
What do you want to do? Configure a single device (has to be added manually to a configuration file!)
- Setup a device
Choose one of the following device categories
Choose one of the following device categories PV inverter (or corresponding meter)
- Configuration PV inverter (or corresponding meter)
Choose a PV inverter (or corresponding meter): RCT Power
Please provide the following settings:
IP address or hostname xxx.xxx.xxx.xxx
Cache 30s
-------------------------------------------------
Help:
Query external power of all devices connected to S0
-------------------------------------------------
External power No
Testing the pv configuration of RCT Power ...
Error: cannot create meter type 'rct': timeout
What type of operating system or environment does evcc run on?
macOS
External automation
- I have made sure that no external automation like HomeAssistant or Node-RED is active or accessing any of the mentioned devices when this issue occurs.
Nightly build
- I have verified that the issue is reproducible with the latest nightly build
Version
evcc version 0.209.7 (0760db8)