Info API disabled..?

Have just installed HADaboard om my RP3 running Homeassistant 0.63.3

What does it mean that INFO API is disabled?

pi@hassbian:~ $ appdaemon -c /home/pi/.homeassistant/conf
2018-02-20 00:07:57.514087 INFO AppDaemon Version 2.1.12 starting
2018-02-20 00:07:57.514681 INFO Configuration read from: /home/pi/.homeassistant /conf/appdaemon.yaml
2018-02-20 00:07:57.971532 INFO Starting Apps
2018-02-20 00:07:58.270345 INFO Got initial state
2018-02-20 00:07:58.271368 INFO App initialization complete
2018-02-20 00:07:58.272086 INFO Starting dashboard
2018-02-20 00:07:58.283058 INFO API is disabled
2018-02-20 00:07:58.512439 INFO Connected to Home Assistant 0.63.3

Could that be the reason why I cant connect to the lights?

lampe_sub:
  widget_type: light
  entity: light.lampe_sub
  title: Lampe på sub

In HADaboard the lamp icon shows up and changes color when I “turn it on/off”, but the lamp stays off.

lampeavpa

API disabled means that you didnt activate the api server. (a server that can be used to reach appdaemon from inside other programs)

API has nothing to do with the dashboard.

is there anything else in the logs?
did you set an error log in appdaemon.yaml that you can look at?
how does your complete dashboard look?
is there an error in the java console?

Appdaemon.yaml

HASS:
ha_url: https://xxxxxxxxxx.duckdns.org:8123
ha_key: xxxxxxxxxx
AppDaemon:
logfile: STDOUT
errorfile: STDERR
threads: 10
api_ssl_certificate: /etc/letsencrypt/live/xxxxxxxxxx.duckdns.org/fullchain.pem
api_ssl_key: /etc/letsencrypt/live/xxxxxxxxxx.duckdns.org/privkey.pem
HADashboard:
dash_url: https://myinternalip.duckdns.org:5050

java

Im a noob so im not sure how to find STDOUT and STDERR :frowning:

The device trackers dos not work - always at home…

STDOUT and STDERR make things go to the screen or the logs from hassbian.
you can set any logfile on those place (just make sure it is on a place where appdaemon has writing rights)

if you didnt make a copy paste error then your dash_url is not a valid url.

i wanted to see what is in the dashboard file, but i think you have an error somewhere in your setup.
best way to check is this:
close appdaemon
set your logfiles so you can view and copy them:

logfile: /home/pi/.homeassistant/conf/appdaemon.log
errorfile: /home/pi/.homeassistant/conf/appdaemonerror.log

start appdaemon
look at both files and copy that here (if it doesnt give you a clue if something is wrong)

Something went wrong so I had to reinstall HA from backup, and then install Appdameon.

lys
I can not turn on/off the lights in HADashboard, but it recives info about the lights from HA when I refresh.

Any suggestions for what might be wrong :face_with_monocle:
Another thing… I can only reach the dashboard with local ip

appdameon.yaml
HASS:
ha_url: https://xxxxxxxxxx.duckdns.org:8123
ha_key: xxxxxxxx
AppDaemon:
logfile: /home/pi/.homeassistant/conf/appdaemon.log
errorfile: /home/pi/.homeassistant/conf/appdaemonerror.log
threads: 10
api_ssl_certificate: /etc/letsencrypt/live/xxxxxxxxxx.duckdns.org/fullchain.pem
api_ssl_key: /etc/letsencrypt/live/xxxxxxxxxx.duckdns.org/privkey.pem
HADashboard:
dash_url: https://xxxxxxxxxx.duckdns.org:5050

appdaemon.log

