Hi!
I can’t create TelegramReceiverDevice in config.json, can anybody help me with syntax (ex.):
{
"id": "TelegramReceiverDevice",
"name": "TelegramReceiverDevice",
"class": "TelegramReceiverDevice"
}
where is my mistake?
New plugin for Telegram
Hi!
I can’t create TelegramReceiverDevice in config.json, can anybody help me with syntax (ex.):
{
"id": "TelegramReceiverDevice",
"name": "TelegramReceiverDevice",
"class": "TelegramReceiverDevice"
}
where is my mistake?
Well, looks like you are missing the Secret Passcode… But why not create such device via the frontend?? Worked like a charm for me!
Anyway, here’s the config for my device:
{
"secret": "XXX",
"id": "telegramreceivertest",
"name": "telegramreceivertest",
"class": "TelegramReceiverDevice"
}
@Stokstaart thx! @Dan how about own commands section? I try to write like this:
{
"id": "TelegramReceiverDevice",
"name": "TelegramReceiverDevice",
"class": "TelegramReceiverDevice",
"secret": "$ecret$",
"commands": [
{
"name": "send_mess",
"request": "send_mess",
"variable": "$gdoors",
"value": "set",
"enabled": true
}
]
},
at ptmatic-daemon.log i see:
[pimatic] error: Invalid config of device "TelegramReceiverDevice": Property "commands" is not a valid property
and it not works, when i send message to my bot:
mocart2: send_mess
i get:
Robot: 'send_mess' is not a valid command
all other default commands (like: help, etc.) works. Thanks!
@mocart2 The commands section you defined is is not within the specification, so this will not work. I would suggest to use the GUI (webpage) as @stokstaart suggested. Furthermore, please read the plugin description and forum threads on the pimatic website on how to correctly configure, this will make it more clear. Looking at the syntax I think you have seen the very early screenshot of my original suggestion, which I moved away from in favour of directly responding to rule conditions as suggested by Kosta.
You can define rules with a predicate e.g.
when telegram received "send_mess" then turn on the light
Below some valid examples to get you underway.
Correct config sections:
Plugin:
"plugin": "telegram",
"apiToken": "<your apitoken>",
"active": true,
"recipients": [
{
"name": "<friendly name>",
"userChatId": "<chat_id>",
"enabled": true,
"admin": true
}
]
}'```
ReceiverDevice:
```{
"secret": "<change_me !>",
"id": "telegram-receiver",
"name": "Telegram Receiver",
"class": "TelegramReceiverDevice"
}```
Rule Predicate example:
```{
"id": "receiver-test",
"name": "receiver-test",
"rule": "when telegram received \"test\" then set temp of thermostat to 19,
"active": true,
"logging": true
}```
Rule Action example:
```{
"id": "presence-when-i-am-not-home",
"name": "Send ALARM when doors / windows are opened when I am not home",
"rule": "when $windows-open = $yes and $at-home = $no then send text telegram to JohnDoe \"!! INTRUDER ALERT !! Doors / Windows were opened while not home !!\"",
"active": true,
"logging": true
}```
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins
Question: Did i mess up something? Are the new telegram plugin workin well now?
Like i said, like a charm!
(haven’t tried to send pics/video yet, but triggering rules and getting data is working fine here!)
@Swen Difficult to say without any information. I believe @mwittig saw your problems after the rollback to 1.0.8 were not caused by telegram, but by IFTT.
The current version of Telegram should be stable, and I just retested other media formats on the released version, and they are sent with success as well (This part of the code was not touched between versions).
If you are unsure, just delete the pimatic-telegram directory from your node_modules directory, and restart pimatic. The plugin will be automatically reinstalled, after which you can follow instructions to enable the new functionality. Also your rules will need to be in the new format as per the instructions.
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins
Roger, thank you!
@Dan that is so awesome! Very nice. Working well.Thank you for this upgrade.
The next release will include sending locations (GPS coordinates), which will show as a map in your telegram messaging client. Combined with the location or phone plugins this could yield some creative solutions, such as “alert if a device is not at an expected location at a determined time”. Code is ready on a separate branch, but I am not sure when I will merge to master yet. Soon though
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins
Version 1.1.13 has been released just now:
send gps telegram ....... "<latitude>;<longutide>"
which allows for sending GPS coordinatesLate breaking known issue: After changing settings of the TelegramReceiverDevice, the rule commands defined by telegram received "rule_command"
are lost by the listener. I am looking to make these persistent across recreation of the device (which happens on changes), or reload the rules defined with “telegram received” on recreation of the device, which then passes them to the listener
Workaround: Restart pimatic after changing settings on your TelegramListenerDevice
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins
Hi,
i like the telegram plugin very much and change from pushover to telegram!
but i habe now one problem with the telegram plugin. I create a rule that sends me some datas out of variables, if i send a message to my bot. and it works fine. but my problem is, that the variables in the message don t updated. if i order the variables the first time, everything looks good. but every message after the first (same rule) include the same information like the first, although the variables changed in pimatic. only i restart pimatic the message includes the right data.
(pimatic version: 0.9.38 | telegram version: 1.1.13)
i hope somebody can help.
@flozen See the primary post on reporting issues on Github. This issue was logged previously and has been fixed. The fix will be included in the next release.
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins
oh, now i see. sorry, i have to search better the next time and thanks for your very fast answer
1.1.4 has been released with bugfixes for Github issues:
#13: Telegram receiver rules are not applied for recreated telegram receiver device
#16: Bot sends old values
In short, when changing settings on the receiver device, Telegram now reloads rule commands when telegram received "<request>"
When sending variables, eg temperature, Telegram now sends the actual value at the time of sending the message
@flozen: No worries !
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins
Hi. Not sure if i’m blind, or it’s not possible for now:
Is it possible to turn off the message sent, when activating rules by sending keywords (“Rule condition ‘XYZ’ triggered”)?
Thanks for your work!
Hi @sirhc,
Your eyes are still working The confirmation message is sent always. If needed I can look into making this a configurable option.
Can you say some more about your specific scenario? this helps determining the best option, as it may benefits others as well.
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins
First, thanks for the great plugin
But i have a little problem.
The pluging should send me the actually temperature, but it only works once and after the pimatic send me always the same value.
If i send the value at the same time by email, then i receive a mail with the correct value.
At the Webinterface is the value also correct but telegram send me always the same value.
regards
Markus
@Dan
I’m relieved :P
I’m just using Keywords like “Licht aus” to switch off all 433mhz triggered lights. When done im sending a text message Via telegram with a custom text “Licht XYZ aus”, which i prefer over the rule condition triggered.
For other scenarios it’s even more “useless” to see the rule triggered: When sending “Temperatur” to my telegram bot i’ getting messaged with the current values of my temperature sensors (see my error report from 2 days ago); Therefore i’m sending a message with those values - if that rule hadn’t been triggered, i wouldn’t get any response, so there’s as well no need for this.
So an option for just turning on / off rule triggering would be nice: Those who don’t want to create customs responses can just use the automated rule answer, while the others can turn it off and send custom messages.
Thanks in advance!
@edhunter667 said in New plugin for Telegram:
Just upgrade to the new version, your error #13 was fixed there.
@sirhc said in New plugin for Telegram:
So an option for just turning on / off rule triggering would be nice: Those who don’t want to create customs responses can just use the automated rule answer, while the others can turn it off and send custom messages.
Thanks in advance!
This is the easy option :D, can implement in a few minutes really, I’ll see if I can get around to it today!
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins