Page 11 of 32

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Monday 09 January 2017 19:11
by wez3
apt80 wrote:
bsmeding wrote: try install the Auth python moduel :

Code: Select all

pip install auth
Yeah, thanks for the advice.

I did so. At first auth wouldn't install because of errors, not sure what exactly
I tried > sudo easy_install auth
Then > sudo pip install auth
which failed as well. Then I figured I need to install the python build tools to install auth. That worked.
After > sudo apt-get install build-essential python-dev
I was able to install auth with > sudo pip install auth

But it didn't solve the missing auth package error. Finally I tried this:
sudo easy_install flaskex Flask-OAuth2-Login Flask-OAuth Flask-ExtDirect Flask-Auth Flask-Login

Because of an earlier suggestion. But to no avail...
Some people suggested that the auth module has some problems on the "full" raspbian jessie. You might try raspbian jessie lite, some people said that works. I've already created an issue on this on github. I will check it when i am able to. If you try it, can you tell me whether it worked :)?

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Monday 09 January 2017 21:23
by Routernl
I really like the domoboard, many thnx for creating and sharing !

Configuring through the .conf file is a very nice setup, and most of the options are self-explanatory, the board and google supply most of the necessary answers, but the Google maps I can't figure out..
Is anyone else experiencing an empty maps panel ?
I've tried filling in locations in the conf file (and filled in an API for Google maps embedded) but as a result I only get a blank panel .

On inspection chrome reports the following error :
Uncaught TypeError: Cannot read property '0' of undefined at domoboard.js:128

line 128 in domoboard.js reads:
var locurl = "https://www.google.com/maps/embed/v1/place?key=" + googleMapEmbedKey + "&q=" + encodeURIComponent(data.result[0].Data) + "&maptype=satellite";

As I am neither a coder nor a js I'm at a loss..
Anyone got this working ?

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Monday 09 January 2017 22:16
by wez3
Routernl wrote:I really like the domoboard, many thnx for creating and sharing !

Configuring through the .conf file is a very nice setup, and most of the options are self-explanatory, the board and google supply most of the necessary answers, but the Google maps I can't figure out..
Is anyone else experiencing an empty maps panel ?
I've tried filling in locations in the conf file (and filled in an API for Google maps embedded) but as a result I only get a blank panel .

On inspection chrome reports the following error :
Uncaught TypeError: Cannot read property '0' of undefined at domoboard.js:128

line 128 in domoboard.js reads:
var locurl = "https://www.google.com/maps/embed/v1/place?key=" + googleMapEmbedKey + "&q=" + encodeURIComponent(data.result[0].Data) + "&maptype=satellite";

As I am neither a coder nor a js I'm at a loss..
Anyone got this working ?
You have to fill in a IDX from domoticz (text utility) that contains your location.

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Monday 09 January 2017 22:43
by felix63
Demoboard doesn't work anymore. I get the following. I don't understand. Its either because of the git pull I just did or because of my attempts to update python-six...!?

Code: Select all

pi@domus:~/domoboard$ python server.py -c basic.conf
 * Running on http://192.168.178.50:8008/ (Press CTRL+C to quit)
[2017-01-09 22:24:12,847] ERROR in app: Exception on /dashboard [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python2.7/dist-packages/Flask_Auth-0.85-py2.7.egg/flaskext/auth/auth.py", line 186, in decorator
    return func(*args, **kwargs)
  File "server.py", line 50, in generatePage
    debug = app.debug)
  File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 134, in render_template
    context, ctx.app)
  File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 116, in _render
    rv = template.render(context)
  File "/usr/local/lib/python2.7/dist-packages/Jinja2-2.9.3-py2.7.egg/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python2.7/dist-packages/Jinja2-2.9.3-py2.7.egg/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/domoboard/templates/index.html", line 7, in top-level template code
    {% include k + ".html" ignore missing %}
  File "/home/pi/domoboard/templates/switches.html", line 18, in top-level template code
    {% for k, v in blockArray[count]["switches"].iteritems() %}
  File "/usr/local/lib/python2.7/dist-packages/Jinja2-2.9.3-py2.7.egg/jinja2/environment.py", line 430, in getattr
    return getattr(obj, attribute)
