Skip to content

erikbuild/trmnl-yolink-temperature

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YoLink Temperature Sensor Plugin for TRMNL

License

This TRMNL plugin displays a grid of all of your temperature/humidity sensors from a YoLink account.

NOTE: It requires hosting a simple json proxy api on something like Cloudflare Worker, Netlify Function, or AWS Lambda to proxy the API requests.

Preview of TRMNL dashboard

Prerequisites

Get YoLink UserID / Secrets

Generate a User Access Credential in the YoLink app if you haven't already.

  1. Open YoLink App
  2. Click the hamburger icon in the top left.
  3. Click Settings > Account > Advanced Settings > User Access Credentials
  4. Create a new credential if you don't already have one. Otherwise, copy the UIAD and Secret Key.

Create Cloudflare Worker

  1. Create (or sign in to) a CloudFlare personal (free) account.
  2. Navigate to Computer (Workers) > Workers & Pages.
  3. Click on Create and then Hello World > Get Started.
  4. Name the worker and Click Deploy. Note the deploy URL.
  5. Click Edit Code and replace the contents of worker.js in CloudFlare with the contents of cloudflare\worker.js from this repository.
  6. Click Deploy to deploy the worker.
  7. Click back to the worker overview page and Click Settings.
  8. Click Variables & Secrets.
    1. Add a Secret named YOLINK_CLIENT_ID and set the value to the UIAD from your YoLink account.
    2. Add a Secret named YOLINK_CLIENT_SECRET and set the value to the Secret Key from your YoLink account.
  9. Visit your deploy URL; you should see a JSON result with your temperature values and devices.

Import the Plugin into TRMNL Dashboard

  1. Download the latest release zip.
  2. Visit the TMRNL Private Plugin Page.
  3. Click Import new and select the latest release zip.
  4. Set your Cloudflare Worker URL as well as the Subtitle Text.

Local Development

Either the trmnl_preview gem or Docker must be installed.

Simply clone the repo, then run bin/dev.

References

About

Simple TRMNL plugin for grabbing the current state of YoLink temperature sensors.

Topics

Resources

License

Stars

Watchers

Forks