StealthChesnut / HA-FoxESS-Modbus

Home Assistant Modbus Integration setup for Fox ESS H1 and AC Inverters
77 stars 37 forks source link

[Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 2 bytes (0 received) / No Response received from the remote unit/Unable to decode response BUT INTEGRATION IS WORKING #62

Closed Vato9394 closed 1 year ago

Vato9394 commented 1 year ago

I get 2 errors in the home assistant log:

But the integration is working fine and all my data is filled in. is this a bug in the integration or do I do something wrong?

StealthChesnut commented 1 year ago

Hi @Vato9394 How are you connecting to your inverter? Are you using Lan or Modbus?

Vato9394 commented 1 year ago

I am using Modbus (specifically a serial to usb)

StealthChesnut commented 1 year ago

Ok, thanks.

Can you post the version numbers for your inverter firmware please?

On Thu, 1 Dec 2022, 18:00 Vato9394, @.***> wrote:

I am using Modbus (specifically a serial to usb)

— Reply to this email directly, view it on GitHub https://github.com/StealthChesnut/HA-FoxESS-Modbus/issues/62#issuecomment-1334144147, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALFO3FH5RU5T5WL6DYLWCALWLDRSDANCNFSM6AAAAAASI6AV4M . You are receiving this because you commented.Message ID: @.***>

Vato9394 commented 1 year ago

1.36

Vato9394 commented 1 year ago

I am using the fork for the h3 tho. (https://github.com/rsaemann/HA-FoxESS-H3-Modbus) I have an AIO H3 8.0 E

StealthChesnut commented 1 year ago

@rsaemann - are you able to help?

rsaemann commented 1 year ago

I am getting the same error. I will check if it is a bad register. Maybe it is just too many sensors read out in the update loop. I used 30 seconds for every register. Maybe that is not enough. First guess for troubleshooting: Disable some sensors that you do not need by commenting the lines. Or increase the update interval.

rsaemann commented 1 year ago

I found for my installation (island mode), that the sensors for the inverter current, battery current and battery voltage are responsible for the error. If I comment them out, no modbus errors are thrown.

If you have only the main grid or both (grid+eps) connected: please report if disabling the sensors work for you.

Vato9394 commented 1 year ago

I have disabled (commented) following sensors:

Now, I don't get an error thrown.

Thanks for the help!

StealthChesnut commented 1 year ago

Ok - closing this issue as it seems to be resolve. Thanks for helping out @rsaemann!

kevinverelst commented 1 year ago

@Vato9394 Could you help me setup my Integration? I'm seeing the same errors except my integration isn't working. The values stay "unavailable". I'm doing exactly the same except I have a H3-5.0-E inverter. How did you connect your cable to the RS485 port? If I understand correctly, I need pin 1&2? image

Vato9394 commented 1 year ago

Yes, pin 1 and 2 (I got the RS485 to usb, I first tried with the USR W610, but didn't get it to work, I don't know why, maybe my incompetence?) Connect 1 to A and 2 to B, don't switch this. I also used the fork for the H3 specifically. https://github.com/rsaemann/HA-FoxESS-H3-Modbus I copied it manually to home assistant, don't use hacs for this (the locations in the yaml code are different if you use hacs, do yourself a favor and just do it manually) And my firmware is the latest 1.36 (just send foxess support an email, they can update it remotely)

rsaemann commented 1 year ago

Did you check the Inverter's RS485 Slave ID? The sensors use standard address 247. However due to installation this might have changed. I encountered an accidential reset once that changed the address to 000. Invertermenu -> settings -> communication -> RS485 -> slaveID

Check the dongle and connection with a tool like GModbus for Windows.

Vato9394 commented 1 year ago

You can check this in the menu on the inverter itself.

tagware commented 1 year ago

Guys, Girls & Others,

Is there a reason why you guys are using the RS485 port? Rather than plugin a CAT5(RJ45) cable into the inverter Ethernet port (F) and running it back to the router?

As a CAT5 shield cable run can be up to 100 meters and still be in spec.

Save Electrons. :o)

Regards David Vincent

Daibutt commented 1 year ago

When I connected using RS485 back in April, the (H1-5.0E) firmware wasn't supporting access via the LAN port . As it's working fine there's no real push for me to swap over to LAN. If my RS485 converter packs in I'll probably do it then.

Vato9394 commented 1 year ago

Guys, Girls & Others, Is there a reason why you guys are using the RS485 port? Rather than plugin a CAT5(RJ45) cable into the inverter Ethernet port (F) and running it back to the router? As a CAT5 shield cable run can be up to 100 meters and still be in spec. Save Electrons. :o) Regards David Vincent

on the H3 inverters, modbus over ethernet is not (yet) enabled. thats the reason we use the RS485 port.

kevinverelst commented 1 year ago

@Vato9394 I'm an idiot. It was working from the start but I was looking at the foxess entities (I used to have the foxess cloud integration installed) instead of the modbus entities. I also was under the impression that it was not working due to the error in the logs and just looking at the wrong entities. I cleaned everything up and started from scratch. This is when I noticed that it was working.

@rsaemann the default address was working fine and I can confirm your fork is working on a H3-5.0-E inverter.

@tagware My inverter has a USB wifi dongle connected to port F. I would rather just plug in an ethernet cable but since the fork I'm using tells me that port 502 is closed. It seems I cannot connect over network. I'm also confused because it says I can connect LAN on port F while that has a USB interface.

image
tagware commented 1 year ago

Okay,

You have a different model to my AC1-5.0-E which does. Cost saving again I suppose. :o(

But you do have 3 x more PV inputs that I do. As I have none. :o(

Oversight on my part, ended up buying a Solax 2K inverter to make up on that mistake.

Regards David Vincent

On Tue, 6 Dec 2022 at 08:37, Kevin Verelst @.***> wrote:

@Vato9394 https://github.com/Vato9394 I'm an idiot. It was working from the start but I was looking at the foxess entities (I used to have the foxess cloud integration installed) instead of the modbus entities. I also was under the impression that it was not working due to the error in the logs and just looking at the wrong entities. I cleaned everything up and started from scratch. This is when I noticed that it was working.

@rsaemann https://github.com/rsaemann the default address was working fine and I can confirm your fork is working on a H3-5.0-E inverter.

@tagware https://github.com/tagware My inverter has a USB wifi dongle connected to port F. I would rather just plug in an ethernet cable but since the fork https://github.com/rsaemann/HA-FoxESS-H3-Modbus I'm using tells me that port 502 is closed. It seems I cannot connect over network. I'm also confused it says I can connect LAN on port F while that has a USB interface. [image: image] https://user-images.githubusercontent.com/4036085/205860905-9d1ac725-6ff9-48e2-891a-7babd31142f0.png

— Reply to this email directly, view it on GitHub https://github.com/StealthChesnut/HA-FoxESS-Modbus/issues/62#issuecomment-1338965946, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3GF265M6BMP2ECO3MVGKLWL33JJANCNFSM6AAAAAASI6AV4M . You are receiving this because you were mentioned.Message ID: @.***>

tagware commented 1 year ago

Hi Kevin,

You in theory can swap over the WiFi with a LAN port for £67 ish. The trouble is finding one.

Regards David Vincent

On Tue, 6 Dec 2022 at 08:37, Kevin Verelst @.***> wrote:

@Vato9394 https://github.com/Vato9394 I'm an idiot. It was working from the start but I was looking at the foxess entities (I used to have the foxess cloud integration installed) instead of the modbus entities. I also was under the impression that it was not working due to the error in the logs and just looking at the wrong entities. I cleaned everything up and started from scratch. This is when I noticed that it was working.

@rsaemann https://github.com/rsaemann the default address was working fine and I can confirm your fork is working on a H3-5.0-E inverter.

@tagware https://github.com/tagware My inverter has a USB wifi dongle connected to port F. I would rather just plug in an ethernet cable but since the fork https://github.com/rsaemann/HA-FoxESS-H3-Modbus I'm using tells me that port 502 is closed. It seems I cannot connect over network. I'm also confused it says I can connect LAN on port F while that has a USB interface. [image: image] https://user-images.githubusercontent.com/4036085/205860905-9d1ac725-6ff9-48e2-891a-7babd31142f0.png

— Reply to this email directly, view it on GitHub https://github.com/StealthChesnut/HA-FoxESS-Modbus/issues/62#issuecomment-1338965946, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3GF265M6BMP2ECO3MVGKLWL33JJANCNFSM6AAAAAASI6AV4M . You are receiving this because you were mentioned.Message ID: @.***>

kevinverelst commented 1 year ago

Why bother? The USB RS485 stick I bought was € 3...

tagware commented 1 year ago

Yep. Not saying you should.

It was for others to know that you can. As an alternative.

Cheers.

On Tue, 6 Dec 2022, 08:51 Kevin Verelst, @.***> wrote:

Why bother? The USB RS485 stick I bought was € 3...

— Reply to this email directly, view it on GitHub https://github.com/StealthChesnut/HA-FoxESS-Modbus/issues/62#issuecomment-1338980463, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3GF2YQQQOLG2ZFR3JYPILWL345VANCNFSM6AAAAAASI6AV4M . You are receiving this because you were mentioned.Message ID: @.***>

Daibutt commented 1 year ago

Hi Kevin, You in theory can swap over the WiFi with a LAN port for £67 ish. The trouble is finding one. Regards David Vincent

Do you mean the FoxESS Smart LAN module? I think this just replaces your WiFi Cloud connection with hardwired Cloud connection, rather than allowing you local access.

tagware commented 1 year ago

That's a Ho Hum point.

Yep. I concede.

Stick to you RS485

Regards David Vincent

On Tue, 6 Dec 2022 at 08:55, DaiButt @.***> wrote:

Hi Kevin, You in theory can swap over the WiFi with a LAN port for £67 ish. The trouble is finding one. Regards David Vincent

Do you mean the FoxESS Smart LAN module? I think this just replaces your WiFi Cloud connection with hardwired, rather than allowing you local access.

— Reply to this email directly, view it on GitHub https://github.com/StealthChesnut/HA-FoxESS-Modbus/issues/62#issuecomment-1338984258, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3GF2ZBH3NR2Q7C4MT6I5TWL35MDANCNFSM6AAAAAASI6AV4M . You are receiving this because you were mentioned.Message ID: @.***>

StealthChesnut commented 1 year ago

@Vato9394 I'm an idiot. It was working from the start but I was looking at the foxess entities (I used to have the foxess cloud integration installed) instead of the modbus entities. I also was under the impression that it was not working due to the error in the logs and just looking at the wrong entities. I cleaned everything up and started from scratch. This is when I noticed that it was working.

@rsaemann the default address was working fine and I can confirm your fork is working on a H3-5.0-E inverter.

@kevinverelst, @Vato9394 - are your problems solved? If so I will close this discussion. :)

Vato9394 commented 1 year ago

yes, mine was resolved some time ago, you can close this discussion ;)