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

Mqtt parsing error for device #305

Closed
bpsphere opened this issue Aug 30, 2024 · 6 comments
Closed

Mqtt parsing error for device #305

bpsphere opened this issue Aug 30, 2024 · 6 comments

Comments

@bpsphere
Copy link

I have a temperature sensor which I want to set a value.
The server is running on Rpi-5

Dash Looks like this

image

this the received message by mosquitto local broker.

casanet/state/mXILTy {"temperatureSensor":{status":"on","temperature":20}}

And the error message looks like this

[8/30/2024, 14:49:04] [error] [MqttHandler.onMessage] Parsing mqtt message for casanet/state/mXILTy:{"temperatureSensor":{status":"on","temperature":20}} failed, error: {}

@haimkastner
Copy link
Member

Hi @bpsphere

The string in the log you have pasted is an invalid JSON, the quotes character is missing before the status property.

You can try it out in validators like that https://jsonformatter.curiousconcept.com/#

@haimkastner
Copy link
Member

@bpsphere I'm closing the issue since the failure seems to be due to an invalid JSON payload.

If you still have that error after fixing the payload, please reopen it.

@bpsphere
Copy link
Author

bpsphere commented Sep 1, 2024

hi @haimkastner , Thank you highlighting the JSON error. Sorry it was typo. The error is consistent with the correct payload. Here are some snap shots of status update attempts.

Would appreciate if you could let me know what I am doing wrong. casanet_server is not set for boot, purely running from the shell.

image

image

@haimkastner
Copy link
Member

ok, I will soon grab some time to reproduce it in my environment too.

@haimkastner haimkastner reopened this Sep 5, 2024
@haimkastner haimkastner transferred this issue from casanet/dashboard-app Sep 5, 2024
@haimkastner
Copy link
Member

Hi @bpsphere

I have reproduced the issue in my environment, which seems to be a backend issue.
I have transferred it to the server repo.

You can pull the latest version (4.0.45) including the fix.

@bpsphere
Copy link
Author

bpsphere commented Sep 9, 2024

Thank you so much, appreciate you effort

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