Git Product home page Git Product logo

espurnabot's Introduction

Espurna Bot

A small bot for interaction with espurna

with this bot you can control an espurna switch remotely without exposing it to the internet

go check them out they are awesome! espurna

Features

  • Control the relay
  • Schedule a task for the espurna (one time / recurring)*
  • Nice interface and hopefully good UX

Installation

Install on this machine

go get -u github.com/profawk/espurnaBot

cross compile (for example for your 64bit Pi)

git clone https://github.com/profawk/espurnaBot
cd espurnaBot
CGO_ENABLED=0 GOARCH=arm64 go build

Configuration steps

  • Create a bot using @BotFather
  • Get your chatID either from telegram (getUpdates) or from the bot's deny log
  • Enable the http REST API on your espurna and get a key
  • Make sure the espurna's ip is constat or resolvable
  • Place your bot token, chat id, espurna ip, and API key in the config file
  • Enjoy ;)

Configuration file breakdown

  • botToken - telegram bot access token
  • chatIds - array of chatids allowed to access the bot
  • watchdog - whether or not to check every minute if the relay state has changed externally
  • espurna
    • relay - relay id which we control
    • hostname - espurna's accessible address
    • apiKey - key for REST API

Plans

  • Implement scheduling REST API for the espurna for unified tasks
  • Allow full customization of all messages sent by bot (personalisation and i18n)
  • Create a triggers system e.g. alert the user 30 minutes after the water heater has been turned on and turn it off

Notes

  • * the scheduling is done externally to the espurna for a lack of fitting API

espurnabot's People

Contributors

idanyadgar avatar profawk avatar roeij avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.