Giter Club home page Giter Club logo

radiotherm's People

Contributors

accudev avatar billy27607 avatar cornercase avatar craftyguy avatar jerryworkman avatar larcher avatar mhrivnak avatar mledford avatar nickpegg avatar pvince avatar skimj avatar stevejbauer avatar trisk avatar tubaman avatar vinnyfuria avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

radiotherm's Issues

Need to add another CT80 class

CT80RevB2v026

from thermostat.py
class CT80RevB2v026(CT80RevB):
MODEL = 'CT80 Rev B V0.26'

from init.py
from .thermostat import (
Thermostat,
CommonThermostat,
CT30v175,
CT30v192,
CT30v194,
CT30v199,
CT50v109,
CT50v188,
CT50v192,
CT50v194,
CT80RevB1v100,
CT80RevB2v100,
CT80RevB2v103,
CT80RevB2v109,
CT80RevB2v026,
)
from . import discover
from . import fields

THERMOSTATS = (
CT30v175,
CT30v192,
CT30v194,
CT30v199,
CT50v109,
CT50v188,
CT50v192,
CT50v194,
CT80RevB1v100,
CT80RevB2v100,
CT80RevB2v103,
CT80RevB2v109,
CT80RevB2v026,
)

Support for CT100/CT101

Was wondering if there was something blocking support for these models? They seem pretty nice due to them supporting Alexa and z-wave

radiotherm fails silently

Radio Thermostat CT80 Rev B2 V1.09

> python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import radiotherm
>>> tstat = radiotherm.get_thermostat()
>>> tstat.temp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'temp'
>>> tstat = radiotherm.get_thermostat('192.168.10.129')
>>> tstat.temp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'temp'
>>> str(tstat)
'None'
>>>^D

>curl http://192.168.10.129/tstat
{"temp":70.50,"tmode":3,"fmode":2,"override":0,"hold":1,"t_heat":72.00,"t_cool":77.00,"ttarget":1,"program_mode":1,"tstate":1,"fstate":1,"time":{"day":2,"hour":20,"minute":19},"t_type_post":0}

>~/radiotherm-master# ./run-tests.sh
...............................
----------------------------------------------------------------------
Ran 31 tests in 0.028s

OK
>pip search radiotherm
radiotherm                - client library for wifi thermostats sold by
                            radiothermostat.com
  INSTALLED: 1.2 (latest)

Caching needed

Some sort of caching of the HTTP request data would significantly improve performance.

Each variable evaluation triggers a new HTTP request in radiotherm. Each request takes 5 to 20 seconds on my thermostat. A cache of GET requests would provide much better performance.

Rolling Up PRs?

There are now about 3 PRs related to updating some Radio Thermostat hardware revisions. These are impacting other projects, such as Home Assistant, and seem to be fairly trivial patches. Since one patch dates back to January, I wanted to see what the update process timeline is so I know when to expect to see some of these hit mainline?

Migrate to gitlab

I light of recent news about Microsoft acquiring Github, I propose that this project be moved to Gitlab.com. I am in the process of migrating my projects now, and it seems that since I have contributor rights here I am able to migrate this project too. @mhrivnak, thoughts?

CT50 V1.92 Support

Thanks for developing this wonderful package. It is exactly what I have been looking to use on my RPi2 x-mas gift. I have two CT50 V1.92 themostats in the house and I have installed radiotherm v1.2 on my Rpi2. Do you have any suggestions of what I'm doing wrong or does the code need to be modified to support my stats?

Below is the result of my installation and 1st attempt to read temperature. Hopefully it will be useful:

The following was at the command shell prompt:

pi@raspberrypi:~ $ sudo pip-3.2 install radiotherm
Downloading/unpacking radiotherm
Downloading radiotherm-1.2.tar.gz
Running setup.py (path:/tmp/pip-build-z5qyz6ne/radiotherm/setup.py) egg_info for package radiotherm

Installing collected packages: radiotherm
Running setup.py install for radiotherm

Successfully installed radiotherm
Cleaning up...

The following is at the python prompt:

tstat = radiotherm.get_thermostat('192.168.1.4')
tstat.temp
Traceback (most recent call last):
File "<pyshell#9>", line 1, in
tstat.temp
AttributeError: 'NoneType' object has no attribute 'temp'
tstat.tmode
Traceback (most recent call last):
File "<pyshell#10>", line 1, in
tstat.tmode
AttributeError: 'NoneType' object has no attribute 'tmode'

Documentation doesn't seem correct for instantiating a Radio Thermostat object?

I have a feeling I'm doing something wrong, but when I tried to follow the README to instantiate a Radio Thermostat device, it silently failed. Instead, what I had to do was this:

ct80 = radiotherm.thermostat.CT80(ip)
        temp = ct80.temp['raw']
        humidity = ct80.humidity['raw']

This was on Python 2.7.6. Notice I specified the CT80 directly but my guess is that's not what I should be doing. Doing it this way does work (I mostly wanted to grab the temp and humidity for logging periodically).

As an aside, I'm having nearly the exact same problem in Home Assistant and it seems to try to use the radiotherm library like the README as well (and seems to be failing).

setting the target temp on the thermostat CT80 B2 Rev v1.09

Currently, I have two of the radio thermostats, model CT80 B2 Rev v1.09. When working with the thermostat via the api, I noticed I could set the target temp on the thermostat if I used a only a interger for the target temp. If the temp was a floating point number (ie 72.3), the setting of the target temp would fail. In addition to this, I noticed I could set the target temp to 72.5 via the library and the thermostat would target temp would be set to 72. Is this normal behavior for the other models of the radio thermostat as well?

Multiple thermostats

Hi,
Was wondering in discovery why you check for the case where you get > 1 thermostats but only return the first? Why not just return the thermostats as a list?

if len(thermostats) > 1:
            raise IOError("Found %d thermostats and I don't know which to pick." % len(thermostats))
        return thermostats[0]

Thanks for the library.

Todd

Radio Thermostat CT80 Rev B1 V1.00 error

I get the following error when trying to set up a CT80 Rev B1 V1.00 Radio Thermostat in Home Assistant:

ERROR:homeassistant.components.climate:Error while setting up platform radiotherm
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 164, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File "/usr/lib64/python3.4/asyncio/tasks.py", line 393, in wait_for
return fut.result()
File "/usr/lib64/python3.4/asyncio/futures.py", line 274, in result
raise self._exception
File "/usr/lib64/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.4/site-packages/homeassistant/components/climate/radiotherm.py", line 66, in setup_platform
tstats.append(RadioThermostat(tstat, hold_temp, away_temps))
File "/usr/lib/python3.4/site-packages/homeassistant/components/climate/radiotherm.py", line 80, in init
self.set_time()
File "/usr/lib/python3.4/site-packages/homeassistant/components/climate/radiotherm.py", line 216, in set_time
'minute': now.minute
AttributeError: 'NoneType' object has no attribute 'time'

It looks like I have a different version of the CT80 that I have not seen before.
Anything you need to help assist in resolving this, please let me know.

Security issues

Hi there,

Thanks for this nice library. It might be good to mention in the readme that the whole CT family is insecure, so that people don't develop incorrect expectations (your library is great, so I expect few people will read the manual, and fewer still realize that the device is insecure).

There are currently two CVEs (https://www.cvedetails.com/cve/CVE-2013-4860/ and https://www.cvedetails.com/cve/CVE-2018-11315/) against the CT line, and apparently the manufacturer hasn't fixed or responded to either. The first one allows any website you visit while connected to the Wifi to turn the heating or AC on or off, or change the target temperature; the second one additionally allows websites that you visit to exfiltrate data (the first one is a cross-site scripting vulnerability; the second one is a DNS rebinding issue).

Of course, none of these issues come from your neat library; but it's still things that users may want to know about.

Unable to maintain project going forward

@mhrivnak

I've given up on these devices, they're just too unreliable to use for home automation for me (no fault of this project), but as a consequence I no longer have a way to test merge requests, etc. Thank you for letting me carry the torch for a while. Hopefully someone else (with trusted contributions here already?) is able to step up.

Radio Thermostat CT80 Rev B1 V1.00 error updating in home assistant

(I believe this is not exactly the same as #26 -- although the result is similar -- since the error message isn't quite the same.
Apologies if it's a dup.)

When I add the radio thermostat component to my home assistant configuration, HA tries to add my device but fails and puts this error in the log:

2018-04-21 10:41:14 ERROR (MainThread) [homeassistant.components.climate] radiotherm: Error on device update! Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 188, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 327, in async_device_update yield from self.hass.async_add_job(self.update) File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run result = self.fn(*self.args, **self.kwargs) File "/usr/lib/python3.6/site-packages/homeassistant/components/climate/radiotherm.py", line 237, in update self._name = self.device.name['raw'] AttributeError: 'NoneType' object has no attribute 'name' 2018-04-21 10:41:44 WARNING (SyncWorker_2) [netdisco.ssdp] Error fetching description at http://[fe80::d4e2:6588:1d90:ba8a]:6544/getDeviceDesc

Like in #26, I believe this may be related to the Rev no. of the device.

Is this project abandoned?

Just curious, because some projects (like home-assistant) use this project to add support for radiotherm devices, and if this project is no longer being maintained then we should fork this and maintain it so that support for newer devices can be added and issues resolved.

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.