Tertiush / bmspace

Pace Battery Management System
GNU General Public License v3.0
50 stars 26 forks source link

Hardware Info and more documentation #33

Closed Norm71 closed 7 months ago

Norm71 commented 7 months ago

I do have a System from Tewaycell Tewaycell 48V 200Ah 10Kwh All-in-one Mobile ESS Built-in Hybrid Invert and they provided a RS232 to USB Cable with it.

They also sent the PACEexTool but its completely in Chinese.

Now i found your Home Assistant integration. 😀

Can you explain a bit more how i do get the basic connection? I think i need to install the USB driver for Linux first on the Homeassistant Raspberry. Is that possible? Then i have questions for the requirements: paho_mqtt==1.6.1 PyYAML==6.0.1 pyserial==3.5

I dont know how to get the reuirements.

I have Mosquito MQTT and use it already for my OpenDTU and ESP32

I posted in Power Forum but did not get any answer. So i try directly here.

Tertiush commented 7 months ago

Do you have home assistant operating system, or just home assistant core installed? The addon is meant for operating system.

If you run core then you need to install the dependancies in the requirements file, change the config file to suite your needs, and finally run the script manually. If you need to run the script as a system service, Google will help you out there.

On Wed, Mar 6, 2024, 00:23 Norm71 @.***> wrote:

I do have a System from Tewaycell Tewaycell 48V 200Ah 10Kwh All-in-one Mobile ESS Built-in Hybrid Invert https://tewaycell.com/products/tewaycell-48v-200ah-10kwh-all-in-one-mobile-ess-built-in-hybrid-inverter?variant=41313098858553 and they provided a RS232 to USB Cable with it.

They also sent the PACEexTool but its completely in Chinese.

Now i found your Home Assistant integration. 😀

Can you explain a bit more how i do get the basic connection? I think i need to install the USB driver for Linux first on the Homeassistant Raspberry. Is that possible? Then i have questions for the requirements: paho_mqtt==1.6.1 PyYAML==6.0.1 pyserial==3.5

I dont know how to get the reuirements.

I have Mosquito MQTT and use it already for my OpenDTU and ESP32

I posted in Power Forum but did not get any answer. So i try directly here.

— Reply to this email directly, view it on GitHub https://github.com/Tertiush/bmspace/issues/33, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYY5DDKVPK35GERPET2AJLYWZAV3AVCNFSM6AAAAABEH6VFIOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE3TAMRUGE2DSNY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Norm71 commented 7 months ago

Its Home Assistant Operating System. So with HA OS i dont need the paho_mqtt, PyYAML and pyserial? So i installed the addon and its running. The BMS is connected with the provided Rs232 to USB connector. But how can i verify which port is used (/dev/ttyUSB0) and is there a driver needed?

Thats my protocol: Hello BMS Pace Starting up... Loading options.json Config: {"mqtt_host": "192.168.17.133", "mqtt_port": 1883, "mqtt_user": "mqtt-user", "mqtt_password": "xxxxxxxxxxxx", "mqtt_ha_discovery": true, "mqtt_ha_discovery_topic": "homeassistant", "mqtt_base_topic": "bmspace", "connection_type": "Serial", "bms_ip": "10.0.0.161", "bms_port": 5000, "bms_serial": "/dev/ttyUSB0", "scan_interval": 5, "debug_output": 0} Connection Type: Serial MQTT connected with result code 0 Connecting to BMS... trying to connect /dev/ttyUSB0 BMS serial error connecting: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0' Traceback (most recent call last): File "/workdir/./bms.py", line 1090, in success, data = bms_getVersion(bms) File "/workdir/./bms.py", line 656, in bms_getVersion success, INFO = bms_request(bms,cid2=constants.cid2SoftwareVersion) File "/workdir/./bms.py", line 619, in bms_request if not bms_sendData(bms,request): File "/workdir/./bms.py", line 118, in bms_sendData comms.write(request) AttributeError: 'bool' object has no attribute 'write' Script exiting

Tertiush commented 7 months ago

Nope you don't need it, HAOS will handle all of that for you. Just Google how to install addons in home assistant, pretty straightforward.

On Wed, Mar 6, 2024, 20:04 Norm71 @.***> wrote:

Its Home Assistant Operating System. So with HA OS i dont need the paho_mqtt, PyYAML and pyserial? Do you have some website where your setup is documented or do you know some?

— Reply to this email directly, view it on GitHub https://github.com/Tertiush/bmspace/issues/33#issuecomment-1981489932, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYY5DHNMXBSFITZRIJBOIDYW5LCDAVCNFSM6AAAAABEH6VFIOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBRGQ4DSOJTGI . You are receiving this because you commented.Message ID: @.***>

Norm71 commented 7 months ago

Add on is installed but I don't get any signal from the USB port. Don't know how to find out which is used in Home assistant

Tertiush commented 7 months ago

Go look in the system menu for hardware info or something like that. Should be usbtty1 or something similar. Case sensitive

On Thu, Mar 7, 2024, 18:16 Norm71 @.***> wrote:

Add on is installed but I don't get any signal from the USB port. Don't know how to find out which is used in Home assistant

Norman Brodowsky Herzogst.21 41747 Viersen 01522 3640871


Von: Tertius @.> Gesendet: Thursday, March 7, 2024 5:12:09 PM An: Tertiush/bmspace @.> Cc: Norman Brodowsky @.>; Author @.> Betreff: Re: [Tertiush/bmspace] Hardware Info and more documentation (Issue #33)

Nope you don't need it, HAOS will handle all of that for you. Just Google how to install addons in home assistant, pretty straightforward.

On Wed, Mar 6, 2024, 20:04 Norm71 @.***> wrote:

Its Home Assistant Operating System. So with HA OS i dont need the paho_mqtt, PyYAML and pyserial? Do you have some website where your setup is documented or do you know some?

— Reply to this email directly, view it on GitHub https://github.com/Tertiush/bmspace/issues/33#issuecomment-1981489932,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACYY5DHNMXBSFITZRIJBOIDYW5LCDAVCNFSM6AAAAABEH6VFIOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBRGQ4DSOJTGI>

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/Tertiush/bmspace/issues/33#issuecomment-1983870249>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/AUL47SM2LROJP7PPQNWHAIDYXCGVTAVCNFSM6AAAAABEH6VFIOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBTHA3TAMRUHE>.

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Tertiush/bmspace/issues/33#issuecomment-1983879037, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYY5DBIIUBJZLVMPVP3NHLYXCHGFAVCNFSM6AAAAABEH6VFIOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBTHA3TSMBTG4 . You are receiving this because you commented.Message ID: @.***>

Norm71 commented 7 months ago

Thats it: Hello BMS Pace Starting up... Loading options.json Config: {"mqtt_host": "192.168.17.133", "mqtt_port": 1883, "mqtt_user": "mqtt-user", "mqtt_password": "xxxxxx", "mqtt_ha_discovery": true, "mqtt_ha_discovery_topic": "homeassistant", "mqtt_base_topic": "bmspace", "connection_type": "Serial", "bms_ip": "10.0.0.161", "bms_port": 5000, "bms_serial": "/dev/ttyACM1", "scan_interval": 5, "debug_output": 0} Connection Type: Serial MQTT connected with result code 0 Connecting to BMS... trying to connect /dev/ttyACM1 BMS serial connected

Norm71 commented 7 months ago

It was to early to be happy. That was my Z-Wave Stick. Cable is not listed will try a Waveshare RS232 RS485 to WiFi POE Ethernet Serial Server Converter. Is there any Hardware you can recommend?

Tertiush commented 7 months ago

Nope sorry, just used what I has laying around.

Norm71 commented 7 months ago

Solved the config!

So what i have:

  1. Batterysysttem: https://tewaycell.com/products/tewaycell-48v-200ah-10kwh-all-in-one-mobile-ess-built-in-hybrid-inverter?variant=41313098858553
  2. Rs232to Eth: https://www.waveshare.com/wiki/RS485_TO_WIFI/ETH

Installed your Addon image

Configured the Waveshare as follows: image

Afterwards the Addon could connect and i directly retrieved:

Pack Serial Number: Packs: 1 Pack 1, Total cells: 16 Pack 1, V Cell1: 3281 mV Pack 1, V Cell2: 3280 mV Pack 1, V Cell3: 3281 mV Pack 1, V Cell4: 3281 mV Pack 1, V Cell5: 3281 mV Pack 1, V Cell6: 3280 mV Pack 1, V Cell7: 3280 mV Pack 1, V Cell8: 3280 mV Pack 1, V Cell9: 3280 mV Pack 1, V Cell10: 3280 mV Pack 1, V Cell11: 3279 mV Pack 1, V Cell12: 3279 mV Pack 1, V Cell13: 3279 mV Pack 1, V Cell14: 3279 mV Pack 1, V Cell15: 3279 mV Pack 1, V Cell16: 3278 mV Pack 1, Cell Max Diff Volt Calc: 3 mV Pack 1, Total temperature sensors: 6 Pack 1, Temp1: 23.7 ℃ Pack 1, Temp2: 22.0 ℃ Pack 1, Temp3: 20.3 ℃ Pack 1, Temp4: 19.5 ℃ Pack 1, Temp5: 29.8 ℃ Pack 1, Temp6: 26.4 ℃ Pack 1, I Pack: -1.17 A Pack 1, V Pack: 52.477 V Pack 1, I Remaining Capacity: 73750 mAh Pack 1, I Full Capacity: 200000 mAh Pack 1, SOC: 36.88 % Pack 1, Cycles: 15 Pack 1, Design Capacity: 190000 mAh Pack 1, SOH: 105.26 % Script running.... Pack Remaining Capacity: 73750 mAh Pack Full Capacity: 200000 mAh Pack Design Capacity: 190000 mAh Pack SOC: 36.88 % Pack SOH: 105.26 % Packs for warnings: 1 Pack 1, warnings: Pack 1, balancing1: 00000000 Pack 1, balancing2: 00000000 Publishing HA Discovery topic...

Many thanks for this Addon !!!!!!