Coder Social home page Coder Social logo

tado_owda's People

Contributors

adrianslabu avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

tado_owda's Issues

Log file

Could you consider to add some logs ?

import logging

logging.basicConfig(format='%(asctime)s %(levelname)-8s %(message)s',filename="tado.log",level=logging.INFO)

def printm(message):
global lastMessage
if (message != lastMessage):
lastMessage = message
sys.stdout.write(message + "\n")
logging.info (message)

thanks !

Py Check recursive call

Hello,

first I want to thank you that you programmed an open window assistant without geofencing. But I have a problem with the script I can't solve, maybe you can help me. I run the script on a raspberry pi with crontab at reboot. The first messages looks like this in the log file

PyTado.http.http :: DEBUG ::
Request:
Method:POST
URL: https://auth.tado.com/oauth/token
Headers: {'User-Agent': 'python-requests/2.25.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '/', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Referer': 'https://app.tado.com/', 'Content-Length': '2'}
Response:
StatusCode: 200
Data: {, 'token_type': 'bearer', , 'expires_in': 599, 'scope': 'home.user', 'jti': 'a5d84305-8150-45a3-8009-b39ac7ed280d'}

So I guess it is running. But after some of this logs I get an error:

Current thread 0xb6f78640 (most recent call first):
File "/usr/lib/python3.9/email/utils.py", line 57 in _has_surrogates
File "/usr/lib/python3.9/email/_policybase.py", line 287 in _sanitize_header
File "/usr/lib/python3.9/email/_policybase.py", line 316 in header_fetch_parse
File "/usr/lib/python3.9/email/message.py", line 471 in get
File "/usr/lib/python3.9/email/message.py", line 578 in get_content_type
File "/usr/lib/python3.9/email/message.py", line 594 in get_content_maintype
File "/usr/lib/python3.9/email/feedparser.py", line 295 in _parsegen
File "/usr/lib/python3.9/email/feedparser.py", line 180 in _call_parse
File "/usr/lib/python3.9/email/feedparser.py", line 176 in feed
File "/usr/lib/python3.9/email/parser.py", line 56 in parse
File "/usr/lib/python3.9/email/parser.py", line 67 in parsestr
File "/usr/lib/python3.9/http/client.py", line 225 in parse_headers
File "/usr/lib/python3.9/http/client.py", line 331 in begin
File "/usr/lib/python3.9/http/client.py", line 1347 in getresponse
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 440 in _make_request
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699 in urlopen
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439 in send
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 655 in send
File "/usr/local/lib/python3.9/dist-packages/PyTado/http/http.py", line 132 in request
File "/usr/local/lib/python3.9/dist-packages/PyTado/interface.py", line 577 in get_zone_overlay_default
File "/usr/local/lib/python3.9/dist-packages/PyTado/interface.py", line 155 in get_state
File "/usr/local/lib/python3.9/dist-packages/PyTado/interface.py", line 686 in get_open_window_detected
File "/home/pi/tado_owda.py", line 61 in checkWindowsState
File "/home/pi/tado_owda.py", line 72 in checkWindowsState
File "/home/pi/tado_owda.py", line 72 in checkWindowsState

Thanks for your help.

Greetings

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.