This file contains hidden or 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
| #!/usr/bin/env python | |
| from gpiozero import LED, Button | |
| from time import sleep | |
| from flask import Flask | |
| import datetime | |
| portone = LED(25) | |
| app = Flask(__name__) |
This file contains hidden or 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
| import requests | |
| def getToken(): | |
| req = requests.post("https://westeurope.api.cognitive.microsoft.com/sts/v1.0/issuetoken", | |
| headers={"Ocp-Apim-Subscription-Key": "YOUR_AZURE_API_KEY_HERE"}, | |
| ) | |
| return req.text | |
| def textToMp3(text, voice="it-IT-ElsaNeural"): |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| WEBHOOK_DESTINATION="http://localhost:3000/stripe/webhook" | |
| WEBHOOK_SECRET="whsec_ENTER_YOURS_HERE" | |
| if [[ ! "$#" -eq 1 ]]; then | |
| echo "USAGE: $0 /path/to/event.json"; | |
| exit 1; | |
| fi | |
| timestamp="$(date +%s)." |
This file contains hidden or 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
| substitutions: | |
| device_name: esp-tesla | |
| friendly_name: ESPHome Tesla | |
| mqtt_broker: 10.42.1.10 # CHANGE! | |
| tx_pin: GPIO32 # connect to RX on modbus bridge # CHANGE! | |
| rx_pin: GPIO33 # connect to TX on modbus bridge # CHANGE! | |
| ct1_value_id: internal_meter_reading # Name of the (number) variable that needs to be set as ct reading | |
| min_value: 0.0 | |
| max_value: 35.0 # adjust to a value above configured max-value in Wall Connector config | |
| start_value: 0.0 # Initial value at boot - determines the behavior when home assistant |
OlderNewer