Skip to content
This repository has been archived by the owner on Dec 30, 2020. It is now read-only.
/ sh Public archive

IoT Core and Dashboard using JS, MQTT, React

Notifications You must be signed in to change notification settings

CyanoFresh/sh

Repository files navigation

Solomaha Home

Currently in ALPHA

Smart Home hub & control panel written using JS, MQTT and React.

Installation

  1. Clone repo && cd:

    git clone https://github.com/CyanoFresh/sh
    cd sh
    
  2. Install deps

    • production:

      npm ci
      
    • dev:

      npm i
      
  3. Copy (if dev) and configure env variables:

    cp .env.example .env
  4. If needed configure & build the frontend (in ./frontend folder)

Topic structure: (probably outdated)

Web Panel

user/{ID} - state of all items

Switch

  • switch/{ID} - switch current state

  • switch/{ID}/set - change switch state:

    {
      "state": true
    }
  • switch/{ID}/toggle - toggle switch current state

Variable

  • variable/{ID} - current value:

    24.6
    
  • variable/{ID}/set - update value [TODO]

RGB

  • rgb/{ID} - current state

  • rgb/{ID}/set - update state. Example:

    {
        "mode": "color",
        "red": 255,
        "green": 255,
        "blue": 255
    }
    {
        "mode": "rainbow"
    }

Buzzer

  • buzzer/{ID}/unlock - unlock command

  • buzzer/{ID}/ringing - ringing event (sent from device)

    true

    or:

    false
  • buzzer/{ID}/unlocked - unlocked event (sent from device)

Plant

  • plant/{ID} - current state

    {
        "moisture": 80
    }

    config update scenario:

    {
        "minMoisture": 80,
        "duration": 2
    }

    can be combined

  • plant/{ID}/water - water command

  • plant/{ID}/watered - watered event