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

Longitude & latitude attributes of stream entity break map in sidebar - C210 #302

Closed
Xlinx64 opened this issue Mar 28, 2023 · 7 comments
Closed
Labels
Bug Something isn't working
Milestone

Comments

@Xlinx64
Copy link

Xlinx64 commented Mar 28, 2023

Description

Because the HD and SD stream have Longitute and latitude values in the attributes they are messing with the map in the sidebar. The map is completely zoomed out and you see the whole world.
As a test I removed the values from the attribute via the developer settings and the map started to work again.
It would already help to rename these values.

Reproduction Steps

  1. Enable the HD or SD Stream in Home assistant.
  2. Via the left pane open the Map
  3. The map is completely zoomed out and unusable

Expected behavior

The stream entity should not mess with the map.

If applicable, add error logs.

No response

Device Firmware

1.3.0 Build 220830

Using stream component

Yes

Does camera work via official integrations?

N/A

Camera has all attributes filled out in developer tools

Yes

HASS Environment

Home Assistant OS on ODROID N2+

Search for similar issues

Yes

Additional information

Bildschirm­foto 2023-03-28 um 15 37 24

@JurajNyiri
Copy link
Owner

JurajNyiri commented Mar 29, 2023

My C200s do not expose anything like this. Is this possible to be set up via the Tapo app?
What is the value of the properties?

@JurajNyiri JurajNyiri added the Bug Something isn't working label Mar 29, 2023
@Xlinx64
Copy link
Author

Xlinx64 commented Mar 29, 2023

The camera is set up via the Tapo app.
The properties look like this

longitude: 164903
latitude: 484042

@AndreiArdelean1
Copy link

I have the same issue with C225

@Benny2102
Copy link

Same here (C210,C110)
I found a solution on the HA forum. Now it doesn't interfere with the map. I deleted the cameras and re-added them to the home assistant after the change.

V 5.0.0
custom_components\tapo_control\camera.py

  1. self._attr_extra_state_attributes["longitude"] = 0
  2. self._attr_extra_state_attributes["latitude"] = 0
  3. self._attr_extra_state_attributes["has_set_location_info"] = 0

@skgsergio
Copy link

skgsergio commented Apr 26, 2023

I'm having the same issue with two C210, I removed the cameras from HA and re-added them and nothing changed.

One camera has "longitude: 0", "latitude: 0", and "has_set_location_info: 0" and the other "longitude: -XXXXX", "latitude: XXXXXX", and "has_set_location_info: 1". I did not set, at least intentionally, any location in Tapo app, and both cameras were configured on the same day... But lat/lng is actually the lat/lng of my home without the decimal separator.

Edit:
I've noticed that the only different thing is that the camera with lat/lng was added to a room inside the Tapo app and the other was not, but I've tried either adding the one without lat/lng to a room and removing the camera with lat/lng from the room and nothing changed (even re-configuring the camera in HA in each step to see if it was related).

@skgsergio
Copy link

Managed to get rid of the location, I've rejected Tapo App location permissions, deleted the camera from Tapo app, and re-added it. Then I reconfigured Tapo Control in Home Assistant.

Looks like it sets the location when you configure the camera in Tapo app, which makes sense to me since this camera is near a window and the other is deep inside the house where there is no GPS signal and was the first I've configured.

JurajNyiri added a commit that referenced this issue Apr 27, 2023
Fix #302: Longitude & latitude attributes of stream entity break map …
@JurajNyiri JurajNyiri added this to the 5.1.6 milestone Apr 27, 2023
@JurajNyiri
Copy link
Owner

Fixed in https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/releases/tag/5.1.6 available with May HA release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants