{"files":{"SKILL.md":"---\nname: m-bus-httpd-api\ndescription: \"M-Bus HTTPD API skill. Use when working with M-Bus HTTPD for mbus. Covers 7 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# M-Bus HTTPD API\nAPI version: 0.3.5\n\n## Auth\nNo authentication required.\n\n## Base URL\n/\n\n## Setup\n1. No auth setup needed\n2. GET /mbus/api -- returns this api specification\n3. POST /mbus/hat/on -- create first on\n\n## Endpoints\n7 endpoints across 1 group. See references/api-spec.lap for full details.\n\n### Mbus\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /mbus/api | Returns this API specification |\n| GET | /mbus/hat | Gets Raspberry Pi Hat information |\n| POST | /mbus/hat/on | Turns on power to the M-Bus |\n| POST | /mbus/hat/off | Turns off power to the M-Bus |\n| POST | /mbus/scan/{device}/{baudrate} | Scan the specified device for slaves |\n| POST | /mbus/get/{device}/{baudrate}/{address} | Gets data from the slave identified by {address} |\n| POST | /mbus/getMulti/{device}/{baudrate}/{address}/{maxframes} | Gets data from the slave identified by {address}, and supports multiple responses from the slave |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"List all api?\" -> GET /mbus/api\n- \"List all hat?\" -> GET /mbus/hat\n- \"Create a on?\" -> POST /mbus/hat/on\n- \"Create a off?\" -> POST /mbus/hat/off\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Create/update endpoints return the modified resource on success\n- Error responses include status codes and descriptions in the spec\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api M-Bus HTTPD API\n@base /\n@version 0.3.5\n@endpoints 7\n@toc mbus(7)\n\n@endpoint GET /mbus/api\n@desc Returns this API specification\n@returns(200) OK\n@errors {404: Not found}\n\n@endpoint GET /mbus/hat\n@desc Gets Raspberry Pi Hat information\n@returns(200) {product: str, productId: str, productVer: str, uuid: str, vendor: str} # OK\n@errors {404: Not found}\n\n@endpoint POST /mbus/hat/on\n@desc Turns on power to the M-Bus\n@returns(200) OK\n@errors {404: Not found}\n\n@endpoint POST /mbus/hat/off\n@desc Turns off power to the M-Bus\n@returns(200) OK\n@errors {404: Not found}\n\n@endpoint POST /mbus/scan/{device}/{baudrate}\n@desc Scan the specified device for slaves\n@required {device: str # The serial device to scan - /dev/ is pre-pended to {device} by M-Bus HTTPD before scanning, baudrate: int(int32) # Baudrate to communicate with M-Bus devices}\n@returns(200) OK\n@errors {400: Bad request, 404: Not found (e.g. device not found, or M-Bus HTTPD is unauthorized to access it, or to change baud rate to that specified, device not responding etc)}\n\n@endpoint POST /mbus/get/{device}/{baudrate}/{address}\n@desc Gets data from the slave identified by {address}\n@required {device: str # The serial device to scan - /dev/ is pre-pended to {device} by M-Bus HTTPD before scanning, baudrate: int(int32) # Baudrate to communicate with M-Bus devices, address: str(string) # The slave device to get data from}\n@returns(200) OK\n@errors {400: Bad request, 404: Not found (or M-Bus HTTPD is unauthorized to access it, or to change baud rate to that specified, etc)}\n\n@endpoint POST /mbus/getMulti/{device}/{baudrate}/{address}/{maxframes}\n@desc Gets data from the slave identified by {address}, and supports multiple responses from the slave\n@required {device: str # The serial device to scan - /dev/ is pre-pended to {device} by M-Bus HTTPD before scanning, baudrate: int(int32) # Baudrate to communicate with M-Bus devices, address: str(string) # The slave device to get data from, maxframes: int(int32) # The slave device to get data from}\n@returns(200) OK\n@errors {400: Bad request, 404: Not found (or M-Bus HTTPD is unauthorized to access it, or to change baud rate to that specified, etc)}\n\n@end\n"}}