Skip to content

Instantly share code, notes, and snippets.

View AndrewAubury's full-sized avatar

Andrew Aubury AndrewAubury

View GitHub Profile
blueprint:
name: Sonoff SNZB-01 Wireless Switch via MQTT
description: Handle an SNZB-01's various inputs
domain: automation
input:
mqtt_channel:
name: MQTT Topic
description: "MQTT Topic to subscribe to"
default: ""
selector:
  • Create a Cloudflare worker with the code provided
  • Install the asar tools
  • Copy the app.asar from cricut (C:\Users\USERNAME\AppData\Local\Programs\Cricut Design Space\resources) out to a folder
  • Unpack the asar with the command asar e app.asar app
  • Open app/cricut-ele-design-space/main.js in a actual text editor - I use VSCode
  • Search and replace apis.cricut.com to your-worker-url.workers.dev
  • Repack the asar with the command asar p app mod-app.asar
  • Replace the cricut app.asar with your new modded one

When Cricut updates the design space you will need to re-do the mod.

// Constants
const API_HOSTNAME = 'apis.cricut.com';
var PROXY_HOSTNAME = ""; // this is set dynamicly to support custom domains
const MACHINE_TYPE_MAP = { // Can we make this dynamiclly pulled?
'22': 'Newt',
'14': 'Scamander',
'11': 'Maker',
'19': 'Mars',
'12': 'Cupid',