Sign inSign up

swat121/karen

By swat121

•Updated over 2 years ago

Image
0

748

swat121/karen repository overview

⁠Karen

This repository contain the source code of the message broker, that is able to help you get connect to other home mircoservice.

⁠Desciption


Karen - is a service, that creates a connection between apps (telegram bot⁠, website, android app) and smart things (ESP8266⁠, Arduino UNO). Karen have a standard array of commands that control microcontrollers:

  • help
  • status
  • setting
    • relay1
    • relay2
    • relay3
    • backlight
  • sensor
    • temperature
    • light
  • bot
    • message

This array of commands must be in the source code of every service running microcontrollers, in order to ensure normal communication.

For cluster management of microcontrollers in Karen used application.yaml file with local ip address every microcontroller.

Example:

service:
  resource:
    garry: "http://192.168.0.100:80/"
    patric: "http://192.168.0.101:80/"

⁠Requirements


  • java 17.0.3
  • maven 3.8.4

⁠Instalation and running (docker)


Clone image:

docker pull swat121/karen:tagname

Create container, you can use docker-compose or command line for environment variable

command line

docker run -p 8080:8080 -e TOKEN=yourToken -e ID=yourID -e CHAT=yourChat --restart=always -d swat121/karen:tagname

docker-compose

version: "3"

services:
  karen:
    image: swat121/karen:tagname
    restart: always
    container_name: karen
    environment:
      token: "yourToken"
      id: "yourId"
      chat: yourChat
      patric: http://192.168.0.101:80/
      garry: http://192.168.0.100:80/
      spongebob: http://192.168.0.100:80/
    ports:
      - 8080:8080

Tag summary

Content type

Image

Digest

sha256:462e6fd36…

Size

268.1 MB

Last updated

over 2 years ago

docker pull swat121/karen