From 15ad2a0a20d7ebbb1c87ac5933433865bd14cd9b Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 2 Feb 2021 01:15:30 +0100 Subject: [PATCH] s/platypush.readthedocs.io/docs.platypush.tech/g --- ...cate-with-your-smart-home-over-Telegram.md | 14 ++++----- static/pages/Build-custom-voice-assistants.md | 30 +++++++++---------- ...omizable-voice-assistant-with-Platypush.md | 8 ++--- ...y-monitor-with-Platypush-and-Tensorflow.md | 6 ++-- ...your-favourite-e-reader-using-Platypush.md | 6 ++-- ...wsletters-from-RSS-feeds-with-Platypush.md | 16 +++++----- ...atypush-and-a-pinch-of-machine-learning.md | 10 +++---- ...e-for-data-collection-and-visualization.md | 18 +++++------ .../One-browser-extension-to-rule-them-all.md | 16 +++++----- ...to-a-universal-Zigbee-and-Z-Wave-bridge.md | 8 ++--- ...e-self-hosted-automation-with-Platypush.md | 10 +++---- 11 files changed, 71 insertions(+), 71 deletions(-) diff --git a/static/pages/Build-a-bot-to-communicate-with-your-smart-home-over-Telegram.md b/static/pages/Build-a-bot-to-communicate-with-your-smart-home-over-Telegram.md index 42ce0d4..5762676 100644 --- a/static/pages/Build-a-bot-to-communicate-with-your-smart-home-over-Telegram.md +++ b/static/pages/Build-a-bot-to-communicate-with-your-smart-home-over-Telegram.md @@ -90,10 +90,10 @@ backend.chat.telegram: enabled: true ``` -The [backend](https://platypush.readthedocs.io/en/latest/platypush/backend/chat.telegram.html) enables you to receive +The [backend](https://docs.platypush.tech/en/latest/platypush/backend/chat.telegram.html) enables you to receive events (like new messages, attachments, requests, etc.) and create custom hooks on them. -The [plugin](https://platypush.readthedocs.io/en/latest/platypush/plugins/chat.telegram.html) enables you to write to +The [plugin](https://docs.platypush.tech/en/latest/platypush/plugins/chat.telegram.html) enables you to write to chats, programmatically send messages and attachments, administer channels, etc. Let’s say that we want the bot to implement the following commands: @@ -273,11 +273,11 @@ The bot will now reply with an error if you try to send a message from an unauth ## Conclusions We have only explored one specific feature of the Telegram integration in this article: the ability of the bot to react -to [`CommandMessageEvent`](https://platypush.readthedocs.io/en/latest/platypush/events/chat.telegram.html#platypush.message.event.chat.telegram.CommandMessageEvent) +to [`CommandMessageEvent`](https://docs.platypush.tech/en/latest/platypush/events/chat.telegram.html#platypush.message.event.chat.telegram.CommandMessageEvent) events, run actions, and reply with text messages. As you can see from -the [list of supported Telegram events](https://platypush.readthedocs.io/en/latest/platypush/events/chat.telegram.html) +the [list of supported Telegram events](https://docs.platypush.tech/en/latest/platypush/events/chat.telegram.html) you can do more, such as: - Create hooks when someone shares contact info. Ever thought of letting a bot automatically store the new contacts sent @@ -287,15 +287,15 @@ you can do more, such as: a chat to your hard drive or a remote Dropbox folder. - Run actions on text messages instead of commands. You can use - the [`TextMessageEvent`](https://platypush.readthedocs.io/en/latest/platypush/events/chat.telegram.html#platypush.message.event.chat.telegram.TextMessageEvent), + the [`TextMessageEvent`](https://docs.platypush.tech/en/latest/platypush/events/chat.telegram.html#platypush.message.event.chat.telegram.TextMessageEvent), for example, if you prefer to type “turn on the lights” instead of `/lights_on`. - Take a picture from the camera and send it to yourself through - the [`send_photo`](https://platypush.readthedocs.io/en/latest/platypush/events/chat.telegram.html#platypush.message.event.chat.telegram.TextMessageEvent) + the [`send_photo`](https://docs.platypush.tech/en/latest/platypush/events/chat.telegram.html#platypush.message.event.chat.telegram.TextMessageEvent) action. - Automatically moderate chat groups through - the [`chat.telegram`](https://platypush.readthedocs.io/en/latest/platypush/plugins/chat.telegram.html) actions. + the [`chat.telegram`](https://docs.platypush.tech/en/latest/platypush/plugins/chat.telegram.html) actions. - You can also deploy multiple bots, e.g. per device, so you can run actions on a specific device from the associated chat, or instead, use a single bot as entry point and deliver messages to other devices over MQTT, Kafka, or HTTP API. diff --git a/static/pages/Build-custom-voice-assistants.md b/static/pages/Build-custom-voice-assistants.md index df1a3a1..17a9ee7 100644 --- a/static/pages/Build-custom-voice-assistants.md +++ b/static/pages/Build-custom-voice-assistants.md @@ -128,9 +128,9 @@ engines. Let’s go through some of the available integrations, and evaluate the ### Integrations -- [`assistant.google`](https://platypush.readthedocs.io/en/latest/platypush/plugins/assistant.google.html) plugin (to +- [`assistant.google`](https://docs.platypush.tech/en/latest/platypush/plugins/assistant.google.html) plugin (to programmatically start/stop conversations) - and [`assistant.google`](https://platypush.readthedocs.io/en/latest/platypush/backend/assistant.google.html) backend + and [`assistant.google`](https://docs.platypush.tech/en/latest/platypush/backend/assistant.google.html) backend (for continuous hotword detection). ### Configuration @@ -212,7 +212,7 @@ assistant.google: ### Integrations -- [`assistant.google.pushtotalk`](https://platypush.readthedocs.io/en/latest/platypush/plugins/assistant.google.pushtotalk.html) +- [`assistant.google.pushtotalk`](https://docs.platypush.tech/en/latest/platypush/plugins/assistant.google.pushtotalk.html) plugin. ### Configuration @@ -307,7 +307,7 @@ curl -XPOST -H 'Content-Type: application/json' -d ' ### Integrations -- [`assistant.echo`](https://platypush.readthedocs.io/en/latest/platypush/plugins/assistant.echo.html) plugin. +- [`assistant.echo`](https://docs.platypush.tech/en/latest/platypush/plugins/assistant.echo.html) plugin. ### Configuration @@ -378,7 +378,7 @@ curl -XPOST -H 'Content-Type: application/json' -d ' ### Integrations -- [`assistant.snowboy`](https://platypush.readthedocs.io/en/latest/platypush/backend/assistant.snowboy.html) backend. +- [`assistant.snowboy`](https://docs.platypush.tech/en/latest/platypush/backend/assistant.snowboy.html) backend. ### Configuration @@ -427,7 +427,7 @@ backend.assistant.snowboy: ``` - Start Platypush. Say the hotword associated with one of your models, check on the logs that the - [`HotwordDetectedEvent`](https://platypush.readthedocs.io/en/latest/platypush/events/assistant.html#platypush.message.event.assistant.HotwordDetectedEvent) + [`HotwordDetectedEvent`](https://docs.platypush.tech/en/latest/platypush/events/assistant.html#platypush.message.event.assistant.HotwordDetectedEvent) is triggered and, if there’s an assistant plugin associated with the hotword, the corresponding assistant is correctly started. @@ -469,8 +469,8 @@ backend.assistant.snowboy: ### Integrations -- [`stt.deepspeech`](https://platypush.readthedocs.io/en/latest/platypush/plugins/stt.deepspeech.html) plugin - and [`stt.deepspeech`](https://platypush.readthedocs.io/en/latest/platypush/backend/stt.deepspeech.html) backend (for +- [`stt.deepspeech`](https://docs.platypush.tech/en/latest/platypush/plugins/stt.deepspeech.html) plugin + and [`stt.deepspeech`](https://docs.platypush.tech/en/latest/platypush/backend/stt.deepspeech.html) backend (for continuous detection). ### Configuration @@ -527,11 +527,11 @@ backend.stt.deepspeech: ``` - Start Platypush. Speech detection will start running on startup. - [`SpeechDetectedEvents`](https://platypush.readthedocs.io/en/latest/platypush/events/stt.html#platypush.message.event.stt.SpeechDetectedEvent) + [`SpeechDetectedEvents`](https://docs.platypush.tech/en/latest/platypush/events/stt.html#platypush.message.event.stt.SpeechDetectedEvent) will be triggered when you talk. - [`HotwordDetectedEvents`](https://platypush.readthedocs.io/en/latest/platypush/events/stt.html#platypush.message.event.stt.HotwordDetectedEvent) + [`HotwordDetectedEvents`](https://docs.platypush.tech/en/latest/platypush/events/stt.html#platypush.message.event.stt.HotwordDetectedEvent) will be triggered when you say one of the configured hotwords. - [`ConversationDetectedEvents`](https://platypush.readthedocs.io/en/latest/platypush/events/stt.html#platypush.message.event.stt.ConversationDetectedEvent) + [`ConversationDetectedEvents`](https://docs.platypush.tech/en/latest/platypush/events/stt.html#platypush.message.event.stt.ConversationDetectedEvent) will be triggered when you say something after a hotword, with speech provided as an argument. You can also disable the continuous detection and only start it programmatically by calling `stt.deepspeech.start_detection` and `stt.deepspeech.stop_detection`. You can also use it to perform offline speech transcription from audio files: @@ -612,15 +612,15 @@ So far, Platypush provides integrations with Porcupine and Cheetah. ### Integrations - *Hotword engine*: - [`stt.picovoice.hotword`](https://platypush.readthedocs.io/en/latest/platypush/plugins/stt.picovoice.hotword.html) + [`stt.picovoice.hotword`](https://docs.platypush.tech/en/latest/platypush/plugins/stt.picovoice.hotword.html) plugin and - [`stt.picovoice.hotword`](https://platypush.readthedocs.io/en/latest/platypush/backend/stt.picovoice.hotword.html) + [`stt.picovoice.hotword`](https://docs.platypush.tech/en/latest/platypush/backend/stt.picovoice.hotword.html) backend (for continuous detection). - *Speech engine*: - [`stt.picovoice.speech`](https://platypush.readthedocs.io/en/latest/platypush/plugins/stt.picovoice.speech.html) + [`stt.picovoice.speech`](https://docs.platypush.tech/en/latest/platypush/plugins/stt.picovoice.speech.html) plugin and - [`stt.picovoice.speech`](https://platypush.readthedocs.io/en/latest/platypush/backend/stt.picovoice.speech.html) + [`stt.picovoice.speech`](https://docs.platypush.tech/en/latest/platypush/backend/stt.picovoice.speech.html) backend (for continuous detection). ### Configuration diff --git a/static/pages/Build-your-customizable-voice-assistant-with-Platypush.md b/static/pages/Build-your-customizable-voice-assistant-with-Platypush.md index b8a77b1..a754c60 100644 --- a/static/pages/Build-your-customizable-voice-assistant-with-Platypush.md +++ b/static/pages/Build-your-customizable-voice-assistant-with-Platypush.md @@ -147,8 +147,8 @@ assistant.google: ``` - Refer to the official documentation to check the additional initialization parameters and actions provided by the - [assistant backend](https://platypush.readthedocs.io/en/latest/platypush/backend/assistant.google.html) and - [plugin](https://platypush.readthedocs.io/en/latest/platypush/plugins/assistant.google.html). + [assistant backend](https://docs.platypush.tech/en/latest/platypush/backend/assistant.google.html) and + [plugin](https://docs.platypush.tech/en/latest/platypush/plugins/assistant.google.html). - Restart Platypush and keep an eye on the output to check that everything is alright. Oh, and also double check that your microphone is not muted. @@ -211,8 +211,8 @@ A few words about the configuration tweaks: - The `assistant.google.pushtotalk` plugin configuration only requires the default assistant language to be used. Refer to the official documentation for extra initialization parameters and methods provided by the -[Snowboy backend](https://platypush.readthedocs.io/en/latest/platypush/backend/assistant.snowboy.html) and the -[push-to-talk plugin](https://platypush.readthedocs.io/en/latest/platypush/plugins/assistant.google.pushtotalk.html). +[Snowboy backend](https://docs.platypush.tech/en/latest/platypush/backend/assistant.snowboy.html) and the +[push-to-talk plugin](https://docs.platypush.tech/en/latest/platypush/plugins/assistant.google.pushtotalk.html). Restart Platypush and check the logs for any errors, then say your hotword. If everything went well, an assistant conversation will be started when the hotword is detected. diff --git a/static/pages/Create-your-smart-baby-monitor-with-Platypush-and-Tensorflow.md b/static/pages/Create-your-smart-baby-monitor-with-Platypush-and-Tensorflow.md index 6af349a..46d6c16 100644 --- a/static/pages/Create-your-smart-baby-monitor-with-Platypush-and-Tensorflow.md +++ b/static/pages/Create-your-smart-baby-monitor-with-Platypush-and-Tensorflow.md @@ -320,7 +320,7 @@ detected over the past 2 seconds and `positive` otherwise. There’s not much use however in a script that simply prints a message to the standard output if our baby is crying — we want to be notified! Let’s use Platypush to cover this part. In this example, we’ll use -the [`pushbullet`](https://platypush.readthedocs.io/en/latest/platypush/plugins/pushbullet.html) integration to send a +the [`pushbullet`](https://docs.platypush.tech/en/latest/platypush/plugins/pushbullet.html) integration to send a message to our mobile when cry is detected. Let’s install Redis (used by Platypush to receive messages) and Platypush with the HTTP and Pushbullet integrations: @@ -343,7 +343,7 @@ pushbullet: ``` Now, let’s modify the previous script so that, instead of printing a message to the standard output, it triggers a -[`CustomEvent`](https://platypush.readthedocs.io/en/latest/platypush/events/custom.html) that can be captured by a +[`CustomEvent`](https://docs.platypush.tech/en/latest/platypush/events/custom.html) that can be captured by a Platypush hook: ```python @@ -525,7 +525,7 @@ sample length/window/frequency band parameters. Also, consider that this is a relatively basic example of automation — feel free to spice it up with more automation tasks. For example, you can send a request to another Platypush device (e.g. in your bedroom or living room) with the -[`tts`](https://platypush.readthedocs.io/en/latest/platypush/plugins/tts.html) plugin to say aloud that the baby is crying. You can also extend the `micmon_detect.py` script so that the captured +[`tts`](https://docs.platypush.tech/en/latest/platypush/plugins/tts.html) plugin to say aloud that the baby is crying. You can also extend the `micmon_detect.py` script so that the captured audio samples can also be streamed over HTTP — for example using a Flask wrapper and `ffmpeg` for the audio conversion. Another interesting use case is to send data points to your local database when the baby starts/stops crying (you can refer to my previous article on how to use Platypush+PostgreSQL+Mosquitto+Grafana to create your flexible and diff --git a/static/pages/Deliver-articles-to-your-favourite-e-reader-using-Platypush.md b/static/pages/Deliver-articles-to-your-favourite-e-reader-using-Platypush.md index 991033b..c2f4e52 100644 --- a/static/pages/Deliver-articles-to-your-favourite-e-reader-using-Platypush.md +++ b/static/pages/Deliver-articles-to-your-favourite-e-reader-using-Platypush.md @@ -51,7 +51,7 @@ API, and Instapaper) and how to glue all the pieces together through Platypush. ## Configure your Kindle account for e-mail delivery I’ll assume in this first section you have a Kindle, a linked Amazon account, and a Gmail account that we’ll use to -programmatically send documents to the device via email - although it's also possible to leverage the [`mail.smtp`](https://platypush.readthedocs.io/en/latest/platypush/plugins/mail.smtp.html) +programmatically send documents to the device via email - although it's also possible to leverage the [`mail.smtp`](https://docs.platypush.tech/en/latest/platypush/plugins/mail.smtp.html) plugin and use another domain for delivering PDFs. We’ll later see als ohow to leverage Instapaper with other devices. First, you’ll have to create an email address associated to your Kindle that’ll be used to remotely deliver documents: @@ -119,7 +119,7 @@ Now that you’ve got everything in place, it’s time to configure Platypush to ## Create a rule to automatically send articles to your Kindle -The [`http.poll`](https://platypush.readthedocs.io/en/latest/platypush/backend/http.poll.html) backend is a flexible +The [`http.poll`](https://docs.platypush.tech/en/latest/platypush/backend/http.poll.html) backend is a flexible component that can be configured to poll and process updates from many web resources — JSON, RSS, Atom etc. Suppose you want to check for updates @@ -204,7 +204,7 @@ sophisticated rules that connect it to anything. There are many ways for Tasker to communicate with Platypush (direct RPC over HTTP calls, using Join with an external MQTT server to dispatch messages, using an intermediate IFTTT hook, or Pushbullet, etc.), and there are many ways for Platypush to communicate back to Tasker on your mobile device (using [AutoRemote](https://joaoapps.com/autoremote/) with -the [Platypush plugin](https://platypush.readthedocs.io/en/latest/platypush/plugins/autoremote.html) to send custom +the [Platypush plugin](https://docs.platypush.tech/en/latest/platypush/plugins/autoremote.html) to send custom events, using IFTTT with any service connected to your mobile, using the [Join API](https://joaoapps.com/join/api/), or, again, Pushbullet). diff --git a/static/pages/Deliver-customized-newsletters-from-RSS-feeds-with-Platypush.md b/static/pages/Deliver-customized-newsletters-from-RSS-feeds-with-Platypush.md index aabc02b..78c8159 100644 --- a/static/pages/Deliver-customized-newsletters-from-RSS-feeds-with-Platypush.md +++ b/static/pages/Deliver-customized-newsletters-from-RSS-feeds-with-Platypush.md @@ -46,10 +46,10 @@ Let’s cover these points step by step. ## Installing and configuring Platypush -We’ll be using the [`http.poll`](https://platypush.readthedocs.io/en/latest/platypush/backend/http.poll.html) backend +We’ll be using the [`http.poll`](https://docs.platypush.tech/en/latest/platypush/backend/http.poll.html) backend configured with one or more `RssUpdate` objects to poll our RSS sources at regular intervals and create the digests, and -either the [`mail.smtp`](https://platypush.readthedocs.io/en/latest/platypush/plugins/mail.smtp.html) plugin or the -[`google.mail`](https://platypush.readthedocs.io/en/latest/platypush/plugins/google.mail.html) plugin to send the +either the [`mail.smtp`](https://docs.platypush.tech/en/latest/platypush/plugins/mail.smtp.html) plugin or the +[`google.mail`](https://docs.platypush.tech/en/latest/platypush/plugins/google.mail.html) plugin to send the digests to our email. You can install Platypush on any device where you want to run your logic — a RaspberryPi, an old laptop, a cloud node, @@ -127,7 +127,7 @@ to automatically scrape the content of a web page - I covered some of these conc my [previous article](https://blog.platypush.tech/article/Deliver-articles-to-your-favourite-e-reader-using-Platypush) on how to parse RSS feeds and send the PDF digest to your e-reader. The same mechanism works well for newsletters too. If you want to parse the content of the newsletter as well, all you have to do is configure -the [`http.webpage`](https://platypush.readthedocs.io/en/latest/platypush/plugins/http.webpage.html) Platypush +the [`http.webpage`](https://docs.platypush.tech/en/latest/platypush/plugins/http.webpage.html) Platypush plugin. Since the Mercury API doesn't provide a Python binding, this requires a couple of JavaScript dependencies: ```shell @@ -174,14 +174,14 @@ legal one: ## Configuring the mail delivery When new content is published on a subscribed RSS feed Platypush will generate -a [NewFeedEvent](https://platypush.readthedocs.io/en/latest/platypush/events/http.rss.html) and it should create a copy +a [NewFeedEvent](https://docs.platypush.tech/en/latest/platypush/events/http.rss.html) and it should create a copy of the digest under `~/.local/share/platypush/feeds/cache/{date:time}_{feed-title}.[html|pdf]`. The `NewFeedEvent` in particular is the link you need to create your custom logic that sends an email to a list of addresses when new content is available. First, configure the Platypush mail plugin you prefer. When it comes to sending emails you primarily have two options: -- The [`mail.smtp`](https://platypush.readthedocs.io/en/latest/platypush/plugins/mail.smtp.html) plugin — if you want to +- The [`mail.smtp`](https://docs.platypush.tech/en/latest/platypush/plugins/mail.smtp.html) plugin — if you want to send emails directly through an SMTP server. Platypush configuration: ```yaml @@ -193,7 +193,7 @@ mail.smtp: ssl: True ``` -- The [`google.mail`](https://platypush.readthedocs.io/en/latest/platypush/plugins/google.mail.html) plugin — if you +- The [`google.mail`](https://docs.platypush.tech/en/latest/platypush/plugins/google.mail.html) plugin — if you want to use the native GMail API to send emails. If that is the case then first make sure that you have the dependencies for the Platypush Google module installed: @@ -224,7 +224,7 @@ At this point the GMail delivery is ready to be used by your Platypush automatio ## Connecting the dots Now that both the RSS parsing logic and the mail integration are in place, we can glue them together through the -[`NewFeedEvent`](https://platypush.readthedocs.io/en/latest/platypush/events/http.rss.html) event. The new advised way +[`NewFeedEvent`](https://docs.platypush.tech/en/latest/platypush/events/http.rss.html) event. The new advised way to configure events in Platypush is through native Python scripts - the custom YAML-based syntax for events and procedure was becoming too cumbersome to maintain and write (although it’s still supported), and I feel like going back to a clean and simple Python API may be a better option. diff --git a/static/pages/Detect-people-with-a-RaspberryPi-a-thermal-camera-Platypush-and-a-pinch-of-machine-learning.md b/static/pages/Detect-people-with-a-RaspberryPi-a-thermal-camera-Platypush-and-a-pinch-of-machine-learning.md index 99eb616..7e9bb77 100644 --- a/static/pages/Detect-people-with-a-RaspberryPi-a-thermal-camera-Platypush-and-a-pinch-of-machine-learning.md +++ b/static/pages/Detect-people-with-a-RaspberryPi-a-thermal-camera-Platypush-and-a-pinch-of-machine-learning.md @@ -46,7 +46,7 @@ For this example we'll use the following hardware: account that both have the same resolution (32x24 pixels), so the wider angle comes with the cost of a lower spatial resolution. If you want to use a different thermal camera there’s not much you’ll need to change, as long as it comes with a software interface for RaspberryPi and - it’s [compatible with Platypush](https://platypush.readthedocs.io/en/latest/platypush/plugins/camera.ir.mlx90640.html). + it’s [compatible with Platypush](https://docs.platypush.tech/en/latest/platypush/plugins/camera.ir.mlx90640.html). Setting up the MLX90640 on your RaspberryPi if you have a Breakout Garden it’s easy as a pie. Fit the Breakout Garden on top of your RaspberryPi. Fit the camera breakout into an I2C slot. Boot the RaspberryPi. Done. Otherwise, you can also @@ -94,7 +94,7 @@ camera module. This post assumes that you have already installed and configured Platypush on your system. If not, head to my post on [getting started with Platypush](https://blog.platypush.tech/article/Ultimate-self-hosted-automation-with-Platypush), -the [readthedocs page](https://platypush.readthedocs.io/en/latest/), the +the [readthedocs page](https://docs.platypush.tech/en/latest/), the [Gitlab page](https://git.platypush.tech/platypush/platypush) or [the wiki](https://git.platypush.tech/platypush/platypush/-/wikis/home). @@ -141,7 +141,7 @@ git clone https://github.com/BlackLight/imgdetect-utils ~/projects/imgdetect-uti Now that you’ve got all the hardware and software in place, it’s time to start capturing frames with your camera and use them to train your model. First, configure -the [MLX90640 plugin](https://platypush.readthedocs.io/en/latest/platypush/plugins/camera.ir.mlx90640.html) in your +the [MLX90640 plugin](https://docs.platypush.tech/en/latest/platypush/plugins/camera.ir.mlx90640.html) in your Platypush configuration file (by default, `~/.config/platypush/config.yaml`): ```yaml @@ -469,7 +469,7 @@ scp -r ~/models/people_detect pi@raspberry:/home/pi/models Once the Tensorflow model has been deployed to the RaspberryPi you can quickly test how it performs against some pictures taken on the device using -the [`tensorflow.predict`](https://platypush.readthedocs.io/en/latest/platypush/plugins/tensorflow.html#platypush.plugins.tensorflow.TensorflowPlugin.predict) +the [`tensorflow.predict`](https://docs.platypush.tech/en/latest/platypush/plugins/tensorflow.html#platypush.plugins.tensorflow.TensorflowPlugin.predict) method: ```shell @@ -515,7 +515,7 @@ intervals with a new one that captures pictures and feeds them to the previously use a Python script stored under `~/.config/platypush/scripts` in this case, but it will also work with a cron defined in YAML in `config.yaml`) and, for example, turns on the lights when presence is detected and turns them off when presence is no longer detected (I'll use -the [`light.hue`](https://platypush.readthedocs.io/en/latest/platypush/plugins/light.hue.html) plugin in this example): +the [`light.hue`](https://docs.platypush.tech/en/latest/platypush/plugins/light.hue.html) plugin in this example): ```python import os diff --git a/static/pages/How-to-build-your-personal-infrastructure-for-data-collection-and-visualization.md b/static/pages/How-to-build-your-personal-infrastructure-for-data-collection-and-visualization.md index f1ad0e0..ba167af 100644 --- a/static/pages/How-to-build-your-personal-infrastructure-for-data-collection-and-visualization.md +++ b/static/pages/How-to-build-your-personal-infrastructure-for-data-collection-and-visualization.md @@ -202,7 +202,7 @@ $HOME/go/bin/mqttcli pub -t "sensors/$(hostname)/disk_root" -m $usage ``` Alternatively, you can also write the logic for sending system data points directly in Platypush - -e.g. using the [`system`](https://platypush.readthedocs.io/en/latest/platypush/plugins/system.html) +e.g. using the [`system`](https://docs.platypush.tech/en/latest/platypush/plugins/system.html) plugin - and that will be executed while the service is running, so you won't need the `mqttcli` dependency: ```python @@ -313,7 +313,7 @@ a RaspberryPi: [HTU21D-F](https://shop.pimoroni.com/products/adafruit-htu21d-f-temperature-humidity-sensor-breakout-board)) that communicates over I2C/SPI that you can plug directly on the RaspberryPi. If you go for this solution then you won’t need another microprocessor to deal with the ADC conversion, but you’ll also have to make sure that these devices come - with a Python library and they’re [supported in Platypush](https://platypush.readthedocs.io/en/latest/) (feel free to + with a Python library and they’re [supported in Platypush](https://docs.platypush.tech/en/latest/) (feel free to open an issue or send a pull request if that’s not the case). Let’s briefly analyze an example of the option 1 implementation. Let’s suppose that you have an Arduino with a connected @@ -403,12 +403,12 @@ backend.sensor.serial: - 30.0 ``` -[`backend.sensor.serial`](https://platypush.readthedocs.io/en/latest/platypush/backend/sensor.serial.html) (and, in +[`backend.sensor.serial`](https://docs.platypush.tech/en/latest/platypush/backend/sensor.serial.html) (and, in general, any sensor backend) will trigger -a [`SensorDataChangeEvent`](https://platypush.readthedocs.io/en/latest/platypush/events/sensor.html#platypush.message.event.sensor.SensorDataChangeEvent) +a [`SensorDataChangeEvent`](https://docs.platypush.tech/en/latest/platypush/events/sensor.html#platypush.message.event.sensor.SensorDataChangeEvent) when new sensor data is available, and -[`SensorDataBelowThresholdEvent`](https://platypush.readthedocs.io/en/latest/platypush/events/sensor.html#platypush.message.event.sensor.SensorDataBelowThresholdEvent) / -[`SensorDataAboveThresholdEvent`](https://platypush.readthedocs.io/en/latest/platypush/events/sensor.html#platypush.message.event.sensor.SensorDataAboveThresholdEvent) +[`SensorDataBelowThresholdEvent`](https://docs.platypush.tech/en/latest/platypush/events/sensor.html#platypush.message.event.sensor.SensorDataBelowThresholdEvent) / +[`SensorDataAboveThresholdEvent`](https://docs.platypush.tech/en/latest/platypush/events/sensor.html#platypush.message.event.sensor.SensorDataAboveThresholdEvent) respectively when the new sensor data is respectively below or above one of the configured threshold. We can now configure an event hook to send new sensor data to MQTT to be stored on the database by dropping another @@ -617,8 +617,8 @@ walked or slept the most, or even just visualizing the data on a computer unless the Fit API. Luckily, Platypush comes with a handy Google Fit -[backend](https://platypush.readthedocs.io/en/latest/platypush/backend/google.fit.html) -and [plugin](https://platypush.readthedocs.io/en/latest/platypush/plugins/google.fit.html), and you can +[backend](https://docs.platypush.tech/en/latest/platypush/backend/google.fit.html) +and [plugin](https://docs.platypush.tech/en/latest/platypush/plugins/google.fit.html), and you can leverage them to easily build your visualization, automation and queriable fit database. - Prepare the fit tables on your database. Again, we’ll leverage a trigger to take care of the normalization: @@ -896,7 +896,7 @@ active time would look like this: Grafana also allows you to create alerts when some metrics go below/above a certain threshold or when there are no data points for a certain period of time. You can also connect such alerts back to platypush events by leveraging Platypush’s -[web hooks](https://platypush.readthedocs.io/en/latest/platypush/events/http.hook.html). +[web hooks](https://docs.platypush.tech/en/latest/platypush/events/http.hook.html). Let’s see for example how to configure Grafana to send a notification to a Platypush custom web hook that sends a Pushbullet notification to your mobile device when the measurements from one of your gas sensors go above a certain diff --git a/static/pages/One-browser-extension-to-rule-them-all.md b/static/pages/One-browser-extension-to-rule-them-all.md index 5c6b5af..53b3ca9 100644 --- a/static/pages/One-browser-extension-to-rule-them-all.md +++ b/static/pages/One-browser-extension-to-rule-them-all.md @@ -110,9 +110,9 @@ interaction with the browser context — things like “play this video on my Ch “download this Magnet link directly on my NAS”, and so on. All the way up to custom event hooks that could react to Platypush events triggered by other devices with custom logic running in the browser — things like “synchronize the clipboard on the laptop if another Platypush device sends -a [`ClipboardEvent`](https://platypush.readthedocs.io/en/latest/platypush/events/clipboard.html)”, “send a notification +a [`ClipboardEvent`](https://docs.platypush.tech/en/latest/platypush/events/clipboard.html)”, “send a notification to the browser with the spoken text when the Google Assistant plugin triggers -a [`ResponseEvent`](https://platypush.readthedocs.io/en/latest/platypush/events/assistant.html#platypush.message.event.assistant.ResponseEvent)” +a [`ResponseEvent`](https://docs.platypush.tech/en/latest/platypush/events/assistant.html#platypush.message.event.assistant.ResponseEvent)” , or when a sensor goes above a certain threshold, and so on. I wanted the ability to define all of these actions through a JavaScript native API similar to that provided by @@ -127,7 +127,7 @@ to see what you can do with it. First, you need a Platypush service running somewhere. If you haven’t tried it before, refer to any of the links in the previous sections to get started (I’ve made sure that installing, configuring, and starting a base environment doesn’t take longer than five minutes, I promise :) ). Also, make sure that you enable -the [HTTP backend](https://platypush.readthedocs.io/en/latest/platypush/backend/http.html) in the `config.yaml`, as the +the [HTTP backend](https://docs.platypush.tech/en/latest/platypush/backend/http.html) in the `config.yaml`, as the webserver is the channel used by the extension to communicate with the server. Once you have a Platypush instance running on e.g. a RaspberryPi, another server or your laptop, get the web extension: @@ -183,7 +183,7 @@ managing cloud services, you name it. You can also run procedures stored on the with `procedure` — and you can also pass the URL in the active tab to action as an argument by using the special variable `$URL$` as an action value. For instance, you can use it to create an action that sends the current URL to your mobile device -through [`pushbullet.send_note`](https://platypush.readthedocs.io/en/latest/platypush/plugins/pushbullet.html#platypush.plugins.pushbullet.PushbulletPlugin.send_note), +through [`pushbullet.send_note`](https://docs.platypush.tech/en/latest/platypush/plugins/pushbullet.html#platypush.plugins.pushbullet.PushbulletPlugin.send_note), with both `body` and `url` set to `$URL$`. Once you’re happy with your action, you can save it so it’s available both from the toolbar and the browser context menu. @@ -274,7 +274,7 @@ async (app, args) => { - `app.getDOM` returns the DOM/content of the current page (as a Node element), while `app.setDOM` replaces the DOM/content of the page (given as a string). For example, you can combine the provided DOM API with - the [Platypush Translate plugin](https://platypush.readthedocs.io/en/latest/platypush/plugins/google.translate.html) + the [Platypush Translate plugin](https://docs.platypush.tech/en/latest/platypush/plugins/google.translate.html) to translate a web page on the fly: ```javascript @@ -283,7 +283,7 @@ async (app, args) => { const dom = await app.getDOM(); // Translate the page through the Platypush Google Translate plugin - // (https://platypush.readthedocs.io/en/latest/platypush/plugins/google.translate.html). + // (https://docs.platypush.tech/en/latest/platypush/plugins/google.translate.html). // The plugin also splits the HTML in multiple requests if too long // to circumvent Google's limit on maximum input text. const response = await app.run({ @@ -452,9 +452,9 @@ async (app, args) => { With these basic blocks, you should be able to create any custom browser actions that you want. Some examples: - Convert the current web page to PDF through - the [Platypush `webpage.simplify` plugin](https://platypush.readthedocs.io/en/latest/platypush/plugins/http.webpage.html) + the [Platypush `webpage.simplify` plugin](https://docs.platypush.tech/en/latest/platypush/plugins/http.webpage.html) and deliver it to your Kindle as an attachment through - the [Platypush GMail plugin](https://platypush.readthedocs.io/en/latest/platypush/plugins/google.mail.html). + the [Platypush GMail plugin](https://docs.platypush.tech/en/latest/platypush/plugins/google.mail.html). - Send an email to someone containing the text selected on a page. diff --git a/static/pages/Transform-a-RaspberryPi-into-a-universal-Zigbee-and-Z-Wave-bridge.md b/static/pages/Transform-a-RaspberryPi-into-a-universal-Zigbee-and-Z-Wave-bridge.md index 0f595c1..fda7af1 100644 --- a/static/pages/Transform-a-RaspberryPi-into-a-universal-Zigbee-and-Z-Wave-bridge.md +++ b/static/pages/Transform-a-RaspberryPi-into-a-universal-Zigbee-and-Z-Wave-bridge.md @@ -218,7 +218,7 @@ backend.zigbee.mqtt: ![Zigbee plugin screenshot 2](../img/zigbee-zwave-3.png) You can send requests through -the [supported API](https://platypush.readthedocs.io/en/latest/platypush/plugins/zigbee.mqtt.html) over HTTP, Python +the [supported API](https://docs.platypush.tech/en/latest/platypush/plugins/zigbee.mqtt.html) over HTTP, Python code or through whichever platypush backend you have configured: ```shell @@ -241,7 +241,7 @@ from platypush.context import get_plugin get_plugin('zigbee.mqtt').device_set(device='White Bulb', property='state', value='ON') ``` -Or hook any custom logic to the [supported events](https://platypush.readthedocs.io/en/latest/platypush/events/zigbee.mqtt.html): +Or hook any custom logic to the [supported events](https://docs.platypush.tech/en/latest/platypush/events/zigbee.mqtt.html): ```python from platypush.event.hook import hook @@ -301,8 +301,8 @@ user manual. Since Z-Wave has a stricter protocol and all the compliant devices format, the Z-Wave interface is much more granular and detailed compared to Zigbee. You can, of course, send commands to the new network through -the [available API](https://platypush.readthedocs.io/en/latest/platypush/plugins/zwave.html) and subscribe custom hooks -on [Z-Wave events](https://platypush.readthedocs.io/en/latest/platypush/events/zwave.html): +the [available API](https://docs.platypush.tech/en/latest/platypush/plugins/zwave.html) and subscribe custom hooks +on [Z-Wave events](https://docs.platypush.tech/en/latest/platypush/events/zwave.html): ```shell # HTTP request diff --git a/static/pages/Ultimate-self-hosted-automation-with-Platypush.md b/static/pages/Ultimate-self-hosted-automation-with-Platypush.md index 9b2bbac..98530ca 100644 --- a/static/pages/Ultimate-self-hosted-automation-with-Platypush.md +++ b/static/pages/Ultimate-self-hosted-automation-with-Platypush.md @@ -82,7 +82,7 @@ play raw or sampled sounds from a MIDI interface, monitor access to the file sys some NFC tag is detected by your reader, read and extract content from RSS feeds and send it to your Kindle, read and write data to a remote database, send metrics to Grafana, create a custom voice assistant, run and train machine learning models, and so on — basically, you can do anything that comes -with [one of the hundreds of supported plugin](https://platypush.readthedocs.io/en/latest/). +with [one of the hundreds of supported plugin](https://docs.platypush.tech/en/latest/). Another issue I’ve tried to tackle is the developer and power user experience. I wanted to make it easy to use the automation platform as a library or a general-purpose API, so you can easily invoke a custom logic to turn on the lights @@ -437,7 +437,7 @@ In both the cases, however, this will install only the dependencies for the core very small and relies on backends and plugins to actually do things. The dependencies for each integration are reported in the documentation of that integration itself ( -see [official documentation](https://platypush.readthedocs.io/en/latest/)), and there are mainly four ways to install +see [official documentation](https://docs.platypush.tech/en/latest/)), and there are mainly four ways to install them: - Through `pip` extras: this is probably the most immediate way, although (for now) it requires you to take a look at @@ -525,8 +525,8 @@ A few notes: - The list of events triggered by each backend is also available in the documentation of those backends, and you can write your own hooks (either in YAML inside of `config.yaml` or as Python drop-in scripts) to capture them and execute custom - logic - for instance, [`backend.light.hue`](https://platypush.readthedocs.io/en/latest/platypush/backend/light.hue.html) can - trigger [`platypush.message.event.light.LightStatusChangeEvent`](https://platypush.readthedocs.io/en/latest/platypush/events/light.html#platypush.message.event.light.LightStatusChangeEvent). + logic - for instance, [`backend.light.hue`](https://docs.platypush.tech/en/latest/platypush/backend/light.hue.html) can + trigger [`platypush.message.event.light.LightStatusChangeEvent`](https://docs.platypush.tech/en/latest/platypush/events/light.html#platypush.message.event.light.LightStatusChangeEvent). - By convention, plugins are identified by the lowercase name of their class without the `Plugin` suffix (e.g. `light.hue`) while backends are identified by the lowercase name of their class without the `Backend` suffix. @@ -537,7 +537,7 @@ A few notes: - By default, the HTTP backend will run the web service directly through a Flask wrapper. If you are planning to run the service on a machine with more traffic or in production mode, then it's advised to use a uwsgi+nginx wrapper - - the [official documentation](https://platypush.readthedocs.io/en/latest/platypush/backend/http.html) explains how to + the [official documentation](https://docs.platypush.tech/en/latest/platypush/backend/http.html) explains how to do that. - If the plugin or the backend doesn't require parameters, or if you want to keep the default values for the parameters,