#!/usr/bin/env python # coding: utf-8 #
# Opsdroid Logo #
# #

Opsdroid Playground

# # Welcome to the Opsdroid Playground. # # This interactive environment allows you to run opsdroid, build skills and test out your conversations. # # You will see four windows open in front of you. # # - **Notebook instructions and testing** - This page you are reading contains some instructions on how to use opsdroid and a handy `NotebookChat` tester. # - **skill.py** - An Opsdroid skill to get you started. # - **configuration.yaml** - An example Opsdroid configuration. # - **Terminal window** - Where we will run Opsdroid. # # We should already have Opsdroid installed so you can get things running by typing this command in the terminal window and pressing enter. # # ```bash # opsdroid start -f configuration.yaml # ``` # # Then once you see the line `Opsdroid is now running` in the log output run the below notebook cell to connect the tester. Once you see the chat prompt and it says `Connected` try typing `ping` in the chat and hitting send. # In[ ]: from notebookchat import NotebookChat chat = NotebookChat("localhost", 8080) chat.start() # Hopefully you should see Opsdroid reply with `pong`. This is because Opsdroid ran the `skill.py` script and matched on the phrase `ping`. # # Try editing the `skill.py` so that Opsdroid responds with something other than `pong` and save the file. # # Then restart Opsdroid by pressing `ctrl+c` in the terminal window and then `up` and `enter` to run the start command again. # # Once Opsdroid startup up run the cell above again to reconnect the chat. Then try sending `ping` again to see Opsdroid respond with your new message. # # ## Next steps # # Now that you are up to speed with how to use the playground why don't you check out the [Opsdroid documentation](https://docs.opsdroid.dev) to find out what you can build with Opsdroid.