Closed NODeeJay closed 1 year ago
@NODeeJay thanks for the report, do you use the MQTT_add on of Home Assistant or MQTT is on another machine? If during the setup of the camera you configured the Broker Host Name this your config there must be external MQTT machine IP or Host Name, by default the camera point to the HA Broker ADD on host name that is "core-mosquitto". It would be appreciated the the full log you got to better understand what is going on. We did confirm that the Json is correctly grabbed and as per you are in HA OS I guess you run under docker and you use the HA Broker Addon, is that correct? Additionally, I guess later today will release a fix for the rooms configurations. I can add some additional log entry of course to trouble shoot your reported issue. Sorry for the inconvenience so far... I guess on your kind understanding this add on is growing up, and there are several different install way of HA (and way to setup the broker), we are working also on a method to simplify the MQTT client setup and automate it so that this kind of inconveniences would not happen in the future (generically it works but as you experienced can be a little technical to install it). Thanks in advance for your kind help and consideration.
@NODeeJay thanks for the report, do you use the MQTT_add on of Home Assistant or MQTT is on another machine?
I configured core-mosquitto
, I use the internal standard MQTT, no fancy new version or external broker running somewhere.
I played a bit further around, using the connection with SSL core-mosquitto:8883
or the hostname I use from the robot, with or without port and SSL. It seems that the port is not processed at all but I did not check it in the code. Also with SSL it seems not to connect at all to the broker. The FQDN or core-mosquitto as host did not make any difference, I see the client connection in the MQTT broker log, which corresponds to the log entry from the component.
I am still wondering why there are so many reconnects in a short time?
2023-08-26 14:10:55.366 DEBUG (Thread-1538 (_thread_main)) [custom_components.valetudo_vacuum_camera.valetudo.connector] Subscribed to MQTT broker with topic: valetudo/Robi
2023-08-26 14:10:56.370 DEBUG (Thread-1538 (_thread_main)) [custom_components.valetudo_vacuum_camera.valetudo.connector] Subscribed to MQTT broker with topic: valetudo/Robi
2023-08-26 14:10:58.375 DEBUG (Thread-1538 (_thread_main)) [custom_components.valetudo_vacuum_camera.valetudo.connector] Subscribed to MQTT broker with topic: valetudo/Robi
2023-08-26 14:11:00.638 WARNING (MainThread) [homeassistant.components.sensor] Updating snmp sensor took longer than the scheduled update interval 0:00:05
2023-08-26 14:11:00.648 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.hplj2055dn_printer_status_code is taking over 10 seconds
2023-08-26 14:11:00.653 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.hplj2055dn_printer_error_code is taking over 10 seconds
2023-08-26 14:11:02.379 DEBUG (Thread-1538 (_thread_main)) [custom_components.valetudo_vacuum_camera.valetudo.connector] Subscribed to MQTT broker with topic: valetudo/Robi
2023-08-26 14:11:05.638 WARNING (MainThread) [homeassistant.components.sensor] Updating snmp sensor took longer than the scheduled update interval 0:00:05
2023-08-26 14:11:10.383 DEBUG (Thread-1538 (_thread_main)) [custom_components.valetudo_vacuum_camera.valetudo.connector] Subscribed to MQTT broker with topic: valetudo/Robi
Which full log do you mean?
From what I understand, the newly created entity camera.robi_camera
should show me the map rotated as per configuration?
No worries, you started a great piece of work and am very happy to try it and get it running. Thank you for your support!
Probably I know what is the issue.. the user name and password you need to use are the same one you use to connect the vacuum to MQTT. the user name homeassistant is reserved to home assistant so the client can't connect your MQTT broker for this reason:
Just let me if this is the way you already use or what is the result after using those credentials. If I'm correct you followed to the letter the instructions, this would means I will need to update the documentation instead of the integration :) Thanks once again for time, regards.
Right you are that is the issue. I used the same credentials as for the robi and it worked immediately. Strange, that I have other addons and integrations that connect fine with the homeassistant user.
Thank you for your help, the card is streaming fine into Piotrs card :-)
It is currently a work in progress soon it will be not required thanks to @rohankapoorcom
Checklist
The problem
I tried to get the valetudo map displayed in the Xiaomi add-on from Piotr. I followed the instructions and installed both add-ons. I configured the camera with my MQTT provider, but it seems not to create an image at all.
I enabled debug logging and see the addon connecting to MQTT and subscribe to the correct topic:
2023-08-25 22:20:55.594 DEBUG (Thread-107 (_thread_main)) [custom_components.valetudo_vacuum_camera.valetudo.connector] Subscribed to MQTT broker with topic: valetudo/Robi
but when the image comes:
it does not seem to get further processed by the component, at least I am missing
_LOGGER.debug("Received " + self._mqtt_topic + " image data from MQTT")
which I found in the connector. Also the snapshot directory in the customer_component folder is empty.In
custom:valetudo-map-card
the image works fine, which is also saved from the mqtt message.Can I somehow increase the logging even more? Any idea how to troubleshoot that? Is it because it's an S5 Max? But shouldn't Valetudo provide the map in valetudo form/as PNG?
What version of an integration has described problem?
1.3.4
What was the last working version of an integration?
No response
What vacuum model do you have problems with?
Roborock.S5Max
Please firmware installed on your Vacuum.
2023.08.0
What version of Home Assistant do you use?
2023.8.4
What type of installation are you running?
Home Assistant OS
Camera's configuration
Logs or Errors shown in the HA snapshots (please enable the Debug Mode)
Additional information
I noticed the component re-registers sporadically several times within a minute a couple of times quickly after each other (~5 - 20 seconds) I get
[custom_components.valetudo_vacuum_camera.valetudo.connector] Subscribed to MQTT broker with topic: valetudo/Robi
but there is no connection closure_LOGGER.debug(self._mqtt_topic + ": Stopped and disconnected from MQTT broker.")
before, as when I disable the configured camera and re-enable it.