webdjoe / pyvesync

pyvesync is a python library to manage Etekcity & Levoit smart devices
MIT License
175 stars 83 forks source link

NameError: name 'DEFAULT_TZ' is not defined #63

Closed JetForMe closed 3 years ago

JetForMe commented 3 years ago

When I try to run your example code from the Readme, I get:

$ python p.py
Traceback (most recent call last):
  File "p.py", line 3, in <module>
    manager = VeSync("EMAIL", "PASSWORD", time_zone=DEFAULT_TZ)
NameError: name 'DEFAULT_TZ' is not defined
 pip show pyvesync
Name: pyvesync
Version: 1.2.1
Summary: pyvesync is a library to manage Etekcity                 Devices and Levoit Air Purifier
Home-page: https://github.com/markperdue/pyvesync
Author: Mark Perdue
Author-email: markaperdue@gmail.com
License: MIT
Location: /Users/rmann/.pyenv/versions/3.8.2/lib/python3.8/site-packages
Requires: requests
Required-by: 

By the way, is server access required? Is it not possible to directly control the device?

webdjoe commented 3 years ago

take out the time_zone argument or use your proper time zone from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

The devices are controlled through the vesync server. I don't know any way of flashing with custom firmware like tasmota. It would probably require soldering wires onto the board, not worth it IMO.

JetForMe commented 3 years ago

I was able to get it to work with the correct string, but I don't know if the example is broken, or something else.

Yeah, I'm looking for an IP-enabled switch I can use locally in my shop, from machine to machine, without a server. The Etekcity outdoor switch is really nice, except for the apparent requirement that it go through the server (I hate this about most home automation).