Conversation
Dom.ru now exposes cameras of neighboring entrances via
/rest/v1/places/{placeId}/screen-sections (viewable with a Pro
subscription). The home page loads that endpoint per place and renders
one card per camera, with its own Home Assistant snippet.
Cameras are matched by externalCameraId / forpostGroupId instead of the
array index, which broke with more than one place or camera.
Door permissions are taken from /rest/v1/places/{placeId}/accesscontrols:
after a subscription the embedded list in subscriberplaces advertises
allowOpen for neighboring doors that cannot actually be opened. Neighbor
cards never get an "Open" button.
Extra endpoints failing (or 404 on operators without screen-sections)
degrade gracefully: the basic camera list stays visible.
This was referenced Sep 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Что сделано
Дом.ру начал отдавать камеры соседних подъездов через
/rest/v1/places/{placeId}/screen-sections(просмотр доступен по подписке Pro. Этот PR выводит их на главную страницу.screen-sectionsи/rest/v1/places/{placeId}/accesscontrols(pkg/domru/apiWrapper.go, новые модели).cmd/controllers/home_cameras.go,templates/home.html.tmpl).externalCameraId/forpostGroupId, а не по индексу в массиве — старый шаблон подставлял чужую камеру, как только адресов или камер становилось больше одного./accesscontrols: после подключения подписки встроенный список вsubscriberplacesотдаётallowOpen: trueдля соседних дверей, которые на самом деле открыть нельзя (проверено на живом API). У карточек соседей кнопки «Открыть» нет никогда.screen-sections, базовый список камер всё равно рендерится, а ошибка показывается на странице.preпереносят длинные URL вместо горизонтального скролла.Проверка
cmd/controllers/home_cameras_test.go: сопоставление по ID между адресами, права по подписке, дедупликация между старым и новым списками, деградация при 404/403/503, экранирование и условный рендер шаблона./stream/{id}; кнопка открытия есть только у своего домофона.