UndefinedError: 'collections.OrderedDict object' has no attribute 'switches'
192.168.178.29 - - [09/Jan/2017 22:24:12] "GET /dashboard HTTP/1.1" 500 -

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Tuesday 10 January 2017 0:00
by squandor
felix63 wrote:Demoboard doesn't work anymore. I get the following. I don't understand. Its either because of the git pull I just did or because of my attempts to update python-six...!?

Code: Select all

pi@domus:~/domoboard$ python server.py -c basic.conf
 * Running on http://192.168.178.50:8008/ (Press CTRL+C to quit)
[2017-01-09 22:24:12,847] ERROR in app: Exception on /dashboard [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python2.7/dist-packages/Flask_Auth-0.85-py2.7.egg/flaskext/auth/auth.py", line 186, in decorator
    return func(*args, **kwargs)
  File "server.py", line 50, in generatePage
    debug = app.debug)
  File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 134, in render_template
    context, ctx.app)
  File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 116, in _render
    rv = template.render(context)
  File "/usr/local/lib/python2.7/dist-packages/Jinja2-2.9.3-py2.7.egg/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python2.7/dist-packages/Jinja2-2.9.3-py2.7.egg/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/domoboard/templates/index.html", line 7, in top-level template code
    {% include k + ".html" ignore missing %}
  File "/home/pi/domoboard/templates/switches.html", line 18, in top-level template code
    {% for k, v in blockArray[count]["switches"].iteritems() %}
  File "/usr/local/lib/python2.7/dist-packages/Jinja2-2.9.3-py2.7.egg/jinja2/environment.py", line 430, in getattr
    return getattr(obj, attribute)
UndefinedError: 'collections.OrderedDict object' has no attribute 'switches'
192.168.178.29 - - [09/Jan/2017 22:24:12] "GET /dashboard HTTP/1.1" 500 -
that's strange it still works with our test situations. we did fixed 3 issues with one change so maybe it's that i will ask Wez3 tomorrow.

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Tuesday 10 January 2017 10:15
by Awst6000
Hi,
Yesterday I downloaded the lastest version of Domoboard and I also got a lot of errors, even when using the same .conf file from another configuration that does work without problems.
It looks as if Domoboard is very strict now in syntax.

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Tuesday 10 January 2017 11:20
by jhenrikb
Thanks Squandor. That fixed the issue.

I spent the morning editing the conf file, removing and adding IDX's etc.

I typed in my IP and port to Domoticz backend, and used the same IP with a different port on domoboard.

I start up the file, go to login page and type in the username and password that is written in the config file.
It gives me a "bad request" page in chrome after i logged in.

putty log shows:
192.168.1.111 - - [10/Jan/2017 11:07:27] "GET /login/static/js/moment.min.js HTTP/1.1" 404 -
192.168.1.111 - - [10/Jan/2017 11:07:53] "POST /login/ HTTP/1.1" 400 -

heres my config file if anyone wonder
domob.zip
conf file
(1.45 KiB) Downloaded 44 times
Sincerely
John

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Tuesday 10 January 2017 11:44
by squandor
Awst6000 wrote:Hi,
Yesterday I downloaded the lastest version of Domoboard and I also got a lot of errors, even when using the same .conf file from another configuration that does work without problems.
It looks as if Domoboard is very strict now in syntax.
I Awst6000 how does you're config looks like and which kind of error did you get?

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Tuesday 10 January 2017 11:54
by Felix82
Snowtiger wrote:
Snowtiger wrote:I installed all dependencies but still get this error :

Code: Select all

xx@raspberrypi:~/git/domoboard $ sudo python2.7 server.py -c myconf.conf
Traceback (most recent call last):
  File "server.py", line 4, in <module>
    from flaskext.auth import Auth, AuthUser, login_required, logout
ImportError: No module named auth
As you can see i already did the python2.7 trick - also tried to install auth via easy-install but that did not solve the error.
I have been digging around - running on a Pi with Raspbian Jessie, python2.7 info

Code: Select all

Python 2.7.9 (default, Sep 17 2016, 20:26:04) 
[GCC 4.9.2] on linux2
I have checked the sys.path if everything is included

Code: Select all

['', '/usr/lib/python2.7/dist-packages', '/usr/local/lib/python2.7/dist-packages/Flask_Auth-0.85-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/configobj-5.0.6-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/GitPython-2.1.1-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/gitdb2-2.0.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/smmap2-2.0.1-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/simplejson-3.10.0-py2.7-linux-armv7l.egg', '/usr/local/lib/python2.7/dist-packages/bleach-1.5.0-py2.7.egg', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-arm-linux-gnueabihf', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7']
looks alright to me, running direct in command line Python -

Code: Select all

>>> from flaskext.auth import Auth, AuthUser, login_required, logout
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named auth
Shoot me maar lek ;)
Tot zover - iemand met Phyton kennis nog enig idee?
FYI

Im', running a Pi3, Full Jessie (11-2016). I also encountered the same error message after running server.py ("No module named auth").
I got rid of the message by running these commands:

Sudo pip install auth --upgrade
Sudo easy_install requests
Sudo easy_install auth

After running these commands i got the Idx "bla" is not... # them out in de .conf file

By solving this, a new one has appeared :)

Traceback (most recent call last):
File "server.py", line 156, in <module>
auth = Auth(app, login_url_name='login_form')
NameError: name 'Auth' is not defined

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Tuesday 10 January 2017 13:29
by jhenrikb
went over my config again. Now after login it shows "Internal server error"
Raspbian command window show

pi@raspberrypi:~/domoboard $ python server.py -c domob.conf
* Running on http://192.168.1.127:8090/ (Press CTRL+C to quit)
192.168.1.111 - - [10/Jan/2017 13:26:17] "GET /login/ HTTP/1.1" 200 -
192.168.1.111 - - [10/Jan/2017 13:26:17] "GET /login/static/js/moment.min.js HTTP/1.1" 404 -
192.168.1.111 - - [10/Jan/2017 13:26:36] "POST /login/ HTTP/1.1" 200 -
192.168.1.111 - - [10/Jan/2017 13:26:36] "GET /login/static/js/moment.min.js HTTP/1.1" 404 -
192.168.1.111 - - [10/Jan/2017 13:26:36] "GET /login/static/js/moment.min.js HTTP/1.1" 404 -
192.168.1.111 - - [10/Jan/2017 13:26:47] "POST /login/ HTTP/1.1" 302 -
[2017-01-10 13:26:47,354] ERROR in app: Exception on /dashboard [GET]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python2.7/dist-packages/Flask_Auth-0.85-py2.7.egg/flaskext/auth/auth.py", line 186, in decorator
return func(*args, **kwargs)
File "server.py", line 48, in generatePage
_csrf_token = session['_csrf_token'])
File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/templating.py", line 134, in render_template
context, ctx.app)
File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/templating.py", line 116, in _render
rv = template.render(context)
File "/usr/local/lib/python2.7/dist-packages/Jinja2-2.9.3-py2.7.egg/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/local/lib/python2.7/dist-packages/Jinja2-2.9.3-py2.7.egg/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/pi/domoboard/templates/index.html", line 7, in top-level template code
{% include k + ".html" ignore missing %}
File "/home/pi/domoboard/templates/line_charts.html", line 29, in top-level template code
{% for k, v in blockArray[count]["line_charts"].iteritems() %}
File "/usr/local/lib/python2.7/dist-packages/Jinja2-2.9.3-py2.7.egg/jinja2/environment.py", line 430, in getattr
return getattr(obj, attribute)
UndefinedError: 'dict object' has no attribute 'line_charts'
192.168.1.111 - - [10/Jan/2017 13:26:47] "GET /dashboard HTTP/1.1" 500 -


Is it normal for it to show a different IP?

John

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Tuesday 10 January 2017 13:41
by Awst6000
Hi,
I also got a lot of these errors that look like this (has no attribute 'line_charts')
It seems that you cannot have empty entries.

This is only an example !!!
[info]
[[display_components]]
components = top_tiles, tvgids, news
[[top_tiles]]
[[tvgids]]
<no news entry>

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Tuesday 10 January 2017 14:07
by squandor
Awst6000 wrote:Hi,
I also got a lot of these errors that look like this (has no attribute 'line_charts')
It seems that you cannot have empty entries.

This is only an example !!!
[info]
[[display_components]]
components = top_tiles, tvgids, news
[[top_tiles]]
[[tvgids]]
<no news entry>
Thats Right, you can't because you set news in components the server looks for an [[news]] item in the list.

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Tuesday 10 January 2017 15:18
by dutchdevil83
I have pulled the develop branch but still have some issues configuring domoboard. Can someone tell me if the functions are supported and how to use it?

1) Can`t get CounterToday values from my P1 Meters (gas+electricity)... It only displays the total usage (first value from the DATA string ). looks like it doesn`t get CounterToday from JSON string?

2) Can`t get current usage from P1 Meter (USAGE from JSON string)

3) Is it possible to display only temp, only humidity, only baro, etc from 1 sensor. For example for my weather sensor it display temp+humidity+baro but all those data doesn`t fit in the top tile

If i know this are issues then i can register them at github if necessary

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Tuesday 10 January 2017 17:31
by felix63
jhenrikb wrote:went over my config again. Now after login it shows "Internal server error"
Raspbian command window show
Hi John,

I have the same problems as you. Did you recently updated your system (sudo apt-get update/upgrade)? Or did you reinstall some of the dependencies?

Cheers,
Lex

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Tuesday 10 January 2017 18:02
by felix63
I restored my SD-card to the previous version (on which i initially installed a working version of Domoboard).

Did

Code: Select all

sudo apt-get install python-setuptools
sudo easy_install flask flask-auth configobj gitpython simplejson bleach requests
git clone https://github.com/wez3/domoboard
and I am still getting the same errors when calling domoboard. So now I'm sure it's not me :)

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Tuesday 10 January 2017 18:03
by dutchdevil83
This is fixed by adding the following code : then the onclick function on ipad will loading in same window instead of opening safari when de dashboard is running from the Homescreen as 'native' app

Code: Select all

var a=document.getElementsByTagName("a");
for(var i=0;i<a.length;i++)
{
    a[i].onclick=function()
    {
        window.location=this.getAttribute("href");
        return false
    }
}
Where do i have to put this code?

Can you make a pull request for this issue on github?

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Tuesday 10 January 2017 18:26
by squandor
Make sure to use master if you are looking for stability. The development branch is used for testing and development which could contain bugs (however we would like to know them!).

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Tuesday 10 January 2017 18:35
by Awst6000
squandor wrote:Make sure to use master if you are looking for stability. The development branch is used for testing and development which could contain bugs (however we would like to know them!).
Yesterday It was surely the master branch I downloaded. (The zipfile also contains the word 'master')
I recognize a lot of the errors in the posts above.

I'm not a coder but maybe it is wise to rollback the recent changes.

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Tuesday 10 January 2017 18:45
by jhenrikb
felix63 wrote:
jhenrikb wrote:went over my config again. Now after login it shows "Internal server error"
Raspbian command window show
Hi John,

I have the same problems as you. Did you recently updated your system (sudo apt-get update/upgrade)? Or did you reinstall some of the dependencies?

Cheers,
Lex
Heya, yeah. Everything is the newest version from fresh install.
I can't even install a simple Frontpage from this forum even though I do everything right (or so I believe :p). Load in IP etc but nothing works. Domoticz offline all the time. If I upload the Frontpage on my computer and get the idxs from the Pi3 it's working perfectly. I will try to install domoboard on Windows later and see if that works.

John

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Tuesday 10 January 2017 18:55
by linconnu76
Hello,
I've got this problem :
pi@raspberrypi:~/domoboard$ sudo python server.py -c domoboard.conf
* Running on http://192.168.1.9:5000/ (Press CTRL+C to quit)
[2017-01-10 18:49:05,627] ERROR in app: Exception on /dashboard [GET]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python2.7/dist-packages/Flask_Auth-0.85-py2.7.egg/flaskext/auth/auth.py", line 186, in decorator
return func(*args, **kwargs)
File "server.py", line 48, in generatePage
_csrf_token = session['_csrf_token'])
File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/templating.py", line 134, in render_template
context, ctx.app)
File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/templating.py", line 116, in _render
rv = template.render(context)
File "/usr/local/lib/python2.7/dist-packages/Jinja2-2.9.2-py2.7.egg/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/local/lib/python2.7/dist-packages/Jinja2-2.9.2-py2.7.egg/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/pi/domoboard/templates/index.html", line 9, in top-level template code
{% set count = count + 1 %}
UndefinedError: 'count' is undefined

What can I do ?