Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@RamonBell
RamonBell / gist:b34679599e7fa1b298719f7ca17eedcb
Created November 25, 2023 01:53
ecowitt weather node red flow
[
{
"id": "a0016b1c.68e518",
"type": "tab",
"label": "Weather Station",
"disabled": false,
"info": ""
},
{
"id": "cb8de379.0b5f4",
function postCalendarEventsToMQTT() {
// Replace the values in these variables with your own information
const CALENDAR_ID = r########@gmail.com;
const MQTT_BROKER_URL = mqtt://192.168.1.198:1883;
const MQTT_TOPIC = main_calendar;
// Set up the MQTT client
const mqttClient = MQTT.connect(MQTT_BROKER_URL);
// Get the calendar events
const calendar = CalendarApp.getCalendarById(CALENDAR_ID);
const events = calendar.getEvents(new Date(), new Date(new Date().getTime() + (24 * 60 * 60 * 1000))); // Get events for the next 24 hours
@RamonBell
RamonBell / gist:6562ce42e5cf4ace2cf3e467fd98b376
Last active June 11, 2022 15:55
Automation for android phone to open a view based on location
****change the source to your mobile app location source and the zone to what ever zone you want
https://companion.home-assistant.io/docs/notifications/notification-commands/
In order to ge this to work the first time you have to give the app permission to do this. This is phone specific so you will have to look it up
alias: Open shopping list for me at stores
description: 'Opens mobile app shopping list when you get to the store'
trigger:
- platform: geo_location
source: sensor.pixel_6_geocoded_location
type: custom:vertical-stack-in-card
mode: vertical
cards:
- type: custom:mushroom-template-card
primary: Kid's room
icon: mdi:teddy-bear
icon_color: pink
layout: horizontal
tap_action:
action: navigate
@RamonBell
RamonBell / gist:0f035880af19b178a1a7c732fee67988
Created May 15, 2022 00:58
mushroom person card with phone entities
type: custom:stack-in-card
mode: vertical
cards:
- type: custom:mushroom-person-card
entity: person.ramon_bell
use_entity_picture: true
hide_name: true
layout: vertical
- type: custom:mushroom-chips-card
chips:
@RamonBell
RamonBell / gist:5e938234a81ce0f4a23a082070efee03
Created May 15, 2022 00:53
Mushroom card with buttons for entities
Watch the spacing. Change the entities for your needs. The first light.groep_woonkamer is nothing its just a place holder leave it alone. The secondary: is for what ever you want to show values for.
type: custom:vertical-stack-in-card
mode: vertical
cards:
- type: custom:mushroom-template-card
primary: Family Room
@RamonBell
RamonBell / gist:42e030c55f245c61e24fc580288be90b
Created September 26, 2021 02:02
SETTING RGB BULB COLOR BY MONTH OR HOLIDAY
[{"id":"2982a664efb25955","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"57e72065e35da4fe","type":"bigtimer","z":"2982a664efb25955","outtopic":"","outpayload1":"on","outpayload2":"off","name":"September lights","comment":"","lat":"","lon":"","starttime":5001,"endtime":"1350","starttime2":0,"endtime2":0,"startoff":"-20","endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"","outtext2":"","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":false,"feb":false,"mar":false,"apr":false,"may":false,"jun":false,"jul":false,"aug":false,"sep":true,"oct":false,"nov":false,"dec":false,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":0,"month7":0,"day8":0,"month8":0,"day9":0,"month9":0,"day10":0,"month10":0,"day11":0,"month11":0,"day12":0,"month12":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"x
@RamonBell
RamonBell / gist:657ae1ed538f1d7b375561e0f39a3232
Last active May 1, 2021 05:11
Alexa TTS node red sound
[{"id":"3857578f.0eb368","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"55ab5702.ec6998","type":"api-call-service","z":"3857578f.0eb368","name":"","server":"","version":1,"debugenabled":false,"service_domain":"media_player","service":"play_media","entityId":"","data":"{\"entity_id\":\"########################\",\"media_content_id\":\"amzn_sfx_doorbell_chime_01\",\"media_content_type\":\"sound\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":590,"y":240,"wires":[[]]},{"id":"4d7f8a41.b9f8b4","type":"api-call-service","z":"3857578f.0eb368","name":"Set Volume to 80%","server":"","version":1,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.ramon_s_echo_plus","data":"{\"volume_level\":\".99\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":310,"y":240,"wires":[["55ab5702.ec6998"]]}]
[{"id":"fec9b4e3.fe2c78","type":"tab","label":"RF doorbell","disabled":false,"info":""},{"id":"619264af.40619c","type":"function","z":"fec9b4e3.fe2c78","name":"side door boorbell","func":"var line1 = [\"Some one is ringing the side doorbell \" ]\n\nmsg.payload =\n\nline1[Math.floor(Math.random() * line1.length)]\n\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":830,"y":560,"wires":[["a4dbdbdb.d13fa8"]]},{"id":"569a909a.ed83f","type":"function","z":"fec9b4e3.fe2c78","name":"front door boorbell","func":"var line1 = [\"Some one is ringing the front doorbell \" ]\n\nmsg.payload =\n\nline1[Math.floor(Math.random() * line1.length)]\n\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":80,"wires":[["a4dbdbdb.d13fa8"]]},{"id":"2cdcf18c.a6965e","type":"api-current-state","z":"fec9b4e3.fe2c78","name":"Home?","server":"","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boo
@RamonBell
RamonBell / premade_node_red
Created April 23, 2021 15:00
some premade node red node and flows
here are some of my most used node red flows:
[{"id":"ae3bb37e.1e5b1","type":"tab","label":"Preset nodes","disabled":false,"info":""},{"id":"12dad45a.09b5cc","type":"group","z":"ae3bb37e.1e5b1","name":"","style":{"fill":"#ffff00","label":true},"nodes":["19979de1.412c12","a358eaa9.574cb8"],"x":817.5078125,"y":119,"w":500,"h":283.5234375},{"id":"a358eaa9.574cb8","type":"group","z":"ae3bb37e.1e5b1","g":"12dad45a.09b5cc","style":{"stroke":"#c7c2bb","stroke-opacity":"1","fill":"#c7c2bb","fill-opacity":"0.75","label":true,"label-position":"nw","color":"#afa89d"},"nodes":["119286c.c14c479","fddf1965.59c7a8"],"x":843.5078125,"y":218.5234375,"w":448,"h":158},{"id":"3e7d5673.ae1eaa","type":"group","z":"ae3bb37e.1e5b1","name":"","style":{"fill":"#777777","label":true},"nodes":["3da81636.a0fbba","e9d3b605.a0adb8"],"x":34,"y":39,"w":292,"h":142},{"id":"64235d8b.4e4704","type":"group","z":"ae3bb37e.1e5b1","name":"","style":{"fill":"#c8e7a7","label":true},"nodes":["2063baeb.2c4a06","e5e0289a.6a4378"],"x":54,"y":439,"w":332