This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Widget for Solar Manager Data | |
// read username:password from widget parameter, not hardcoded in the script | |
const token = args.widgetParameter | |
let smID = "SolarManagerID" | |
const gatewayData = await fetchGatewayProductionAndConsumption() | |
// Erstellen Sie das Widget | |
let widget = new ListWidget(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: yellow; icon-glyph: magic; | |
// Maske Icon erstellt von "Freepik" (www.flaticon.com/de) | |
let country = "de"; | |
let storeId = 251; | |
let param = args.widgetParameter; | |
if (param != null && param.length > 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const canvSize = 200; | |
const canvTextSize = 80; | |
const canvas = new DrawContext(); | |
canvas.opaque = false; | |
const battCircleRemainColor = new Color("#32CD33"); // Charge circle remaining color | |
const battCircleDepletedColor = new Color("#fff"); | |
const battCircleBGColor = new Color('#fff'); // Widget background color | |
const battCircleTextColor = new Color('#000'); // Widget text color | |
const labelColor = new Color('#768178') | |
const textColor = new Color('#34443c') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// insert your Spotify client id and secret here | |
const clientId = "xxx" | |
const clientSecret = "xxx" | |
// the Spotify country ISO code | |
const spotifyCountry = "DE" | |
let widget = await createWidget() | |
Script.setWidget(widget) | |
Script.complete() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: red; icon-glyph: music; | |
// insert your Spotify client id and secret here | |
const clientId = "xxx" | |
const clientSecret = "xxx" | |
let widget = new ListWidget() | |
widget.setPadding(22,10,10,10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
partNo=$1 | |
storeId=$2 | |
notifyUrl=https://ntfy.sh/$3 | |
FILE=$4/${partNo/\//-}-$storeId | |
if [ ! -f "$FILE" ]; then | |
echo "$FILE does not exist." | |
echo -n "1" > $FILE | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: deep-blue; icon-glyph: film; | |
// name: ard-mediathek.js | |
// description: A scriptable widget which displays the latest editorial picks of the ARD Mediathek | |
// author: Marco Dengel | |
// email: marco79cgn@gmail.com | |
let mediathekData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: red; icon-glyph: newspaper; | |
// insert your Spotify client id and secret here (replace xxx) | |
const clientId = "xxx" | |
const clientSecret = "xxx" | |
let widget = new ListWidget() | |
widget.setPadding(22, 10, 10, 10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: blue; icon-glyph: magic; | |
// default zip and partNo - will be overwritten by your widget parameters | |
let zip = '50670' | |
let partNo = "MU7A3ZD/A" | |
// insert your ntfy url | |
const notifyUrl = "https://ntfy.sh/******" | |
// force push notification - set to true in order to test that your setup is working correctly | |
const forcePushNotification = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: cyan; icon-glyph: magic; | |
// the node sonos http api base url (running on your Pi for example) | |
let sonosBaseUrl = "http://192.168.178.10:5005" | |
// optional for cover art: the ip address of one of your Sonos speakers | |
let sonosPlayerUrl = "http://192.168.178.38:1400" | |
let param = args.widgetParameter |