Skip to content

Support door-mgr#162

Merged
bear-KU merged 3 commits into
nomlab:masterfrom
fujiwara-e:fix/pr-161
Jul 23, 2026
Merged

Support door-mgr#162
bear-KU merged 3 commits into
nomlab:masterfrom
fujiwara-e:fix/pr-161

Conversation

@fujiwara-e

Copy link
Copy Markdown
Contributor

概要

door-mgr に対応するように MQTT のトピックの変更および pub するメッセージを変更した.

変更内容

  • トピックを dt/swimmy/v1/ou/eng4/nomlab/swimmy/attend から cmd/pinot/v1/ou/eng4/doormgr/state に変更した
  • pub する JSON のメンバを変更した

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-mgr position strings.

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 thread lib/swimmy/service/doorplate.rb Outdated
Comment on lines 8 to 10
def send_attendance_event(attendance, user_name)
require "json"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2c53c42 で修正.

Comment thread lib/swimmy/command/attendance.rb Outdated
Comment on lines 45 to 49
attendance_labels = {
"hi" => "在室",
"bye" => "帰宅"
}
doorplate_service = Swimmy::Service::Doorplate.new(mqtt_client)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2c53c42 で修正.

Comment thread lib/swimmy/service/doorplate.rb Outdated
end

def send_attendance_event(attendance, user_id, user_name)
def send_attendance_event(attendance, user_name)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pub の相手が openHAB が持つ Item の Swimmy Attendance Event から door-mgr に変わったので,メソッド名を適切なものに変更したほうが良いと思います.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2c53c42 で修正.

@fujiwara-e fujiwara-e mentioned this pull request Jul 23, 2026
@bear-KU
bear-KU merged commit 3374ed7 into nomlab:master Jul 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants