Giter VIP home page Giter VIP logo

tellprox's People

Contributors

erijo avatar p3tecracknell 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

Watchers

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

tellprox's Issues

Webroot ProxyReverse

Hello!

Have trouble getting the proxy pass in apache or tellprox to work.
Configured tellprox using webroot (/tellprox) but gets 404 from bottle / cherrypy

Not found: '/ / devices' (webroot string is missing)

apache config for my site:
Proxy Pass / tellprox http://127.0.01:8080/
Pass Reverse proxy / tellprox http://127.0.0.1:8080/

Do not really understand where the problem is.
Have tried to debug the app but it looks ok.

Regads
Sivend

tdtool and ascii characters

I decided to try the latest git version of your tellprox server and i immediatly ran into trouble.
I followed the instructions in the readme.md and installed the telldus.py without problems.
The tellprox server starts alright too. But when i try to refresh my devices i get the following error message:

<LocalRequest: GET http://example.com:8084/json/devices/list?supportedMethods=1023>
Traceback (most recent call last):
File "/home/peter/Desktop/tellprox/tellprox/bottle.py", line 764, in _handle
return route.call(*_args)
File "/home/peter/Desktop/tellprox/tellprox/bottle.py", line 1575, in wrapper
rv = callback(_a, **ka)
File "/home/peter/Desktop/tellprox/tellprox/api.py", line 19, in route_all
resp = self.callbacksftype
File "/home/peter/Desktop/tellprox/tellprox/tellstick.py", line 56, in route_devices
for k, device in self.devices.iteritems()
File "/home/peter/Desktop/tellprox/tellprox/tellstick.py", line 203, in device_to_dict
'name': device.name,
File "/usr/local/lib/python2.7/dist-packages/telldus/telldus.py", line 217, in getattr
return func(self.id)
File "/usr/local/lib/python2.7/dist-packages/telldus/library.py", line 145, in free_string
string = string.decode(Library.STRING_ENCODING)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
<LocalRequest: GET http://example.com:8084/json/sensors/list>
<LocalRequest: GET http://example.com:8084/json/sensor/info?id=11>
<LocalRequest: GET http://example.com:8084/json/sensor/info?id=13>
<LocalRequest: GET http://example.com:8084/json/sensor/info?id=12>
<LocalRequest: GET http://example.com:8084/json/sensor/info?id=21>
<LocalRequest: GET http://example.comu:8084/json/sensor/info?id=9999>
<LocalRequest: GET http://example.com:8084/json/sensor/info?id=9998>
<LocalRequest: GET http://example.com:8084/json/sensor/info?id=14>

As you see the sensors work just fine. But the light switches causes the errors and doesn't show on either Remotestick or via the browser.
Unfortunatly this also makes my backed up copy of tellprox crash. So i guess something goes wrong when i install telldus-py. (Install log pasted below.)

Have you got any ideas?

If you would like me to register this on github i'd be happy to do it!

Thanks!

/Peter

sudo python setup.py install
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/telldus
copying telldus/constants.py -> build/lib.linux-x86_64-2.7/telldus
copying telldus/telldus.py -> build/lib.linux-x86_64-2.7/telldus
copying telldus/library.py -> build/lib.linux-x86_64-2.7/telldus
copying telldus/init.py -> build/lib.linux-x86_64-2.7/telldus
running install_lib
copying build/lib.linux-x86_64-2.7/telldus/constants.py -> /usr/local/lib/python2.7/dist-packages/telldus
copying build/lib.linux-x86_64-2.7/telldus/telldus.py -> /usr/local/lib/python2.7/dist-packages/telldus
copying build/lib.linux-x86_64-2.7/telldus/library.py -> /usr/local/lib/python2.7/dist-packages/telldus
copying build/lib.linux-x86_64-2.7/telldus/init.py -> /usr/local/lib/python2.7/dist-packages/telldus
byte-compiling /usr/local/lib/python2.7/dist-packages/telldus/constants.py to constants.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/telldus/telldus.py to telldus.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/telldus/library.py to library.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/telldus/init.py to init.pyc
running install_egg_info
Removing /usr/local/lib/python2.7/dist-packages/py_telldus-0.1.0.egg-info
Writing /usr/local/lib/python2.7/dist-packages/py_telldus-0.1.0.egg-info

