Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c1579f2edf | |||
| 5bdd48a0d2 | |||
| 51a9e801b2 | |||
| 4a961c865e | |||
| 9d0dac7e7b | |||
| 569260634c | |||
| 7ae1318376 | |||
| 9013db5213 | |||
| 597cba9fec |
40
AGENTS.md
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# TRMNL Plugin Development Guidelines
|
||||||
|
|
||||||
|
## Project Overview
|
||||||
|
This is a TRMNL platform plugin for displaying room data from Google Sheets on connected devices. The plugin uses Liquid templating for the frontend and YAML for configuration.
|
||||||
|
|
||||||
|
## File Structure
|
||||||
|
- `full.liquid` - Main Liquid template file for rendering room data
|
||||||
|
- `settings.yml` - Plugin configuration including API endpoints and custom fields
|
||||||
|
- `MeetingRooms-sample-data.json` - Sample data structure reference
|
||||||
|
|
||||||
|
## Code Style Guidelines
|
||||||
|
|
||||||
|
### Liquid Templating
|
||||||
|
- Use Liquid syntax for data binding and conditional logic
|
||||||
|
- Follow existing naming conventions: use snake_case for variables
|
||||||
|
- Keep HTML structure clean and semantic
|
||||||
|
- Use TRMNL-specific classes for styling (layout, columns, grid, etc.)
|
||||||
|
|
||||||
|
### YAML Configuration
|
||||||
|
- Use YAML format for all configuration files
|
||||||
|
- Follow existing key naming conventions (snake_case)
|
||||||
|
- Include proper descriptions for custom fields
|
||||||
|
- Use string quotes for all string values
|
||||||
|
|
||||||
|
### General Development
|
||||||
|
- No build/test commands - this is a static plugin
|
||||||
|
- Validate Liquid syntax by testing in TRMNL platform
|
||||||
|
- Ensure Google Sheets API URLs are correct and accessible
|
||||||
|
- Test with various device IDs using TRMNL_ID matching
|
||||||
|
|
||||||
|
### Testing
|
||||||
|
- Test by deploying to TRMNL platform with different device IDs
|
||||||
|
- Verify data loads from Google Sheets correctly
|
||||||
|
- Check responsive behavior on TRMNL devices
|
||||||
|
- Validate fallback logo displays when no data is available
|
||||||
|
|
||||||
|
## Key Components
|
||||||
|
- Device ID matching via `trmnl.plugin_settings.custom_fields_values.device_id`
|
||||||
|
- Data filtering using `where` filter in Liquid
|
||||||
|
- Google Sheets integration via opensheet.elk.sh API
|
||||||
50
MeetingRooms-sample-data.json
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"not_in_use":"FALSE",
|
||||||
|
"room_name":"Orchid Room",
|
||||||
|
"group_name":"Engineering Team",
|
||||||
|
"type":"Leadership Retreat",
|
||||||
|
"days":"MON, TUE, WED",
|
||||||
|
"note":"🎨 Arts and Crafts Workshop",
|
||||||
|
"header":"CBC Winchester",
|
||||||
|
"tagline":"Fields Conference 1",
|
||||||
|
"info":"Cedarmore Camp & Conference Center",
|
||||||
|
"TRMNL_ID":"15236G"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"not_in_use":"TRUE",
|
||||||
|
"room_name":"Crossings Ministries",
|
||||||
|
"group_name":"Fields Conference 2",
|
||||||
|
"type":"Leadership Retreat",
|
||||||
|
"days":"FRI, SAT, SUN",
|
||||||
|
"note":"Check out at 9am 🕐",
|
||||||
|
"header":"SBC Greenville",
|
||||||
|
"tagline":"Fields Conference 2",
|
||||||
|
"info":"Cedarmore Camp & Conference Center",
|
||||||
|
"TRMNL_ID":"3SLGPG"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"not_in_use":"FALSE",
|
||||||
|
"room_name":"Gym",
|
||||||
|
"group_name":"Youth Group",
|
||||||
|
"type":"Kids Camp",
|
||||||
|
"days":"MON, WED, TUE, THU, FRI",
|
||||||
|
"note":"⚽Soccer & 🎯 Volley Ball",
|
||||||
|
"header":"The Oasis",
|
||||||
|
"tagline":"Crossings Leadership Private Meeting Space",
|
||||||
|
"info":"Cedarmore Camp & Conference Center",
|
||||||
|
"TRMNL_ID":"75484B"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"not_in_use":"FALSE",
|
||||||
|
"room_name":"Welcome Center",
|
||||||
|
"group_name":"TEST",
|
||||||
|
"type":"TEST",
|
||||||
|
"days":"MON",
|
||||||
|
"note":"TEST",
|
||||||
|
"header":"Cedarmore",
|
||||||
|
"tagline":"Test Display",
|
||||||
|
"info":"Welcome to Cedarmore!",
|
||||||
|
"TRMNL_ID":"3BM5TH"
|
||||||
|
}
|
||||||
|
]
|
||||||
29
README.md
@@ -1,6 +1,6 @@
|
|||||||
## CEDARMORE Room Data TRMNL Plug-in - ReadMe
|
## CEDARMORE Room Data TRMNL Plug-in - ReadMe
|
||||||
|
|
||||||
**Version:** 1.1
|
**Version:** 1.2
|
||||||
|
|
||||||
**Description:**
|
**Description:**
|
||||||
|
|
||||||
@@ -8,4 +8,29 @@ This plug-in is designed for use with the TRMNL platform ([https://usetrmnl.com]
|
|||||||
|
|
||||||
**Functionality:**
|
**Functionality:**
|
||||||
|
|
||||||
The plug-in functions by linking to a Google Sheet. The sheet contains the room data that will be displayed on the TRMNL device. The link is established through a matching Spreadsheet ID, ensuring that the correct data is displayed on the intended device.
|
The plug-in functions by linking to a Google Sheet. The sheet contains the room data that will be displayed on the TRMNL device. The link is established through a matching Spreadsheet ID, ensuring that the correct data is displayed on the intended device.
|
||||||
|
|
||||||
|
**New Feature - Not In Use Mode:**
|
||||||
|
Each display can now be marked as "Not In Use" by setting the `not_in_use` field to "TRUE" in the spreadsheet. When enabled, the display will show the Cedarmore logo instead of room data, allowing for easy identification of unavailable displays. Setting `not_in_use` to "FALSE" will show the normal room information.
|
||||||
|
|
||||||
|
## Images
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Links
|
||||||
|
- [Crossings Room Data Spreadsheet](https://docs.google.com/spreadsheets/d/1i9emEf-_b0pkZxP4G3_IivfqozJAb2k8TnK9HfRBDAQ/edit?gid=681330367#gid=681330367)
|
||||||
|
- [List Of Plugins](https://usetrmnl.com/plugin_settings?keyname=private_plugin)
|
||||||
|
- [Framework Design System](https://usetrmnl.com/framework)
|
||||||
|
- [Liquid 101 Template System](https://help.usetrmnl.com/en/articles/10671186-liquid-101)
|
||||||
|
- [Custom plugin filters](https://help.usetrmnl.com/en/articles/10347358-custom-plugin-filters)
|
||||||
|
- [Advanced Liquid](https://help.usetrmnl.com/en/articles/10693981-advanced-liquid)
|
||||||
|
- [TRMNL Shop](https://shop.usetrmnl.com/)
|
||||||
|
- [OpenSheet](https://github.com/benborgers/opensheet#readme) - Converts Google sheet to json data
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% assign json_data = data | where: "TRMNL_ID", trmnl.plugin_settings.custom_fields_values.device_id | first %}
|
{% assign json_data = data | where: "TRMNL_ID", trmnl.plugin_settings.custom_fields_values.device_id | first %}
|
||||||
{% assign my_id = trmnl.plugin_settings.custom_fields_values.device_id %}
|
{% assign my_id = trmnl.plugin_settings.custom_fields_values.device_id %}
|
||||||
|
|
||||||
{% if json_data %}
|
{% if json_data and json_data.not_in_use == "FALSE" %}
|
||||||
|
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
filter: grayscale(100%) brightness(0%) ; float: right;" src="https://gocrossings.org/wp-content/uploads/2020/02/logo-white_1.png"/>
|
filter: grayscale(100%) brightness(0%) ; float: right;" src="https://gocrossings.org/wp-content/uploads/2020/02/logo-white_1.png"/>
|
||||||
<span class="instance"><p>DeviceID: {{ my_id }} Updated at {{ "now" | date: "%s" | plus: trmnl.user.utc_offset | date: "%H:%M" }}</p></span>
|
<span class="instance"><p>DeviceID: {{ my_id }} Updated at {{ "now" | date: "%s" | plus: trmnl.user.utc_offset | date: "%H:%M" }}</p></span>
|
||||||
</div>
|
</div>
|
||||||
{% else %} <!-- If There is no json data just show the logo -->
|
{% else %} <!-- If There is no json data or not_in_use is true, show the logo -->
|
||||||
<div class="layout layout--center">
|
<div class="layout layout--center">
|
||||||
<img class="image-dither" style="
|
<img class="image-dither" style="
|
||||||
filter: grayscale(100%) brightness(70%) contrast(500%);" src="https://gocrossings.org/wp-content/uploads/2020/03/cedarmore.png"/>
|
filter: grayscale(100%) brightness(70%) contrast(500%);" src="https://gocrossings.org/wp-content/uploads/2020/03/cedarmore.png"/>
|
||||||
|
|||||||
BIN
icon/room-data-plugin-icon.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
icon/welcome-center-plugin-icon.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
screenshots/20250617_124308.jpg
Normal file
|
After Width: | Height: | Size: 4.4 MiB |
BIN
screenshots/20250617_130122.jpg
Normal file
|
After Width: | Height: | Size: 4.5 MiB |
BIN
screenshots/20250617_142932.jpg
Normal file
|
After Width: | Height: | Size: 4.3 MiB |
BIN
screenshots/Cedarmore_Room_Data_Google_Sheets.png
Normal file
|
After Width: | Height: | Size: 154 KiB |
BIN
screenshots/TRMNL_Plugin_Settings.png
Normal file
|
After Width: | Height: | Size: 312 KiB |
@@ -4,7 +4,7 @@ no_screen_padding: 'no'
|
|||||||
dark_mode: 'no'
|
dark_mode: 'no'
|
||||||
static_data: "[{\"room_name\":\"Orchid Room\",\"group_name\":\"Engineering Team\",\"type\":\"Leadership Retreat\",\"days\":\"MON, TUE, WED\",\"note\":\"\U0001F3A8 Arts and Crafts Workshop\",\"TRMNL_ID\":\"15236G\"},{\"room_name\":\"Crossings Ministries\",\"group_name\":\"Fields Conference 2\",\"type\":\"Leadership Retreat\",\"days\":\"FRI, SAT, SUN\",\"note\":\"Check out at 9am \U0001F558\",\"TRMNL_ID\":\"3SLGPG\"},{\"room_name\":\"Gym\",\"group_name\":\"Youth Group\",\"type\":\"Kids Camp\",\"days\":\"MON, WED, TUE, THU, FRI\",\"note\":\"⚽Soccer & \U0001F3D0 Volley Ball\",\"TRMNL_ID\":\"75484B\"},{\"room_name\":\"Welcome Center\",\"group_name\":\"TEST\",\"type\":\"TEST\",\"days\":\"MON\",\"note\":\"TEST\",\"TRMNL_ID\":\"3BM5TH\"}]"
|
static_data: "[{\"room_name\":\"Orchid Room\",\"group_name\":\"Engineering Team\",\"type\":\"Leadership Retreat\",\"days\":\"MON, TUE, WED\",\"note\":\"\U0001F3A8 Arts and Crafts Workshop\",\"TRMNL_ID\":\"15236G\"},{\"room_name\":\"Crossings Ministries\",\"group_name\":\"Fields Conference 2\",\"type\":\"Leadership Retreat\",\"days\":\"FRI, SAT, SUN\",\"note\":\"Check out at 9am \U0001F558\",\"TRMNL_ID\":\"3SLGPG\"},{\"room_name\":\"Gym\",\"group_name\":\"Youth Group\",\"type\":\"Kids Camp\",\"days\":\"MON, WED, TUE, THU, FRI\",\"note\":\"⚽Soccer & \U0001F3D0 Volley Ball\",\"TRMNL_ID\":\"75484B\"},{\"room_name\":\"Welcome Center\",\"group_name\":\"TEST\",\"type\":\"TEST\",\"days\":\"MON\",\"note\":\"TEST\",\"TRMNL_ID\":\"3BM5TH\"}]"
|
||||||
polling_verb: get
|
polling_verb: get
|
||||||
polling_url: https://opensheet.elk.sh/1i9emEf-_b0pkZxP4G3_IivfqozJAb2k8TnK9HfRBDAQ/MeetingRooms!A1:F15
|
polling_url: https://opensheet.elk.sh/1i9emEf-_b0pkZxP4G3_IivfqozJAb2k8TnK9HfRBDAQ/MeetingRooms!A1:G15
|
||||||
polling_headers: ''
|
polling_headers: ''
|
||||||
polling_body: ''
|
polling_body: ''
|
||||||
id: 101230
|
id: 101230
|
||||||
@@ -14,5 +14,5 @@ custom_fields:
|
|||||||
name: Device ID (required)
|
name: Device ID (required)
|
||||||
description: The id for the device shoudl match the TRMNL_ID from the spreadsheet
|
description: The id for the device shoudl match the TRMNL_ID from the spreadsheet
|
||||||
default: '1234'
|
default: '1234'
|
||||||
name: OAISIS Crossing Room Data
|
name: [DeviceID] Crossing Room Data
|
||||||
refresh_interval: 360
|
refresh_interval: 360
|
||||||
|
|||||||