Best method for getting Appdaemon & HaDashboard working

I have been playing around with Hassio on a raspberry pi, then had a go with a docker install with a ubuntu virtual machine and finally had a go with ubuntu again with a pip installation - unfortunately I have had no success with getting AppDaemon connecting to Home assistant. From what I have seen in a few places, I am not the only one with this issue but there seems to be no common cause.

So for those that do have their dashboards all up and running, can you advise on what your OS and method of install was?

Pc Win 10, pip install for both HA and appdaemon, also rpi3 aio install for HA and pip for appdaemon, HADashboard works fine from both. I will eventually get round to trying it on Hass.io but not for a few months.

Much appreciated @keithh666
I was going to use a NUC that I have for the job but figured that there might be a better way.

Will give it a go. Cheers!

i see all problems about installing appdaemon, and over 90% from them all are problems configuring or people who try things that are not possible.

connection problems always always come because people try to use SSL in 2 servers (dashboard and HA) and try to reach both from the outside.

keep these things in mind before you start:

  1. dashboard was actually written for home use, not for using outside the home network. (so setting up ssl, pasword, etc. can give trouble is some cases)
  2. if you want to use it outside your network, dont try to install lets encrypt inside HA or appdaemon. use a proxyserver like nginx insted
  3. the easiest way is with pip install. make sure you have a clean python 3.5 or higher environment
  4. install inside docker, or with hassio makes that you are dependeing on other people creating a docker that is right for all cases. unless you know your way around docker or addons and can create them yourselve.
  5. using pip, the preffered way is to use virtual environments for both programs. but if you use that its wise to make yourselve familiar with virtual environments.
  6. if you run into trouble installing, open a new topic in the appdaemon section, tell how you installed, make sure you know how to access logs and show them, and show configuration files.
  7. always wise practice is to read the docs about installing. if you dont understand something right, feel free to ask BEFORE you take the action. better do it the right way once then try to solve problems you have created afterwards.

I hope this helps you.

Thanks @ReneTode. Some great advice there.
I was starting with the basics within my local network but was still running into issues. I might have built up to a secure interface to point to the outside world eventually, but the paranoid side of me thinks I would stick with a VPN connection to access it.

Chipping away at a Win10 install as I type; appdaemon is giving me grief with a list of errors when I try to start it, but will confess that I did have Python 2.x installed on this NUC previously so working through the issues.

Will certainly read more about virtual environments with Python. Have enjoyed tinkering with a bit of Python over the recent years so no doubt will be a good learning curve.

Edit: typo/grammar

remember that Win10 isnt the most used and worst tested environment for python programs like AD.
only python 2.x wont do you any good. a 3.5 must be installed and errorless running before you try installing HA/AD.

still learning and little exp? then i advice to use an RPI with noobs clean and newly installed to start with.
its the most used and tested environment with little or no problems. and it comes with a python 3.5 default nowadays.
starting with noobs instead of hassbian makes it advanced enough for inexperienced users, it still gives all freedom, but you will run into little trouble, and when you do there is enough exp. here on the forum to solve it fast.

Totally understand that Win10 is not ideal, but if it meant I could reduce one device sapping power, I thought I would give it a go.

Ironically, I may have been too hasty to switch platforms as I think I might have been misinterpreting the
error
“Error getting state, check Java Console for details”
I figured it was AD not communicating with HA. With the windows install I can see the errors without digging, so I have discovered that my MQTT light switch is causing an error “ValueError: not enough values to unpack (expected 2, got 1)”
The plot thickens…

Down the search engine rabbit hole I go. :rabbit:

running a pc 24/7 will use 100 times more power then closing your pc at night and running a rpi 24/7 :wink:
RPI uses a tiny bit of power compared to a win 10 PC.

thats like switching off a small led light to save power by using an oldfashioned light bulb.

I have the NUC running 24/7 that runs other parts of my home automation (windows only program), as well as being a NAS and license server for my PLC, so adding another raspberry pi would have been adding to the power usage. The NUC draws little power as it is but as you say, not compared to the measly 1 or 2 watts of the RPi.

oke, then its adding :wink:
still we are talking about not even 1 kw a year.
that saving is not even a decent beer in 5 year :wink:

If we are talking beer currency; I am a married man - every beer counts! :smiley:

Discovered my issue was a total PEBCAK problem and I am now elbows deep in MQTT, SNMP and a plethora of other acronyms getting my system set up and loving it.
Went with the Raspberry pi set up in the end (there goes my Chimay Blue for Christmas :wink:)
and it is responsive as well as easy to set up.

For the sake of curiosity, I copied my working install to my Win10 NUC and found it only slightly faster to load. But certainly not enough difference to bias me that way.

What do you recommend re installing Appdaemon with pip3 noting I’ve used virtualenv. Should appdaemon be part of the Home Assistant virtualenv, or should you make a new one?

Background: I’ve current got two virtualenv’s on my pi3 which is running Raspbian. (so I did not use HASS.io, or Haspbian)

  • Home Assistant
  • An area to run python script that brings CurrentCost data in and published it to an MQTT

(have to admit, being new to raspberry pi, python, HA, it’s a bit of a nuisance having to jump back and forth between virtualenv’s activating/deactivating)

You use pip to install packages within a virtualenv, so if it is working now, you should be fine.

Best practice would be to let them have separate environments, for the the odd occasion when they demand different packages.

But I have used the same venv up until V2. Currently I have created a separate one for V3 because (for a short while at least) there was a clash with HA.

I think there are some helper scripts around the internet that can activate/deactive virtual environments as you change directories, but I can’t find a link at the moment. I just use separate windows when I need to.

i second what GP says.

i dont use a venv, but in the last period from AD 3 there is a small problem.
i still can work around it though, by making sure i always update HA after i have made an AD update

ok thanks - been looking at virtualenvwrapper which looks good too

Question - So you don’t really need to run different environments as different users then do you? Well, even though it may be best practice, this is part of the “it’s a bit of a nuisance”. I did setup my two environments with different users so it’s a bit confusing knowing whether to have to “su” to change users when changing between virtual environments.

i believe you can have several environments with 1 user, but like i said i avoided it because of the nuisances :wink:
so i am not sure.

Each user can have as many virtual environments as it needs.