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

Example config on npmjs buggy #10

Open
sschuste opened this issue Mar 7, 2019 · 7 comments
Open

Example config on npmjs buggy #10

sschuste opened this issue Mar 7, 2019 · 7 comments

Comments

@sschuste
Copy link

sschuste commented Mar 7, 2019

Not a code issue, but your example config on https://www.npmjs.com/package/homebridge-telegram is buggy and differs from the one shown here on GitHub.

Stefan

@Kjoffy
Copy link

Kjoffy commented Dec 5, 2019

Here, use this one attached

Config (1).txt

@jeylites
Copy link

jeylites commented Dec 26, 2019

Can't seem to get this working on IOS 13, Homebridge & plugin load successfully and I see an icon on Homekit app but it says Not Supported. What could be the issue? Is it a config issue?

Hardware: Raspberry Pi 3B+
Homebridge: Alpine Docker Setup

{
    "bridge": {
        "name": "Home2#7",
        "username": "",
        "port": 52332,
        "pin": "031-45-150"
    },
    "accessories": [],
    "platforms": [
        {
            "platform": "Telegram",
            "bots": [
                {
                    "name": "Bot name as seen in HomeKit",
                    "token": "1039561798:AAGGJwwTqi5JJYLlbrHSO7rvDVTqZmnNB2E",
                    "chat": "-358641562",
                    "error": "Something broken. I'm shutting down.",
                    "notifications": {
                        "Hello": {
                            "mode": "Markdown",
                            "randomize": true,
                            "messages": [
                                "*Hi!*",
                                "_Hello!_",
                                "Hey mate!",
                                {
                                    "bye": {
                                        "mode": "HTML",
                                        "randomize": false,
                                        "messages": [
                                            "<b>Good bye!</b>",
                                            "<i>I'm sad to see you leave.</i>"
                                        ]
                                    }
                                }
                            ]
                        }
                    }
                }
            ]
        }
    ]
}

@roboterm
Copy link
Contributor

Status „Not Supported“ is normal.
But your chat id looks wired. Didn’t know that there are negative ids.

@roboterm
Copy link
Contributor

roboterm commented Dec 26, 2019

And your config looks wired too. Take a look at mine:

{
   "platform" : "Telegram"    
   "name" : "R0bot",  
   "bots" : [  
       {
           "chat" : "15683609",  
           "token" : "xxxxxxxxxx",  
           "name" : "R0bot",  
           "error" : "Something broken. I'm shutting down.",  
           "notifications" : {  
               "Auf Wiedersehen" : {  
                   "mode" : "HTML",  
                   "randomize" : false,  
                   "messages" : [  
                       "<b>Letzte Person hat Wohnung verlassen.</b>"  
                   ]  
               },  
               "Air Alert" : {  
                   "mode" : "HTML",  
                   "randomize" : false,  
                   "messages" : [  
                       "<b>Air Alert!</b>"  
                   ]  
               },  
               "Sonnenaufgang" : {  
                   "mode" : "HTML",  
                   "randomize" : false,  
                   "messages" : [  
                       "<b>Sonnenaufgang</b>"  
                   ]  
               },  
               "Willkommen" : {  
                   "mode" : "HTML",  
                   "randomize" : false,  
                   "messages" : [  
                       "<b>Willkommen!</b>"  
                   ]  
               },  
               "Sonnenuntergang" : {  
                   "mode" : "HTML",  
                   "randomize" : false,  
                   "messages" : [  
                       "<b>Sonnenuntergang</b>"  
                   ]  
               }  
           }  
       }  
   ],  
},  

@Kjoffy
Copy link

Kjoffy commented Dec 27, 2019

Hi Guys,

If the chat is a group, then the Chat ID will be negative. If it is about a single person, then it will be positive.

I believe you should send the notifications to the single user added to the group chat.

@jeylites
Copy link

jeylites commented Dec 27, 2019

@roboterm @Kjoffy

Thanks, guys for taking the time to write back, the sample config Robert provided helped. The sample config on wiki needs to be updated as it doesn't work.

I learned about chat ID "-" while watching a Youtube video on How to Create a Telegram Bot and Send Message via bot API.

If anyone runs into the same issue, check the above link out.

Here is my working config

{
    "bridge": {
        "name": "Home2#7",
        "username": "0E:B3:82:CB:2F:D4",
        "port": 52332,
        "pin": "031-45-150"
    },
    "accessories": [],
    "platforms": [
        {
            "platform": "Telegram",
            "bots": [
                {
                    "name": "SMILE ALERTS",
                    "token": "10395617900000000JJYLlbrHSO7rvDVTqZmnNB2",
                    "chat": "-358641562",
                    "error": "Something broken. I'm shutting down.",
                    "notifications": {
                        "FED THE CAT": {
                            "mode": "HTML",
                            "randomize": false,
                            "messages": [
                                "FED THE CAT!"
                            ]
                        },
                        "AUTO GATE OPEN": {
                            "mode": "HTML",
                            "randomize": false,
                            "messages": [
                                "AUTO GATE OPEN"
                            ]
                        }
                    }
                }
            ]
        }
    ]
}

@jeylites
Copy link

jeylites commented Dec 27, 2019

BTW, there seems to be a bug with the plugin. When one tries to turn off "include in Favorites" it still shows up on the Homekit - Favorite list.

Tried to simulate the same for other plugins, no issue.

Updated

FIX: Click on Edit - top right corner of the Homekit app, the icon will start to wiggle. Click on the Plugin Icon and slide to turn off the "include in Favorites" option.

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

4 participants