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

Unable to get notifications on telegram #132

Open
ronzino83 opened this issue Sep 10, 2024 · 8 comments
Open

Unable to get notifications on telegram #132

ronzino83 opened this issue Sep 10, 2024 · 8 comments

Comments

@ronzino83
Copy link

ronzino83 commented Sep 10, 2024

I am having difficulties to bring notifications on telegram.

Log does not report telegram releted issues,and correctly report event on motion detection

I have created a telegram bot,got the id and chat id,but notifications does not come.

My config.yml follows

Do i have to setup something more on the bot ? Always used bots but it is the first time i create one

frigate:
  server: http://192.168.119.33:5000
  ignoressl: true

  webapi:
    enabled: true                                                    
    interval: 30

  mqtt:
    enabled: false                                               
  cameras:
    exlude:                                                      
  alerts:                                                         
   general:
      title: Frigate Alert
      timeformat: Mon, 02 Jan 2006 15:04:05 MST
      nosnap: allow
      snap_bbox: false
      snap_timestamp: false
      snap_crop: false

    quiet:
      start:
      end:
                        
    zones:
      unzoned: allow
      allow:
      block:

    labels:
      min_score: 30
      allow:
      block:

    telegram:
      enabled: true
      chatid: 11xxxx
      token: 69xxxxx
      template:

  monitor:
    enabled: false
    url:
    interval:
    ignoressl:
@freefd
Copy link
Contributor

freefd commented Sep 11, 2024

@ronzino83, firstly just check that your bot works. You can do this by simply using curl:

~> curl -d chat_id=11xxxx -X POST https://api.telegram.org/bot69xxxxx/sendMessage -d text='Test message'

Where chat_id contains the ID of your Telegram account, the bot69xxxxx - is the bot ID with mandatory bot prefix.
Don't forget to send the bot a message like /start to be able to receive messages from it.

@ronzino83
Copy link
Author

Thanks for your help. I have tried with the proposed command, and i have received the message on telegram. So the bot is ok...should be something else or in the config or a parsing bug

@ronzino83
Copy link
Author

I have just seen that "alerts" and "monitor" are at the same indenting level of "frigate", while in my -yml are sublevel of frigate.
No parsing error is reported in the log, but probabily the parser is not doing a good job. I will give a try to this modification later and I will give a feedback if this solve the problem or not

@freefd
Copy link
Contributor

freefd commented Sep 11, 2024

@ronzino83 did you try to enable debug logging with env var named FN_DEBUG or using CLI arg -debug as described by documentation https://frigate-notify.0x2142.com/latest/config/options/?

@ronzino83
Copy link
Author

@freefd yes i have enabled FN_DEBUG but log does not show anything relevant

BY THE WAY, everything now is fixed, eventually it was an indentation error in my .yml file as written before.
Such kind of error is not catch by yml parser.
Thanks for you support, i can start to use this sw.

@freefd
Copy link
Contributor

freefd commented Sep 14, 2024

@0x2142, it seems that several root keys in the configuration should become mandatory to avoid such a silent parsing of a malformed YAML.

@0x2142
Copy link
Owner

0x2142 commented Sep 16, 2024

Agreed. I have a bit of work to do on improving the config file parsing, but it hasn't been the biggest priority. Perhaps in the meantime I could add a few key items to check for though & make it easier to notify the user when the indentation is incorrect.

@ronzino83
Copy link
Author

Yeah parsing is always a time consuming coding activity, with few benefits, as once a user resolve a typo, the parsing utility becames null.

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