{"id":18899514,"url":"https://github.com/seeed-projects/watcher-interpreter","last_synced_at":"2025-09-04T13:33:23.256Z","repository":{"id":257784596,"uuid":"860340472","full_name":"Seeed-Projects/watcher-interpreter","owner":"Seeed-Projects","description":"An interpreter/sdk for Watcher","archived":false,"fork":false,"pushed_at":"2024-09-20T08:56:06.000Z","size":6,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-12-09T03:51:40.830Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pypi.org/project/watcher-interpreter/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Seeed-Projects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-20T08:55:32.000Z","updated_at":"2024-11-14T05:14:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"a33286db-7797-4dcd-b405-99f5aafc7ea1","html_url":"https://github.com/Seeed-Projects/watcher-interpreter","commit_stats":null,"previous_names":["seeed-projects/watcher-interpreter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seeed-Projects%2Fwatcher-interpreter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seeed-Projects%2Fwatcher-interpreter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seeed-Projects%2Fwatcher-interpreter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seeed-Projects%2Fwatcher-interpreter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Seeed-Projects","download_url":"https://codeload.github.com/Seeed-Projects/watcher-interpreter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231965487,"owners_count":18453091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T08:46:44.999Z","updated_at":"2024-12-31T09:17:04.228Z","avatar_url":"https://github.com/Seeed-Projects.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Watcher Interpreter README\n\nWelcome 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.\n\n## Setup\n\n1. Install the Watcher package:\n\n   ```bash\n   pip install watcher-interpreter\n   ```\n\n2. Start the Watcher Interpreter:\n\n   ```bash\n   watcher-interpreter\n   ```\n\n   - tag: **setUser,setPwd,setEui FIRST!**\n\n## Configuration Commands\n\nBefore using the device commands, you need to configure the necessary parameters.\n\n- **setUser \\\u003cusername\\\u003e**: Set the username (API key) for the device.\n\n  ```sh\n  \u003e setUser 1ARRxxxMS250ZMZ2\n  ```\n\n- **setPwd \\\u003cpassword\\\u003e**: Set the password (API key) for the device.\n\n  ```sh\n  \u003e setPwd 72Fxxxx6127A46FF89D95B8F7xxxxC1ACD54752706C344E1B02CD55Dxxxx2C1C\n  ```\n\n- **setEui \\\u003ceui\\\u003e**: Set the EUI of the device.\n\n  ```sh\n  \u003e setEui 2xxxxx1C9627000xx\n  ```\n\n- **(optional)setBaseUrl \\\u003curl\\\u003e**: Set the base URL for the API.\n\n  ```sh\n  \u003e setBaseUrl https://sensecap.seeed.cc/openapi/\n  ```\n\n## Device Commands\n\nOnce configured, you can use the following commands to interact with the device.\n\n- **checkInfo**: Display the current configuration.\n\n  ```sh\n  \u003e checkInfo\n  ```\n\n- **llm_chat \\\u003cwords\\\u003e**: Send a chat message to the device.\n\n  ```sh\n  \u003e llm_chat \"Tell me a joke\"\n  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'}\n  ```\n\n- **llm_task \\\u003cwords\\\u003e**: Get a Task by message from the device.\n\n  ```sh\n  \u003e llm_task Tell a joke when someone detected\n  Task: \u003cTask...JSON...too...long\u003e\n  ```\n\n- **task_publish \\\u003ctask\\\u003e**: Publish a task to the device.\n\n  ```sh\n  \u003e llm_task Tell a joke when someone detected\n  Task: \u003cTask...JSON\u003e\n  \u003e task_publish \u003cTask...JSON\u003e\n  Watcher: {'code': '0', 'data': {}}\n  ```\n\n- **chat_publish \\\u003cwords\\\u003e**: Send a message and publish it as a task.\n\n  ```sh\n  \u003e chat_publish \"Remind me about the meeting\"\n  # llm_task + task_publish\n  Watcher: {'code': '0', 'data': {}}\n  ```\n\n- **chat \\\u003cwords\\\u003e**: Chat with the device using a predefined task.\n\n  ```sh\n  \u003e chat \"What's the weather like today?\"\n  Watcher: The weather today is quite pleasant. ...\n  ```\n\n## Exiting the Program\n\n- **exit**: Exit the Watcher Interpreter.\n\n  ```sh\n  \u003e exit\n  ```\n\n## Additional Information\n\nFor developers, you can import the `watcher.sdk` module to interact with the device programmatically.\n\n```python\nimport watcher.sdk\n\nbase_url = \"https://sensecap.seeed.cc/openapi/\"\n# check https://sensecap-docs.seeed.cc/zh/httpapi_quickstart.html\nuser = \"your api key ID\"\npwd = \"your api key secret\"\n# check your watcher \neui = \"your Watcher's EUI\" \nresult = watcher.sdk.llm_chat(\"why sky is blue?\", base_url, user, pwd, eui)\nprint(result.get(\"data\"))\n```\n\n## Support\n\nFor any issues or queries, please [New issue](https://github.com/Seeed-Projects/watcher-interpreter/issues)\n\n## License\n\nThis software is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseeed-projects%2Fwatcher-interpreter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseeed-projects%2Fwatcher-interpreter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseeed-projects%2Fwatcher-interpreter/lists"}