Open donagrejja opened 1 year ago
There where two reasons WMI support has been removed:
Therefore we added a new, web-request based API to replace WMI. I am aware this might break some usage scenarios, but I was assuming it is not so difficult to switch an application to the new API.
Isn't this desktopinfo tool doing the same thing? Or why would they need to work together?
Getting rid of WMI was great, but how does one query the API?
@RealKodijack Apparently, I never documented it.
When the web server is running, you can point your browser at http://localhost:8086 to see a web interface. Other than that, the following Json end points are implemented:
/api/available
Returns "true" (or an error if not)
/api/version
Returns the version of the server
/api/rootnode
Returns a json with the sensor tree and all the values
/api/nodes/{NodeId}
Returns a json with just the information for the given node
So the basic idea is that you would be querying /api/rootnode
first to get the list of nodes, and then query /api/nodes/...
to get an update. You will need to regularly query the root node again, otherwise you will not be notified of hardware changes (e.g. new USB sticks connected).
If you happen to use .NET, there's a reference implementation for a client in https://github.com/dotnet/iot/tree/main/src/devices/HardwareMonitor.
Awesome, thanks for the quick reply. Already dug the info out of the code myself, but I'm surely not the first nor the last to wonder :-)
Hi =)
Nice job on the bugfixes and additional hardware support of this application =)
I am just wondering if it's possible to maybe add WMI like before but as an alternative plugin or such ?
I know that there was a userbase of the original product that are using WMI together with desktopinfo (https://www.glenn.delahoy.com/desktopinfo/)
And ofc I am one of those using WMI queries to lookup hardware information =) but I can't get it to display newer hardware due to WMI being deprecated and older versions with WMI not supporting the hardware ;)
Anyway. Great job !