-
Notifications
You must be signed in to change notification settings - Fork 7
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
Improvement idea: structure repo to work as an external_components for ESPHome #21
Comments
I've started working on this, you can check my progress on my fork: https://github.com/SibrenVasse/Foxess-T-series-ESPHome-Home-Assistant |
Hey, first of all thanks for working on that!
from this repo to
shown in your example yaml. Unfortunately it spawned this error at compile time:
which seem to be related to lambda function from https://github.com/assembly12/Foxess-T-series-ESPHome-Home-Assistant/blob/main/foxess-inverter.yaml (line 61-100 here). Is there any way to cleanly replace that? I've seen your https://github.com/SibrenVasse/Foxess-T-series-ESPHome-Home-Assistant/blob/main/foxess-inverter.yaml.example, but I'm afraid it would completely replace my entity names and anything depending on them in the process. |
You have to replace everything below the 'uart:' section with the sections from the new yaml example. If you're worried about entities changing name in Home Asisstant, you have to make sure the new sensor has the same 'name' field in the yaml file. Like this:
|
thanks for adapting it for me, that helped me a lot! I've adapted it further to work with LilyGo T-CAN485 board I'm using (works great with no need to add voltage controllers or RS485 components):
I have an optional light section for control over the built in LED:
which I'm using to show different color depending on energy production:
I had to add configuration for flow control pin, it seems to be GPIO17 on that board:
|
@SibrenVasse for some reason your version fails to update some of the sensors, while the version from this repo does. I've noticed my Foxess Inverter T-Series Today Yield (and Total) was updating very infrequently (less often than once an hour) messing up my statistics.
using code from this repo returns all data, all the time (every 2 minutes for my inverter):
|
Can you upload your yaml file? So I can check that everything is the same in my environment. |
Here's the config I'm using. The commented out part is the 100% working code from here. The uncommented is derived from yours that fails to process part of the message received from Foxess inverter.
|
Somehow it's only publishing the sensor states until line foxess_solar.cpp#L156 Do you have a log snippet for when it does update the sensors after line 156? Did you capture the logs via the network? Can you try this instead of the external_component in your config?
|
Updated my config to use PR branch as suggested. My logs show this so far:
The |
It's just a message to warn that the length of the messages received by the inverter are valid (integrity checked by checksum, which the original implementation does not do), but not the same length as the messages I verified my code with. here The parsing itself has not changed from the original code. |
I have created a version without this check:
|
Ok. Something has though as it seems to cut off data received from the inverter with your code, cause it works with the original. Anything else I can check? Here's what the original code outputs:
|
no more warnings, but still just half of the data it seems:
|
I don't know how much you have changed, or if it matters but when I compiled the original version with ESP-IDF 5.3.1 it was erroring out with |
I haven't tried compiling with esp-idf because of incompatibilities with my hardware. Can you try compiling with the arduino framework and enabling verbose logging? |
My inverter is already down for the day. I’m not sure if I will have time to do it tomorrow. |
https://esphome.io/components/external_components.html#example-of-local-components
The text was updated successfully, but these errors were encountered: