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

bluetti-mqtt: error: TypeError: 'NoneType' object is not subscriptable 2023-11-20 14:47:38 INFO Shutting down... #92

Open
tonuzzo opened this issue Nov 20, 2023 · 1 comment

Comments

@tonuzzo
Copy link

tonuzzo commented Nov 20, 2023

Hi, i'm trying to connect and i see Bluetti:
C:\WINDOWS\system32>bluetti-mqtt --scan
We renamed asyncio-mqtt to aiomqtt and released a version 1.0.0 in the process. This is the last release under the asyncio-mqtt name. You can find the new repository at https://github.com/sbtinstruments/aiomqtt
Scanning....
Found AC300222100047XXXX: address 04:7F:0E:93XX:XX

but when a try:

C:\WINDOWS\system32>bluetti-mqtt --broker 192.168.1.34 --username mqttuser --password mqttpassword --interval 10 04:7F:0E:93:XX:XX
We renamed asyncio-mqtt to aiomqtt and released a version 1.0.0 in the process. This is the last release under the asyncio-mqtt name. You can find the new repository at https://github.com/sbtinstruments/aiomqtt
2023-11-20 21:49:41 INFO Connecting to MQTT broker...
2023-11-20 21:49:41 INFO Starting to poll clients...
2023-11-20 21:49:41 INFO Connecting to clients: ['04:7F:0E:93:XX:XX']
2023-11-20 21:49:41 INFO Connected to MQTT broker
2023-11-20 21:49:41 WARNING filtered_messages() is deprecated and will be removed in a future version. Use messages() together with Topic.matches() instead.
2023-11-20 21:49:50 INFO Connected to device: 04:7F:0E:93:XX:XX
2023-11-20 21:49:50 INFO Device 04:7F:0E:93:XX:XX has name: AC300222100047XXXX

2023-11-20 21:49:51 ERROR Crashing with uncaught exception:
Traceback (most recent call last):

File "C:\Program Files\Python312\Lib\site-packages\bluetti_mqtt\device_handler.py", line 31, in run
await asyncio.gather(*(polling_tasks + pack_polling_tasks + [manager_task]))
File "C:\Program Files\Python312\Lib\site-packages\bluetti_mqtt\device_handler.py", line 65, in _pack_poll
device = self._get_device(address)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\site-packages\bluetti_mqtt\device_handler.py", line 103, in get_device
self.devices[address] = build_device(address, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\site-packages\bluetti_mqtt\bluetooth_init
.py", line 28, in build_device
if match[1] == 'AC200M':
~~~~~^^^
TypeError: 'NoneType' object is not subscriptable
2023-11-20 21:49:51 INFO Shutting down...

In Home Assistant i don't see entities and topics...Tomorrow i'll try to approach server to bluetti
Thanks

@tonuzzo tonuzzo changed the title bluetti-mqtt: error: unrecognized arguments: 04:7F:0E:93:XX:XX bluetti-mqtt: error: TypeError: 'NoneType' object is not subscriptable 2023-11-20 14:47:38 INFO Shutting down... Nov 20, 2023
@tonuzzo
Copy link
Author

tonuzzo commented Nov 22, 2023

2023-11-22 10:50:02 WARNING filtered_messages() is deprecated and will be removed in a future version. Use messages() together with Topic.matches() instead.

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

1 participant