-
Notifications
You must be signed in to change notification settings - Fork 31
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
JSON message is too long (> 256 bytes) #193
Comments
We could add a setting which lets you choose from publishing:
But do you think that will solve your issues for all Theengs Gateway's messages? In your case dropping tempf will only shave off 17 bytes. How much above 256 bytes is that message payload? Is there no way to lift the restriction in your MQTT client app? |
In my case, only last 2 bytes of the JSON do not fit: the tailing It also rather cumbersome to have both |
Outside of |
That would be the right thing to do, On the other hand, keeping only one |
What is your use case with the app? |
Thermostat |
Do you control a valve with the app? |
I will control the thermostat itself, but for now I need proper temperature sensor's graph first. |
Theengs app does not answer this need? |
I didn't look at Theengs app yet, thanks. But I need proper MQTT dashboard, with widgets, push notifications, etc. |
Could we add that option? |
Hi @bam80,
While I understand the problem you are having with your Android client, might it not be a better idea to contact the developer of the app to see if the message length handling could not be improved there? I'm only saying this because the messages you are seeing for your LYWSD03MMC/MJWSD05MMC_PVVX decoded messages are by no means the longest which would be produced by many other devices compatible with Theengs Decoder, the library which Theengs Gateway uses for decoding and which does the tempc to tempf conversion already in the library. So even if we would exclude the Fahrenheit temperature here, just for your case - looking at the whole message though, even cutting the very long The on board library unit conversion has been implemented to allow for global compatibility, as not every user is using the produced MQTT messages with a controller allowing for automatic unit conversions. The only really satisfying solution I can see is that the mentioned app does extend its MQTT message length compatibility, as longer messages are not that uncommon, and AFAIK
although i think that might be pushing it a bit for real world usage :) |
Another solution I could think of would be an intermediate app/script which subscribes to the topic Theengs Gateway sends out, then does some cutting down of any unwanted properties for your case, to then re-publish the shorter messages on a different topic to which the app subscribes to. |
I filed an issue to the app's github:
Wouldn't it be a right thing if the user could control the data passed over the MQTT, anyway? |
I wanted to give it a try but I see it costs money. |
To speed up the process, I purchased the app from Google Play Market, but unfortunately it didn't install after the purchase, so I had to refund. |
Hi, I reached out the app author. So far, the response is the following:
RadioShuttle/MQTTPushClient_Android#4 (comment) Also here:
RadioShuttle/MQTTPushClient_Android#2 And the verdict:
RadioShuttle/MQTTPushClient_Android#4 (comment) Thoughts? |
My MQTT client app seems have a restriction of 256 bytes for the message payload length:
https://github.com/RadioShuttle/MQTTPushClient_Android
So I can't parse JSON's in the MQTT messages if they are bigger.
Could we have a setting to exclude some data from the JSON, as temperature in Fahrenheit and such?
Originally reported here: pvvx/ATC_MiThermometer#444
The text was updated successfully, but these errors were encountered: