alarmserver
alarmserver copied to clipboard
panic: Both MQTT and Webhook buses are disabled. Nothing to do!
2023-02-23T12:38:22.793747923Z panic: Both MQTT and Webhook buses are disabled. Nothing to do! 2023-02-23T12:38:22.793881085Z 2023-02-23T12:38:22.793885081Z goroutine 1 [running]: 2023-02-23T12:38:22.794528495Z github.com/toxuin/alarmserver/config.(*Config).Load(0x8?) 2023-02-23T12:38:22.794644780Z /tmp/app/config/config.go:160 +0xe8b 2023-02-23T12:38:22.794730582Z main.main() 2023-02-23T12:38:22.794974695Z /tmp/app/main.go:25 +0x35
Any ideas?
config file is:
debug: true
hikvision: enabled: true cams: myCam: address: 192.168.1.19 https: false username: admin password: admin rawTcp: true
mqtt: enabled: true username: alarmserver password: "assword" port: 1883 server: "192.168.1.20" topicroot: camera-alerts
testet config file name = config.yml and config.yaml
Running on Ubuntu, Docker
Eddie
The config snippet that you posted does not format as a valid YAML. I suspect the indentation in your config is not correct, resulting in invalid configuration. If you can, please pot your formatted config or you can use gist to save your config and share the link to it here in the issue.
I found the error:
the check file , config.go checks for both mqtt and webservices.
Do we need both?
if !myConfig.Mqtt.Enabled && !myConfig.Webhooks.Enabled {
panic("Both MQTT and Webhook buses are disabled. Nothing to do!")
}
This line checks for when both webhooks and MQTT are disabled. This means there is nothing for this software to do - it needs at least one of those enabled. Please provide your config in original format including indentation.
https://gist.github.com/eddiex666/d8a7014ba66e125582def940bf1a3220
I tryed to copy the sample file and remove webhooks and camera. the sample file is using "tab" from CMD. I also testet to edit inside Blusfish and Notepad++
I just need 1 camera and mqtt for the test
debug: true
hikvision: enabled: true cams: myCam: address: 192.168.1.17 https: false username: admin password: admin rawTcp: true
mqtt: enabled: true username: alarmserver password: "assword" port: 1883 server: "192.168.1.4" topicroot: camera-alerts
i just copy and paste the sample config file into my config.yaml file and i still get the error...
Maybe someone can send me a valid dummy config file? with mqtt and 1 camera... that works...
:-)
we found the BUG.
The config file is not reading from correct path. it should be ./config.yml/config.yaml
but in GO file its referating to ./config/config.yaml
However the default config file it been generated into the docker container patch, under DIFF, and this file is been read correct.
Hi guys. I have the same problem. I still don't understand how to fix it?
Hi, @eddiex666 have you solved this problem? Changing location didn't work for me.