Page 4 of 32
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Sunday 01 January 2017 20:43
by wez3
@GreenSmart01
You did not install all requirements. Make sure to run the following command:
sudo easy_install flask flask-auth configobj gitpython simplejson bleach requests
@Lars65
Yes, it is no problem to run domoboard on a seperate RPi. Just config the domoticz server address and it should work (see general_settings) example.conf
@felix63
A cam can be added like this (example is a foscam):
[[camera]]
Camera =
http://x.x.x.x:88/cgi-bin/CGIStream.cgi ... xx&pwd=xxx
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Sunday 01 January 2017 22:20
by felix63
Thanks, that works! I do have some additional questions.
- I am now trying to add motion sensors and door contacts, any suggestion how I could do this
- having two blocks of switches can I change the title? see example below
- how can I add Buienradar and Traffic-info?
Code: Select all
[woonkamer]
[[display_components]]
components = switches[1],switches[2]
[[switches]]
[[[1]]]
staande lamp = 10, dimmer
strip = 325, dimmer
[[[2]]]
iris = 11, rgb
kubus = 79, dimmer
schotel = 335, dimmer
spotjes = 506, dimmer
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Monday 02 January 2017 8:06
by squandor
felix63 wrote:Thanks, that works! I do have some additional questions.
- I am now trying to add motion sensors and door contacts, any suggestion how I could do this
- having two blocks of switches can I change the title? see example below
- how can I add Buienradar and Traffic-info?
Code: Select all
[woonkamer]
[[display_components]]
components = switches[1],switches[2]
[[switches]]
[[[1]]]
staande lamp = 10, dimmer
strip = 325, dimmer
[[[2]]]
iris = 11, rgb
kubus = 79, dimmer
schotel = 335, dimmer
spotjes = 506, dimmer
Hi felix63,
- The door contacts and motion sensors are a bit tricky to answer because can't test with them but if they work just as switches it should work
- At the moment it is not possible to change the title but that's a small fix which i will implement later today
- To add Buienradar and traffic-info you can do the following to you config:
Code: Select all
[woonkamer]
[[display_components]]
components = switches[1],switches[2], buienradar, anwb
[[switches]]
[[[1]]]
staande lamp = 10, dimmer
strip = 325, dimmer
[[[2]]]
iris = 11, rgb
kubus = 79, dimmer
schotel = 335, dimmer
spotjes = 506, dimmer
[[buienradar]]
[[anwb]]
But first you must install the "verkeer" plugin from the settings menu.
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Monday 02 January 2017 8:48
by zandhaas
Nice Dashboard.
Question,
When I install the ANWB plugin I get the below messesaage when I try to start domoboard:
Error occured during loading imports for the plugin anwb. Please check whether all dependecies are installed
I installed it both via the setting menu and via the manual method both eith the same result.
What am I missing?
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Monday 02 January 2017 8:50
by squandor
felix63 wrote:Thanks, that works! I do have some additional questions.
- having two blocks of switches can I change the title? see example below
Just pushed the solution for you're title problem to the develop branch.
If you use the following config in the future it will change the switch title when the new code has been pushed to master:
Code: Select all
[[display_components]]
components = switches[Title 2],switches[Title 1]
[[switches]]
[[[Title 1]]]
staande lamp = 10, dimmer
strip = 325, dimmer
[[[Title 2]]]
iris = 11, rgb
kubus = 79, dimmer
schotel = 335, dimmer
spotjes = 506, dimmer
In my test situation it worked even with spaces so it should work with you to.
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Monday 02 January 2017 8:52
by squandor
zandhaas wrote:Nice Dashboard.
Question,
When I install the ANWB plugin I get the below messesaage when I try to start domoboard:
Error occured during loading imports for the plugin anwb. Please check whether all dependecies are installed
I installed it both via the setting menu and via the manual method both eith the same result.
What am I missing?
hmm i think that we can work on the error messages. The ANWB plugin does use modules which are not default installed and i think that you don't have some of them.
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Monday 02 January 2017 8:59
by vmb
Code: Select all
sudo apt-get install python-setuptools
[/quote]
Thx! That did the trick! Now installing...[/quote]
Installed and running. Tested some things, Will try to suit the dashboard according to my situation. Only one important question (at the moment
)
When I closed the terminal session after starting up Domoboard, Domoboard turned out to have shutdown. Can someone tell me how I can prevent that so it keeps running in the background?
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Monday 02 January 2017 9:09
by zandhaas
squandor wrote:zandhaas wrote:Nice Dashboard.
Question,
When I install the ANWB plugin I get the below messesaage when I try to start domoboard:
Error occured during loading imports for the plugin anwb. Please check whether all dependecies are installed
I installed it both via the setting menu and via the manual method both eith the same result.
What am I missing?
hmm i think that we can work on the error messages. The ANWB plugin does use modules which are not default installed and i think that you don't have some of them.
Yup that did the trick except that I had to use "easy_install" instead of pip.
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Monday 02 January 2017 9:21
by wez3
vmb wrote:Code: Select all
sudo apt-get install python-setuptools
Thx! That did the trick! Now installing...[/quote]
Installed and running. Tested some things, Will try to suit the dashboard according to my situation. Only one important question (at the moment
)
When I closed the terminal session after starting up Domoboard, Domoboard turned out to have shutdown. Can someone tell me how I can prevent that so it keeps running in the background?[/quote]
This should do the trick:
sudo apt-get install screen
screen -S flask
Start domoboard in the screen
You can attach back to the screen with screen -d -r <number of screen>
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Monday 02 January 2017 11:15
by jake
wez3 wrote:
This should do the trick:
sudo apt-get install screen
screen -S flask
Start domoboard in the screen
You can attach back to the screen with screen -d -r <number of screen>
I'm not a Linux expert, but is this screen thing the right thing to do? Won't you loose your connection after a reboot of the Pi? For
another program that needs to run all the time, I was advised (and now use) Supervisor to always start a certain program after reboot.
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Monday 02 January 2017 11:48
by felix63
squandor wrote:
Just pushed the solution for you're title problem to the develop branch.
If you use the following config in the future it will change the switch title when the new code has been pushed to master:
Thanks for your prompt reply!
Regarding Motion Sensors and Contacts. For Motion Sensors using regular switches seems to work as the report 'On' or 'Off'. Contacts however report 'Open' or 'Closed'. The result is that when you use a switch the status is always reported as 'On' regardless off the true state of the switch (Open or Closes).
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Monday 02 January 2017 11:51
by Holland
@Jake
Just run Domoboard within PM2, then Domoboard runs on the background even without a SSH console
jump to the Domoboard directory, and issue;
Code: Select all
pm2 start python server.py -- -c settings.conf
Where settings.conf is the same file as example.conf, but with a different name
To make sure that the above is restarted at reboot;
1.
2.
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Monday 02 January 2017 11:56
by GreenSmart01
wez3 wrote:@GreenSmart01
You did not install all requirements. Make sure to run the following command:
sudo easy_install flask flask-auth configobj gitpython simplejson bleach requests
@wez3
thanks for your comment,
But these commands are already executed
below its output:
Code: Select all
pi@raspberrypi:~$ sudo easy_install flask flask-auth configobj gitpython simplejson bleach requests
Searching for flask
Best match: Flask 0.10.1
Flask 0.10.1 is already the active version in easy-install.pth
Using /usr/lib/python2.7/dist-packages
Processing dependencies for flask
Finished processing dependencies for flask
Searching for flask-auth
Best match: Flask-Auth 0.85
Processing Flask_Auth-0.85-py2.7.egg
Flask-Auth 0.85 is already the active version in easy-install.pth
Using /usr/local/lib/python2.7/dist-packages/Flask_Auth-0.85-py2.7.egg
Processing dependencies for flask-auth
Finished processing dependencies for flask-auth
Searching for configobj
Best match: configobj 5.0.6
Processing configobj-5.0.6-py2.7.egg
configobj 5.0.6 is already the active version in easy-install.pth
Using /usr/local/lib/python2.7/dist-packages/configobj-5.0.6-py2.7.egg
Processing dependencies for configobj
Finished processing dependencies for configobj
Searching for gitpython
Best match: GitPython 2.1.1
Processing GitPython-2.1.1-py2.7.egg
GitPython 2.1.1 is already the active version in easy-install.pth
Using /usr/local/lib/python2.7/dist-packages/GitPython-2.1.1-py2.7.egg
Processing dependencies for gitpython
Finished processing dependencies for gitpython
Searching for simplejson
Best match: simplejson 3.10.0
Processing simplejson-3.10.0-py2.7.egg
simplejson 3.10.0 is already the active version in easy-install.pth
Using /usr/local/lib/python2.7/dist-packages/simplejson-3.10.0-py2.7.egg
Processing dependencies for simplejson
Finished processing dependencies for simplejson
Searching for bleach
Best match: bleach 1.5.0
Processing bleach-1.5.0-py2.7.egg
bleach 1.5.0 is already the active version in easy-install.pth
Using /usr/local/lib/python2.7/dist-packages/bleach-1.5.0-py2.7.egg
Processing dependencies for bleach
Finished processing dependencies for bleach
Searching for requests
Best match: requests 2.4.3
requests 2.4.3 is already the active version in easy-install.pth
Using /usr/lib/python2.7/dist-packages
Processing dependencies for requests
Finished processing dependencies for requests
pi@raspberrypi:~$
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Monday 02 January 2017 12:22
by squandor
@Greensmart01 does the console still have the same modules missing or has the error message changed after the last command?
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Monday 02 January 2017 14:12
by GreenSmart01
Im now getting:
Code: Select all
pi@raspberrypi:~$ sudo python -c server.py example.con
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'server' is not defined
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Monday 02 January 2017 15:21
by squandor
GreenSmart01 wrote:Im now getting:
Code: Select all
pi@raspberrypi:~$ sudo python -c server.py example.con
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'server' is not defined
this is because you put the parameters in the wrong order, what do you get when you run the code:
Code: Select all
sudo python server.py -c example.conf
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Monday 02 January 2017 15:44
by GreenSmart01
Code: Select all
pi@raspberrypi:~/domoboard$ sudo python server.py -c example.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
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Monday 02 January 2017 16:18
by zandhaas
Hello,
I have an other question about the ANWB plugin.
I was able to install it and added teh startPoint en endPoint values to the general tab in config file and also added a [anwb] section.
But when I start domoboard I get the below messages:
Code: Select all
[2017-01-02 16:16:08,204] ERROR in app: Exception on /api [POST]
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 "/domoboard/modules/api.py", line 87, in gateway
result = call(request.args)
File "/domoboard/plugins/anwb.py", line 169, in getData
setEndGeo(geocode(end))
File "/domoboard/plugins/anwb.py", line 23, in geocode
return list(g)[0]
IndexError: list index out of range
I think my entries in the config file are not correct but I can not find more deteail information on how it should be exactly.
Can you please give some more detailed information on how to add the right config file entries for this plugin.
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Monday 02 January 2017 17:13
by squandor
zandhaas wrote:Hello,
I have an other question about the ANWB plugin.
I was able to install it and added teh startPoint en endPoint values to the general tab in config file and also added a [anwb] section.
But when I start domoboard I get the below messages:
Code: Select all
[2017-01-02 16:16:08,204] ERROR in app: Exception on /api [POST]
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 "/domoboard/modules/api.py", line 87, in gateway
result = call(request.args)
File "/domoboard/plugins/anwb.py", line 169, in getData
setEndGeo(geocode(end))
File "/domoboard/plugins/anwb.py", line 23, in geocode
return list(g)[0]
IndexError: list index out of range
I think my entries in the config file are not correct but I can not find more deteail information on how it should be exactly.
Can you please give some more detailed information on how to add the right config file entries for this plugin.
It seems like you're config settings aren't correct indeed. An format for the address could be:
[[anwb]]
startPoint = "Korte minrebroederstraat 1, Utrecht"
endPoint = "Korte Nieuwstraat 6, Nijmegen"
These points are working on my test situation, so hopefully it will work at your's to.
Re: Domoboard a New Dashboard using Domoticz as backend
Posted: Monday 02 January 2017 19:30
by wez3
jake wrote:wez3 wrote:
This should do the trick:
sudo apt-get install screen
screen -S flask
Start domoboard in the screen
You can attach back to the screen with screen -d -r <number of screen>
I'm not a Linux expert, but is this screen thing the right thing to do? Won't you loose your connection after a reboot of the Pi? For
another program that needs to run all the time, I was advised (and now use) Supervisor to always start a certain program after reboot.
Your right, better is to create a service of it. I would use systemd for this, however during development i mainly use screen
.