Skip to content

Conversation

itsmylife
Copy link
Contributor

@itsmylife itsmylife commented Sep 3, 2025

Problem

Users reported that string values like "on", "off", or "admin_off" were not being received, while numeric values worked fine. The framer expected all payloads to be valid JSON, but many MQTT publishers send raw strings without JSON encoding.

Description

Fixes an issue where the MQTT datasource failed to process raw string values that aren't JSON-encoded, causing data to be silently dropped.

Solution

Added fallback logic in toFrame() method to treat raw bytes as string values when JSON parsing fails.

Fixes: #131

Copy link
Member

@zoltanbedi zoltanbedi left a comment

Choose a reason for hiding this comment

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

lgtm

@itsmylife itsmylife merged commit 8d6c415 into main Sep 8, 2025
17 checks passed
@itsmylife itsmylife deleted the ismail/add-support-for-raw-values branch September 8, 2025 07:50
@github-project-automation github-project-automation bot moved this to Complete in OSS Big Tent Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Data not received as a string
2 participants