To further add to my own confusion,  if I copy the payload output at the 
terminal from mosquitto_sub and then paste that exact data using 
mosquitto_pub, it works on both the site and mqtt-admin.

Today I tried reinstalling everything on a pi (raspbian/stretch) using a 
Vantage Vue instead of the Pro2, no change in the issue.   I can publish a 
fake payload at the terminal or copy paste my actual payload, and it works 
fine, but the payload published by weewx can only be viewed at the 
terminal, and does not work when subscribing with mqtt-admin or on the 
belchertown website.


On Thursday, April 11, 2019 at 12:12:16 PM UTC-4, Peter de Wit wrote:
>
> I wrote a larger post which was instantly deleted by the group which I 
> don't feel like typing all out again.   The 2nd was also auto-deleted with 
> no explanation, I'll try one more time and apologies if multiple posts are 
> being mailed to anyone.
>
> -------
>
> Debian / weewx 3.9.1 with mqtt extension / belchertown / nginx / david 
> vantage pro2 
>
>
> Here is the issue in short:
>
> MQTT appears to be working internally but the payload is rather large and 
> prevents the website from updating.  A smaller fake payload used for 
> testing is successful.  How do I truncate the data in the MQTT payload?  
>  things like soil and leaf wetness are not required.
>
> -------
>
> Example from current setting obtained at the terminal
>
> mosquitto_sub -h localhost -t weather/#
>
> {"windSpeed10_kph": "0.0", "monthET": "0.0", "cloudbase_meter": 
> "610.078192345", "outHumidity": "73.0", "pressure_mbar": "1004.21031119", 
> "rain_cm": "0.0", "dayET": "0.0", "barometer_mbar": "1013.30892876", 
> "yearRain_cm": "0.0", "consBatteryVoltage_volt": "1.25", "dewpoint_C": 
> "-2.64673607144", "insideAlarm": "0.0", "inHumidity": "27.0", "sunrise": 
> "1554924300.0", "windGust_kph": "0.0", "heatindex_C": "1.66666666667", 
> "dayRain_cm": "0.0", "outsideAlarm1": "0.0", "forecastIcon": "6.0", 
> "outsideAlarm2": "0.0", "windSpeed_kph": "0.0", "forecastRule": "45.0", 
> "rainAlarm": "0.0", "altimeter_mbar": "1012.55702971", "windchill_C": 
> "1.66666666667", "appTemp_C": "-0.674718834607", "outTemp_C": 
> "1.66666666667", "extraAlarm1": "0.0", "extraAlarm2": "0.0", "extraAlarm3": 
> "0.0", "extraAlarm4": "0.0", "extraAlarm5": "0.0", "extraAlarm6": "0.0", 
> "extraAlarm7": "0.0", "extraAlarm8": "0.0", "humidex_C": "1.66666666667", 
> "rain24_cm": "0.0", "hourRain_cm": "0.0", "inTemp_C": "23.5", 
> "soilLeafAlarm4": "0.0", "trendIcon": "20.0", "soilLeafAlarm2": "0.0", 
> "soilLeafAlarm3": "0.0", "usUnits": "16.0", "soilLeafAlarm1": "0.0", 
> "leafWet4": "0.0", "txBatteryStatus": "1.0", "yearET": "0.0", 
> "monthRain_cm": "0.0", "rainRate_cm_per_hour": "0.0", "dateTime": 
> "1554913274.0", "stormRain_cm": "0.0", "sunset": "1554885600.0", 
> "inDewpoint_C": "3.41268318248"}
>
>
> The site just shows "Connected.  Waiting for data."
>
> --------
>
> Using MQTT-admin I can see payload size errors:   
> https://i.imgur.com/skL3x35.png
>
> ---------
>
> Sending a smaller fake payload from the terminal successfully updates the 
> website:
>
> mosquitto_pub -h localhost -t "weather" -m '{"UV": "0.68", 
> "barometer_inHg": "30.4306066431", "outHumidity": "45.8", "maxSolarRad": 
> "399.067737313", "dewpoint_F": "17.6078693897", "cloudbase_foot": 
> "4723.66604779", "heatindex_F": "36.5", "altimeter_inHg": "30.3995019668", 
> "dayRain_in": "0.0", "outTemp_F": "36.5", "appTemp_F": "31.2879264251", 
> "windchill_F": "15.5", "hourRain_in": "0.0", "humidex_F": "36.5", 
> "rainRate_inch_per_hour": "0.0", "pressure_inHg": "29.9401590264", 
> "usUnits": "1.0", "txBatteryStatus": "0.0", "windSpeed_mph": "55.0", 
> "rain24_in": "5.0", "dateTime": "1542561977", "radiation_Wpm2": 
> "124.813456"}' -u weewx -P weewx
>
>
> https://i.imgur.com/lnVyexP.png
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to