> For the complete documentation index, see [llms.txt](https://sharinghub.kittenbot.hk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sharinghub.kittenbot.hk/programmingplatforms/kittenblock/an-zhuang-ban-kittenblock/features/extensions/iot.md).

# IOT(物聯網)插件

## IOT(物聯網)插件

隨著5G網絡的落實，IOT(物聯網)是近年來的熱門話題。Kittenblock中也預載了iot的插件，讓大家可以在Kittenblock中學習IOT。

### 加載IOT插件

按下左下角的插件加載按鈕。

![](https://kittenbothk.readthedocs.io/en/latest/_images/add3.png)

選擇iot插件。

![](https://kittenbothk.readthedocs.io/en/latest/_images/iot1.png)

加載成功！

![](https://kittenbothk.readthedocs.io/en/latest/_images/iot2.png)

### IOT插件介紹

Kittenblock裡面可以運行本地的內聯網MQTT伺服器。

![](https://kittenbothk.readthedocs.io/en/latest/_images/iot3.png)

點擊IOT本地伺服器，按下開關按鈕。

頁面會顯示本地伺服器的IP地址。

![](https://kittenbothk.readthedocs.io/en/latest/_images/iot4.png)

運行伺服器之後，我們試試搭建這個程式。

![](https://kittenbothk.readthedocs.io/en/latest/_images/iot6.png)

運行程式後，可以看到舞台小貓會說出收到的資料。

![](https://kittenbothk.readthedocs.io/en/latest/_images/iot7.png)

如果你有多台電腦，只要你的電腦都連接到同一個網絡，所有電腦都可以連接到同一個本地內聯網伺服器。

例如，在下圖，3台電腦都連接到192.168.0.117，大家都訂閱和發佈到同一個話題，就可以互相溝通。

![](https://kittenbothk.readthedocs.io/en/latest/_images/iot8.png)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sharinghub.kittenbot.hk/programmingplatforms/kittenblock/an-zhuang-ban-kittenblock/features/extensions/iot.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
