Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Retire native JSON MQTT functionality #5507

Open
thebentern opened this issue Dec 4, 2024 · 11 comments
Open

[Feature Request]: Retire native JSON MQTT functionality #5507

thebentern opened this issue Dec 4, 2024 · 11 comments
Assignees
Labels
enhancement New feature or request high-priority Issues that affect core functionality or are "show stoppers" pinned Exclude from stale processing tech debt Code or lib references that are not up to date or propper standards

Comments

@thebentern
Copy link
Contributor

Platform

Cross-Platform

Description

This has been a problematic feature for several reasons:

  1. It takes up precious space on NRF52 based devices which are approaching the limits of flash utilization
  2. It has created potential security concerns in the past and there are likely undiscovered ones existing now.
  3. It should be an application layer concern where the implementation can be less prescriptive and tailored to the use case.

Tagging @ianmcorvidae because he has some migration strategies to externalize the support while keeping things in the format they exist in currently for the firmware so that automations in Home Assistant or otherwise can continue working with a bit of extra sauce.

@thebentern thebentern added the enhancement New feature or request label Dec 4, 2024
@rcarteraz
Copy link
Member

I like this idea. It's definitely something that needs to be addressed and @ianmcorvidae has some great ideas around this. Looking forward to seeing the solution.

@GUVWAF
Copy link
Member

GUVWAF commented Dec 4, 2024

Agree on this, although indeed with the "requirement" that it would need to be able to easily integrate with popular home automation systems like Home Assistant and OpenHAB. Ideally it would be a native integration/binding such that the end-user doesn't have to handle this glue code and run it in an additional daemon.

@pdxlocations
Copy link
Member

It case it's useful, I've roughed out a python script for this purpose. Maybe it's possible to use something like this as a custom addon to HA?
https://github.com/pdxlocations/mqtt-protobuf-to-json

@asjmcguire
Copy link

From what I can tell having a quick look at this @pdxlocations it only seems to cope with decoding mesh packets and outputting them to JSON, which indeed is something I still need, but much more important for me, given I use Home Assistant to broadcast weather updates on both a dedicated channel more frequently, and longfast less frequently, is the ability to SEND a mqtt message to be broadcast. So code would need to be able to figure out which portnum to use, and what channel.

@GUVWAF
Copy link
Member

GUVWAF commented Dec 17, 2024

@garthvh Why are we planning to retain the JSON functionality for the RAK Ethernet gateway? #5498 (comment)

Then someone would still need to maintain this (add new fields and fix bugs like the one linked), and it can only be tested on one specific hardware combo. Besides, once we have a suitable alternative it will likely be slightly different than the manually crafted JSON, so you can't use the same system with different hardware. In my opinion if we remove it from the firmware, we have to nuke it altogether.

@garthvh
Copy link
Member

garthvh commented Dec 17, 2024

@garthvh Why are we planning to retain the JSON functionality for the RAK Ethernet gateway? #5498 (comment)

Then someone would still need to maintain this (add new fields and fix bugs like the one linked), and it can only be tested on one specific hardware combo. Besides, once we have a suitable alternative it will likely be slightly different than the manually crafted JSON, so you can't use the same system with different hardware. In my opinion if we remove it from the firmware, we have to nuke it altogether.

I don't anticipate it being something that the project maintains, that device is managed by @beegee-tokyo and RAK so my thought was that he could continue to maintain it if necessary, but I am not opposed to nuking it.

@beegee-tokyo
Copy link
Contributor

@garthvh I am ok, if you replace it with something else that works.
MQTT with JSON might not be important for "messaging", but when using Meshtastic in other applications like sensor networks, control functions, it is essential, specially because you don't offer a working raw payload decoder at this point.
I can maintain MQTT until you come up with something else.

@leshniak
Copy link

leshniak commented Dec 19, 2024

It case it's useful, I've roughed out a python script for this purpose. Maybe it's possible to use something like this as a custom addon to HA? https://github.com/pdxlocations/mqtt-protobuf-to-json

I've started a similar project based on node.js a month ago https://github.com/leshniak/meshtastic-protobuf-decoder (for private use at the time). @pdxlocations but yours suits better for HA.

@beegee-tokyo
Copy link
Contributor

@leshniak
Any plans to add your project to NodeRED official packages?
I am struggling to add your meshtastic-protobuf-decoder to my NodeRED installation.

@fifieldt
Copy link
Contributor

@broglep is working on a home assistant integration at https://github.com/broglep/homeassistant-meshtastic that looks like it won't need json+mqtt

@pdxlocations
Copy link
Member

An HA integration using protos and MQTT: https://github.com/kvj/hass_Mtastic_MQTT

@github-actions github-actions bot added the Stale label Feb 27, 2025
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 7, 2025
@garthvh garthvh reopened this Mar 7, 2025
@garthvh garthvh removed the Stale label Mar 7, 2025
@caveman99 caveman99 added the pinned Exclude from stale processing label Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high-priority Issues that affect core functionality or are "show stoppers" pinned Exclude from stale processing tech debt Code or lib references that are not up to date or propper standards
Projects
None yet
Development

No branches or pull requests