mukaschultze / ha-must-inverter

Must Inverter plugin for HomeAssistant
MIT License
20 stars 4 forks source link

How to connect inverter physically to Home Assistant OS (run on Raspberry Pi) to use your integration #36

Open misterscv opened 1 month ago

misterscv commented 1 month ago

Checklist

Is your feature request related to a problem? Please describe.

Sorry for a dumb question im noob :). I put it here, cos i do not know how to ask a question in other way.

How to connect inverter physically to Home Assistant OS (run on Raspberry Pi) to use your integration. Should i use official usb wifi plug, or use some cables such as rj45 or usb cable to connect inverter to HA. Can you explane this, please. Thanks in advance

Describe the solution you'd like

Sorry for a dumb question im noob :). I put it here, cos i do not know how to ask a question in other way.

Describe alternatives you've considered

Sorry for a dumb question im noob :). I put it here, cos i do not know how to ask a question in other way.

Additional context

Sorry for a dumb question im noob :). I put it here, cos i do not know how to ask a question in other way.

mukaschultze commented 1 month ago

What's your inverter model?

There are two ways of connecting the inverter:

USB (easy to set up)

My inverter (PV18-3024 VPM) comes with a USB cable, I'm assuming yours does too. You can use this cable to connect the inverter to a PC using port 8 of the screenshot below (or Raspberry in your case).

After you connect the USB cable the inverter will show up as a serial device usually on /dev/ttyUSB0 path. All the correct settings will be auto-completed when you try to add the device to Home Assistant.

This is by far the easiest way to set up, it should work out of the box.

image

Using a serial to Wi-Fi converter (advanced set up)

Alternatively, you can buy a generic serial to Wi-Fi converter and use the RJ45 (port 9 in the screenshot) to connect your device to your home network.

But be aware that this is not as simple as connecting an ethernet cable to the inverter, it requires you to crimp your own RJ45 cable using the pinout from your inverter's manual. It also requires a fair bit of configuration, you'll need to have a bit of understanding of how serial devices work.

The official wifi plug is NOT supported by the integration since it uses some proprietary cloud service.

This is the serial to wifi converter I've been using for the last 5 months on my setup: https://pt.aliexpress.com/item/4001114113365.html

Let me know if this clears up how to setup the integration a bit so I can add better instructions to the readme file

misterscv commented 1 month ago

My inverter is HBP1800 (HBP18-5248 HM). It has usb port and cabel included. I connected USB to my Raspberry. I cannot understand what to type in the first field in my case image

misterscv commented 1 month ago

It works! :)

i typed:

/dev/ttyUSB0

and it works!

Thanks

misterscv commented 1 month ago

My battery is 48v. Sensors Monitor works! That is what i needed.

im glad that i can use sensors.

Thanks for integration

mukaschultze commented 1 month ago

I've added the default placeholder to that field, hopefully, it solves the confusion for other people 7fa4be3c45370cb52af736a7f6d9f6442a2e3a5c

misterscv commented 1 month ago

Hi. I have another question. does the inverter know about the capacity and level of the connected battery in wh or %. It would be great to have such information as sensors

alex-dokienko commented 1 month ago

hello, wonder if you can help, I've 5kWh inverter + 48V Must battery, I managed to connect via USB using your integration, big thank you for effort on building and sharing this integration. Currently I would like to get battery capacity level, but I couldn't find any metrics related to that, only current batt power.

I know battery can be connected via CAN cable to inverter (maybe in that case it can give more options ?) but it's not an option for me as in that case it tries to use 80A charging which I can't use due to existing setup (not so good wires)

Is there any way how I can get that information ? Really appreciate any help or guideness.

misterscv commented 1 month ago

Hi, Alex. I asked mukaschultze for the same question :). I have the HBP18-5248 HM station. It has inverter and 48v, 5kWh battery. I believe, you need to connect battery and inverter via cable to CAN and COM ports. It would not give capacity information, but inverter will work properly with battery. By default battery charges with 30A, and you can change it to 60A max. I think you mix up max charge settings from battery and solar panels togather, which is 80A max.

As for capacity sensor and battery level sensor, i created my own template sensor in HA. From existing data from integration. it works but not as good as it should :)

It would be great if it possible some how to add this information into the integration itself. And big plus if integration would understand voltage of battery and give propper controls for the battery. Integration knows about battery, but has controls from 24v battery. mukaschultze what do you think.

alex-dokienko commented 1 month ago

hi @misterscv, thanks for feedback. As for connecting battery and inverter with CAN cable I'm pretty sure it resets/ignore your charging limits, as I did all setup to use charging 30A, but once I used cable, setting was resetted by default to 80A (as that what my battery can take), I tried to change charging back to 30A, but I think it can't store it or just reset every time if I do switch off inverter, didn't want really to play around too much with that option as my wires really can't take such current + I also found some other guy in Interent who also experienced same issue as me, also I don't have any solar panels, using my inverter in appartment.

In my case I'm using using as output switch with energy meter function (using utility meter in HA with manual reset), but yes it's also working not so great, in my situation I charge battery once at night (due to lower cost), so it's become hectic to keep track current capacity especially if it's charged during day (in some cases when we get long loadshedding schedule).

mukaschultze commented 1 month ago

Hi. I have another question. does the inverter know about the capacity and level of the connected battery in wh or %. It would be great to have such information as sensors

@misterscv @alex-dokienko the inverter doesn't provide any sort of battery percentage or remaining capacity. You would need some sort of coulomb counter to keep track of the SOC.

The inverter LCD display uses a heuristic to determine the capacity, I guess it's possible to implement this same heuristic using HA templates, but keep in mind that it's extremely inaccurate.

image image

As for capacity sensor and battery level sensor, i created my own template sensor in HA. From existing data from integration. it works but not as good as it should :)

@misterscv can you paste your template here? Might be helpful to some folks.

Integration knows about battery, but has controls from 24v battery. mukaschultze what do you think.

I can try to do that, only reason I haven't done it yet is because nobody complained :upside_down_face:

misterscv commented 1 month ago

I have some problems with integration and do not know how to fix it. All integration sensors stuck at some moment after long peropd of work and do not refresh their data. For example, sensors can work for 5-8 hours and then stuck. Reload integration does not help. After reload integration all sensors become unavailable. Only restart home assistant helps to make the integration to work. mukaschultze do you have any thoughts. Have you faced this problem?

mukaschultze commented 1 month ago

mukaschultze do you have any thoughts. Have you faced this problem?

Yes, increasing the scan interval helps. 15 seconds works for me, anything less than that freezes the integration after a few hours.

alex-dokienko commented 1 month ago

actually I got similar issue today, well my inverter is stopping/starting based on automation, so after inverter start again, automation stop receiving values, I'd imagine after some retries it timeouts and not reconnects after that.