Skip to content

Instantly share code, notes, and snippets.

dexterlabora / meraki-mqtt-v1-asyncapi.yaml
Created Apr 28, 2022
DEV --- The is just a TEST schema for Meraki MQTT data.
View meraki-mqtt-v1-asyncapi.yaml
asyncapi: '2.3.0'
title: Meraki MQTT API
version: '1.0.0'
description: |
The Meraki MQTT service enables real-time telemetry from your network devices.
name: Apache 2.0
dexterlabora /
Created Apr 25, 2022
An add-on custom function to call a Meraki API and shape the data to fit a Google Sheet.
* Fetches Meraki API data and formats the JSON data into Google Sheet format
* @param url url to pull json data from
* @param apiKey API key for authorization
* @param title The title text to display in the cell
* @param refresh Triggers a refresh of report when changed. Cannot use now() functions, so a helper "Refresh Reports" button will update a hidden _meraki_tools settings sheet to set a time, triggering the function to re-evaluate. You can optionaly set a Trigger to call the refreshReports function on a schedule.
* @return Google Sheet data
* @customfunction
dexterlabora / jsonata-openapi-parse-ops-paths.txt
Created Feb 12, 2021
JSONata - Parse Open API v2 Spec by Path, Operation, Description and Tags
View jsonata-openapi-parse-ops-paths.txt
/* OAS Path Ops and Tags */
/*"pathIndex": $index,*/
"path": $keys($$.paths)[$index],
"operationid": %.operationId,
"description": %.description,
dexterlabora / v0-v1-path-operations-diff.json
Created Sep 4, 2020
Meraki API v0-v1-path-operations-diff.json
View v0-v1-path-operations-diff.json
"oldPath": "/devices/{serial}/camera/qualityAndRetentionSettings",
"newPath": "/devices/{serial}/camera/qualityAndRetention",
"oldOperations": [
"newOperations": [
dexterlabora / reddit-power-temp-flows.json
Created Jul 28, 2020
Is basement humidity above 50%? Is current power draw in Watts below 5.0 on dehumidfier? Only if both of those are true, then trigger the next step in the flow.
View reddit-power-temp-flows.json
"id": "8d3e6c8e.8cbc9",
"type": "inject",
"z": "e941d247.46185",
"name": "51%",
"props": [
"p": "payload"
dexterlabora / jsonata.txt
Created Jul 21, 2020
JSONata - Format OpenAPI Spec JSON for Vue V-Swagger component
View jsonata.txt
JSONata expression to:
Format OpenAPI Spec JSON for Vue V-Swagger component
$requestArray := $.paths.*#$pi.*#$i.{
dexterlabora / mr-mqtt-nr-simulator.json
Created Aug 21, 2019
A simulation of WiFi and BLE probes and MQTT communication network.
View mr-mqtt-nr-simulator.json
"id": "c100fe2a.cb152",
"type": "debug",
"z": "90fbc492.9c31f8",
"name": "Broker",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
dexterlabora / esp8266-sniffer
Created Aug 7, 2019
A fork of esp8266-sniffer to pipe probe requests the serial port in JSON format to be easily used with Node-RED, etc.
View esp8266-sniffer
#include <ArduinoJson.h>
#include <iostream>
#include <ESP8266WiFi.h> // added this
#include <ESP8266HTTPClient.h> // added this
const char* serial = "YYYY-YYYY-YYYY"; // fake AP serial
const char* networkId = "N_99999999999"; // fake network ID
const float txPower = 20.5; // power in dBm (0 - 20.5)
dexterlabora / parsePathParams.js
Created Apr 12, 2019
Regex to replace URL path params with values
View parsePathParams.js
var path = '/network/{id}/device/{serial}';
params = {
serial: "abcd-abcd-abcd"
var paramNames = Object.keys(params);
console.log('paramNames', paramNames);
dexterlabora / vue.config.js
Created Apr 1, 2019
Meraki API proxy config for VueJS with Webpack
View vue.config.js
module.exports = {
devServer: {
proxy: {
"/api/*": {
target: "",
secure: false,
changeOrigin: true,
pathRewrite: {
"^/api": ""