Domoboard - General Discussions

Domoboard is a dashboard for Domoticz based on Python Flask.

Moderator: wez3

Forum rules
Before posting here, make sure you are using the latest Beta or Stable version.

In order to fix issues or add features these have to be reported on the Domoboard Github pages.
This makes it possible to keep track of issues/features on a centralized place.

Refer to the issue of the github tracker when possible.

This subforum is meant to discuss issues and/or feature requests, or anything else related to Domoboard.
janvier123
Posts: 34
Joined: Saturday 17 September 2016 22:04
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Domoboard - General Discussions

Post by janvier123 » Tuesday 13 June 2017 7:57

sander815 wrote:why am i getting these errors?

[email protected]:~/domoboard $ /home/pi/domoboard/bin/python /home/pi/domoboard/server.py -d -c /home/pi/domoboard/example2.conf -d
Error when starting the Flask server: [Errno 13] Permission denied

and if i run it like this
[email protected]:~/domoboard $ python /home/pi/domoboard/server.py -d -c /home/pi/domoboard/test.conf
Traceback (most recent call last):
File "/home/pi/domoboard/server.py", line 4, in <module>
from flaskext.auth import Auth, AuthUser, login_required, logout
ImportError: No module named auth
Its happened to me also when they updated it

- Open 2 terminals (connecting to the same IP / Raspberry ...)
- in the first window type: sudo tail -f /var/log/syslog => this will output any debug info
- in the second window type: sudo systemctl start domoboard.service

squandor
Posts: 201
Joined: Saturday 19 December 2015 23:34
Target OS: Raspberry Pi
Domoticz version: 3.5837
Contact:

Re: Domoboard - General Discussions

Post by squandor » Wednesday 14 June 2017 9:14

sander815 wrote:why am i getting these errors?

[email protected]:~/domoboard $ /home/pi/domoboard/bin/python /home/pi/domoboard/server.py -d -c /home/pi/domoboard/example2.conf -d
Error when starting the Flask server: [Errno 13] Permission denied

and if i run it like this
[email protected]:~/domoboard $ python /home/pi/domoboard/server.py -d -c /home/pi/domoboard/test.conf
Traceback (most recent call last):
File "/home/pi/domoboard/server.py", line 4, in <module>
from flaskext.auth import Auth, AuthUser, login_required, logout
ImportError: No module named auth
could you try the following command:

Code: Select all

 sudo /home/pi/domoboard/bin/pip install flask-auth --upgrade 

janvier123
Posts: 34
Joined: Saturday 17 September 2016 22:04
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Domoboard - General Discussions

Post by janvier123 » Wednesday 14 June 2017 17:33

Still doesnt work:

Code: Select all

[email protected]:~/domoboard $ python server.py -c config.conf -d
Traceback (most recent call last):
  File "server.py", line 3, in <module>
    from flask import Flask, g, redirect, url_for, render_template, abort, request, session
ImportError: No module named flask
And then this:

Code: Select all

[email protected]:~/domoboard $ sudo /home/pi/domoboard/bin/pip install flask --upgrade
Requirement already up-to-date: flask in ./lib/python2.7/site-packages
Cleaning up...
Same error as above

wez3
Posts: 50
Joined: Friday 30 December 2016 13:54
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Domoboard - General Discussions

Post by wez3 » Wednesday 14 June 2017 19:16

sander815 wrote:why am i getting these errors?

[email protected]:~/domoboard $ /home/pi/domoboard/bin/python /home/pi/domoboard/server.py -d -c /home/pi/domoboard/example2.conf -d
Error when starting the Flask server: [Errno 13] Permission denied

and if i run it like this
[email protected]:~/domoboard $ python /home/pi/domoboard/server.py -d -c /home/pi/domoboard/test.conf
Traceback (most recent call last):
File "/home/pi/domoboard/server.py", line 4, in <module>
from flaskext.auth import Auth, AuthUser, login_required, logout
ImportError: No module named auth
The first error occurs because your user probably does not have permission to bind to the port specified in the config. Port <= 1024 on Linux requires root privileges. So you need to run "sudo /home/pi/domoboard/bin/python /home/pi/domoboard/server.py -d -c /home/pi/domoboard/example2.conf -d".

The second error occurs because you installed Domoboard within an virtualenv. The auth module is only installed within this virtualenv. Go into your virtualenv with:
cd /<path>/domoboard/
source bin/activate

When calling python (with sudo), it should work.

Martijn85
Posts: 52
Joined: Wednesday 20 January 2016 21:21
Target OS: Raspberry Pi
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Domoboard - General Discussions

Post by Martijn85 » Monday 17 July 2017 21:18

janvier123 wrote:Ive (kinda) fixed the issue with 2 domoticz_temp_charts
Spending countless hours trying to fix it and ending up with a dirty way to have 2 graphs

The issue is:
when calling "ShowTempLog" and console log the content div i got this

Code: Select all

domoticz-chart-block-1
domoticz-chart-block-2
Great, however when calling "AddDataToTempChart(data, $.DayChart_Temp.highcharts(), 1);" and console log "console.log($.DayChart_Temp.highcharts());" i get this:

---------------------------------------------
Object { renderTo: <div#domoticz-chart-block-2>, userOptions: Object, respRules: Array[0], margin: Array[4], spacing: Array[4], bounds: Object, callback: undefined, isResizing: 0, options: Object, axes: Array[3], 47 more… } domoticz.js:1305:8
Object { renderTo: <div#domoticz-chart-block-2>, userOptions: Object, respRules: Array[0], margin: Array[4], spacing: Array[4], bounds: Object, callback: undefined, isResizing: 0, options: Object, axes: Array[3], 51 more… }
---------------------------------------------

It seems that something is remembering the last div and refuse to update/reset it, the way to fix it is: creating a new "period" called it "day2" and renaming all variables from "DayChart_Temp" to "Day2Chart_Temp"

now calling

Code: Select all

ShowTempLog("domoticz-chart-block-2",14,"Serre Temp+Hum", "day2");
Havent tested with

Code: Select all

  [[domoticz_temp_charts]]
    Nest Curr Temp/Hum = 28, day2, temp
seems to work :)

Hello janvier123,

Can you explain this some more. I would love to get this to work!

Must i change something in the code to get this to work?

janvier123
Posts: 34
Joined: Saturday 17 September 2016 22:04
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Domoboard - General Discussions

Post by janvier123 » Monday 17 July 2017 22:45

Its a few file changes, remind me tomorrow will ya? pm or something
Ill upload the changed files, but do remember this is not a very good way to do it, but it works for me :)

Martijn85
Posts: 52
Joined: Wednesday 20 January 2016 21:21
Target OS: Raspberry Pi
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Domoboard - General Discussions

Post by Martijn85 » Sunday 23 July 2017 23:56

janvier123 wrote:Its a few file changes, remind me tomorrow will ya? pm or something
Ill upload the changed files, but do remember this is not a very good way to do it, but it works for me :)
Can you please share the changes! Would be great, thanks :D

janvier123
Posts: 34
Joined: Saturday 17 September 2016 22:04
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Domoboard - General Discussions

Post by janvier123 » Monday 24 July 2017 9:35

oh right ..

Download the 1 zip file and place the files in the following directory's:


domoticz_temp_charts2.html => /home/pi/domoboard/templates/

domoticz.js => /home/pi/domoboard/static/js/

(NOTE: the following is un-tested, since i dont use the real domoboard anymore)

then in your .conf file

Code: Select all

  [[display_components]]
    components = domoticz_temp_charts[1], domoticz_temp_charts[2]
   [[domoticz_temp_charts]]
      [[[1]]]
        Energie = 150, week, energy
      [[[2]]]
        Gas = 151, month, gas
Attachments
Desktop.zip
(7.92 KiB) Downloaded 12 times

Martijn85
Posts: 52
Joined: Wednesday 20 January 2016 21:21
Target OS: Raspberry Pi
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Domoboard - General Discussions

Post by Martijn85 » Monday 24 July 2017 9:45

janvier123 wrote:oh right ..

Download the 1 zip file and place the files in the following directory's:


