| Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision |
| docs:guide-user:services:remote_control:im_email [2024/12/14 23:44] – [XMPP] stokito | docs:guide-user:services:remote_control:im_email [2024/12/15 16:23] – [UnifiedPush] stokito |
|---|
| |
| ===== Telegram ===== | ===== Telegram ===== |
| This is the most used option. The Telegram has an advanced Bots API with easy access via simple HTTP API with a long pooling. | This is the most used option. The Telegram has an [[https://core.telegram.org/bots|advanced Bots API]] with easy access via simple HTTP API with a long pooling. |
| |
| The [[https://github.com/alexwbaule/telegramopenwrt|alexwbaule/telegramopenwrt]] is a TG bot based on the ''curl'' and supports many commands: | The [[https://github.com/alexwbaule/telegramopenwrt|alexwbaule/telegramopenwrt]] is a TG bot based on the ''curl'' and supports many commands: |
| * wifi_list: List all wireless devices. | * wifi_list: List all wireless devices. |
| * wifi_restart: Restart a wireless device radio. | * wifi_restart: Restart a wireless device radio. |
| * wll_list: Get a wifi clients list that is connected to this device * * Unordered List Item | * wll_list: Get a wifi clients list that is connected to this device |
| |
| |
| ===== XMPP ===== | ===== XMPP ===== |
| The XMPP (Jabber) is badly supported but used. You can install the [[:docs:guide-user:services:xmpp.server|Prosody XMPP server]] and use it as client too with a little Lua scripting. | The XMPP (Jabber) is badly supported but used. You can install the [[:docs:guide-user:services:xmpp.server|Prosody XMPP server]] and use it as client too with a little Lua scripting. |
| The [[https://sendxmpp.hostname.sk/|sendxmpp]] is a perl-script to send xmpp, similar to what sendmail does for email. You may try to use [[https://xmpp.org/extensions/xep-0124.html|XEP-0124 BOSH]] or install REST API plugin on the XMPP server to send and receive messages over HTTP API. | The [[https://sendxmpp.hostname.sk/|sendxmpp]] is a perl-script to send xmpp, similar to what sendmail does for email. To send and receive messages over HTTP API with ''wget'' or ''curl'' you may install REST API plugin on the XMPP server ([[https://modules.prosody.im/mod_http_rest|mod_http_rest]] for Prosody). The [[https://xmpp.org/extensions/xep-0124.html|XEP-0124 BOSH]] probably can be used. |
| |
| * [[https://github.com/stanson-ch/xmppcd|xmppcd]] Small XMPP client daemon | * [[https://github.com/stanson-ch/xmppcd|xmppcd]] Small XMPP client daemon |
| * [[https://www.reddit.com/r/openwrt/comments/11auq9n/send_a_xmpp_message_from_router/|Reddit: Send a xmpp message from router]] | * [[https://www.reddit.com/r/openwrt/comments/11auq9n/send_a_xmpp_message_from_router/|Reddit: Send a xmpp message from router]] |
| | |
| | |
| | ===== UnifiedPush ===== |
| | |
| | [[https://unifiedpush.org/|UnifiedPush]] is an open specification and tools that lets the user choose how push notifications are delivered. Different apps supports it: |
| | |
| | * [[https://docs.ntfy.sh/|ntfy.sh]] (pronounced "notify") is an HTTP-based publish-subscriber notification service. It allows you to send notifications to your phone or desktop via scripts from any computer, and/or using a REST API. It has apps for Android and iOS. |
| | * The same but I want to use Google for some reason: [[https://unifiedpush.org/users/distributors/fcm/|gCompat-UP Distrib (Android)]] |
| | * I have a Nextcloud server: [[https://unifiedpush.org/users/distributors/nextpush/|NextPush (Android)]] |
| | * I use Conversations XMPP client: [[https://unifiedpush.org/users/distributors/conversations/|Conversations (Android)]] |
| | |
| | ==== Send push notification via ntfy.sh ==== |
| | Example of a script to send a notification via the [[https://docs.ntfy.sh/|ntfy.sh]] into the [[https://ntfy.sh/example|example]] queue (you should create your own private queue): |
| | |
| | <code bash> |
| | NTFY_QUEUE="example" |
| | NEW_CLIENT_IP="192.168.1.42" |
| | MSG="Someone joined network |
| | |
| | A new client with IP $NEW_CLIENT_IP joined. |
| | Please check if it's not an intruder." |
| | |
| | wget -q -O - "ntfy.sh/$NTFY_QUEUE" \ |
| | --header "Priority: urgent" \ |
| | --header "Tags: ghost" \ |
| | --header "Click: http://192.168.1.1/" \ |
| | --header "Actions: http, Open Luci, https://192.168.1.1/cgi-bin/ntfy-action.cgi?block=$NEW_CLIENT_IP, clear=true" \ |
| | --header "Email: root@OpenWrt" \ |
| | --post-data="$MSG" |
| | </code> |
| | |
| | **NOTE:** the ''--header'' option was added to the ''uclient-fetch'' on Jul 2024 so if you wish to use extended properties you'll need to install the ''wget-ssl'' package. |
| | |
| | ==== See also ==== |
| | |
| | [[https://github.com/bitfireAT/webdav-push/|WebDAV Push]] |
| | |