You need (1) to be consistent among MQTT publish, Belchertown, and 
mosquitto re: whether you have username/password enabled or not and (2) if 
enabled you have to not typo the username/password in one of the places.   
Other possibility is that you're going back and forth editing things and 
forgot to reset either weewx or mosquitto after making a change.  It 
happens.

On Sunday, May 7, 2023 at 3:00:44 PM UTC-7 Kevin Crivelli wrote:

> as per my last post I can use that command to see topic weather data 
> coming in but still for some reason weewx/belchertown can connect but no 
> data is transmitted. I gotta be missing one little thing. Messed around 
> again this morning and still nothing. Really don't want to throw in the 
> towel so if anyone has anymore ideas that would be awesome. 
>
> On Sunday, May 7, 2023 at 3:14:20 AM UTC-4 Kevin Crivelli wrote:
>
>> ok so I seem to be getting weather when using that test from earlier
>>
>> [image: getting weather.jpg]
>>
>> On Sunday, May 7, 2023 at 3:09:07 AM UTC-4 Kevin Crivelli wrote:
>>
>>> I was able to get the test message no problem so it seems mosquitto is 
>>> set up correctly yet I am still unable to get anything more than Connected. 
>>> Waiting for data using my local url and remotely I get Connecting to 
>>> weather station real time 
>>>
>>> still where I left off.
>>>
>>> On Saturday, May 6, 2023 at 4:40:59 PM UTC-4 vince wrote:
>>>
>>>> doh - I of course got those sub/pub commands backward.  You use the -m 
>>>> message for publishing.  Sorry for the confusion.
>>>>
>>>>    
>>>>
>>>>    - subscribe in one window => mosquitto_sub -h x.x.x.x -t 
>>>>    junk/testing -u mosquittoUserHere -P mosquittoPassHere
>>>>
>>>>
>>>>    - publish a test in another  => mosquitto_pub -h x.x.x.x -t 
>>>>    junk/testing -u mosquittoUserHere -P mosquittoPassHere -m testing123
>>>>
>>>> I added password protection to my pi setup and it works fine there and 
>>>> after restarting weewx (after editing weewx.conf).   Updated the github 
>>>> page to show the edits I made.
>>>>
>>>> I did need to create the MQTT password file so the specified user/pass 
>>>> is there.  Remember it's not an account password.  It's just a user/pass 
>>>> combination for connecting to your MQTT server.
>>>>
>>>> On Saturday, May 6, 2023 at 1:23:20 PM UTC-7 vince wrote:
>>>>
>>>>> It's not hanging.  It is not hearing anything.  Hit control-C to stop 
>>>>> listening with mosquitto_sub.
>>>>>
>>>>> On mine I see the loop messages every couple seconds basically 
>>>>> immediately.  I hit control-C after the first loop packet was displayed.
>>>>>
>>>>> $ mosquitto_sub -d -t simulator/# -h 192.168.1.232
>>>>> Client null sending CONNECT
>>>>> Client null received CONNACK (0)
>>>>> Client null sending SUBSCRIBE (Mid: 1, Topic: simulator/#, QoS: 0, 
>>>>> Options: 0x00)
>>>>> Client null received SUBACK
>>>>> Subscribed (mid: 1): 0
>>>>> Client null received PUBLISH (d0, q0, r0, m0, 'simulator/loop', ... 
>>>>> (1255 bytes))
>>>>> {"dateTime": "1683403745.0", "usUnits": "1.0", "outTemp_F": 
>>>>> "30.714330964267866", "inTemp_F": "64.4867113429638", "barometer_inHg": 
>>>>> "31.022674842890833", "pressure_inHg": "31.022674842890833", 
>>>>> "windSpeed_mph": "0.3866257855458439", "windDir": "346.0814717203496", 
>>>>> "windGust_mph": "0.46395094265501235", "windGustDir": 
>>>>> "346.0814717203496", 
>>>>> "outHumidity": "77.68024528672494", "inHumidity": "27.026577314072398", 
>>>>> "radiation_Wpm2": "911.9394844177033", "UV": "12.767152781847846", 
>>>>> "rain_in": "0.0", "txBatteryStatus": "1.0", "windBatteryStatus": "0.0", 
>>>>> "rainBatteryStatus": "0.0", "outTempBatteryStatus": "1.0", 
>>>>> "inTempBatteryStatus": "0.0", "consBatteryVoltage_volt": "12.0", 
>>>>> "heatingVoltage_volt": "12.876232859402455", "supplyVoltage_volt": 
>>>>> "12.0", 
>>>>> "referenceVoltage_volt": "11.725352060455753", "rxCheckPercent": 
>>>>> "58.589515129677444", "altimeter_inHg": "31.812916691917174", 
>>>>> "appTemp_F": 
>>>>> "25.97065488238462", "cloudbase_foot": "2093.2738825982638", 
>>>>> "dewpoint_F": 
>>>>> "24.583925880835505", "heatindex_F": "30.714330964267866", "humidex_F": 
>>>>> "30.714330964267866", "inDewpoint_F": "29.791543533239455", 
>>>>> "maxSolarRad_Wpm2": "0.0", "rainRate_inch_per_hour": "0.0", 
>>>>> "windchill_F": 
>>>>> "30.714330964267866", "hourRain_in": "0.0", "rain24_in": "0.0", 
>>>>> "dayRain_in": "0.0"}
>>>>> Client null received PUBLISH (d0, q0, r0, m0, 'simulator/loop', ... 
>>>>> (1236 bytes))
>>>>> ^CClient null sending DISCONNECT
>>>>>
>>>>>
>>>>> Test your mosquitto server...
>>>>>
>>>>>    - subscribe in one window => mosquitto_sub -h x.x.x.x -t 
>>>>>    junk/testing -u mosquittoUserHere -P mosquittoPassHere -m testing123
>>>>>    - publish a test in another  => mosquitto_pub -h x.x.x.x -t 
>>>>>    junk/testing -u mosquittoUserHere -P mosquittoPassHere
>>>>>
>>>>> If that doesn't work, your mosquitto setup is messed up.
>>>>>
>>>>> It ain't rocket science unless you are running a funky os variant or 
>>>>> you have enabled packet filters blocking incoming traffic to the MQTT or 
>>>>> Websockets ports.
>>>>>
>>>>>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/bf1361b5-408f-4944-86d1-8dde5b5feaccn%40googlegroups.com.

Reply via email to