Skip to content
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

Obstacle View - Missing IP address #294

Closed
sca075 opened this issue Dec 5, 2024 · 7 comments · Fixed by #298
Closed

Obstacle View - Missing IP address #294

sca075 opened this issue Dec 5, 2024 · 7 comments · Fixed by #298
Assignees

Comments

@sca075
Copy link
Owner

sca075 commented Dec 5, 2024

Reported by @marvinwankersteen.

Where does the IP address/hostname from which HA downloads the image come from? Because mine says:

obstacles: 
- point:
    x: 2978
    'y': 2450
  label: Obstacle (70%)
  link: >-
    http://None/api/v2/robot/capabilities/ObstacleImagesCapability/img/cc948342-e069-5d68-aab3-8c8cf93e75ab

HA logs:

2024-12-05 18:20:43.315 ERROR (ThreadPoolExecutor-6_0) [custom_components.mqtt_vacuum_camera.camera] Error downloading image: Cannot connect to host none:80 ssl:default [Domain name not found]

My workaround in HA currently looks like this:

grep none /etc/hosts
<ip-of-robot> none

Originally posted by @marvinwankersteen in #286 (comment)

@sca075 sca075 self-assigned this Dec 5, 2024
@marvinwankersteen
Copy link

marvinwankersteen commented Dec 5, 2024

@sca075

The IP is normally in the wifiCapability of the vacuum

Hm, do you mean this mqtt topic? vacuum/robo2/WifiConfigurationCapability/ips

It's set with the right ip address.

Also in this sensor.valetudo_robo2_wi_fi_configuration:

ssid: <my-ssid>
ips:
  - <ip-of-robot>
frequency: 2.4ghz
signal: -46
unit_of_measurement: dBm
device_class: signal_strength
icon: mdi:wifi
friendly_name: robo2 Wi-Fi configuration

@sca075
Copy link
Owner Author

sca075 commented Dec 5, 2024

@marvinwankersteen yes you are correct.. the topic is setup in the const.py and it is correct according to the code. But I had to set a filter as sometime there is IPv4,IPv6 so or I have a bug on this filter or something else is happening. As mentioned earlier an option to solve this would be to use the api instead (url to the robot in the MQTT config) in the case for some reason this subscription fails to get this value.

DECODED_TOPICS = {
"/MapData/segments",
"/maploader/map",
"/maploader/status",
"/StatusStateAttribute/status",
"/StatusStateAttribute/error_description",
"/$state",
"/BatteryStateAttribute/level",
"/WifiConfigurationCapability/ips",
"/state", # Rand256
"/destinations", # Rand256
"/command", # Rand256
"/custom_command", # Rand256
"/attributes", # Rand256
}
# self.command_topic need to be added to this dictionary after init.
NON_DECODED_TOPICS = {
"/MapData/map-data",
"/map_data",
}

@marvinwankersteen
Copy link

Ah, I see. Thanks for the explanation.

@sca075 sca075 linked a pull request Dec 6, 2024 that will close this issue
@sca075
Copy link
Owner Author

sca075 commented Dec 7, 2024

@marvinwankersteen Well I found the issue... and the fix will be out in the next hours.

sca075 added a commit that referenced this issue Dec 7, 2024
@marvinwankersteen
Copy link

marvinwankersteen commented Dec 7, 2024

@sca075 Thanks. It works now. 👍

But, I think you forgot to disable the test_mode?

WARNING (SyncWorker_7) [custom_components.mqtt_vacuum_camera.utils.files_operations] custom_components/mqtt_vacuum_camera/snapshots/test.json does not exist.

Camera works again, if I switch to:

parsed_json, is_a_test = await self._process_parsed_json()

160131b#diff-2e991099dcf931a19afd7fcd2767966705cff1bb28f061454d1019996c723fd3R501

@sca075
Copy link
Owner Author

sca075 commented Dec 7, 2024

@marvinwankersteen thanks a lot.. changed the package for the new downloads.. removing the True from there.

@sca075
Copy link
Owner Author

sca075 commented Dec 7, 2024

@marvinwankersteen please do not forget to let me know also if the Obstacle View has problems as reported on #295 thanks for your feedback and have a nice weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants