Replies: 12 comments 9 replies
-
Thanks for the feedback, I am correcting this, sorry for modifying things that I could not verify (I was just relying on the documentation) Thanks, Jan |
Beta Was this translation helpful? Give feedback.
-
yes, I corrected this and used 1 in my update |
Beta Was this translation helpful? Give feedback.
-
Yes, I believe the system performs well now, and it is about time to push
the changes back.
I would however like to remove an unused text_input I added, so that this
does not confuse you.
I can perform this small cleanup tomorrow.
I also noticed that since I did a HA core upgrade, I get warnings (a lot)
of this kind :
- Detected blocking call inside the event loop. This is causing
stability issues. Please report issue to the custom component author for
solax_modbus doing blocking calls at
custom_components/solax_modbus/__init__.py, line 229: return
self._client.read_holding_registers(address, count, **kwargs)
- Detected blocking call inside the event loop. This is causing
stability issues. Please report issue to the custom component author for
solax_modbus doing blocking calls at
custom_components/solax_modbus/__init__.py, line 235: return
self._client.read_input_registers(address, count, **kwargs)
I believe your original version might also suffer from this, so It would be
good to check his before we push back the changes.
Thanks a lot for your work, I am very happy with the solution. I will send
you a notification tomorrow when I have removed the unused experimental
part (setting charge/discharge time windows for Gen4)
With kind regards,
Jan
…On Thu, Feb 17, 2022 at 7:13 PM wills106 ***@***.***> wrote:
Do you think this is at a stage now to push the changes back and go from
there? I have a number of smaller changes I want to change for Gen2
Inverters but I was waiting for you to finish your changes so it doesn't
become too difficult with branching and having to backtrack some of the
other changes.
—
Reply to this email directly, view it on GitHub
<#16 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC2B23TF4REKZNGTNAK4UFLU3U3CZANCNFSM5M6CZAOA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
<wills106/homsassistant-solax-modbus/repo-discussions/16/comments/2199116@
github.com>
--
Jan Colpaert
+32 478 882435
|
Beta Was this translation helpful? Give feedback.
-
Did you test this with the very latest HA version?
If so, It might indeed be related to the slower serial modbus
communication. I did not have this issue before I did the HA upgrade.
I will reverify anyway to make sure I did not break this myself.
Regards,
Jan
…On Thu, Feb 17, 2022 at 9:20 PM wills106 ***@***.***> wrote:
I have gone back to my code for now and don't have that error.
I'll load your version back on again tomorrow or the weekend and I'll see
if I start getting the errors.
If I don't get the errors maybe it's related to the Serial side of Modbus?
I'll see how I get on and let you know.
—
Reply to this email directly, view it on GitHub
<#16 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC2B23U7YFAAFVRRGVDKIHLU3VKALANCNFSM5M6CZAOA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
<wills106/homsassistant-solax-modbus/repo-discussions/16/comments/2199935@
github.com>
--
Jan Colpaert
+32 478 882435
|
Beta Was this translation helpful? Give feedback.
-
I am on 2022.2.6
I will do some testing with the more recent pymodbus version if I find time
tomorrow.
…On Thu, Feb 17, 2022 at 9:36 PM wills106 ***@***.***> wrote:
I am on 2022.2.5 at the moment.
I'll have a read to see what changes HA has made between 2022.2.5 and
2022.2.8
Might also be worth checking out newer pymodbus versions? We are using
pymodbus==2.3.0 there is now 2.5.3
—
Reply to this email directly, view it on GitHub
<#16 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC2B23SYDBJA3YZ6QM3KKGLU3VL4XANCNFSM5M6CZAOA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
<wills106/homsassistant-solax-modbus/repo-discussions/16/comments/2200035@
github.com>
--
Jan Colpaert
+32 478 882435
|
Beta Was this translation helpful? Give feedback.
-
I did see there was a modbus update recently in HA
Kind Regards
Matthew Porter
…________________________________
From: wills106 ***@***.***>
Sent: 17 February 2022 20:36
To: wills106/homsassistant-solax-modbus ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [wills106/homsassistant-solax-modbus] Changes for Gen 4 (Discussion #16)
I am on 2022.2.5 at the moment.
I'll have a read to see what changes HA has made between 2022.2.5 and 2022.2.8
Might also be worth checking out newer pymodbus versions? We are using pymodbus==2.3.0 there is now 2.5.3
—
Reply to this email directly, view it on GitHub<#16 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADYOAWQXWXJ2UWJKCNM4SVDU3VL4XANCNFSM5M6CZAOA>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I adapted my fork to the pymodbus version 2.5.3, but the warnings still
come (probably only for people with serial modbus)
I believe we are ready for a merge back into the wills106 main line, but
the number of changes is rather high. I tried not to impact the older
generations, but I cannot re-test this.
You will also see that I made the python coding style a bit more compact
for some source files, I hope you can live with this, and am sorry for
inconvenience.
With kind regards,
Jan
…On Thu, Feb 17, 2022 at 10:21 PM matthewjporter ***@***.***> wrote:
I did see there was a modbus update recently in HA
Kind Regards
Matthew Porter
________________________________
From: wills106 ***@***.***>
Sent: 17 February 2022 20:36
To: wills106/homsassistant-solax-modbus ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [wills106/homsassistant-solax-modbus] Changes for Gen 4
(Discussion #16)
I am on 2022.2.5 at the moment.
I'll have a read to see what changes HA has made between 2022.2.5 and
2022.2.8
Might also be worth checking out newer pymodbus versions? We are using
pymodbus==2.3.0 there is now 2.5.3
—
Reply to this email directly, view it on GitHub<
#16 (reply in thread)>,
or unsubscribe<
https://github.com/notifications/unsubscribe-auth/ADYOAWQXWXJ2UWJKCNM4SVDU3VL4XANCNFSM5M6CZAOA
>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
—
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC2B23VKV3S5PVEH56KYHRDU3VRGFANCNFSM5M6CZAOA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
<wills106/homsassistant-solax-modbus/repo-discussions/16/comments/2200276@
github.com>
--
Jan Colpaert
+32 478 882435
|
Beta Was this translation helpful? Give feedback.
-
I did a test today: I increased the serial baudrate from 19200 (default for Gen4) to 115200 (the maximum speed), but this did not resolve the 'blocking calls warning' issue. |
Beta Was this translation helpful? Give feedback.
-
In the mean time, I will try to call the pymodbus read_input_registers and read_holding_registers in an async way. |
Beta Was this translation helpful? Give feedback.
-
Modbus RTU (serial) always uses a stack based on following layers:
The Gen4 device uses Modbus RTU over RS485, (and yes this means UART) |
Beta Was this translation helpful? Give feedback.
-
Did you notice the blocking warnings on a system with TCP modbus?
I started trying to make the calls async, but did not reach a solution yet
..
I had some storm damage in the garden, so I wanted to repair this first.
I am also running my HA on a PI4, the warnings only started to come
somewhere beginning februari, when I did a software update
Jan
…On Sat, Feb 26, 2022 at 4:51 PM wills106 ***@***.***> wrote:
I managed to get round my Mum's but here inverter doesn't look like it
communicates over Modbus but rather normal Uart over RS232 or RS485.
I did notice them blocking errors on a Fresh install of Home Assistant OS
running on a PI4
So perhaps the calls do need to be async
Might need to call this integration SolaX Modbus & UART if I am to include
both, assuming I can understand how to communicate with it?
—
Reply to this email directly, view it on GitHub
<#16 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC2B23WPX36MX5CQISUCTHLU5DZJPANCNFSM5M6CZAOA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
<wills106/homsassistant-solax-modbus/repo-discussions/16/comments/2256911@
github.com>
--
Jan Colpaert
+32 478 882435
|
Beta Was this translation helpful? Give feedback.
-
Indeed, I saw some similar reports in the HA formums for other
integrations.
I did not find a good sample solution yet. My effort to use async is
unfinished as the communication blocked completely after my first try ...
I will continue to search for a solution, but be warned, this is not my top
priority the coming days.
…On Sat, Feb 26, 2022 at 8:08 PM wills106 ***@***.***> wrote:
The only time I saw the blocking calls was when I turned on Modbus Serial.
When using TCP I have never seen blocking errors (on x86_64).
If you search for issues on HA Core on Github with blocking calls there is
a few for various integrations. I think it's just warning's at the moment,
not sure if they are going to block integrations that don't use async in
the future or not? Not really looked into it much. They must have made a
change this year.
—
Reply to this email directly, view it on GitHub
<#16 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC2B23Q6TJE7MGREPITFUG3U5EQL7ANCNFSM5M6CZAOA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
<wills106/homsassistant-solax-modbus/repo-discussions/16/comments/2257698@
github.com>
--
Jan Colpaert
+32 478 882435
|
Beta Was this translation helpful? Give feedback.
-
@infradom I have started to go through the changes you have made for Gen 4 and serial comms.
I'll list a few observations below as not sure where else to discus.
https://github.com/infradom/homsassistant-solax-modbus/blob/1a7482c8e52dfce2b307c3d5650e249bec6f009c/solax_modbus/__init__.py#L420-L421
Requires the value multiplying by 0.1 for Gen 2 and Gen 3
https://github.com/infradom/homsassistant-solax-modbus/blob/1a7482c8e52dfce2b307c3d5650e249bec6f009c/solax_modbus/__init__.py#L423-L424
Requires the value multiplying by 10 for Gen 2 and 0.1 for Gen 3
I suggest we use something like:
I know this goes against what's in the Modbus docs, but a number of parts are incorrect in them.
https://github.com/infradom/homsassistant-solax-modbus/blob/1a7482c8e52dfce2b307c3d5650e249bec6f009c/solax_modbus/__init__.py#L747
Should read
if feedin_power > 0: self.data["grid_export"] = feedin_power
and not elf.dataBeta Was this translation helpful? Give feedback.
All reactions