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

Program terminating itself after a while, trying to access Dropbox directory #16

Open
fmnamado opened this issue Nov 22, 2022 · 1 comment

Comments

@fmnamado
Copy link

Hello,

I am interested in this software just to shutdown remotely via Home Assistant, but I am running into several problems.

Let's start in the first one.

I edited the files in order to reflect my username, but when mac2mqtt is running, it terminates itself after a while using "bessarabov" absolute username.
I thinks this is in the program itself and not in my YAML files.
What is it trying to do accessing a Dropbox directory?
Have I forget to change somewhere?

Can you please help me?

<-user->@<-computer-> mac2mqtt % ./mac2mqtt
2022/11/22 09:45:51 Started
2022/11/22 09:45:51 Connected to MQTT
2022/11/22 09:45:51 Sending 'true' to topic: mac2mqtt/<-computer->/status/alive
panic: runtime error: index out of range [1] with length 0

goroutine 45 [running]:
main.getBatteryChargePercent(0xc00004fef0, 0x1319948)
/Users/bessarabov/Dropbox/git/mac2mqtt/mac2mqtt.go:284 +0x115
main.updateBattery(0x137cc20, 0xc000120000)
/Users/bessarabov/Dropbox/git/mac2mqtt/mac2mqtt.go:290 +0x85
main.main.func1(0xc0001a6000, 0x137cc20, 0xc000120000, 0xc0001a6050)
/Users/bessarabov/Dropbox/git/mac2mqtt/mac2mqtt.go:318 +0xe5
created by main.main
/Users/bessarabov/Dropbox/git/mac2mqtt/mac2mqtt.go:310 +0x1d0
<-user->@<-computer-> mac2mqtt %

@callumgare
Copy link

Looks like you're running into this issue #8. Until #17 is merged you'll need to build the binary yourself from source with the changes included in theat PR in order to get this to run I'm afraid. If you're game you can follow the process found in #9.

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

2 participants