bluetti_mqtt icon indicating copy to clipboard operation
bluetti_mqtt copied to clipboard

Suport for AC200L

Open Kathou99 opened this issue 11 months ago • 12 comments

Hi, with the AC200L I can't connect with the HA addon, see below the output I got.

Run the the HA addon

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
cont-init: info: running /etc/cont-init.d/00-banner.sh

-----------------------------------------------------------
 Add-on: Bluetti to MQTT
 MQTT bridge between Bluetti and Home Assistant
-----------------------------------------------------------
 Add-on version: 1.4.1
 You are running the latest version of this add-on.
 System: Home Assistant OS 11.5  (amd64 / qemux86-64)
 Home Assistant Core: 2024.2.3
 Home Assistant Supervisor: 2024.02.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[14:10:13] INFO: Reading configuration settings...
[14:10:14] INFO: Starting bluetti-logger...
[14:10:14] INFO: Messages are NOT published to the MQTT broker in logger mode.
Traceback (most recent call last):
  File "/usr/local/bin/bluetti-logger", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/bluetti_mqtt/logger_cli.py", line 119, in main
    asyncio.run(log(args.address, args.log))
  File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.10/site-packages/bluetti_mqtt/logger_cli.py", line 55, in log
    devices = await check_addresses({address})
  File "/usr/local/lib/python3.10/site-packages/bluetti_mqtt/bluetooth/__init__.py", line 55, in check_addresses
    return [build_device(d.address, d.name) for d in filtered]
  File "/usr/local/lib/python3.10/site-packages/bluetti_mqtt/bluetooth/__init__.py", line 55, in <listcomp>
    return [build_device(d.address, d.name) for d in filtered]
  File "/usr/local/lib/python3.10/site-packages/bluetti_mqtt/bluetooth/__init__.py", line 28, in build_device
    if match[1] == 'AC200M':
TypeError: 'NoneType' object is not subscriptable
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Kathou99 avatar Feb 25 '24 19:02 Kathou99

Hi I also have the same problem with AC200L, you can't connect

filippo5589 avatar Apr 02 '24 18:04 filippo5589

IMG_0015

filippo5589 avatar Apr 02 '24 18:04 filippo5589

There are lots of changes required. Basically the AC200L is similar to the AC200M. There are some minor quirks but basically it uses the same code. One of the bigger problems though is that the mqtt code seems in need to be fixed. In my local version I had lots of issues getting it to work.

ftrueck avatar Apr 07 '24 11:04 ftrueck

@ftrueck were you able to get it to work? I have the same problem, and any insight you can give would be appreciated.

MikeWolfeGHC avatar Apr 17 '24 12:04 MikeWolfeGHC

There is this: https://github.com/warhammerkid/bluetti_mqtt/pull/106

I wonder if there are controls for ac input available.

tripzero avatar Apr 29 '24 17:04 tripzero

@MikeWolfeGHC Here is my working fork with support for AC200L:

https://github.com/ftrueck/bluetti_mqtt

ftrueck avatar May 03 '24 15:05 ftrueck

@tripzero there are controls for:

  • AC Output
  • DC Output
  • Power Off
  • Display Timeout

The input can not be changed at the moment.

ftrueck avatar May 03 '24 15:05 ftrueck

Thank you

Mike Wolfe Vice President - Technology George Harms Construction Co., Inc.


From: Florian Trück @.> Sent: Friday, May 3, 2024 11:29:55 AM To: warhammerkid/bluetti_mqtt @.> Cc: Mike Wolfe @.>; Mention @.> Subject: Re: [E] [warhammerkid/bluetti_mqtt] Suport for AC200L (Issue #104)

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

@MikeWolfeGHChttps://github.com/MikeWolfeGHC Here is my working fork with support for AC200L:

https://github.com/ftrueck/bluetti_mqtt

— Reply to this email directly, view it on GitHubhttps://github.com/warhammerkid/bluetti_mqtt/issues/104#issuecomment-2093246622, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALPIKC5DW2V4VLP2JV6KHBDZAOUPHAVCNFSM6AAAAABDZC2OLOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJTGI2DMNRSGI. You are receiving this because you were mentioned.Message ID: @.***>

MikeWolfeGHC avatar May 03 '24 16:05 MikeWolfeGHC

Hi, I can't make it work, can you help me? @Ftrueck I can't enter your repository. image

filippo5589 avatar May 03 '24 22:05 filippo5589

@tripzero there are controls for:

  • AC Output
  • DC Output
  • Power Off
  • Display Timeout

The input can not be changed at the moment.

Is that an bluetooth API thing or just we lack the right commands? I can't control it from the app, so I'm guessing it's the former...

tripzero avatar May 03 '24 22:05 tripzero

Hi, I can't make it work, can you help me? @ftrueck I can't enter your repository. image

What URL did you use? The URL I posted is only for the library, not the HA Addon. I have a rudimentary fork in my github for the HA Addon which just changes the origin of the library. But I can not test it at the moment, since my HA device is too far away from my bluetty AC200L, so I have no idea if it will work. If you want to give it a try. The repo URL for the addon is: https://github.com/ftrueck/bluetti2mqtt. There is no guarantee that it will work because i have no idea of docker currently. :-)

ftrueck avatar May 04 '24 07:05 ftrueck

@tripzero there are controls for:

  • AC Output
  • DC Output
  • Power Off
  • Display Timeout

The input can not be changed at the moment.

Is that an bluetooth API thing or just we lack the right commands? I can't control it from the app, so I'm guessing it's the former...

I think probably both. The protocol is not disclosed from bluetti. So everything needs to be reverse engineered by hand. I do not know if someone already found the needed commands. I guess they exist, since you can control the inputs over bluetooth with the official bluetti app.

ftrueck avatar May 07 '24 15:05 ftrueck