How to use the homematicip.find_and_load_config_file function in homematicip

To help you get started, we’ve selected a few homematicip examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github coreGreenberet / homematicip-samples / QRCodeGenerator / qrcodegenerator.py View on Github external
#!/usr/bin/env python3
import homematicip
from homematicip.home import Home
from homematicip.group import MetaGroup
from homematicip.device import Device
import qrcode
import os
import codecs

config = homematicip.find_and_load_config_file()


def main():
    if config is None:
        print("COULD NOT DETECT CONFIG FILE")
        return


    home = Home()
    home.set_auth_token(config.auth_token)
    home.init(config.access_point)
    print("Downloading configuration")
    home.get_current_state()
    if not os.path.exists("./img/"):
        os.makedirs("./img/")
github coreGreenberet / homematicip-samples / SampleTemplate / empty.py View on Github external
#!/usr/bin/env python3
import homematicip
from homematicip.home import Home
config = homematicip.find_and_load_config_file()


def main():
    if config is None:
        print("COULD NOT DETECT CONFIG FILE")
        return
    

    home = Home()
    home.set_auth_token(config.auth_token)
    home.init(config.access_point)

    home.get_current_state()

    print("current AP Version: {}".format(home.currentAPVersion))
github coreGreenberet / homematicip-samples / TelegramNotificationBot / TelegramNotificationBot.py View on Github external
#!/usr/bin/env python3
import logging

import homematicip
from homematicip.home import Home
config = homematicip.find_and_load_config_file()

from telegram.ext import Updater, CommandHandler
from telegram import Bot, ParseMode

TG_TOKEN = None
TG_BOT = None
TG_USERS = []
logger = None

HMIP_Home = Home()

def create_logger(level, file_name):
    logger = logging.getLogger()
    logger.setLevel(level)
    handler = TimedRotatingFileHandler(file_name, when='midnight', backupCount=5) if file_name else logging.StreamHandler()
    handler.setFormatter(logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s'))