GithubHelp home page GithubHelp logo

droscy / thermod Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 757 KB

Programmable thermostat daemon for smart-heating automation.

License: GNU General Public License v3.0

Python 92.48% PHP 2.94% CSS 0.90% JavaScript 3.58% Pascal 0.11%

thermod's People

Contributors

dependabot[bot] avatar droscy avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

bopopescu

thermod's Issues

Thermod exits with "unknown error" if all thermometers become unavailable

If, for any reason, all the thermometers become unavailable, the daemon exits with unknown error occurred: list index out of range. The shutdown is graceful, but no useful info is reported to the user.

This is an extract of the log with the error.

2020-05-16 08:25:58,280 thermod.thermometer WARNING  1-wire device /sys/bus/w1/devices/28-000008e33449/w1_slave not ready, keep going without it
2020-05-16 08:25:59,420 thermod.thermometer WARNING  1-wire device /sys/bus/w1/devices/28-000008e3890d/w1_slave not ready, keep going without it
2020-05-16 08:25:59,425 thermod.thermometer DEBUG    checking standard deviation of temperatures []
2020-05-16 08:25:59,435 thermod.thermometer DEBUG    there is only one temperature, returning it
2020-05-16 08:25:59,442 thermod.thermometer DEBUG    generic exception in temperature updating cycle
2020-05-16 08:26:25,225 thermod.timetable   DEBUG    checking if system is in cooling mode: False
2020-05-16 08:26:25,231 thermod.thermometer DEBUG    retrieving average of last temperatures
2020-05-16 08:26:25,237 thermod.thermometer DEBUG    creating averaging task
2020-05-16 08:26:25,245 thermod             CRITICAL unknown error occurred: list index out of range
Traceback (most recent call last):
  File "/home/thermod/thermod/bin/thermod", line 706, in thermostat_cycle
    await lock.wait()
  File "/usr/lib/python3.5/asyncio/locks.py", line 326, in wait
    yield from fut
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 285, in result
    raise CancelledError
concurrent.futures._base.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/thermod/thermod/bin/thermod", line 610, in thermostat_cycle
    thermometer.temperature,
  File "/home/thermod/thermod/thermod/thermometer.py", line 185, in temperature
    return round(self._calibrate(self.raw_temperature), 2)  # additional decimal are meaningless
  File "/home/thermod/thermod/thermod/thermometer.py", line 1034, in raw_temperature
    raise self._fail_exception
  File "/home/thermod/thermod/thermod/thermometer.py", line 1002, in _update_temperatures_callback
    averaging_task.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/home/thermod/thermod/thermod/thermometer.py", line 993, in _update_temperatures
    temp = self.decorated.raw_temperature
  File "/home/thermod/thermod/thermod/thermometer.py", line 875, in raw_temperature
    newtemp = self.decorated.raw_temperature
  File "/home/thermod/thermod/thermod/thermometer.py", line 713, in raw_temperature
    raw = temperatures[0]
IndexError: list index out of range
2020-05-16 08:26:25,324 thermod             INFO     shutdown requested```

Cannot start thermod with empty cooling setting

Starting thermod with cooling = in thermod.conf makes the daemon crash with error:

CRITICAL invalid configuration: invalid value `` for cooling system
Traceback (most recent call last):
File "/usr/bin/thermod", line 152, in
settings = config.parse_main_settings(cfg)
File "/usr/lib/python3/dist-packages/thermod/config.py", line 342, in parse_main_settings
heating, cooling, thermometer, host, port,
UnboundLocalError: local variable 'thermometer' referenced before assignment

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.