-
-
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 <[email protected]>
Signed-off-by: Stefan Triller <[email protected]>
Thanks for the review, I have fixed the format error as well and rebased against the latest |
Signed-off-by: Stefan Triller <[email protected]>
} | ||
|
||
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 <[email protected]> * Addressed review comments Signed-off-by: Stefan Triller <[email protected]> * Spotless run again Signed-off-by: Stefan Triller <[email protected]> Signed-off-by: Dave J Schoepel <[email protected]>
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 <[email protected]> * Addressed review comments Signed-off-by: Stefan Triller <[email protected]> * Spotless run again Signed-off-by: Stefan Triller <[email protected]>
openhab#11216) * Implement Vacuum discovery for Homeassistant MQTT Closes openhab#8988 Signed-off-by: Stefan Triller <[email protected]> * Addressed review comments Signed-off-by: Stefan Triller <[email protected]> * Spotless run again Signed-off-by: Stefan Triller <[email protected]> Signed-off-by: Nick Waterton <[email protected]>
openhab#11216) * Implement Vacuum discovery for Homeassistant MQTT Closes openhab#8988 Signed-off-by: Stefan Triller <[email protected]> * Addressed review comments Signed-off-by: Stefan Triller <[email protected]> * Spotless run again Signed-off-by: Stefan Triller <[email protected]> Signed-off-by: Michael Schmidt <[email protected]>
openhab#11216) * Implement Vacuum discovery for Homeassistant MQTT Closes openhab#8988 Signed-off-by: Stefan Triller <[email protected]> * Addressed review comments Signed-off-by: Stefan Triller <[email protected]> * Spotless run again Signed-off-by: Stefan Triller <[email protected]>
openhab#11216) * Implement Vacuum discovery for Homeassistant MQTT Closes openhab#8988 Signed-off-by: Stefan Triller <[email protected]> * Addressed review comments Signed-off-by: Stefan Triller <[email protected]> * Spotless run again Signed-off-by: Stefan Triller <[email protected]>
openhab#11216) * Implement Vacuum discovery for Homeassistant MQTT Closes openhab#8988 Signed-off-by: Stefan Triller <[email protected]> * Addressed review comments Signed-off-by: Stefan Triller <[email protected]> * Spotless run again Signed-off-by: Stefan Triller <[email protected]>
Closes #8988
Automatically discovers vacuum robots running on Valetudo (RE) with enabled MQTT
Signed-off-by: Stefan Triller [email protected]