{"id":15040016,"url":"https://github.com/automattic/biab-plugin","last_synced_at":"2025-10-11T00:33:39.859Z","repository":{"id":66078738,"uuid":"80506527","full_name":"Automattic/biab-plugin","owner":"Automattic","description":"Blog In A Box WordPress plugin","archived":false,"fork":false,"pushed_at":"2017-03-08T13:11:08.000Z","size":339,"stargazers_count":10,"open_issues_count":5,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-29T12:45:25.096Z","etag":null,"topics":["raspberrypi","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Automattic.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":"2017-01-31T09:23:30.000Z","updated_at":"2023-07-31T20:46:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"07584b78-b821-4518-8b8e-8c5bb7aab14f","html_url":"https://github.com/Automattic/biab-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Automattic/biab-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Automattic%2Fbiab-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Automattic%2Fbiab-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Automattic%2Fbiab-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Automattic%2Fbiab-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Automattic","download_url":"https://codeload.github.com/Automattic/biab-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Automattic%2Fbiab-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005656,"owners_count":26083943,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["raspberrypi","wordpress","wordpress-plugin"],"created_at":"2024-09-24T20:44:06.809Z","updated_at":"2025-10-11T00:33:39.842Z","avatar_url":"https://github.com/Automattic.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blog In A Box WordPress Plugin\n\nA custom WordPress plugin for [Blog In A Box](https://inabox.blog/).\n\nProvides an admin interface to the [Blog In A Box device handler tool](https://github.com/Automattic/biab-cli), as well as widgets for SenseHAT readings.\n\n## Installation\n\nThe plugin is installed as a standard WordPress plugin by copying to `wp-content/plugins`.\n\nNote: this is done automatically when using [Blog In A Box Installer](https://github.com/Automattic/biab-installer).\n\n## Usage\n\nOnce installed the plugin appears as a menu in the WordPress admin interface:\n\n![Admin menu](screenshot-1.png)\n\nThe main admin page allows individual device modules to be enable or disabled:\n\n![Modules](screenshot-2.png)\n\nThe plugin control path should point to the [Blog In A Box CLI](https://github.com/Automattic/biab-cli) tools.\n\n## Camera Module\n\nWith a Raspberry Pi camera attached you can use the camera module. This allows you to take photos (manually or scheduled) and have them appear as blog posts.\n\n### Manual Photo\n\nPress the `take photo` button to take an immediate photo. A small window appears with the photo.\n\n### Scheduled Photo\n\nSet an interval (seconds, minutes, or hours) to have the camera automatically take a photo and add it to a new blog post. This is perfect for taking snapshots of a particular location!\n\n### Settings\n\nYou can change various camera settings:\n\n- Vertical / horizontal flip - this may be needed depending on the orientation of the camera\n- Quality - the JPEG quality of the photos (from 1% to 100%), which determines the file size\n- Brightness / saturation / sharpness / contrast\n- ISO - adjusts the camera's ISO setting. A higher ISO allows more light onto the sensor, but increases noise.\n- White balance - adjust according to the light colour\n- Effect - add a special effect to the captured photo\n\n## SenseHAT Module\n\nWith an attached SenseHAT module you can monitor environment data (temperature, humidity, and air pressure) and have this displayed on your blog either as a live display, or a historical chart. Additionally you can use the SenseHAT display to show readings.\n\n### Manual Reading\n\nPress the `publish report` button to take an immediate reading and publish this as a blog post.\n\n### Scheduled Reading\n\nSet an interval (seconds, minutes, or hours) to have readings automatically taken. These will be stored, but not result in a blog post.\n\n### Units\n\nChange the temperature units between Celsius and Fahrenheit.\n\n## Developing\n\nThe plugin is designed to be extended with additional devices, and should match changes in the [CLI tool](https://github.com/Automattic/biab-cli).\n\nEach device module is effectively a WordPress plugin in its own right, and has full access to all WordPress plugin hooks.\n\nTo add an additional device:\n\n- Create a device directory\n- Create a standard WordPress plugin entry point for the device - see `camera/camera.php` as an example\n- Include the entry point at the bottom of `blog-in-a-box.php`\n\nYour device can now perform whatever WordPress functions are necessary.\n\n### Interfacing with Blog In A Box CLI\n\nAt some point your WordPress device code will need to talk to the associated CLI device code. This is achieved by extending the `BiabControl` class:\n\n```php\nclass BiabOtherDevice extends BiabControl {\n\tpublic function do_special_thing( $data ) {\n\t\t$this-\u003erequest( 'my-cli-command', $data );\n\t}\n}\n```\n\nThis will call the `my-cli-command` from the Blog In A Box CLI tool. Effectively:\n\n`biab my-cli-command data`\n\nIf the command returns data you can listen to this with:\n\n```php\n$response = $this-\u003erequest( 'my-cli-command', $data );\n```\n\nWhere `$response` will contain:\n\n```php\narray(\n\t'retval' =\u003e 0,\n\t'output' =\u003e 'your returned data'\n);\n```\n\nThe `retval` is the exit code from the CLI tool. Anything other than `0` is an error.\n\n## Contributing\n\nWe welcome contributions in any form, and you can help reporting, testing, and detailing bugs.\n\n## License\n\nThe Blog In A Box theme is licensed under [GNU General Public License v2 (or later)](./LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautomattic%2Fbiab-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautomattic%2Fbiab-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautomattic%2Fbiab-plugin/lists"}