tiredsosha / warden

Сontrol Windows over MQTT
Apache License 2.0
8 stars 2 forks source link

Incorrect function #20

Open hazymat opened 1 year ago

hazymat commented 1 year ago

Hi,

The warden.log file is doing a very good job :)

Is it possible to add more logging in the case of "incorrect function" to provide more insight about the cause?

Logfile errors getting the volume:

WARN:  2023/01/22 21:56:33 can't get volume level - Incorrect function.
DEBUG: 2023/01/22 21:56:33 volume:%!s(<nil>)
WARN:  2023/01/22 21:56:33 skiping one cycle of publishing to "warden/flanders/status/volume" - WINAPI

And setting the volume:

DEBUG: 2023/01/22 21:56:38 17 recieved in "warden/flanders/commands/volume"
WARN:  2023/01/22 21:56:38 can't set volume level - Incorrect function.

Also same problem getting mute status:

WARN:  2023/01/22 22:02:43 can't get mute status - Incorrect function.
WARN:  2023/01/22 22:02:43 skiping one cycle of publishing to "warden/flanders/status/muted" - Incorrect function.

and setting it:

DEBUG: 2023/01/22 22:03:40 true recieved in "warden/flanders/commands/mute"
WARN:  2023/01/22 22:03:40 can't set mute - Incorrect function.
tiredsosha commented 1 year ago

incorrect function is error from win api itself. I will try to reproduce the problem, thanks