Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show current CPU Frequency in WebUI and maybe Home Assistant integration #3879

Open
CRCinAU opened this issue Apr 4, 2024 · 4 comments
Open
Labels
enhancement fixed in source This issue is unsolved in the latest release but fixed in master

Comments

@CRCinAU
Copy link

CRCinAU commented Apr 4, 2024

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.

@blazoncek
Copy link
Collaborator

blazoncek commented Apr 5, 2024

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.

@CRCinAU
Copy link
Author

CRCinAU commented Apr 5, 2024

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") +

@blazoncek
Copy link
Collaborator

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

@CRCinAU
Copy link
Author

CRCinAU commented Apr 5, 2024

That would be beautiful :)

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

blazoncek added a commit that referenced this issue Apr 5, 2024
- add "clock" - CPU clock in MHz
- add "flash" - flash size in MB
Fix for #3879
@blazoncek blazoncek added the fixed in source This issue is unsolved in the latest release but fixed in master label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement fixed in source This issue is unsolved in the latest release but fixed in master
Projects
None yet
Development

No branches or pull requests

2 participants