Manager un Bluetti

Bonjour à tous,
J’utilise une power station de la marque Bluetti la AC200MAX.
En cherchant sur le net j’ai trouvé une possibilité de la manager en bluetooth
Cela peut se faire via un script python. Je vous mets ci-dessous la procédure d’installation. Il y a une commande à faire « pip install bluetti_mqtt ». Je ne sais pas comment installer ce script.
Quelqu’un veux bien me donner un petit coup de main.
Merci d’avance.

============
bluetti_mqtt

This tool provides an MQTT interface to Bluetti power stations. State will be
published to the bluetti/state/[DEVICE NAME]/[PROPERTY] topic, and commands
can be sent to the bluetti/command/[DEVICE NAME]/[PROPERTY] topic.

Installation

… code-block:: bash

$ pip install bluetti_mqtt

Usage

… code-block:: bash

$ bluetti-mqtt --scan
Found AC3001234567890123: address 00:11:22:33:44:55
$ bluetti-mqtt --broker [MQTT_BROKER_HOST] 00:11:22:33:44:55

If your MQTT broker has a username and password, you can pass those in.

… code-block:: bash

$ bluetti-mqtt --broker [MQTT_BROKER_HOST] --username username --password pass 00:11:22:33:44:55

By default the device is polled as quickly as possible, but if you’d like to
collect less data, the polling interval can be adjusted.

… code-block:: bash

# Poll every 60s
$ bluetti-mqtt --broker [MQTT_BROKER_HOST] --interval 60 00:11:22:33:44:55

If you have multiple devices within bluetooth range, you can monitor all of
them with just a single command. We can only talk to one device at a time, so
you may notice some irregularity in the collected data, especially if you have
not set an interval.

… code-block:: bash

$ bluetti-mqtt --broker [MQTT_BROKER_HOST] 00:11:22:33:44:55 00:11:22:33:44:66

Background Service

If you are running on a platform with systemd, you can use the following as a
template. It should be placed in /etc/systemd/system/bluetti-mqtt.service.
Once you’ve written the file, you’ll need to run
sudo systemctl start bluetti-mqtt. If you want it to run automatically after
rebooting, you’ll also need to run sudo systemctl enable bluetti-mqtt.

… code-block:: bash

[Unit]
Description=Bluetti MQTT
After=network.target
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=30
TimeoutStopSec=15
User=your_username_here
ExecStart=/home/your_username_here/.local/bin/bluetti-mqtt --broker [MQTT_BROKER_HOST] 00:11:22:33:44:55

[Install]
WantedBy=multi-user.target

Home Assistant Integration

If you have configured Home Assistant to use the same MQTT broker, then by
default most data and switches will be automatically configured there. This is
possible thanks to Home Assistant’s support for automatic MQTT discovery, which
is enabled by default with the discovery prefix of homeassistant.

This can be controlled with the --ha-config flag, which defaults to
configuring most fields (« normal »). Home Assistant MQTT discovery can also be
disabled, or additional internal device fields can be configured with the
« advanced » option.

Reverse Engineering

For research purposes you can also use the bluetti-logger command to poll the
device and log in a standardised format.

… code-block:: bash

$ bluetti-logger --log the-log-file.log 00:11:22:33:44:55

While the logger is running, change settings on the device and take note of the
time when you made the change, waiting ~ 1 minute between changes. Note that
not every setting that can be changed on the device can be changed over
bluetooth.

If you’re looking to add support to control something that the app can change
but cannot be changed directly from the device screen, both iOS and Android
support collecting bluetooth logs from running apps. Additionally, with the
correct hardware Wireshark can be used to collect logs. With these logs and a
report of what commands were sent at what times, this data can be used to
reverse engineer support.

Salut,

En fait il manque le principal : c’est quoi ton installation…
Dans une installation HAOS, ajouter du python à coté, c’est pas la peine d’y penser.
Dans une installation supervised, c’est jouable mais il faut bien connaitre quand même et si tu pose la question ici, c’est pas bon signe
Dans une installation core/container ça marcherai aussi mais c’est aussi compliqué, voir pire.

Mon HAOS est sous proxmox. J’étais parti de la version HAOS 8.5
Ma version actuelle est la suivante
Home Assistant 2022.12.8
Supervisor 2022.12.1
Operating System 9.4
Interface utilisateur : 20221213.1 - latest

Donc c’est mort, tu es dans le cas 1

Par contre tu as de la chance, il doit être possible de monter une VM dédiée à ta station, une base debian et d’appliquer le tuto. en utilisant le MQTT commun avec HA ça suffira à faire le lien.
Au moins tu ne cassera rien de l’existant

justement mes jeedom sont sous debian bulleyes donc je peux faire une install dessus et faire le lien comme tu me le propose.

Bof… Bidouiller sur jeedom ça a toujours été un souci à l’époque où je jouais avec…
ça ne coute pas plus cher de faire une VM à part et c’est bien plus efficace. La seule contrainte c’est d’avoir une clé bluetooh que tu peux rattacher.
Et partager la clé bluetooth avec jeedom, c’est pas envisageable non plus

j’ai une clé usb sena 100 de dispo je vais voir pour me monter cela.
Merci à toi pour ton aide