Skip to content

Instantly share code, notes, and snippets.

View charithmadhuranga's full-sized avatar
🏠
Working from home

Charith Madhuranga charithmadhuranga

🏠
Working from home
View GitHub Profile
@charithmadhuranga
charithmadhuranga / Private-pypi-howto
Created May 11, 2023 12:58 — forked from Jaza/Private-pypi-howto
Guide for how to create a (minimal) private PyPI repo, just using Apache with directory autoindex, and pip with an extra index URL.
*
@charithmadhuranga
charithmadhuranga / homeassistant.nomad
Created July 6, 2022 14:29 — forked from langerma/homeassistant.nomad
homeassistant nomad job
# Hashicorp At Home - A series of blog posts by Mockingbird Consulting
# Read the original at https://www.mockingbirdconsulting.co.uk/blog/2019-01-05-hashicorp-at-home/
#
# This code is licensed under the MIT License, and remains the copyright of Mockingbird Consulting Ltd.
# This configuration will launch homeassistant.io and have it hosted at homeassistant.service.consul
# (assuming the default domain of .consul has been retained from the original articles).
#
# Configuration for HomeAssistant will be saved to the host machine in /srv/home_assistant/config,
# so if you have an existing HomeAssistant configuration you should be able to drop the files in to
/*
To move a panel to below the divider in Home Assistant
Add this to your configuration.yaml
frontend:
extra_module_url:
- /local/move-panel.js
And put the following into <config-dir>/www/move-panel.js
Replace URL_TO_MOVE with the url of your panel
@charithmadhuranga
charithmadhuranga / configuration.yaml
Created May 28, 2022 20:13 — forked from thomasloven/configuration.yaml
Use custom fonts in Home Assistant
# /config/configuration.yaml
...
lovelace:
mode: yaml
resources:
- url: /local/myfont.css
type: css
...
// Simplest possible custom card
// Does nothing. Doesn't look like anything
class MyCustomCard extends HTMLElement {
setConfig(config) {
// The config object contains the configuration specified by the user in ui-lovelace.yaml
// for your card.
// It will minimally contain:
// config.type = "custom:my-custom-card"
@charithmadhuranga
charithmadhuranga / DVRIP-Sonia Reference Codes.md
Created March 3, 2022 08:41 — forked from ekwoodrich/DVRIP-Sonia Reference Codes.md
Reference codes for the DVRIP/Sonia TCP protocol used by the Net Surveillance ActiveX plugin

DVRIP/Sonia Protocol

DVRIP/Sonia TCP protocol used by the Net Surveillance ActiveX plugin

1. Response Codes

Return code Definition
100 Success
101 Unknown error
102 Version not supported
103 Illegal request
@charithmadhuranga
charithmadhuranga / ph-260bd-relay.yml
Created February 9, 2022 04:38 — forked from bjeanes/ph-260bd-relay.yml
ESPHome definition to pick up readings from the PH-260BD water PH/EC/TDS/Temp sensor - https://www.aliexpress.com/item/1005002707585119.html / https://www.aliexpress.com/item/4001143771176.html
esphome:
name: ph-260bd-relay
platform: ESP32
board: esp32dev
# Enable logging
logger:
logs:
esp32_ble_tracker: INFO
@charithmadhuranga
charithmadhuranga / instructions.md
Created February 1, 2022 14:59 — forked from flaviut/Setting up Emporia Vue 2 with ESPHome.md
Setting up Emporia Vue 2 with ESPHome

Setting up Emporia Vue 2 with ESPHome

example of hass setup

What you need

  • USB to serial converter module
    • I tested this with a cheap & generic CH340G adapter
  • 4 male-to-female jumper wires
  • 4 male pcb-mount headers
  • Soldering iron & accessories
@charithmadhuranga
charithmadhuranga / tablet_dashboard.yaml
Created January 13, 2022 20:46 — forked from xbmcnut/tablet_dashboard.yaml
Full config for my Home Assistant photo frame dashboard
views:
- badges: []
cards:
- cards:
- cards:
- entity: sensor.time
style: |
ha-card {
color: yellow;
#--paper-item-icon-color: green;

My working sample to export to MQTTS topic using app-service-configurable insecure mode for EdgeX Foundry Geneva release

  • EdgeX Foundry Geneva release.
  • Using docker-app-service-configurable:1.2.0 in insecure mode (without Secret Store).
    • A bit of a special method to get around the bug.
  • Export to MQTTS topic using client certificate authentication.

Prepare Cert Files

In this case, use test.mosquitto.org for testing purposes.