Sensors on Linux

Unfortunatly i have never got my sensors to work/show up on the telldus servers. They work just fine locally with TelldusCenter and tdtool.
There seems to be some features missing in the linux client/server that is available in windows.
Is there anything else you can think of that i might do to help?

Sorry, tried writing this in "enhancments". But i guess i messed up...

Cant get it to work on windows 7 64bit

Hi

Im fairly new to this whole python thing, and I cant seem to get it to work om my windows 7 machine.

I have installed python 2,7 for windows, and downloadet both the tellprox git and the telldus-py. My folder structer is:

tellprox
-static
-telldus-py
------bin
------telldus
------test
-tellprox
-views

When i run python -m tellprox i get:

C:\tellprox>python -m tellprox
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 162, in run_module_as_main
"main", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in run_code
exec code in run_globals
File "C:\tellprox\tellprox__main
.py", line 11, in
from tellstick import TellstickAPI
File "tellprox\tellstick.py", line 2, in
from telldus.constants import *
ImportError: No module named telldus.constants

so it seems it cant find the module telldus.constants

If i move all files from C:\tellprox\telldus-py\telldus to C:\tellprox i get the following:

C:\tellprox>python -m tellprox
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 162, in run_module_as_main
"main", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in run_code
exec code in run_globals
File "C:\tellprox\tellprox__main
.py", line 11, in
from tellstick import TellstickAPI
File "tellprox\tellstick.py", line 2, in
from telldus.constants import *
File "telldus.py", line 24, in
from .constants import *
ValueError: Attempted relative import in non-package

So now Ive run out of idees. Any help would be appreciated, i thought it would be easy to get this working on windows but maybe I was wrong :)

Tellprox sensors on linux!

I posted this on the Telldus site as well, but i just wanted to let you know.

Just tried this with ubuntu 12.10 and it works great!
Except that i don't get any sensor information. I'm not sure why, i guess that it gets the sensor/light information from tdtool.
This is what i get in the terminal:

tdtool --list
SENSORS:

PROTOCOL               MODEL                  ID      TEMP    HUMIDITY   LAST UPDATED       
mandolyn               temperaturehumidity    12      -23.2°   61%        2013-05-02 11:50:40
mandolyn               temperaturehumidity    13      29.2°   29%        2013-05-02 11:51:11
mandolyn               temperaturehumidity    21      7.1°   33%        2013-05-02 08:43:16
mandolyn               temperaturehumidity    14      22.0°   27%        2013-05-02 11:51:20
mandolyn               temperaturehumidity    11      5.0°   63%        2013-05-02 11:51:10

But the sensors doesn't show up in the app (Remotestick)

This is the tellprox debug output when trying to access the sensors:

cust.bredbandsbolaget.se - - [02/May/2013 11:41:30] "GET /json/sensors/list HTTP/1.1" 200 14
cust.bredbandsbolaget.se - - [02/May/2013 11:41:33] "GET /json/devices/list?supportedMethods=1023 HTTP/1.1" 200 2293

And if i visit my site at:

my.domain.com:8084/json/sensors/list

All i get is this message:

{"sensor": []}

Any ideas on what could be wrong?
Or how i can debug this further.
Thanks!

/Peter

get_client_info() fails to return version

The get_client_info() in tellstick.py crashes because there's no global version variable. Should it be self.version?

  •                   'version' : version,
    
  •                   'version' : self.version,
    

Can't run on Raspberry Pi

Hello,

I can't make this run on one of my Pi-boxes with telldus-core grabbed and compiled from source. tdtool (and all other stuff) works as it should.

