Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add MQTT GPIO control and status topics#8955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
fpoisson2 wants to merge1 commit intomeshtastic:develop
base:develop
Choose a base branch
Loading
fromfpoisson2:claude/add-espresense-ibeacon-014aW1GEgY45ZtowK3iQgTcG

Conversation

@fpoisson2
Copy link

Implement dedicated MQTT topics for GPIO control:

  • Subscribe to msh/{root}/2/gpio/{NODE_ID}/control for commands
  • Publish status to msh/{root}/2/gpio/{NODE_ID}/status

Supported JSON command formats:

  • Simple: {"pin": N, "value": V} or {"pin": N, "command": "read"}
  • Advanced: {"command": "write/read/watch", "gpio_mask": M, "gpio_value": V}

Status response format:
{"type":"gpio_status","gpio_mask":M,"gpio_value":V,"timestamp":T,"node_id":"!xxx"}

The RemoteHardwareModule now publishes GPIO status to MQTT when:

  • GPIO write commands are executed
  • GPIO read responses are sent
  • Watched GPIOs change state

🙏 Thank you for sending in a pull request, here's some tips to get started!

❌ (Please delete all these tips and replace them with your text) ❌

  • Before starting on some new big chunk of code, it it is optional but highly recommended to open an issue first
    to say "Hey, I think this idea X should be implemented and I'm starting work on it. My general plan is Y, any feedback
    is appreciated." This will allow other devs to potentially save you time by not accidentially duplicating work etc...
  • Please do not check in files that don't have real changes
  • Please do not reformat lines that you didn't have to change the code on
  • We recommend using theVisual Studio Code editor along with the'Trunk Check' extension (In beta for windows, WSL2 for the linux version),
    because it automatically follows our indentation rules and its auto reformatting will not cause spurious changes to lines.
  • If your PR fixes a bug, mention "fixes #bugnum" somewhere in your pull request description.
  • If your other co-developers have comments on your PR please tweak as needed.
  • Please also enable "Allow edits by maintainers".
  • Please do not submit untested code.
  • If you do not have the affected hardware to test your code changes adequately against regressions, please indicate this, so that contributors and commnunity members can help test your changes.
  • If your PR gets accepted you can request a "Contributor" role in the Meshtastic Discord

🤝 Attestations

  • I have tested that my proposed changes behave as described.
  • I have tested that my proposed changes do not cause any obvious regressions on the following devices:
    • Heltec (Lora32) V3
    • LilyGo T-Deck
    • LilyGo T-Beam
    • RAK WisBlock 4631
    • Seeed Studio T-1000E tracker card
    • Other (please specify below)

Implement dedicated MQTT topics for GPIO control:- Subscribe to msh/{root}/2/gpio/{NODE_ID}/control for commands- Publish status to msh/{root}/2/gpio/{NODE_ID}/statusSupported JSON command formats:- Simple: {"pin": N, "value": V} or {"pin": N, "command": "read"}- Advanced: {"command": "write/read/watch", "gpio_mask": M, "gpio_value": V}Status response format:{"type":"gpio_status","gpio_mask":M,"gpio_value":V,"timestamp":T,"node_id":"!xxx"}The RemoteHardwareModule now publishes GPIO status to MQTT when:- GPIO write commands are executed- GPIO read responses are sent- Watched GPIOs change state
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign ourContributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let usrecheck it.

@fifieldtfifieldt added requires-protosRequires changes to protobufs to work requires-docsDocumentation must be updated enhancementNew feature or request labelsDec 12, 2025
@fifieldt
Copy link
Member

Cool idea :) Are you in discord? It's probably worth some discussion about whether it's safe to enable this by default, or whether we need a protobuf to turn it on/off.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

enhancementNew feature or requestrequires-docsDocumentation must be updatedrequires-protosRequires changes to protobufs to work

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@fpoisson2@CLAassistant@fifieldt@claude

[8]ページ先頭

©2009-2025 Movatter.jp