domoticz_temp_charts2.html => /home/pi/domoboard/templates/

domoticz.js => /home/pi/domoboard/static/js/

(NOTE: the following is un-tested, since i dont use the real domoboard anymore)

then in your .conf file

Code: Select all

  [[display_components]]
    components = domoticz_temp_charts[1], domoticz_temp_charts[2]
   [[domoticz_temp_charts]]
      [[[1]]]
        Energie = 150, week, energy
      [[[2]]]
        Gas = 151, month, gas

Thanks for sharing! :mrgreen:

Then I'm curious which version you are running.. Is that the php version you previously indicated?

godomogo
Posts: 14
Joined: Saturday 02 September 2017 2:46
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Domoboard - General Discussions

Post by godomogo » Saturday 09 September 2017 16:49

I'm getting the following error on startup:

Code: Select all

[email protected]:~/domoboard $ python server.py -c example.conf -d
Traceback (most recent call last):
  File "server.py", line 168, in <module>
    domoticz.checkDomoticzStatus(config)
  File "/home/pi/domoboard/modules/domoticz.py", line 24, in checkDomoticzStatus
    for device in result["result"]:
KeyError: 'result'
I saw a similar error earlier in this thread with api.py that turned out to be a bug that was fixed.

Any ideas about this one?

Thanks!

squandor
Posts: 201
Joined: Saturday 19 December 2015 23:34
Target OS: Raspberry Pi
Domoticz version: 3.5837
Contact:

Re: Domoboard - General Discussions

Post by squandor » Saturday 09 September 2017 16:51

godomogo wrote:
Saturday 09 September 2017 16:49
I'm getting the following error on startup:

Code: Select all

[email protected]:~/domoboard $ python server.py -c example.conf -d
Traceback (most recent call last):
  File "server.py", line 168, in <module>
    domoticz.checkDomoticzStatus(config)
  File "/home/pi/domoboard/modules/domoticz.py", line 24, in checkDomoticzStatus
    for device in result["result"]:
KeyError: 'result'
I saw a similar error earlier in this thread with api.py that turned out to be a bug that was fixed.

Any ideas about this one?

Thanks!
Strange do you have the correct ip filled in into you're configuration?

godomogo
Posts: 14
Joined: Saturday 02 September 2017 2:46
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Domoboard - General Discussions

Post by godomogo » Saturday 09 September 2017 17:08

squandor wrote:
Saturday 09 September 2017 16:51
godomogo wrote:
Saturday 09 September 2017 16:49
I'm getting the following error on startup:

Code: Select all

[email protected]:~/domoboard $ python server.py -c example.conf -d
Traceback (most recent call last):
  File "server.py", line 168, in <module>
    domoticz.checkDomoticzStatus(config)
  File "/home/pi/domoboard/modules/domoticz.py", line 24, in checkDomoticzStatus
    for device in result["result"]:
KeyError: 'result'
I saw a similar error earlier in this thread with api.py that turned out to be a bug that was fixed.

Any ideas about this one?

Thanks!
Strange do you have the correct ip filled in into you're configuration?
Yeah, Domoboard is set up on the Domoticz server. Here's the config:

Code: Select all

[general_settings]
  [[server]]
    url = 192.168.1.90:443                      # IP-address of Domoticz backend
    flask_url = 192.168.1.90:8444               # Please note: this is the internal IP-address including port of the Domoboard server
I presume port 8444 is put into use when server.py is run and that the 8444 can be anything. Is this correct?

godomogo
Posts: 14
Joined: Saturday 02 September 2017 2:46
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Domoboard - General Discussions

Post by godomogo » Saturday 09 September 2017 19:28

[/quote]

Strange do you have the correct ip filled in into you're configuration?
[/quote]

Yeah, Domoboard is set up on the Domoticz server. Here's the config:

Code: Select all

[general_settings]
  [[server]]
    url = 192.168.1.90:443                      # IP-address of Domoticz backend
    flask_url = 192.168.1.90:8444               # Please note: this is the internal IP-address including port of the Domoboard server
