Nekmo / amazon-dash

Hack your Amazon Dash to run what you want.
MIT License
828 stars 67 forks source link

Telegram issue: "Error code: 400" #122

Closed asiag0 closed 5 years ago

asiag0 commented 5 years ago

Put an x into all the boxes [ ] relevant to your issue (like this: [x])

What is the purpose of your issue?

Description

I'm trying to set up telegram notification, however, during testing, it returns the error:

2019-01-31 08:18:29,335 - amazon-dash - WARNING - Error sending confirmation on device button: Error on telegram confirmation. Error code: 400. Error message: Bad Request: chat not found

Here's my config file:

#amazon-dash.yml
# ---------------
settings:
  delay: 10

devices:
    XX:XX:XX:XX:XX:XX: # Angel Soft                                                                                                                                                                                         
      name: button
      confirmation: send-tg
      cmd: date

confirmations:
    send-tg:
      service: telegram
      token: 'TOKEN'
      to: USERID
      is_default: true

I think perhaps I'm missing something, but I've checked all the documentation and can't see what I'm missing. I've verified that my telegram token and user id are both correct.

asiag0 commented 5 years ago

Ah, this can be closed. I forgot that the chat needs to be opened first (I have a tendency to close/delete old chats).