TagoTiP service for sending device commands - #67
Merged
Conversation
Wrap POST /tip/cmd behind services.tagotip.cmd({serial, protocol, body}) using a Service Authorization token.
FabianoEger
self-requested a review
August 18, 2026 13:27
FabianoEger
approved these changes
Aug 18, 2026
FabianoEger
left a comment
Member
There was a problem hiding this comment.
Approve
Clean port of the JS TagoTiP service; request shape, token note, and test match the API.
In this PR
Improvements
docs/source/Services/index.rst:200: add a blank line before the TagoTiP heading. Every other service section has one; without it RST treats the underline as a transition and may warn on the docs build.src/tagoio_sdk/modules/Services/TagoTiP.py:11:protocolis a freestr, whilePOST /tip/cmdonly acceptsmqtt. ConsiderLiteral["mqtt"]so a bad protocol fails at type-check time. Leave it asstrif you want the same surface as sdk-js.
Praise
services.tagotip.cmdmatches the JS name, and the body is rebuilt from the API fields instead of forwarding the whole dict.- The unit test checks both the POST payload and the unwrapped result. This repo had no Services tests before.
Risk (CIA)
Likelihood: 🟢 Low | Impact: 🟢 Low | Exposure: 🟢 Low.
Confirmed.
Outside this PR
Pre-existing
src/tagoio_sdk/__init__.py:1:__version__is still4.1.1whilepyproject.tomlis5.1.5. The User-Agent string reads__version__, so published wheels report the old number. Worth a follow-up.
This was referenced Aug 18, 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.
Summary
Add a
TagoTiPservice that sends device commands through TagoTiP. Exposed asservices.tagotip.cmd({serial, protocol, body}), it wrapsPOST /tip/cmdusing a Service Authorization token from the moduletoken. Ports tago-io/sdk-js#184 to the Python SDK.Test plan
tests/Services/test_tagotip.py(mocked request body and response)uv run pytest tests/passes (211 tests)uv run ruff checkandruff format --checkpassservices.tagotip.cmd({"serial": "mqtt1", "protocol": "mqtt", "body": "reboot-now"})against the production API, responseCommand sentRisk (CIA)
Likelihood: 🟢 Low | Impact: 🟢 Low | Exposure: 🟢 Low
Additive change; new service method, no existing behavior touched.