Author Topic: MQTT Output Configuration with Examples Needed  (Read 775 times)

0 Members and 1 Guest are viewing this topic.

Offline GHammer

  • Senior Contributor
  • ****
  • Posts: 201
    • Woodmar Weather
MQTT Output Configuration with Examples Needed
« on: April 05, 2022, 08:36:45 AM »
I have tried to get the MQTT output working with no luck.
At best, in the WFL2 debug output I see it connect to the mosquitto server but debug never shows any data sent and the mosquitto logs show the connect but no data received.
I can use mosquitto_pub and mosquitto_sub from other machines on the LAN to successfully publish and show messages to the same topic as configured in the WFL2.

What I'm looking for is anyone with this functioning to show the setup page from the WFL2 with your login blurred of course.
I'm just not seeing why this refuses to work.
Wireless Vantage Pro2 Plus with 24hr FARS, WLL

Offline WiFiLogger

  • Forecaster
  • *****
  • Posts: 709
Re: MQTT Output Configuration with Examples Needed
« Reply #1 on: April 05, 2022, 10:54:44 AM »
I have tried to get the MQTT output working with no luck.
At best, in the WFL2 debug output I see it connect to the mosquitto server but debug never shows any data sent and the mosquitto logs show the connect but no data received.
I can use mosquitto_pub and mosquitto_sub from other machines on the LAN to successfully publish and show messages to the same topic as configured in the WFL2.

What I'm looking for is anyone with this functioning to show the setup page from the WFL2 with your login blurred of course.
I'm just not seeing why this refuses to work.

Please note that WiFiLogger is not using SSL.

For testing MQTT I am using this service: https://www.cloudmqtt.com/

Then I am using this config:
 [ You are not allowed to view attachments ]

To receive this data:
 [ You are not allowed to view attachments ]



Offline GHammer

  • Senior Contributor
  • ****
  • Posts: 201
    • Woodmar Weather
Re: MQTT Output Configuration with Examples Needed
« Reply #2 on: April 05, 2022, 09:02:54 PM »
Interesting.
I have no data being sent.
A connection is established, then nothing.
Code: [Select]
DavisGetLOOP - data changed
new TCP Client: 10.10.100.10
[PING] Gateway: 10.10.100.1: Success
MQTTconnect(): server: 10.10.100.10
MQTTconnect(): port: 1883
MQTTconnect(): user: -------
MQTTconnect(): pass: ********

MQTTconnect(): connected
[PING] Gateway: 10.10.100.1: Success
[PING] Gateway: 10.10.100.1: Success

Note there is a user, just blanked for posting.
Wireless Vantage Pro2 Plus with 24hr FARS, WLL

Offline GHammer

  • Senior Contributor
  • ****
  • Posts: 201
    • Woodmar Weather
Re: MQTT Output Configuration with Examples Needed
« Reply #3 on: April 05, 2022, 09:06:01 PM »
Also, changes to the MQTT setup do not take effect until a restart of the WFL2 happens.
Makes troubleshooting kinda hard.
Wireless Vantage Pro2 Plus with 24hr FARS, WLL

Offline GHammer

  • Senior Contributor
  • ****
  • Posts: 201
    • Woodmar Weather
Re: MQTT Output Configuration with Examples Needed
« Reply #4 on: April 05, 2022, 09:12:01 PM »
Well! Color me foolish!

You know, if you go to Setup->System and Enable Upload Data, you'd be surprised at how well the json flows.

I'll take full responsibility for not doing that, but, it would be nice if it were mentioned somewhere. Though self-evident if you look at all settings for an issue.
Wireless Vantage Pro2 Plus with 24hr FARS, WLL

Offline GHammer

  • Senior Contributor
  • ****
  • Posts: 201
    • Woodmar Weather
Re: MQTT Output Configuration with Examples Needed
« Reply #5 on: April 05, 2022, 09:21:01 PM »
It doesn't seem to be sending as often as it should.
Sent the initial message on restart, then nothing.

Code: [Select]
[NTP] sending NTP packet...129.250.35.251
[NTP] packet received epoch: 1649207256
NTP Time: 21:07:39 05-04-2022
Weather station time: 21:07:39 05-04-2022
DavisCheckTime(): Weather Station time OK
MQTTconnect(): server: 10.10.100.10
MQTTconnect(): port: 1883
MQTTconnect(): user: ------
MQTTconnect(): pass: ********
MQTTconnect(): connected
MQTTSend()
MQTTSend(): wflexp.json sent
MQTTSend(): wflexp.json sent
MQTTSend(): realtime.txt sent
MQTTSend(): Done
04/05/2022;21:00
DavisGetArchiveData() START
DavisGetArchiveData() timestamp: 746915892
DavisGetArchiveData(): DATA HEAD OK, CRC OK!!!
PAGES: 1
     NR: 0
PAGE: 0
GLOBE file open failed
Card Mount Failed
Renew RTD
DavisGetLOOP - data changed
TCP SERVER START
MQTTSend()
MQTTSend(): wflexp.json sent
MQTTSend(): wflexp.json sent
MQTTSend(): realtime.txt sent
MQTTSend(): Done
DavisGetLOOP - data changed
DavisGetLOOP - data no changed
DavisGetLOOP - data no changed
DavisGetLOOP - data changed
DavisGetLOOP - data changed
DavisGetLOOP - data changed
DavisGetLOOP - data changed
MQTTSend()
MQTTSend(): wflexp.json sent
MQTTSend(): wflexp.json sent
MQTTSend(): realtime.txt sent
MQTTSend(): Done
DavisGetLOOP - data changed
DavisGetLOOP - data changed

DavisGetLOOP - data no changed
DavisGetLOOP - data changed
DavisGetLOOP - data changed
DavisGetLOOP - data changed
DavisGetLOOP - data changed
MQTTSend()
MQTTSend(): wflexp.json sent
MQTTSend(): wflexp.json sent
MQTTSend(): realtime.txt sent
MQTTSend(): Done
new TCP Client: 10.10.100.10
[PING] Gateway: 10.10.100.1: Success
[PING] Gateway: 10.10.100.1: Success
[PING] Gateway: 10.10.100.1: Success

The mosquitto logs and a mosquitto_sub show no activity after the initial as well.
Wireless Vantage Pro2 Plus with 24hr FARS, WLL

Offline WiFiLogger

  • Forecaster
  • *****
  • Posts: 709
Re: MQTT Output Configuration with Examples Needed
« Reply #6 on: April 06, 2022, 05:33:08 AM »
It doesn't seem to be sending as often as it should.
Sent the initial message on restart, then nothing.

Code: [Select]
new TCP Client: 10.10.100.10

When something is connected over port TCP 22222, then WiFiLogger is blocked to use own export functions.
Please check if on frist page RealTimeData you do not have "PAUSE" yellow text.

Offline GHammer

  • Senior Contributor
  • ****
  • Posts: 201
    • Woodmar Weather
Re: MQTT Output Configuration with Examples Needed
« Reply #7 on: April 06, 2022, 06:20:30 AM »
It doesn't seem to be sending as often as it should.
Sent the initial message on restart, then nothing.

Code: [Select]
new TCP Client: 10.10.100.10

When something is connected over port TCP 22222, then WiFiLogger is blocked to use own export functions.
Please check if on frist page RealTimeData you do not have "PAUSE" yellow text.

That's exactly the issue.
Thank you!
Wireless Vantage Pro2 Plus with 24hr FARS, WLL