Watcher Interpreter README
Welcome to the Watcher Interpreter, a command-line interface for interacting with your AI device. This tool allows you to configure your device, send commands, and interact with its functionalities.
Setup
-
Install the Watcher package:
pip install watcher-interpreter
-
Start the Watcher Interpreter:
watcher-interpreter
- tag: setUser,setPwd,setEui FIRST!
Configuration Commands
Before using the device commands, you need to configure the necessary parameters.
-
setUser <username>: Set the username (API key) for the device.
> setUser 1ARRxxxMS250ZMZ2
-
setPwd <password>: Set the password (API key) for the device.
> setPwd 72Fxxxx6127A46FF89D95B8F7xxxxC1ACD54752706C344E1B02CD55Dxxxx2C1C
-
setEui <eui>: Set the EUI of the device.
> setEui 2xxxxx1C9627000xx
-
(optional)setBaseUrl <url>: Set the base URL for the API.
> setBaseUrl https://sensecap.seeed.cc/openapi/
Device Commands
Once configured, you can use the following commands to interact with the device.
-
checkInfo: Display the current configuration.
> checkInfo -
llm_chat <words>: Send a chat message to the device.
> llm_chat "Tell me a joke" Watcher: {'data': {'tlid': 1726821849813, 'ctd': 1726821849813, 'tn': "Need a laugh? Here's a joke!", 'task_flow': [{'id': 6, 'type': 'chat', 'params': {'response': "Sure! Here's a classic one for you: Why don't skeletons fight each other? They don't have the guts! I hope that brought a smile to your face! Do you have a favorite joke you'd like to share?"}, 'wires': [[]]}]}, 'msg': '', 'code': '0'}
-
llm_task <words>: Get a Task by message from the device.
> llm_task Tell a joke when someone detected Task: <Task...JSON...too...long>
-
task_publish <task>: Publish a task to the device.
> llm_task Tell a joke when someone detected Task: <Task...JSON> > task_publish <Task...JSON> Watcher: {'code': '0', 'data': {}}
-
chat_publish <words>: Send a message and publish it as a task.
> chat_publish "Remind me about the meeting" # llm_task + task_publish Watcher: {'code': '0', 'data': {}}
-
chat <words>: Chat with the device using a predefined task.
> chat "What's the weather like today?" Watcher: The weather today is quite pleasant. ...
Exiting the Program
-
exit: Exit the Watcher Interpreter.
> exit
Additional Information
For developers, you can import the watcher.sdk module to interact with the device programmatically.
import watcher.sdk
base_url = "https://sensecap.seeed.cc/openapi/"
# check https://sensecap-docs.seeed.cc/zh/httpapi_quickstart.html
user = "your api key ID"
pwd = "your api key secret"
# check your watcher
eui = "your Watcher's EUI"
result = watcher.sdk.llm_chat("why sky is blue?", base_url, user, pwd, eui)
print(result.get("data"))
Support
For any issues or queries, please New issue
License
This software is licensed under the MIT License.
Metadata
Release files for watcher-interpreter 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| watcher_interpreter-0.0.1.tar.gz | 5.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| watcher_interpreter-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.2 kB
Release files / watcher_interpreter-0.0.1.tar.gz
| Download URL | watcher_interpreter-0.0.1.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3c928cf76eff55340875af7b9f3358ce9800cd638e50e3557b394876bf50c83
|
|
BLAKE2b-256 checksum How to use checksums |
1db6cc3b00dd7ada49542112ffe3969d1fce5e8e39ad4b969a22239e156135a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Release files / watcher_interpreter-0.0.1-py3-none-any.whl
| Download URL | watcher_interpreter-0.0.1-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98063f5440196b9d21910403b7e739a40c10850d34b833b747e11143b95714e4
|
|
BLAKE2b-256 checksum How to use checksums |
6cf97fbb34e59d9b70eb137aaf741a59231b4510ee2e3d1044014cd584291bdc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|