Page 1 of 32

Domoboard - General Discussions

Posted: Thursday 29 December 2016 17:19
by squandor
Hi All,

Domoboard is a dashboard for Domoticz based on Python Flask. The decision was made to use Domoticz as an backend because it is a powerful framework for home automation. Flask was choosen to get all the powerful features that Python offers.

The project was started because the default Domoticz interface is not designed to be used as an actual dashboard, for example on a tablet which is mounted to the wall. Domoboard is based on Bootstrap which allows the dashboard to be responsive.

Quick start

Install dependencies:

Code: Select all

sudo easy_install flask flask-auth configobj gitpython simplejson bleach requests
Clone the git:

Code: Select all

git clone https://github.com/wez3/domoboard
Modify the config file to suit your needs. Start Domoboard by executing:

Code: Select all

python server.py -c <config_file>
Configuration
Just one config is used to configure Domoboard. A example can be found the applications root ("example.conf"). The following display components are currently supported:
  1. top_tiles
  2. switches
    • switch
    • dimmer
    • rgb
    • setpoint
  3. weather
  4. news
  5. map
  6. domoticz_temp_charts
  7. domoticz_smart_charts
  8. domoticz_counter_charts
  9. domoticz_percentage_charts
  10. line_charts
  11. area_charts
  12. bar_charts
  13. donut_charts
  14. power_usage
  15. serverlog
  16. settings
API
Domoboard has an API which can be found at "/api". All JavaScript files that update data frequently are using this API to obtain the information that is going to be displayed. By default all requests to the API are passed to the Domoticz backend. This means that Domoboard accepts the same API calls as Domoticz does. However the API also allows an plugin developer to add its own API functions by creating an Python module. Developers can specify a "custom" GET-parameter which is patched in to the current API, this allows the developer to run their own Python functions when the API is called.

Domoboard is a framework which allows users to build custom plugins pretty easy. Plugins require the following at least:
  1. A HTML file in the templates/ folder (see templates/hello.html as an example)
  2. For advanced features, such as custom API functions a developer needs to develop a Python file in the plugins/ folder (see plugins/hello.py as an example)
  3. Readme.md in the static/docs folder for the plugin-manager
The following plugins have been developed by now:
  1. iCloud
  2. ANWB
Check out the plugin page at https://github.com/wez3/domoboard-plugins for all plugins.
Check out the domoboard at https://github.com/wez3/domoboard

Here are some screenshots from Domoboard:
Image
Image
Image
Image
Image
Image
Image

Everybody can contribute to the project! For development purposes the "develop" branch is used. The "master" branch contains the stable version of Domoboard.

Please let us know when you've created a plugin, so we can can add to the plugin Github repository.


We hope you like it and any comments or suggestions are welcome.

Greetings,

Wez3 & Squandor

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Thursday 29 December 2016 17:28
by SweetPants
Looks nice, which python version is used?

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Thursday 29 December 2016 17:36
by squandor
it has been build on Python 2.7

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Thursday 29 December 2016 17:54
by gizmocuz
Domoticz is using bootstrap as well.
Always nice to see new interfaces, nice job!

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Thursday 29 December 2016 18:12
by squandor
jep you're right, the idea didn't come to overrule the domoticz front but to create something with extra features including the existing features from domoticz itself.
With that in mind we thought of an interface which is configurable and hopefully would seem nice at an touchscreen so domoticz would be used even more in houses.
I use it in my own house and love the possibilities! :)

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Thursday 29 December 2016 21:21
by dutchdevil83
Looks promising, have got it running but the config file is not "user friendly" at the moment. I saw that under settings you made a attempt to config the devices from there. I think thats the best way to do it because now its a hell of a job to look up the right IDXs and set them in the config file also because for trial and error you have to exit and edit the config and reload.

But again dashboard looks promising and have some good potential. Will have a look at the code of i can get a user friendly method of adding devices to the dashboard.

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Thursday 29 December 2016 21:37
by squandor
Youre right if you don't want to restart the server after every change you can use the -d parameter which sets the flask server to debugging mode so after every change the server will restart automatically

