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

JSON's more than 256 bytes are сut off and can't be parsed #2

Closed
bam80 opened this issue Dec 24, 2023 · 4 comments
Closed

JSON's more than 256 bytes are сut off and can't be parsed #2

bam80 opened this issue Dec 24, 2023 · 4 comments

Comments

@bam80
Copy link

bam80 commented Dec 24, 2023

It was established 256 bytes is too small for the restriction, so it's definitely a problem with this app:
theengs/gateway#193

@helmut64
Copy link
Contributor

helmut64 commented Jan 3, 2024

This is all correct and done by purpose. We need to ensure that push messages are as short as possible to avoid overloading push messages against the vendors Apple/Google. Another reason is also that we cache recent messages on the server to show them on mobile. One more reason is that we forward messages to our LoRa boards, again a payload limit of 256 bytes. This limit reasonable and will not be increased.

@helmut64 helmut64 closed this as completed Jan 3, 2024
@helmut64 helmut64 reopened this Jan 3, 2024
@helmut64 helmut64 closed this as completed Jan 3, 2024
@bam80
Copy link
Author

bam80 commented Jan 3, 2024

Am I understand right it only applies to a push notification topics subscribed and not to a widget's topics?
For the latter, I suppose the restriction is 256 kB instead?

Keep the size of your message content small! Messages larger than 256 kB will be ignored and not delivered as a push message. If the content of a push notification is larger than 255 bytes, it will always be truncated.

https://help.radioshuttle.de/mqttapp/1.0/en/dashboard.html

@helmut64
Copy link
Contributor

helmut64 commented Jan 3, 2024

The server stored message can be up to 256kB, however only a single last message is stored on the server to recover the dash board. For regular push messages there are the 100 last messages stored which allows to see missed/historical messages.
My option is to reduce the message size to something up to 255 characters which means everything works. Use a separate TCP/IP stream to your server for other stuff e.g. videos pictures etc. which can be done in JavaScript in the gallery mode.

@bam80
Copy link
Author

bam80 commented Jan 3, 2024

Sorry it's still not clear to me what messages the 256 bytes restriction applies.
As pointed in the original issue, jsons > 256 bytes are quite common even without videos/pictures etc.: theengs/gateway#193 (comment)

I would need to do my tests again to see if we still have a problem here.

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

No branches or pull requests

2 participants