Skip to content
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

JK-B2A24S20P connection probs #51

Closed
Catchmydrift opened this issue Feb 5, 2023 · 8 comments
Closed

JK-B2A24S20P connection probs #51

Catchmydrift opened this issue Feb 5, 2023 · 8 comments

Comments

@Catchmydrift
Copy link

hi, im completely new to HA, github etc.

i have 2x JK-B2A24S20P bms's and i get this when trying to connect:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
INFO [main.py:68] BT Discovery:
INFO [main.py:73] BT Device 61-24-07-A8-2D-6A address=61:24:07:A8:2D:6A
INFO [bt.py:126] BMS JKBt(C8:47:8C:E5:AB:CB) keep alive enabled
INFO [main.py:195] connecting mqtt @core-mosquitto
INFO [main.py:232] Fetching 1 BMS + 0 others serially, period=1.00s, keep_alive=True
INFO [sampling.py:61] connecting bms JKBt(C8:47:8C:E5:AB:CB)
INFO [main.py:106] mqtt watchdog loop started with timeout 120.0s
INFO [jikong.py:114] normal connect failed, connecting with scanner
WARNING [bt.py:18] BMS JKBt(C8:47:8C:E5:AB:CB) disconnected!
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
WARNING [bt.py:18] BMS JKBt(C8:47:8C:E5:AB:CB) disconnected!
INFO [jikong.py:114] normal connect failed, connecting with scanner
WARNING [bt.py:18] BMS JKBt(C8:47:8C:E5:AB:CB) disconnected!
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
WARNING [bt.py:18] BMS JKBt(C8:47:8C:E5:AB:CB) disconnected!
INFO [jikong.py:114] normal connect failed, connecting with scanner
WARNING [bt.py:18] BMS JKBt(C8:47:8C:E5:AB:CB) disconnected!
ERROR [main.py:120] MQTT never published a message after 120s, exit
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
WARNING [bt.py:18] BMS JKBt(C8:47:8C:E5:AB:CB) disconnected!
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner
INFO [jikong.py:114] normal connect failed, connecting with scanner

my config file is:

  • address: C8:47:8C:E5:AB:CB
    type: jk
    alias: JK-B2A24S20P

im not sure if thats right, but what i have in alias is what shows up on the jk app or bluetooth discovery. the mac address is correct.

im not 100% sure i have mqqt setup correctly, as their didnt seem to be anywhere to create in a username and password? - do i even need one?

any help appriciated thanks :-)

@Catchmydrift
Copy link
Author

then it becomes undiscoverable and i have to switch the bms off and on again to see it via bluetooth...

@fl4p
Copy link
Owner

fl4p commented Feb 5, 2023

On which hardware do you run HA?

@Catchmydrift
Copy link
Author

On which hardware do you run HA?

Hi, rpi 3b+..

@jb-studio
Copy link

jb-studio commented Feb 6, 2023

Hi,
I am experiencing some difficulties connecting to JK BMS as well on my RPI 3B+
I disabled build in Bluetooth and connected TP-Link Bluetooth dongle. I managed to successfully connect Daly BMS to my HA using Batmon addon, but when I am trying to establish a connection to JK BMS JK-B2A8S20P I see errors

INFO [sampling.py:67] connected bms JKBt(C8:47:8C:EC:76:D1)!
ERROR [sampling.py:125] jk-bms error: <class 'AssertionError'>
INFO [sampling.py:51] bms debug data: %s
ERROR [main.py:274] 1 exceptions occurred fetching BMSs
ERROR [main.py:85] Error (num 1) reading BMS:
ERROR [main.py:86] Stack: Traceback (most recent call last):
File "/app/main.py", line 81, in fetch_loop
await fn()
File "/app/main.py", line 275, in fn
raise exceptions[0]
File "/app/main.py", line 270, in fn
await t
File "/app/bmslib/sampling.py", line 47, in call
return await self.sample()
File "/app/bmslib/sampling.py", line 69, in sample
sample = await bms.fetch()
File "/app/bmslib/jikong.py", line 176, in fetch
return BmsSample(
File "/app/bmslib/bms.py", line 57, in init
assert math.isfinite(soc)
AssertionError

Do you have any suggestions on how it can be fixed?
Thanks

@Catchmydrift
Copy link
Author

Ive sorted the mqtt stuff, should be ok, but still getting the same problem in the log..?

@Catchmydrift
Copy link
Author

On which hardware do you run HA?

Any help?

@fl4p
Copy link
Owner

fl4p commented Feb 25, 2023

Sorry for the delay, I didn't see your reply.
I just pushed a fix cc8ed5d

@Catchmydrift
Copy link
Author

Thank you very much for the update 👍👍. I have 2 jk bmses and they are both now picked up! This is awsome 👍👍. Thank you again 😁😁👏👏👏👌👌👌👌✌️✌️✌️👍👍

@fl4p fl4p closed this as completed Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants