Support door-mgr#162
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates Swimmy’s MQTT integration to support door-mgr by switching the publish topic and changing the published JSON payload format.
Changes:
- Changed MQTT topic for doorplate updates to
cmd/pinot/v1/ou/eng4/doormgr/state. - Updated published payload fields from Slack user info to door-mgr-oriented
{ member, position }. - Adjusted command implementations (
loc,hi/bye) to publish door-mgrpositionstrings.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lib/swimmy/service/doorplate.rb | Updates publish topic and payload schema for door-mgr (member, position). |
| lib/swimmy/command/location.rb | Updates doorplate publish argument to send the selected label (position string). |
| lib/swimmy/command/attendance.rb | Maps hi/bye commands to door-mgr position labels before publishing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
8
to
10
| def send_attendance_event(attendance, user_name) | ||
| require "json" | ||
|
|
Comment on lines
45
to
49
| attendance_labels = { | ||
| "hi" => "在室", | ||
| "bye" => "帰宅" | ||
| } | ||
| doorplate_service = Swimmy::Service::Doorplate.new(mqtt_client) |
bear-KU
reviewed
Jul 23, 2026
| end | ||
|
|
||
| def send_attendance_event(attendance, user_id, user_name) | ||
| def send_attendance_event(attendance, user_name) |
Contributor
There was a problem hiding this comment.
pub の相手が openHAB が持つ Item の Swimmy Attendance Event から door-mgr に変わったので,メソッド名を適切なものに変更したほうが良いと思います.
Closed
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.
概要
door-mgr に対応するように MQTT のトピックの変更および pub するメッセージを変更した.
変更内容
dt/swimmy/v1/ou/eng4/nomlab/swimmy/attendからcmd/pinot/v1/ou/eng4/doormgr/stateに変更した