Git Product home page Git Product logo

Comments (14)

vkorn avatar vkorn commented on July 29, 2024

Could you please try to change ha_url and remove ssl_cert/key options?

ha_url: http://172.17.0.1:8123

from hassio-addons.

dellablue avatar dellablue commented on July 29, 2024

just tried this config and still have same problem:

AppDaemon:
  cert_verify: False
  logfile: STDOUT
  errorfile: STDERR
  threads: 10
  app_dir: /config/hadaemon/apps
HASS:
  ha_url: http://172.17.0.1:8123
  ha_key: STRONGPASS
  # ssl_certificate: '/ssl/fullchain.pem'
  # ssl_key: '/ssl/privkey.pem'
HADashboard:
  dash_url: http://cp.local.io
  dash_dir: /config/hadaemon/dashboards

from hassio-addons.

vkorn avatar vkorn commented on July 29, 2024

And you're sure that port is 8123 and password is correct? Because 172.17.0.1 is internal network and it's always accessible, so issues could be with port/password only

from hassio-addons.

dellablue avatar dellablue commented on July 29, 2024

Double checked the password and it matches the api_password for home assistant. Not sure how to check if port is correct. But I can access HA via https://192.168.1.25:8123/ and if I SSH into HASSIO via the plugin, I can ping 127.17.0.1 and 127.17.0.1:8123.

from hassio-addons.

vkorn avatar vkorn commented on July 29, 2024

Hm, just to make, could you please perform last check?
Using ssh plugin, make sure that curl is installed

apk add curl

and call

curl -H "x-ha-access: YOUR_STRONGPASS" http://172.17.0.1:8123/api/history/period

Are you getting long JSON grid or 401 error?

from hassio-addons.

dellablue avatar dellablue commented on July 29, 2024

addon_core_ssh:/# apk add curl
WARNING: Ignoring APKINDEX.84815163.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.24d64ab1.tar.gz: No such file or directory
OK: 44 MiB in 39 packages
addon_core_ssh:/# curl -H "x-ha-access: YOUR_STRONGPASS" http://172.17.0.1:8123/api/history/period
curl: (52) Empty reply from server

from hassio-addons.

vkorn avatar vkorn commented on July 29, 2024

So, this is basically the issue. I'm not sure what's your configuration and whether you've modified default resinos network config but ha is not responding on this address/port.
What's your server_port in ha http section configuration?

from hassio-addons.

dellablue avatar dellablue commented on July 29, 2024

the only change I made to the resinos network config was to change the default interface from wlan0 to eth0 since I use Ethernet to connect to my Raspberry Pi. As for my HA config, I don't specify a server_port. Here is the relevant excerpt from my HA config:

homeassistant:
  name: Home
  latitude: !secret home_latitude
  longitude: !secret home_longitude
  elevation: !secret home_elevation
  unit_system: imperial
  time_zone: America/Chicago
  customize: !include_dir_merge_named customizations

http:
  api_password: !secret api_password
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem
  trusted_networks:
    - 192.168.1.0/24
  ip_ban_enabled: True
  login_attempts_threshold: 5

updater:
  include_used_components: true
discovery:
conversation:
history:
recorder:
  db_url: mysql://hass:[email protected]/homeassistant
logbook:
sun:
frontend:
config:

from hassio-addons.

vkorn avatar vkorn commented on July 29, 2024

Oh, it seems that you're serving https right from ha, my bad could you please run curl again?

curl -k -H "x-ha-access: YOUR_STRONGPASS" https://172.17.0.1:8123/api/history/period

If it works, you need to put
ha_url: https://172.17.0.1:8123

from hassio-addons.

dellablue avatar dellablue commented on July 29, 2024

The curl command worked...got a huge data dump of my HA logfile.

But making it https, still didn't work. Config below:

AppDaemon:
  cert_verify: False
  logfile: STDOUT
  errorfile: STDERR
  threads: 10
  app_dir: /config/hadaemon/apps
HASS:
  ha_url: https://172.17.0.1:8123
  ha_key: STRONGPASS
HADashboard:
  dash_url: http://cp.local.io
  dash_dir: /config/hadaemon/dashboards

Not sure if it helps but prior to using HASSIO, I was using HADashboard successfully on same RPI as HA with this config:

AppDaemon:
  threads: 10
  app_dir: /home/pi/appdaemon/conf/apps
  logfile: /home/pi/appdaemon/appdaemon.log
  errorfile: /home/pi/appdaemon/appdaemon_errorfile.log
  cert_verify: False 
HASS:
  ha_url: https://192.168.1.25:8123
  ha_key: STRONGPASS
  cert_verify: False
  ssl_certificate: '/etc/letsencrypt/live/XXX.duckdns.org/fullchain.pem'
  ssl_key: '/etc/letsencrypt/live/XXX.duckdns.org/privkey.pem'
  disable_apps: 1
#Apps
hello_world:
  module: hello
  class: HelloWorld 
HADashboard:
  dash_url: http://192.168.1.25:5050

from hassio-addons.

vkorn avatar vkorn commented on July 29, 2024

cert_verify means something only on AppDaemon level. You can try to use https://192.168.1.25:8123 but it shouldn't make any difference, as we've checked internal network availability

I'm kinda out of ideas. Try to do following:
ssh to host os (not ssh plugin, but directly to the resin) look at the containers list and get all logs

docker ps
docker logs -f CONTAINER_ID_OF_APP_DAEMON

There might be more details

from hassio-addons.

vkorn avatar vkorn commented on July 29, 2024

There was an issue some time ago with self-signed certs, but you're using LE, so you should be fine. Anyway, as a last resort you could try following:

Modify run.sh to execute

appdaemon -c "$CONFIG_DIR" --commtype "SSE"

bump version in config and rebuild plugin (if you're using pre-built image you'll need to stop it first and then build locally). If it will help, I'll add an option to addon config. It was there before but I've removed it after appdaemon was patched.

from hassio-addons.

dellablue avatar dellablue commented on July 29, 2024

Thanks for helping...couldn't get it to work. FYI, I wasn't able to try that last step because I don't know how to modify the run.sh file.

from hassio-addons.

vkorn avatar vkorn commented on July 29, 2024

You need to do following:

  1. Clone/download this repo
  2. Modify run.sh from appdaemon folder
  3. Copy appdaemon folder to the samba share /addons
  4. In HASSIO ui hit update plugins, then you'll see local one
  5. Hit install -- it will take ~10 mins to build

from hassio-addons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.