2018-02-21 18:31:26.871449 INFO AppDaemon Version 2.1.12 starting
2018-02-21 18:31:26.874960 INFO Configuration read from: /home/pi/.homeassistant/conf/appdaemon.yaml
2018-02-21 18:31:26.892889 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-21 18:31:32.141268 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-21 18:31:37.176948 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-21 18:31:42.211705 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-21 18:31:47.250544 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-21 18:31:52.285669 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-21 18:32:04.536193 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-21 18:32:09.578211 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-21 18:32:14.921108 INFO Starting Apps
2018-02-21 18:32:15.243238 INFO Got initial state
2018-02-21 18:32:15.245194 INFO App initialization complete
2018-02-21 18:32:15.246663 INFO Starting dashboard
2018-02-21 18:32:15.265340 INFO API is disabled
2018-02-21 18:32:15.533459 INFO Connected to Home Assistant 0.63.3
2018-02-21 18:32:15.943155 INFO function [get_dashboard] finished in 160 ms
2018-02-21 18:32:16.219234 INFO New dashboard connected: Main
2018-02-21 18:32:23.876383 INFO New dashboard connected: Main Panel
2018-02-21 18:32:25.188903 INFO function [get_dashboard] finished in 76 ms
2018-02-21 18:32:25.201393 INFO Dashboard disconnected
2018-02-21 18:32:25.375213 INFO New dashboard connected: Main

appdaemonerror.log is empty

permission

main.dash

     title: Main 
       widget_dimensions: [120, 120] 
       widget_margins: [5, 5] 
       columns: 11 

    clock: 
      widget_type: clock 

    weather: 
      widget_type: weather 
      units: "°C" 

    lampe_sub:
      widget_type: light
      entity: light.lampe_sub
      title: Lampe på sub

    gulv_lampe:
      widget_type: light
      entity: light.gulvlampe
      title: Gulvlampe

    reload:
      widget_type: reload 

    layout: 
      - clock(2x1), lampe_sub(1x1), gulv_lampe(1x1)
    #  - weather(3x3)
      - reload(1x1)

unless you have setup NGINX correctly, its impossible to reach HA AND appdaemon with https.
the dash_url should be something like:
dash_url: http://your_ip:5050

nginx should redirect the outside url to that address
but lets encrypt must not be inside the ha configuration and HA should also have a local IP.

if you dont want nginx, you only can use dasjboard with local ip and then the ha_url should be without port.

I have no idea what NGINX is :slight_smile: So I dont think it is installed :slight_smile:
Do you have any idea what can be wrong with the lights?
I can not turn on or off the lights useing HADashboard. If I turn on or dimm the light in HA, and reload HADshboard it shows the correct status.
Looks like HADashboard can recieve but not send information.

i was afraid of that.
what is wrong is that your configuration is wrong.

like i said you need to change your appdaemon.yaml:

dash_url: http://your_ip:5050
ha_url: https://xxxxxxxxxx.duckdns.org #NO PORT!

Changed appdaneon and restartet RP3. Now I cant open HADashboard
bilde

HASS: 
  ha_url: https://xxxxxxxxxx.duckdns.org
  ha_key: xxxxxxxx
AppDaemon: 
  logfile: /home/pi/.homeassistant/conf/appdaemon.log 
  errorfile: /home/pi/.homeassistant/conf/appdaemonerror.log 
  threads: 10
  api_ssl_certificate: /etc/letsencrypt/live/xxxxxxxxxx.duckdns.org/fullchain.pem
  api_ssl_key: /etc/letsencrypt/live/xxxxxxxxxx.duckdns.org/privkey.pem
HADashboard: 
  dash_url:  http://10.0.0.91:5050

are all your devices in your network starting with 10.0.0 ?
try using the IP from the RPI. (the address that your router tells that the RPI has.)

Yes, all my devises starts with 10.0.0.
10.0.0.91 is to my RPI,
Do I need to forvard port 5050 on my router?

Testing appdeamon gives me this:

pi@hassbian:~/.homeassistant/conf $ appdaemon -c /home/hass/.homeassistant/conf

Traceback (most recent call last):
File “/usr/local/bin/appdaemon”, line 11, in
sys.exit(main())
File “/usr/local/lib/python3.5/dist-packages/appdaemon/admain.py”, line 198, in main
config.read_file(open(config_file_conf))
TypeError: invalid file: None

And appdeamon.log:
2018-02-21 22:24:20.544832 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-21 22:26:38.784904 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-21 22:28:57.024824 WARNING Unable to connect to Home Assistant, retrying in 5 seconds

