Page 1 of 1

Check for Ecowitt F/W update fails

Posted: Thu 02 May 2024 11:54 am
by broadstairs
I have two copies of CMX running V4 using two gateways (GW2000 and GW1200) on the same Linux PC. Yesterday I got an alarm saying the GW1200 needed a F/W update but it is running the latest F/W. Looking at the log I saw this-

Code: Select all

GW1200

2024-05-01 13:00:03.094  - WH35CH8 sensor = disabled
2024-05-01 13:00:03.094  - WH90 sensor = disabled
2024-05-01 13:00:03.094 PrintSensorInfoNew: Error - Object reference not set to an instance of an object.
2024-05-01 13:00:03.094 Reading firmware version
2024-05-01 13:00:03.104 DoCommand(CMD_READ_FIRMWARE_VERSION): Valid response
2024-05-01 13:00:03.104 Received: FF-FF-50-12-0E-47-57-31-32-30-30-41-5F-56-31-2E-33-2E-31-B8
2024-05-01 13:00:03.104 API.GetLatestFirmwareVersion: Get Ecowitt Latest Firmware Version
2024-05-01 13:00:03.104 Ecowitt URL: http://ota.ecowitt.net/api/ota/v1/version/info?id=58%3ACF%3A79%3ADF%3AC9%3A64&model=GW1200A&time=1714564803&user=1&version=V1.3.1&sign=31d9a418927c21106249c209c5989852
2024-05-01 13:00:03.458 API.GetLatestFirmwareVersion: Ecowitt API Response code: 200
2024-05-01 13:00:03.458 API.GetLatestFirmwareVersion: Ecowitt API Response: {"code":-1,"msg":"Operation too frequent","time":"1714564803","data":[]}
now I wondered why it got the Operation too frequent message but looking at my GW2000 log I could see this-

Code: Select all

GW2000

2024-05-01 13:00:02.784 Reading firmware version
2024-05-01 13:00:02.792 DoCommand(CMD_READ_FIRMWARE_VERSION): Valid response
2024-05-01 13:00:02.792 Received: FF-FF-50-12-0E-47-57-32-30-30-30-41-5F-56-33-2E-31-2E-32-B8
2024-05-01 13:00:02.792 API.GetLatestFirmwareVersion: Get Ecowitt Latest Firmware Version
2024-05-01 13:00:02.792 Ecowitt URL: http://ota.ecowitt.net/api/ota/v1/version/info?id=94%3A3C%3AC6%3A44%3AFA%3A6B&model=GW2000A&time=1714564802&user=1&version=V3.1.2&sign=dcaf6be4a74acd6c72ce65f9e430bd83
2024-05-01 13:00:04.070 API.GetLatestFirmwareVersion: Ecowitt API Response code: 200
2024-05-01 13:00:04.070 API.GetLatestFirmwareVersion: Ecowitt API Response: {"code":-1,"msg":"The firmware is up to date","time":"1714564803","data":{"id":399,"name":"V3.1.2","content":"- Fix the memory leaks and some known crashes.\r\n- T&HP sensor can replace indoor temperature, humidity, pressure data.\r\n- Fixed a bug when wifi is turned off.","attach1file":"https:\/\/osswww.ecowitt.net\/ota\/20240312\/d0230943cdf23c9469244c49e32bc0e1.bin","attach2file":"","queryintval":86400}}
2024-05-01 13:00:04.070 API.GetLatestFirmwareVersion: No update required, already on the latest version: V3.1.2
As you can see the timing is such that the two operations took place within a second of each other. Also when the error happened on the GW1200 it was not properly handled and should have been retried a while later.

Stuart

Re: Check for Ecowitt F/W update fails

Posted: Thu 02 May 2024 1:10 pm
by ConligWX
This is probably the same error as reported previously.

viewtopic.php?t=22190

Re: Check for Ecowitt F/W update fails

Posted: Thu 02 May 2024 1:39 pm
by broadstairs
No I don't think it's directly related it seems to me the error is mishandled, it should not raise the f/w update flag but be retried.

Stuart

I just checked todays log file and the operation worked OK and it says it's the latest f/w, however the f/w alarm is still set! So it was because the two processes tried to access Ecowitt too close together, this Operation Too Frequent needs to be detected and re-tried.

Re: Check for Ecowitt F/W update fails

Posted: Thu 02 May 2024 3:48 pm
by broadstairs
I agree it's not critical but today at about the same time on the GW1200 it did successfully get the f/w value and confirmed no update was required but it did not reset the alarm, and more than 24 hours had elapsed when I checked. Mildly annoying because initially I went looking for another update! Obviously the two CMXs did the check at sufficiently different times today.

Stuart