nlef / moonraker-telegram-bot

Telegram bot to interact with Moonraker (Klipper Web API Server)
Creative Commons Zero v1.0 Universal
245 stars 64 forks source link

[Bug]: secrets file is not being picked up? #289

Open Otann opened 11 months ago

Otann commented 11 months ago

What happened and in what context?

I have the telegram.conf file

#  Please refer to the wiki(https://github.com/nlef/moonraker-telegram-bot/wiki) for detailed information on how to configure the bot

[bot]
server: localhost
# bot_token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# chat_id: 1

[secrets]
secrets_path: /home/pi/printer_data/config

[progress_notification]
time: 600
percent: 10

[status_message_content]
content: progress, eta, finish_time, m117_status, last_update_time
sensors: rpi, canbus_mcu, chamber
heaters: extruder, heater_bed
fans: chamber, nevermore

[camera]
host: http://localhost:8080/?action=stream
rotate: 180
fps: 30

[telegram_ui]
buttons: [status,pause,cancel,resume],[emergency,macros,shutdown],[HEATSOAK, COOLDOWN]
require_confirmation_macro: false
progress_update_message: false
status_message_m117_update: true

and I have secrets.conf file in the same folder next to it:

[secrets] 
bot_token: xxxxx
chat_id: 111111

But when the bot starts it complains that the values are not provided. And if I use fake values, the log says that the token is invalid.

It looks like the secrets file is not being used, or am I doing something wrong?

If needed, paste the relevant bot log contents here.

No response

If needed, paste the relevant bot journal contents here.

No response

What branch does this occur on?

master

Reports only on latest master or development branches!

EllaFoxo commented 7 months ago

Same issue happens here, clean install from KIAUH.

vasyl83 commented 6 months ago

just tried and having the same issue

nlef commented 6 months ago

@Otann @vasyl83 @tinyfluffs For now you can specify the full path with the name of the secrets file. Default secrets filename fixed in 6601fdf