s/platypush.readthedocs.io/docs.platypush.tech/g
This commit is contained in:
parent
51891eaf73
commit
15ad2a0a20
11 changed files with 71 additions and 71 deletions
|
@ -90,10 +90,10 @@ backend.chat.telegram:
|
||||||
enabled: true
|
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.
|
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.
|
chats, programmatically send messages and attachments, administer channels, etc.
|
||||||
|
|
||||||
Let’s say that we want the bot to implement the following commands:
|
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
|
## Conclusions
|
||||||
|
|
||||||
We have only explored one specific feature of the Telegram integration in this article: the ability of the bot to react
|
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.
|
events, run actions, and reply with text messages.
|
||||||
|
|
||||||
As you can see from
|
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:
|
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
|
- 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.
|
a chat to your hard drive or a remote Dropbox folder.
|
||||||
|
|
||||||
- Run actions on text messages instead of commands. You can use
|
- 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`.
|
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
|
- 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.
|
action.
|
||||||
|
|
||||||
- Automatically moderate chat groups through
|
- 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
|
- 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.
|
chat, or instead, use a single bot as entry point and deliver messages to other devices over MQTT, Kafka, or HTTP API.
|
||||||
|
|
|
@ -128,9 +128,9 @@ engines. Let’s go through some of the available integrations, and evaluate the
|
||||||
|
|
||||||
### Integrations
|
### 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)
|
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).
|
(for continuous hotword detection).
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
@ -212,7 +212,7 @@ assistant.google:
|
||||||
|
|
||||||
### Integrations
|
### 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.
|
plugin.
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
@ -307,7 +307,7 @@ curl -XPOST -H 'Content-Type: application/json' -d '
|
||||||
|
|
||||||
### Integrations
|
### 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
|
### Configuration
|
||||||
|
|
||||||
|
@ -378,7 +378,7 @@ curl -XPOST -H 'Content-Type: application/json' -d '
|
||||||
|
|
||||||
### Integrations
|
### 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
|
### 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
|
- 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
|
is triggered and, if there’s an assistant plugin associated with the hotword, the corresponding assistant is correctly
|
||||||
started.
|
started.
|
||||||
|
|
||||||
|
@ -469,8 +469,8 @@ backend.assistant.snowboy:
|
||||||
|
|
||||||
### Integrations
|
### Integrations
|
||||||
|
|
||||||
- [`stt.deepspeech`](https://platypush.readthedocs.io/en/latest/platypush/plugins/stt.deepspeech.html) plugin
|
- [`stt.deepspeech`](https://docs.platypush.tech/en/latest/platypush/plugins/stt.deepspeech.html) plugin
|
||||||
and [`stt.deepspeech`](https://platypush.readthedocs.io/en/latest/platypush/backend/stt.deepspeech.html) backend (for
|
and [`stt.deepspeech`](https://docs.platypush.tech/en/latest/platypush/backend/stt.deepspeech.html) backend (for
|
||||||
continuous detection).
|
continuous detection).
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
@ -527,11 +527,11 @@ backend.stt.deepspeech:
|
||||||
```
|
```
|
||||||
|
|
||||||
- Start Platypush. Speech detection will start running on startup.
|
- 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.
|
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.
|
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
|
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
|
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:
|
`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
|
### Integrations
|
||||||
|
|
||||||
- *Hotword engine*:
|
- *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
|
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).
|
backend (for continuous detection).
|
||||||
|
|
||||||
- *Speech engine*:
|
- *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
|
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).
|
backend (for continuous detection).
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
|
@ -147,8 +147,8 @@ assistant.google:
|
||||||
```
|
```
|
||||||
|
|
||||||
- Refer to the official documentation to check the additional initialization parameters and actions provided by the
|
- 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
|
[assistant backend](https://docs.platypush.tech/en/latest/platypush/backend/assistant.google.html) and
|
||||||
[plugin](https://platypush.readthedocs.io/en/latest/platypush/plugins/assistant.google.html).
|
[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
|
- 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.
|
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.
|
- 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
|
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
|
[Snowboy backend](https://docs.platypush.tech/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).
|
[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
|
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.
|
conversation will be started when the hotword is detected.
|
||||||
|
|
|
@ -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
|
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
|
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
|
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:
|
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
|
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:
|
Platypush hook:
|
||||||
|
|
||||||
```python
|
```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
|
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
|
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.
|
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
|
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
|
refer to my previous article on how to use Platypush+PostgreSQL+Mosquitto+Grafana to create your flexible and
|
||||||
|
|
|
@ -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
|
## 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
|
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.
|
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:
|
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
|
## 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.
|
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
|
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
|
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
|
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
|
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,
|
events, using IFTTT with any service connected to your mobile, using the [Join API](https://joaoapps.com/join/api/), or,
|
||||||
again, Pushbullet).
|
again, Pushbullet).
|
||||||
|
|
||||||
|
|
|
@ -46,10 +46,10 @@ Let’s cover these points step by step.
|
||||||
|
|
||||||
## Installing and configuring Platypush
|
## 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
|
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
|
either the [`mail.smtp`](https://docs.platypush.tech/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
|
[`google.mail`](https://docs.platypush.tech/en/latest/platypush/plugins/google.mail.html) plugin to send the
|
||||||
digests to our email.
|
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,
|
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)
|
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.
|
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
|
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:
|
plugin. Since the Mercury API doesn't provide a Python binding, this requires a couple of JavaScript dependencies:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
@ -174,14 +174,14 @@ legal one:
|
||||||
## Configuring the mail delivery
|
## Configuring the mail delivery
|
||||||
|
|
||||||
When new content is published on a subscribed RSS feed Platypush will generate
|
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
|
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
|
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.
|
is available.
|
||||||
|
|
||||||
First, configure the Platypush mail plugin you prefer. When it comes to sending emails you primarily have two options:
|
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:
|
send emails directly through an SMTP server. Platypush configuration:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
@ -193,7 +193,7 @@ mail.smtp:
|
||||||
ssl: True
|
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
|
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:
|
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
|
## Connecting the dots
|
||||||
|
|
||||||
Now that both the RSS parsing logic and the mail integration are in place, we can glue them together through the
|
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
|
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
|
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.
|
to a clean and simple Python API may be a better option.
|
||||||
|
|
|
@ -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
|
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
|
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
|
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
|
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
|
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
|
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),
|
[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
|
[Gitlab page](https://git.platypush.tech/platypush/platypush) or
|
||||||
[the wiki](https://git.platypush.tech/platypush/platypush/-/wikis/home).
|
[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
|
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
|
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`):
|
Platypush configuration file (by default, `~/.config/platypush/config.yaml`):
|
||||||
|
|
||||||
```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
|
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
|
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:
|
method:
|
||||||
|
|
||||||
```shell
|
```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
|
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
|
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
|
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
|
```python
|
||||||
import os
|
import os
|
||||||
|
|
|
@ -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 -
|
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:
|
plugin - and that will be executed while the service is running, so you won't need the `mqttcli` dependency:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
@ -313,7 +313,7 @@ a RaspberryPi:
|
||||||
[HTU21D-F](https://shop.pimoroni.com/products/adafruit-htu21d-f-temperature-humidity-sensor-breakout-board)) that
|
[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
|
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
|
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).
|
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
|
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
|
- 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
|
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
|
when new sensor data is available, and
|
||||||
[`SensorDataBelowThresholdEvent`](https://platypush.readthedocs.io/en/latest/platypush/events/sensor.html#platypush.message.event.sensor.SensorDataBelowThresholdEvent) /
|
[`SensorDataBelowThresholdEvent`](https://docs.platypush.tech/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)
|
[`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.
|
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
|
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.
|
the Fit API.
|
||||||
|
|
||||||
Luckily, Platypush comes with a handy Google Fit
|
Luckily, Platypush comes with a handy Google Fit
|
||||||
[backend](https://platypush.readthedocs.io/en/latest/platypush/backend/google.fit.html)
|
[backend](https://docs.platypush.tech/en/latest/platypush/backend/google.fit.html)
|
||||||
and [plugin](https://platypush.readthedocs.io/en/latest/platypush/plugins/google.fit.html), and you can
|
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.
|
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:
|
- 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
|
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
|
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
|
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
|
Pushbullet notification to your mobile device when the measurements from one of your gas sensors go above a certain
|
||||||
|
|
|
@ -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
|
“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
|
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
|
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
|
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.
|
, 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
|
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
|
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
|
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
|
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
|
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:
|
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
|
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
|
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
|
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
|
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.
|
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
|
- `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
|
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:
|
to translate a web page on the fly:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
@ -283,7 +283,7 @@ async (app, args) => {
|
||||||
const dom = await app.getDOM();
|
const dom = await app.getDOM();
|
||||||
|
|
||||||
// Translate the page through the Platypush Google Translate plugin
|
// 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
|
// The plugin also splits the HTML in multiple requests if too long
|
||||||
// to circumvent Google's limit on maximum input text.
|
// to circumvent Google's limit on maximum input text.
|
||||||
const response = await app.run({
|
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:
|
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
|
- 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
|
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.
|
- Send an email to someone containing the text selected on a page.
|
||||||
|
|
||||||
|
|
|
@ -218,7 +218,7 @@ backend.zigbee.mqtt:
|
||||||
![Zigbee plugin screenshot 2](../img/zigbee-zwave-3.png)
|
![Zigbee plugin screenshot 2](../img/zigbee-zwave-3.png)
|
||||||
|
|
||||||
You can send requests through
|
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:
|
code or through whichever platypush backend you have configured:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
@ -241,7 +241,7 @@ from platypush.context import get_plugin
|
||||||
get_plugin('zigbee.mqtt').device_set(device='White Bulb', property='state', value='ON')
|
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
|
```python
|
||||||
from platypush.event.hook import hook
|
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.
|
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
|
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
|
the [available API](https://docs.platypush.tech/en/latest/platypush/plugins/zwave.html) and subscribe custom hooks
|
||||||
on [Z-Wave events](https://platypush.readthedocs.io/en/latest/platypush/events/zwave.html):
|
on [Z-Wave events](https://docs.platypush.tech/en/latest/platypush/events/zwave.html):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# HTTP request
|
# HTTP request
|
||||||
|
|
|
@ -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
|
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
|
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
|
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
|
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
|
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.
|
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 (
|
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:
|
them:
|
||||||
|
|
||||||
- Through `pip` extras: this is probably the most immediate way, although (for now) it requires you to take a look at
|
- 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
|
- 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
|
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
|
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://platypush.readthedocs.io/en/latest/platypush/events/light.html#platypush.message.event.light.LightStatusChangeEvent).
|
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.
|
- 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.
|
`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
|
- 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 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.
|
do that.
|
||||||
|
|
||||||
- If the plugin or the backend doesn't require parameters, or if you want to keep the default values for the parameters,
|
- If the plugin or the backend doesn't require parameters, or if you want to keep the default values for the parameters,
|
||||||
|
|
Loading…
Reference in a new issue