Skip to content

woisy00/pymygw

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pymygw

a mysensors gw based on https://github.com/thehawkes/pymygw

  • MQTT Support
  • OTA Firmware updates

Requirements

  • an arduino mysensors serial gateway connected via usb/serial on a linux host
  • some sensors
  • python pip installed

Installation

    git clone https://github.com/woisy00/pymygw.git
    cd pymygw
    pip install -r requirements.txt

Configuration

config.py

'''
    Arduino Serial config
'''
SerialPort = '/dev/ttyACM0'


'''
    MQTT config


    TLS Attention
    !!!The broker dns name and the CN in the tls cert must be the same!!!
'''
MQTTBroker = 'mqtt.home'
MQTTTLS = True
MQTTPort = 1883
MQTTTLSPort = 8883
MQTTUsername = 'pymygw'
MQTTPassword = 'pymygw'
# https://github.com/jpmens/mqttwarn/issues/95
MQTTProtocol = 3
MQTTTopic = 'pymygw'
MQTTCert = 'pymygw.crt'
MQTTKey = 'pymygw.key'
MQTTCa = 'ca.crt'

'''
    Web Config
    only available if the OpenhabAPI is used
'''
WebPort = 5000
WebDir = 'web'

Start

    cd <<installdirectory>>
    python app.py

Webinterface

The gateway offers a simple Webinterface on Port 5000.

Edit config.py to change the port

WebPort = 5000

About

mysensors to openhab gw

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 89.1%
  • HTML 10.9%