Giter Site home page Giter Site logo

feather-smart-thermostat's Introduction

Feather smart thermostat

Parts

  • a feather huzzah

  • a 2.13 e-ink monochrome wing

  • a I2C SHT31-D temperature and humidity sensor

  • a single channel relay

  • a current sensor

  • three push buttons

  • safety "temperature is too low" disc thermostat

  • safety "temperature is too high" disc thermostat

Design Approach

"Dumb" safety

Safety thermostats override the system to always turn on when it's getting too cold and always turn off when it gets too hot. This will be achieved by putting the "low temperature" thermostat in parallel with the relay that is fed from the smart part of the thermostat, then connect them both in serial with the "high termperature" thermostat.

Those are driven by fixed-temperature disc thermostats.

Monitor Current

Since the safety thermostats may trigger the current on or off independently of the "smart" logic, we will monitor and report the themperature so we can tell what the real state is.

Stand-alone device

The thermostat will work as a stand-alone device first, with three push buttons to raise and lower the set temperature as well as utility functions, such as changing from celsius to farenheight or forcing a reset.

MQTT integration

The "smart" part of the thermostat will be driven by MQTT integrations via wifi, the thermostat will publish data for:

  • Actual temperature
  • Actual humidity
  • Actual current
  • Relay status
  • Set temperature

And the thermostat will receive command for:

  • Set temperature

The idea is that it should always be possible to override the current set temperature from the local device, and that should be reflected to the automation system, while at the same time it should be possible for the automation system to override the manually set temperature.

Configuration

This will read a json file named thermostat.json in the root of the sdcard.

The sample file below explains the expected format:

{
    "wifi": {
        "ssid": "",
        "password": ""
    },
    "mqtt": {
        "broker_host": "",
        "broker_port": 1883,
        "clientid": "",
        "username": "",
        "password": "",
        "topics": {
            "action": "",
            "actual_temperature": "",
            "actual_humidity": "",
            "actual_current": "",
            "target_temperature": "",
            "ramp_up_buffer": "",
            "cool_down_buffer": "",
            "temperature_command": ""
        }
    },
    "temperature": {
        "starting": 21,
        "variance": 1,
        "ramp_up_buffer": 0.1,
        "cool_down_buffer": 0.1
    }
}

Most items are self-explanatory. The temperature section requires some explanation:

  • starting: Value of target temperature on reset, such as when returning from a power outage.

  • variance: This configures how wide should the control allow the temperature to vary. For instance, if you have the target set to 21, and a variance set to 1, the ambient temperature should vary between 20.5 and 21.5 degrees.

  • ramp_up_buffer (Optional): How many degrees before the low end of the variance to turn the heater on, such that we don't get below the target variance due to the ramp up time of the heater element. This is the initial value, which will be automatically adjusted over time.

  • cool_down_buffer (Optional): How many degrees before the high end of the variance to turn the heater off, such that we don't get above the target variance due to residual heat after we turn the heater element off. This is the initial value, which will be automatically adjusted over time.

feather-smart-thermostat's People

Contributors

kunalkhosla avatar ruoso avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

kunalkhosla

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.