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

Fix the situation when there is no volume info #4

Open
bessarabov opened this issue Apr 20, 2021 · 2 comments
Open

Fix the situation when there is no volume info #4

bessarabov opened this issue Apr 20, 2021 · 2 comments

Comments

@bessarabov
Copy link
Owner

See the discrussion starting from https://community.home-assistant.io/t/mac2mqtt-control-volume-on-macos-via-mqtt/298607/14

@fmnamado
Copy link

Another bump into this one.

I have a "logical" audio board, composed by the juntcion of several audios that it is in my interested to be chosen instead of the normal iMac audio output.

Running the command

/usr/bin/osascript -e 'get volume settings'

When the "normal" output is selected gives:

output volume:44, input volume:100, alert volume:100, output muted:false

When this other output is selected gives:

output volume:missing value, input volume:100, alert volume:100, output muted:missing value

So what happens when this locial output is chosen, it crashes the program:

<-user->@<-computer-> mac2mqtt % ./mac2mqtt
2022/11/22 10:23:05 Started
2022/11/22 10:23:05 Connected to MQTT
2022/11/22 10:23:05 Sending 'true' to topic: mac2mqtt/<-computer->/status/alive
2022/11/22 10:23:07 strconv.Atoi: parsing "missing value": invalid syntax

As there is no value, it cannot be converted.
It is the same problem as described.

What can it be done to avoid this?
I don't need the volume information or control, I just want to shutdown remotely the Mac.

Thank you for your help.

@omarkhali
Copy link

I also have the same error on my Mac mini M1, did you find a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants