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
""" | |
MQTT publisher for all Home Assistant states. | |
Copyright (c) 2016 Fabian Affolter <fabian@affolter-engineering.ch> | |
Licensed under MIT | |
For questions and issues please use https://community.home-assistant.io | |
To use this component you will need to add something like the | |
following to your configuration.yaml file. |
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 | |
# encoding: utf-8 | |
import socket | |
from struct import * | |
from twisted.internet.protocol import DatagramProtocol | |
from twisted.internet import reactor | |
import math | |
UDP_IP="127.0.0.1" |