rand256 / valetudo

Valetudo RE - experimental vacuum software, cloud free
Apache License 2.0
667 stars 73 forks source link

Home Assistant No device integration problem but only entities #316

Closed dckiller51 closed 3 years ago

dckiller51 commented 3 years ago

Describe the bug

Automatic integration in Home assistant does not create an additional device but an entities

How to Reproduce

Expected behavior

cbdcd8a435bc2bd64afd9fb402196120fd445a1b

my problem

Screenshots

2ccb2b59211ecf01700941b5b1375bc21d545182 63579e534728ad19b0dfc9a9cd288570075b6a65 669b825387f8e2511dea5d7cb6d9a242db8e7188 02a20f48d526f31e7cda1875ab110b045c3b038c_2_1035x690

Vacuum Model: GEN2 S50 Valetudo Version: Valetudo RE V 0.9.8.2 User-Agent

Additional context

dckiller51 commented 3 years ago

Hello,

Can you give me feedback for Home Assistant users? Maybe I'm doing a bad integration. Should we add an MQTT Vaccum component? Because I left in automatic.

Thank you for your help.

rand256 commented 3 years ago

I personally have no idea how to use Home Assistant. You may want to consult origin Valetudo instructions about MQTT and HA, they shouldn't differ much from RE in that case (at least they didn't when I followed their changes).

dckiller51 commented 3 years ago

Personnellement, je ne sais pas comment utiliser Home Assistant. Vous voudrez peut-être consulter les instructions d'origine Valetudo sur MQTT et HA, elles ne devraient pas différer beaucoup de RE dans ce cas (du moins elles ne l'ont pas fait lorsque j'ai suivi leurs modifications).

Hello,

Here is the difference with Valetudo 0.6.1. I think it's just missing the device part.

Device integration OK

{ "name": "rockrobo", "unique_id": "rockrobo", "device": { "manufacturer": "Beijing Roborock Technology Co., Ltd.", "model": "S5", "name": "rockrobo", "identifiers": [ "rockrobo" ], "sw_version": "0.6.1" }, "schema": "state", "supported_features": [ "start", "pause", "stop", "return_home", "battery", "status", "locate", "clean_spot", "fan_speed", "send_command" ], "command_topic": "valetudo/rockrobo/command", "state_topic": "valetudo/rockrobo/state", "set_fan_speed_topic": "valetudo/rockrobo/set_fan_speed", "fan_speed_list": [ "off", "low", "medium", "high", "max" ], "send_command_topic": "valetudo/rockrobo/custom_command", "json_attributes_topic": "valetudo/rockrobo/attributes", "availability_topic": "valetudo/rockrobo/status" }

NOK

{ "name": "xiaomi_vacuum_cleaner", "unique_id": "xiaomi_vacuum_cleaner", "schema": "state", "supported_features": [ "start", "pause", "stop", "return_home", "battery", "status", "locate", "clean_spot", "fan_speed", "send_command" ], "command_topic": "valetudo/xiaomi_vacuum_cleaner/command", "state_topic": "valetudo/xiaomi_vacuum_cleaner/state", "set_fan_speed_topic": "valetudo/xiaomi_vacuum_cleaner/set_fan_speed", "fan_speed_list": [ "min", "medium", "high", "max", "mop" ], "send_command_topic": "valetudo/xiaomi_vacuum_cleaner/custom_command", "json_attributes_topic": "valetudo/xiaomi_vacuum_cleaner/attributes" }

dckiller51 commented 3 years ago

@rand256
To complete my research how to add this to your config.

lib/miio/Model.js

vacuum: { name: this.identifier, unique_id: this.identifier, device: { manufacturer: this.model.getManufacturerName(), model: this.model.getModelName(), name: this.identifier, identifiers: [this.identifier], sw_version: this.model.getValetudoVersion() },

Thanks

rand256 commented 3 years ago

Here is the difference with Valetudo 0.6.1. I think it's just missing the device part.

Well, yeah, then they did reworked that. It's also missing "availability_topic" it seems, but since I never used HA and neither read its docs, I don't know what is obligatory and what is optional there.

To complete my research how to add this to your config.

Autoconf payload is defined here.

dckiller51 commented 3 years ago

Do you have the possibility to add it in your future update?

rand256 commented 3 years ago

Yes, if that will make it work.

rand256 commented 3 years ago

I've made a test build which includes "device" section added to homeassistant autoconf topic. Please try it and report whether this helps.

How to check:

  1. Download and unpack the test app to i.e. /mnt/data/valetudo;
  2. Stop currently running service by running /etc/init/S11valetudo stop (on 2008+ fw);
  3. Run the test app by typing /mnt/data/valetudo/valetudo plus <Enter>;
  4. ...
  5. Then stop the test app by pressing Ctrl+C;
  6. Restart the common service by running /etc/init/S11valetudo start (on 2008+ fw);
  7. Remove the test app.

Still, maybe something else is needed to be added, idk

dckiller51 commented 3 years ago

I've made a test build which includes "device" section added to homeassistant autoconf topic. Please try it and report whether this helps.

How to check:

  1. Download and unpack the test app to i.e. /mnt/data/valetudo;
  2. Stop currently running service by running /etc/init/S11valetudo stop (on 2008+ fw);
  3. Run the test app by typing /mnt/data/valetudo/valetudo plus ;
  4. ...
  5. Then stop the test app by pressing Ctrl+C;
  6. Restart the common service by running /etc/init/S11valetudo start (on 2008+ fw);
  7. Remove the test app.

Still, maybe something else is needed to be added, idk

Hello,

Hello, I have tested on my S50 Firmw 2020. It works fine. Below are screenshots.

On the other hand, would it be possible to attach valetudo-mapper with. device Sans titre Sans titre1

Thank you for starting your testing.