-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[mqtt.homeassistant] Implement Vacuum discovery for Homeassistant MQTT #11216
Conversation
There's a conflict due to the last commit to mqtt.homeassistant. |
@fwolter I have rebased my changes and resolved the conflict. |
*/ | ||
@NonNullByDefault | ||
public class Vacuum extends AbstractComponent<Vacuum.ChannelConfiguration> { | ||
public static final String vacuumStateChannelID = "state"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Constants should be all upper case.
} | ||
|
||
protected @Nullable String command_topic; | ||
protected String state_topic = ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normal members should be camelCase.
Closes openhab#8988 Signed-off-by: Stefan Triller <github@stefantriller.de>
Signed-off-by: Stefan Triller <github@stefantriller.de>
Thanks for the review, I have fixed the format error as well and rebased against the latest |
Signed-off-by: Stefan Triller <github@stefantriller.de>
} | ||
|
||
protected @Nullable String commandTopic; | ||
protected String stateTopic = ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work?
Don't we need a @SerializedName("state_topic") vor the deserialization to work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yes!
Thank you very much. I have overlooked this and just blindly integrated the review comments as I knew they made sense in a way that there are styles on how to name variables.
I have created a small PR to fix this: #11550
openhab#11216) * Implement Vacuum discovery for Homeassistant MQTT Closes openhab#8988 Signed-off-by: Stefan Triller <github@stefantriller.de> * Addressed review comments Signed-off-by: Stefan Triller <github@stefantriller.de> * Spotless run again Signed-off-by: Stefan Triller <github@stefantriller.de> Signed-off-by: Dave J Schoepel <dave@theschoepels.com>
Hi, Could you please show where you found specification of status attributes, like time or usage counters? I have a branch with mqtt.vacuum specification fully implemented: https://github.com/antroids/openhab-addons/tree/mqtt_vacuum |
I have used https://www.home-assistant.io/integrations/vacuum.mqtt/ and he output of my valetudo running vacuum cleaners :)
You are right! Just when I had finished my implementation and when I was searching for possibilities to overcome the map rotation issues in the robots, I also saw that valetudo has changed the mqtt schema to homie. But that shouldn't be an issue, since we could also implement this too.
I didn't know that. How can one know this if you do not leave a comment on the issue that I have closed? and why did you not create a PR yourself earlier or have commented on mine? Anyway, feel free to add your stuff from your branch, which is missing in my implementation. I mean, in the end this is how OSS works, right? :) |
Maybe you have a mqtt messages from new Valetudo version? |
openhab#11216) * Implement Vacuum discovery for Homeassistant MQTT Closes openhab#8988 Signed-off-by: Stefan Triller <github@stefantriller.de> * Addressed review comments Signed-off-by: Stefan Triller <github@stefantriller.de> * Spotless run again Signed-off-by: Stefan Triller <github@stefantriller.de>
openhab#11216) * Implement Vacuum discovery for Homeassistant MQTT Closes openhab#8988 Signed-off-by: Stefan Triller <github@stefantriller.de> * Addressed review comments Signed-off-by: Stefan Triller <github@stefantriller.de> * Spotless run again Signed-off-by: Stefan Triller <github@stefantriller.de> Signed-off-by: Nick Waterton <n.waterton@outlook.com>
openhab#11216) * Implement Vacuum discovery for Homeassistant MQTT Closes openhab#8988 Signed-off-by: Stefan Triller <github@stefantriller.de> * Addressed review comments Signed-off-by: Stefan Triller <github@stefantriller.de> * Spotless run again Signed-off-by: Stefan Triller <github@stefantriller.de> Signed-off-by: Michael Schmidt <mi.schmidt.83@gmail.com>
openhab#11216) * Implement Vacuum discovery for Homeassistant MQTT Closes openhab#8988 Signed-off-by: Stefan Triller <github@stefantriller.de> * Addressed review comments Signed-off-by: Stefan Triller <github@stefantriller.de> * Spotless run again Signed-off-by: Stefan Triller <github@stefantriller.de>
openhab#11216) * Implement Vacuum discovery for Homeassistant MQTT Closes openhab#8988 Signed-off-by: Stefan Triller <github@stefantriller.de> * Addressed review comments Signed-off-by: Stefan Triller <github@stefantriller.de> * Spotless run again Signed-off-by: Stefan Triller <github@stefantriller.de>
openhab#11216) * Implement Vacuum discovery for Homeassistant MQTT Closes openhab#8988 Signed-off-by: Stefan Triller <github@stefantriller.de> * Addressed review comments Signed-off-by: Stefan Triller <github@stefantriller.de> * Spotless run again Signed-off-by: Stefan Triller <github@stefantriller.de>
Closes #8988
Automatically discovers vacuum robots running on Valetudo (RE) with enabled MQTT
Signed-off-by: Stefan Triller github@stefantriller.de