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
#!/usr/bin/python | |
import os | |
import socket | |
import sys | |
def encode_packet(data): | |
output = bytearray() | |
for i in range(0, len(data)): | |
tmpoutput = bytearray([0, data[i]]) |
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
#! /usr/bin/python | |
import math | |
class SVY21: | |
# Ref: http://www.linz.govt.nz/geodetic/conversion-coordinates/projection-conversions/transverse-mercator-preliminary-computations/index.aspx | |
# WGS84 Datum | |
a = 6378137 | |
f = 1 / 298.257223563 |
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
registers: | |
- name: L1 Voltage | |
unit_of_measurement: V | |
register: 0 | |
data_type: float | |
precision: 2 | |
count: 2 | |
- name: L2 Voltage | |
unit_of_measurement: V | |
register: 2 |
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
""" | |
Support for The Shelly Wifi switch. | |
Save this file inside ".homeassistant/custom_components/switch" (create the folders if not present) and restart HASS. | |
usage example: | |
switch: | |
- platform: shelly | |
switches: |