WLED icon indicating copy to clipboard operation
WLED copied to clipboard

Show current CPU Frequency in WebUI and maybe Home Assistant integration

Open CRCinAU opened this issue 1 year ago • 4 comments

Now that we have 80 & 160Mhz binaries, it would be good to show which one is actually in use on an ESP8266 based chip.

I recently updated my WLED install on a device I had changed to the 160Mhz binary, but there was no way to tell if it updated to an 80 or 160Mhz version of WLED.

CRCinAU avatar Apr 04 '24 23:04 CRCinAU

~~There is no API to detect the actual CPU frequency.~~ If you see no difference and you are getting adequate performance then it doesn't matter what CPU frequency is.

EDIT: Apparently there is API.

blazoncek avatar Apr 05 '24 06:04 blazoncek

Yeah - I haven't looked at the WLED code closely - but if its using the normal Arduino libraries, some random code I used on a WebUI is:

		F("<tr><td>IP Addresses</td><td>") + ip_addr + F("</td></tr>\n") +
		F("<tr><td>MAC Address</td><td>") + WiFi.macAddress().c_str() + F("</td></tr>\n") +
		F("<tr><td>CPU Speed:</td><td>") + ESP.getCpuFreqMHz() + F(" MHz</td></tr>\n") +
		F("<tr><td>Flash Speed:</td><td>") + (ESP.getFlashChipSpeed() / 1000000) + F(" Mhz</td></tr>\n") +
		F("<tr><td>Flash Real Size:</td><td>") + ESP.getFlashChipRealSize() + F(" bytes</td></tr>\n") +
		F("<tr><td>Flash Mode:</td><td>") +
			(
			ESP.getFlashChipMode() == FM_QIO ? "QIO" :
			ESP.getFlashChipMode() == FM_QOUT ? "QOUT" :
			ESP.getFlashChipMode() == FM_DIO ? "DIO" :
			ESP.getFlashChipMode() == FM_DOUT ? "DOUT" :
			"UNKNOWN") + F("</td></tr>\n") +

CRCinAU avatar Apr 05 '24 06:04 CRCinAU

Screenshot 2024-04-05 at 15 54 17 would that do it?

blazoncek avatar Apr 05 '24 13:04 blazoncek

That would be beautiful :)

That way, I can see what build has actually been flashed :)

CRCinAU avatar Apr 05 '24 13:04 CRCinAU

availeable since 0.15.0-b2 (8266 and esp32 chips supported)

softhack007 avatar Sep 28 '24 16:09 softhack007