I can open HADashboard (on 10.0.0.91:5050) when I add :8123 to my ha_url. But without 8123 site cant be opend.

oke, sorry then thats how you configured HA.

then you need to use:

dash_url: http://your_ip:5050
ha_url: https://xxxxxxxxxx.duckdns.org:8123

and your dashboards should be reachable with
http://your_ip:5050/dashboardname

Next problem is that nothing happens when I try to switch on/off the lights within HADasboard.
bilde2

If I set “lampe på sub” to 70% and “Gulvlampe” to 80% in HomeAssistant, and reload HADashboard it receives the correct values.
Seems like HADashboard only can receive info, but not send info to HA.

Why? :cold_sweat:

if you did install the right appdaemon addon this should work as normal.

are there any errors in the java console after you loaded the dashboard?
do you use google chrome to test?

Yes, Im use chrome, and there is no errors in java console.
Maybe I have to reinstall everything… one more time? :sob:

i dont think that would bring anything if you dont know what is wrong.
is there anything in the logs?

Appdeamonerror.log is empty.

Appdeamon.log
2018-02-21 22:35:51.744858 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-21 22:37:00.280595 INFO AppDaemon Version 2.1.12 starting
2018-02-21 22:37:00.284010 INFO Configuration read from: /home/pi/.homeassistant/conf/appdaemon.yaml
2018-02-21 22:37:00.302899 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-21 22:37:05.550358 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-21 22:37:10.596134 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-21 22:37:15.630164 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-21 22:37:20.666574 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-21 22:37:25.701258 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-21 22:37:38.510688 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-21 22:37:43.556556 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2018-02-21 22:37:48.894552 INFO Starting Apps
2018-02-21 22:37:49.200096 INFO Got initial state
2018-02-21 22:37:49.201378 INFO App initialization complete
2018-02-21 22:37:49.202478 INFO Starting dashboard
2018-02-21 22:37:49.217114 INFO API is disabled
2018-02-21 22:37:49.500252 INFO Connected to Home Assistant 0.63.3
2018-02-21 22:38:07.526035 INFO function [get_dashboard] finished in 115 ms
2018-02-21 22:38:07.788917 INFO New dashboard connected: Main
2018-02-21 22:50:30.778655 INFO function [get_dashboard] finished in 128 ms
2018-02-21 22:50:30.797794 INFO Dashboard disconnected
2018-02-21 22:50:31.115983 INFO New dashboard connected: Main
2018-02-21 23:15:06.552382 INFO function [get_dashboard] finished in 113 ms
2018-02-21 23:15:06.577074 INFO Dashboard disconnected
2018-02-21 23:15:06.926655 INFO New dashboard connected: Main
2018-02-21 23:33:26.654376 INFO function [get_dashboard] finished in 134 ms
2018-02-21 23:33:26.675023 INFO Dashboard disconnected
2018-02-21 23:33:27.007037 INFO New dashboard connected: Main

first i want to know if there are any subdirectories created in:
/home/pi/.homeassistant/conf/compiled
and if there are files in there.

and we can get some more info.
in the HADashboard section from your appdaemon.yaml add this line:

  accessfile:/home/pi/.homeassistant/conf/dash_acces.log
  dash_compile_on_start: 1

close appdaemon
close the dashboard
delete the existing logs
delete the files in the subdirs from

  • /home/pi/.homeassistant/conf/compiled/js
  • /home/pi/.homeassistant/conf/compiled/html
  • /home/pi/.homeassistant/conf/compiled/css

restart appdaemon
open the dashboard
try some buttons
check all logs

Compiled

  • css
    • default
      • main_application.css
  • html
    • default
      • main_body.html
      • main_head.html
  • javascript
    • default
      • main_init.js
    • application.js

Deleted these files.

Added this to appdaemon.yaml:
accessfile:/home/pi/.homeassistant/conf/dash_acces.log
dash_compile_on_start: 1

Closed dashboard and deleted loggfiles: appdeamon.log and appdeaminerror.log

Then sudo reboot

After that I can not open HADashboard (at 10.0.0.91:5050/main) anymore.