Page 1 of 1

Weatherflow Tempest and logging

Posted: Thu 21 Mar 2024 6:03 pm
by Dinant
In the MXdiag log file I see all the UDP packets (e.g. rapid_wind and hub_status).
Nice for debugging but they create much bigger log files.
They have a different layout compared to the normal Cumulus MX logging.
Is it possible to disable the logging of those UDP packets?

Example:

Code: Select all

{"serial_number":"ST-01234567","type":"rapid_wind","hub_sn":"HB-01234567","ob":[1711043886,0.82,259]}
{"serial_number":"HB-01234567","type":"hub_status","firmware_revision":"194","uptime":743977,"rssi":-24,"timestamp":1711043887,"reset_flags":"PIN,SFT","seq":74279,"radio_stats":[25,1,0,3,63077],"mqtt_stats":[6,0]}
3/21/2024 6:58:07 PM
{"serial_number":"ST-01234567","type":"rapid_wind","hub_sn":"HB-01234567","ob":[1711043889,0.23,259]}
{"serial_number":"ST-01234567","type":"rapid_wind","hub_sn":"HB-01234567","ob":[1711043892,0.07,259]}
{"serial_number":"ST-01234567","type":"rapid_wind","hub_sn":"HB-01234567","ob":[1711043895,0.02,259]}
{"serial_number":"HB-01234567","type":"hub_status","firmware_revision":"194","uptime":743987,"rssi":-25,"timestamp":1711043897,"reset_flags":"PIN,SFT","seq":74280,"radio_stats":[25,1,0,3,63077],"mqtt_stats":[6,0]}
3/21/2024 6:58:17 PM
{"serial_number":"ST-01234567","type":"rapid_wind","hub_sn":"HB-01234567","ob":[1711043898,0.39,221]}
{"serial_number":"ST-01234567","type":"rapid_wind","hub_sn":"HB-01234567","ob":[1711043901,0.11,221]}
{"serial_number":"ST-01234567","type":"rapid_wind","hub_sn":"HB-01234567","ob":[1711043904,0.03,221]}
{"serial_number":"ST-01234567","type":"rapid_wind","hub_sn":"HB-01234567","ob":[1711043907,0.01,221]}
{"serial_number":"HB-01234567","type":"hub_status","firmware_revision":"194","uptime":743997,"rssi":-25,"timestamp":1711043907,"reset_flags":"PIN,SFT","seq":74281,"radio_stats":[25,1,0,3,63077],"mqtt_stats":[6,0]}
3/21/2024 6:58:27 PM
{"serial_number":"ST-01234567","type":"rapid_wind","hub_sn":"HB-01234567","ob":[1711043910,0.00,0]}
{"serial_number":"ST-01234567","type":"rapid_wind","hub_sn":"HB-01234567","ob":[1711043913,0.00,0]}
{"serial_number":"ST-01234567","type":"rapid_wind","hub_sn":"HB-01234567","ob":[1711043916,0.00,0]}
{"serial_number":"HB-01234567","type":"hub_status","firmware_revision":"194","uptime":744007,"rssi":-24,"timestamp":1711043917,"reset_flags":"PIN,SFT","seq":74282,"radio_stats":[25,1,0,3,63077],"mqtt_stats":[6,0]}
3/21/2024 6:58:37 PM
{"serial_number":"ST-01234567","type":"rapid_wind","hub_sn":"HB-01234567","ob":[1711043919,0.00,0]}
{"serial_number":"ST-01234567","type":"rapid_wind","hub_sn":"HB-01234567","ob":[1711043922,0.00,0]}

Re: Weatherflow Tempest and logging

Posted: Thu 21 Mar 2024 6:29 pm
by mcrossley
Which version of MX?

Switching off data logging should remove those messages.

Program Options > Logging Options (from memory)

Re: Weatherflow Tempest and logging

Posted: Thu 21 Mar 2024 6:34 pm
by Dinant
mcrossley wrote: Thu 21 Mar 2024 6:29 pm Which version of MX?
Build 3283.

I looked into the code and it seems the packets are printed with Debug.WriteLine in TempestStation.cs.

Code: Select all

		private static void _udpListener_PacketReceived(object sender, PacketReceivedArgs e)
		{
			if (e.Packet.Length > 0)
			{
				var s = Encoding.ASCII.GetString(e.Packet);
				Debug.WriteLine(s);
				WeatherPacket wp = null;
				try
				{
					wp = JsonSerializer.DeserializeFromString<WeatherPacket>(s);
					if (wp != null)
					{
						wp.FullString = s;
						wp.SetMessageType();
						if (wp.MsgType != WeatherPacket.MessageType.Unknown) WeatherPacketReceived?.Invoke(wp);
					}
				}
				catch (Exception ex)
				{
					Debug.WriteLine(ex.Message);
				}

				if ((wp?.timestamp ?? 0) != 0) Debug.WriteLine(wp?.PacketTime.ToString());
			}
		}

Re: Weatherflow Tempest and logging

Posted: Thu 21 Mar 2024 6:44 pm
by mcrossley
Please redownload the CumulusMXDist3283.zip file (the link now points to CumulusMXDist3283a.zip). A debug version of the exe found its way in to the original zip file.

The only file that has changed and you need to replace is CumulusMX.exe.

Re: Weatherflow Tempest and logging

Posted: Thu 21 Mar 2024 6:53 pm
by Dinant
Yes, Working fine now. Thanks for the quick response.