python -m tellprox
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/pi/test/tellprox/tellprox/main.py", line 11, in
from tellstick import TellstickAPI
File "tellprox/tellstick.py", line 2, in
from telldus.constants import *
ImportError: No module named telldus.constants

This Pi is running the latest official Debian Weezy image. All updates installed.

What have I missed?

Scheduling gone?

I did a clone and couldn't find any working scheduling in the GUI, is it missing?

/Sven

[Discussion] Output directory

Basicly what I am doing is to setup/creating packages for Tellprox in Alpine Linux (a small secure ram-based Linux distro for routers - http://alpinelinux.org and https://github.com/engelvinter/aports). Explains my interest in setup.py :-)

I'm thinking of doing another update:
An optional output path when starting e.g.
python -m tellprox /myoutput/path
Note: If not supplying any path everything will be backward compatible

Why:
I want tellprox to run as the user 'tellprox', writing config.ini and compiled.js into an output directory (having permissions for user tellprox).
In the directory /usr/local/lib/pythonX.Y/site-packages/tellprox only root has permission to write.
Also since Alpine Linux is ram-based I want the config.ini written to a directory which is flashed to disc.

Call to SchedulerAPI as comment again

SchedulerAPI was turned on in a commit.

However in merge of pull request it appears that the call is a comment again:

SchedulerAPI(api, config)

Minor merge errro?

Minor updates needed in README

Issue 1:
"$python setup.py install" should instead be "$sudo python setup.py install"
since default install path is /usr/local/lib/pythonX.Y/site-packages according to:
http://docs.python.org/2/install/

Issue 2:
"1. Change the validate_key value on line 30 of __ main .py" should be removed since it is automatically set when doing install for the first time in __main.py

[Discussion] Tellstick.conf

The biggest obstacle for a beginner is still to define a proper tellstick.conf.

It would be nice if tellprox was able to autodiscover devices - and user could give them names later on - tellprox writing directly to tellstick.conf.

I have not tried it out, but the raw event callback in the telldus-core might be a way to detect devices if putting them in learning mode.

xml output not working?

Checked out the latest from git => Date: Thu Jul 4 23:47:43 2013 +0100 'Validate config and cleaned up config front-end'

Trying to use the browser and the API function to receive xml answers.

If using devices/list and xml, all I get as an answer is '[object Document]'. See attached image.
On the other hand if using the same command and json, I get a full answer including all my defined switches.

xml

Error when trying to acsess from chrome

Scheduler has no jobs to run
Bottle v0.11.6 server starting up (using CherryPyServer())...
Listening on http://192.168.1.7:7001/
Hit Ctrl-C to quit.

Traceback (most recent call last):
File "tellprox/bottle.py", line 764, in _handle
return route.call(*_args)
File "tellprox/bottle.py", line 1575, in wrapper
rv = callback(_a, **ka)
File "/home/pi/tellprox/tellprox/main.py", line 108, in wrapped
return func(_args, *_kwargs)
File "/home/pi/tellprox/tellprox/main.py", line 161, in devices
return render_template('devices')
File "/home/pi/tellprox/tellprox/main.py", line 123, in render_template
return template(view, vars);
File "tellprox/bottle.py", line 3117, in template
return TEMPLATES[tplid].render(kwargs)
File "tellprox/bottle.py", line 3090, in render
self.execute(stdout, kwargs)
File "tellprox/bottle.py", line 3078, in execute
eval(self.co, env)
File "tellprox/bottle.py", line 185, in get
value = obj.dict[self.func.name] = self.func(obj)
File "tellprox/bottle.py", line 2977, in co
return compile(self.code, self.filename or '', 'exec')
File "/home/pi/tellprox/tellprox/views/devices.tpl", line 234
globals()['_rebase']=(u"title='Devices',", dict(name='devices', **locals())))
^
SyntaxError: invalid syntax

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.