Community Hass.io Add-on: AppDaemon 3

the hassio front end or the home assistant frontend?

I may have spoken incorrectly. When I go to https://hassio.local:8123 and it shows all of the cards and status information, there is a card with the sun position and the current weather. This is set correctly.

Edit: I am running hassio. I tried relinking /etc/localtime to my timezone from the ssh instance but that file was not saved after a reboot. From what I gather, hassio runs in UTC internally by design. I saw you allude to this fact in another post you made. Is this the case? This is why I did the local timezone workaround and conversion with the naive times in Python in the OccuSim program (as an optional parameter).

I am very new to this program and I’m learning every day.

Not sure since when, but now I have this in log (was working one week ago).
HASSIO 0.81.6

11-11 00:14:19.600031 WARNING AppDaemon: HASS: Disconnected from Home Assistant, retrying in 5 seconds
2018-11-11 00:14:24.633839 WARNING AppDaemon: HASS: Disconnected from Home Assistant, retrying in 5 seconds
2018-11-11 00:14:

i really dont know about hassio, but i know there are always several places to set the time:
device setting
operating system (hassio)
home assistant
appdaemon itself

normally AD takes the settings from HA and if there are problems its mostly HA settings.
but i have also seen that people had their devicesettings wrong.

if the logtime is set to UTC then there is a problem in the HA settings or devicesettings.

@Klagio that means that appdaemon cant connect to homeassistant. did you update anything?

Hassio to 0.81.6 and appdaemon hassio addon

i dont know if your settings are automaticly changed.
but appdaemon now uses long lived token and not the ha api key anymore.
if you update something its always wise to checkout what has changed and if there are breaking changes.

i cant be sure what is changed in your settings, all i can do is first show you the docs for the configuration from appdaemon, and if you dont know what is wrong go over it with you.

i assume you have tried restarting appdaemon, home assistant, your device and you did go through the logs afterwards?

This is exactly what I’m seeing. I’m having to compensate for every call to date or time in the code. I have the times fixed and I’m working on the dates, but I think that I’m really spinning my wheels (working too hard when there is a better fix).

I can continue to write wrapping code but I think that the AppDaemon time should be in my configured HA timezone.

As far as I can tell, I have a valid appdaemon.yaml file. It is connecting to Home Assistant. I tried changing it just now to the ip address but I could not connect. The token is as you described. I have rebooted and restarted all the services I know how to do.

I have tried putting in those time_zone, latitude, etc. values but they didn’t help anyway, so I removed them. The appdaemon.yaml file is as I posted it before with those localization values removed.

It seems like the timezone in AppDaemon should be set either by those hard coded values that I duplicated from my HA configuration.yaml file but they don’t seem to have any effect.

I’m not sure what to do at this point other than to further correct the Python script for a local timezone.

I do appreciate your help in this.

like i said, if you have UTC time in AD log then its not something from AD.
what about the logtimes in homeassistant?
are they also in UTC time?

if so then you need to find how to change your device time settings.

The logtimes in home assistant are shown in my local timezone.

I’ll look at this again in the morning. Thanks again for your help.

Please use http://hassio/homeassistant in the ha_url option of your appdaemon configuration.

I put
http://192.168.1.xx:8123

and
token: xxxxxc

and now its working

@ReneTode:

Okay, I generated a long-lived access token from my profile, thinking that was the reason AppDaemon isn’t communicating with HA, but the token keeps being overwritten with a shorter token that seems to be auto-generated. This token seems to be working, and it is changing every time I change the token to a long-lived one.

I am running with a LetsEncrypt certificate. I access HA with the https://192.168.1.48:8123 URL. I tried using https://127.0.0.1:8123, https://hassio.homeassistant, and my real URL and none of these would work. I tried putting cert_path in the HASS section. When I did these, there were communication errors in the log. Setting http://hassio/homeassistant was the only way I could set it up without errors.

With the correct http://hassio/homeassistant ha_url I am still not able to turn a light on and off with the occusim script, even though it shows it is doing so in the log. I have verified that my script works on its own. I will do further testing but I’m pretty sure that my instance of AppDaemon is not talking to HA.

Like you said, I think there is a bigger communication error going on here. I suppose I have something configured incorrectly but I can’t seem to figure out what it is.

i assumed that you had a working appdaemon and that you were sure about that from the logs and that you had trouble with time.
i am sorry about my wrong assumption.

you are running hassio. so you should use http://hassio/homeassistant and hassio takes care of the tokens for you.
please restart everything and show the log from appdaemon after restart (beginning to end)

Here is the log: https://ghostbin.com/paste/yjk6d

I can’t see anything wrong with it but I hope that you can!

@ReneTode

Here is a test app I just wrote. It fails to post a message in my syslog. I have this in my configuration.yaml:

# Send notifications to syslog      
notify:
  - platform: syslog

Perhaps my configuration is wrong there, too? I thought it would post the notification.

https://ghostbin.com/paste/hg7qc

there is nothing wrong with appdaemon. its up and running and connected with home assistant.
i think we better take this to PM or discord.

Again, you should use http://hassio/homeassistant in ha_url.

Without token: ?

no leave the token