But sometimes I also find the config a little bit complicated but w
Just like every thing when you now how it works it's easy to change ;)

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Thursday 29 December 2016 21:52
by Awst6000
Looks very nice. Looks like 'Toon for Domoticz' ;)
I'm sorry to say but I hope you don't run into that much trouble that you quit, like most other attempts for creating a dashboard do.

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Thursday 29 December 2016 21:53
by remb0
Great work! Will try it soon..

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Thursday 29 December 2016 21:56
by squandor
We are using it for ourselves so it's not in ours agendas to quit working on it :)!!

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Thursday 29 December 2016 22:22
by Siewert308SW
omg, that looks promising...
From the screenshots i do have to say chapeau.
I'm eager to try this one out, but will take some time as i have other priorities right now.
Until then i will keep a eye on this.
Question: how does the UI runs on slower devices like mine "Samsung Galaxy Tab 7" 1st edition from years back.
In the past i used the frontpage by Hansbit but the browser (FF,Chrome, Dolphin) was slow.

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Thursday 29 December 2016 22:24
by squandor
Wez3 has the domoboard running on an Raspbian with 7" touchscreen with chromium browser and it works like a charm :)

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Thursday 29 December 2016 22:42
by remb0
squandor wrote:Wez3 has the domoboard running on an Raspbian with 7" touchscreen with chromium browser and it works like a charm :)
pics or it didn't happen.jpg
pics or it didn't happen.jpg (122.52 KiB) Viewed 25700 times

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Thursday 29 December 2016 22:58
by squandor
haha ok point taken:
Image

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Thursday 29 December 2016 23:01
by Eoreh
Hi !
Looks nice. I want try it, but i have little problem like this.

Code: Select all

Traceback (most recent call last):
  File "server.py", line 8, in <module>
    import modules.api as api
  File "/home/pi/domoboard/modules/api.py", line 8, in <module>
    import requests, json, re
ImportError: No module named requests
What's the problem ?

Its happend after start:

Code: Select all

sudo python server.py -c example.conf
Of course, I installed all the necessary components

Code: Select all

sudo apt-get install python-setuptools 
sudo apt-get install git
sudo easy_install flask flask-auth configobj gitpython simplejson bleach
git clone https://github.com/wez3/domoboard 
In config example.conf i change only 2 lines in section "server" like this

Code: Select all

url = 192.168.5.80:8080    # IP-address of Domoticz backend
flask_url = 192.168.5.88:80	
My directory modules have files like this:

Code: Select all

api.py
api.pyc
__init__.py
__init__.pyc
security.py
security.pyc

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Thursday 29 December 2016 23:03
by squandor
thanks for you're post.
you're missing an module so the fix would be:

Code: Select all

sudo pip install requests
or

Code: Select all

 sudo easy_install requests
we will update the readme file on GitHub.

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Thursday 29 December 2016 23:23
by Eoreh
Thx for fast answer.
Next problem after (install "requests and) start -> sudo python server.py -c example.conf

Code: Select all

 Traceback (most recent call last):
  File "server.py", line 147, in <module>
    config = json.loads(security.sanitizeString(json.dumps(unsanitizedConfig)), object_pairs_hook=OrderedDict)
  File "/usr/lib/python2.7/json/__init__.py", line 351, in loads
    return cls(encoding=encoding, **kw).decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 369, in decode
    raise ValueError(errmsg("Extra data", s, end, len(s)))
ValueError: Extra data: line 1 column 3231 - line 1 column 3235 (char 3230 - 3234)
My Domoticz - beta v3.6258 runs http on RPI3 with jessie from may 2016 (update and upgrade today).
I dont have any password and users.

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Thursday 29 December 2016 23:27
by squandor
could you post you config.

it seems that error has been raised when the config is being loaded.

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Thursday 29 December 2016 23:36
by Eoreh
Hi !
My config - edited in Notepad++ over WinSCP.
As i wrote I was change only 2 lines from oryginal.

Code: Select all

url = 192.168.5.80:8080    # IP-address of Domoticz backend
flask_url = 192.168.5.88:80  

Re: Domoboard a New Dashboard using Domoticz as backend

Posted: Thursday 29 December 2016 23:42
by squandor
at the server section [[server]]
set secret_key with an random key

i would try to set an username = password to the [[users]] section.

There is an logon page on the domoboard which requires an user and password.

and try to use real idx id's because the server checks if they exists.