feat(#267): expose TUTK/Kalay camera credentials as Granary camera feeder attributes - #269
Open
dennismdejong wants to merge 3 commits into
Open
feat(#267): expose TUTK/Kalay camera credentials as Granary camera feeder attributes#269dennismdejong wants to merge 3 commits into
dennismdejong wants to merge 3 commits into
Conversation
…y camera feeder attributes
…utk_info refresh, scope attrs to wifi_ssid
Contributor
Author
|
@jjjonesjr33 @Sarcaris2000 PR is open for the TUTK/Kalay camera credential exposure discussed in #267. Scope is deliberately minimal (credential attributes + docs, no full camera platform). @Sarcaris2000 — thanks again for confirming the endpoint shapes; if you want to verify the attributes against your shared-account setup once merged, that would be great. |
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.
Summary
Closes #267 — expose the Granary Smart Camera Feeder's TUTK/Kalay camera credentials as sensor attributes so users can use them with external TUTK clients (e.g. go2rtc) to stream the feed locally.
The issue author verified that
POST /member/third/tutk/info(empty payload) works for both primary and shared accounts, returningdata.userToken+data.appTutkUrl. ThecameraId(20-char Kalay UID) comes from the device record, andcameraAuthInfofromrealInfo.Changes
api.py: newtutk_info()method for/member/third/tutk/info(account-scoped, empty payload)granary_smart_camera_feeder.py:camera_id,camera_auth_info,tutk_user_token,tutk_app_url,enable_camera,camera_switch,motion_detection_switch,sound_detection_switchsensor.py: exposes these as attributes on thewifi_ssidsensor entity of the device (single entity, not duplicated across all sensors)README.md: note documenting the exposed credentialsScope
This deliberately does not build a full camera platform (would require bundling the IOTC SDK / go2rtc bridge). It provides the credential layer every streaming approach needs. IOTC/streaming README depth left to the maintainer's judgment.
Review feedback applied
TypeErrorfrom mergingextra_state_attributeswhen HA returnsNonetutk_infoin refresh so a failed call degrades gracefullywifi_ssid) to avoid duplicating credentials across ~15 sensorsserialparameter (endpoint is account-scoped)