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

Issue that values written to MQTT broker does not show the right values #4

Closed
swapper82 opened this issue Jan 30, 2018 · 1 comment
Closed

Comments

@swapper82
Copy link

When publishing to a mosquitto broker (at least)
i got the values {"seq":989,"power":true,"total":true,"battery":100}
Interprited as bolean values or somting?

i "fixed" the issue by changing to float from string (starting line 458 in the main .ino file)

  else {
    root["seq"] = seq;
    root["power"] = float(watt);
    root["total"] = float(pulse / PULSES_PER_KWH);
    root["battery"] = battery;
    root["rssi"] = float(srssi);
  }

Thanx for a GREAT project :)

@bphermansson
Copy link
Owner

Your'e welcome!
Ok, I guess the values are interpreted different with different softwares. But the power and total values are indeed numbers, so I see no problem sending them as floats. I've changed this in the main branch, thanks for the report.

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