I presume port 8444 is put into use when server.py is run and that the 8444 can be anything. Is this correct?
[/quote]

I tried the json URL in this line in a browser and it doesn't work.

Code: Select all

def queryDomoticz(url):
    config = api.getConfig()
    try:
        r = requests.get('http://' + config["general_settings"]["server"]["url"] + '/json.htm' + url,
        auth=(config["general_settings"]["server"].get("user"), config["general_settings"]["server"].get("password")), timeout=5.00)
    except:
        return "{}"
    return r.text
Doesn't work in broswer:
config.conf server url = 192.168.1.90:443
resulting beginnings of the domoticz.py url: http://192.168.1.90:443/json.htm

Changning the config.py url to be just the ip without a port and also adding an "s" to the http in domoticz.py results in this, which works in a browser, but still shows the same error when trying to start things up. Takes longer to error out, but the same error...

https://192.168.1.90/json.htm

Thanks

squandor
Posts: 201
Joined: Saturday 19 December 2015 23:34
Target OS: Raspberry Pi
Domoticz version: 3.5837
Contact:

Re: Domoboard - General Discussions

Post by squandor » Saturday 09 September 2017 19:30

godomogo wrote:
Saturday 09 September 2017 19:28
Strange do you have the correct ip filled in into you're configuration?
[/quote]

Yeah, Domoboard is set up on the Domoticz server. Here's the config:

Code: Select all

[general_settings]
  [[server]]
    url = 192.168.1.90:443                      # IP-address of Domoticz backend
    flask_url = 192.168.1.90:8444               # Please note: this is the internal IP-address including port of the Domoboard server
I presume port 8444 is put into use when server.py is run and that the 8444 can be anything. Is this correct?
[/quote]

I tried the json URL in this line in a browser and it doesn't work.

Code: Select all

def queryDomoticz(url):
    config = api.getConfig()
    try:
        r = requests.get('http://' + config["general_settings"]["server"]["url"] + '/json.htm' + url,
        auth=(config["general_settings"]["server"].get("user"), config["general_settings"]["server"].get("password")), timeout=5.00)
    except:
        return "{}"
    return r.text
Doesn't work in broswer:
config.conf server url = 192.168.1.90:443
resulting beginnings of the domoticz.py url: http://192.168.1.90:443/json.htm

Changning the config.py url to be just the ip without a port and also adding an "s" to the http in domoticz.py results in this, which works in a browser, but still shows the same error when trying to start things up. Takes longer to error out, but the same error...

https://192.168.1.90/json.htm

Thanks
[/quote]

Ok and I assume that you use port 433 instead of 8080?

godomogo
Posts: 14
Joined: Saturday 02 September 2017 2:46
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Domoboard - General Discussions

Post by godomogo » Saturday 09 September 2017 19:50

[/quote]

Ok and I assume that you use port 433 instead of 8080?
[/quote]

Yeah, I'm using port 443. Trying http://192.168.1.90 redirects to https.

squandor
Posts: 201
Joined: Saturday 19 December 2015 23:34
Target OS: Raspberry Pi
Domoticz version: 3.5837
Contact:

Re: Domoboard - General Discussions

Post by squandor » Saturday 09 September 2017 19:52

godomogo wrote:
Saturday 09 September 2017 19:50
Ok and I assume that you use port 433 instead of 8080?
[/quote]

Yeah, I'm using port 443. Trying http://192.168.1.90 redirects to https.
[/quote]

Hmm maybe thats problematic we actually never tested an https installation.

godomogo
Posts: 14
Joined: Saturday 02 September 2017 2:46
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Domoboard - General Discussions

Post by godomogo » Saturday 09 September 2017 20:11

squandor wrote:
Saturday 09 September 2017 19:52
godomogo wrote:
Saturday 09 September 2017 19:50
Ok and I assume that you use port 433 instead of 8080?
Yeah, I'm using port 443. Trying http://192.168.1.90 redirects to https.
[/quote]

Hmm maybe thats problematic we actually never tested an https installation.
[/quote]

Thanks for that... I should've tried without https earlier...

Changed Domoticz to run on 8080 and things are looking better!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests