Unable to connect to frontend

Can you connect using your lan address eg https://192.168.0.10:8123 ?

Your browser will throw a security error but you should be able to bypass that and proceed.

Do you have a fixed IP set on your router with the correct port number forwarding to it from the Wan ?

My FritzBox has the Raspberry Pi set to always be given the same IP address. 124.168.178.122

I can Putty into this address. If I try to go to https://124.168.178.122:8123/states (or without the /states) I get a “Can’t connect as it took too long to respond.”

I PuTTY’ed in and re-ran the update steps as per https://www.home-assistant.io/docs/installation/hassbian/common-tasks/#update-home-assistant which were:

```
$ sudo systemctl stop [email protected]
$ sudo -u homeassistant -H -s
$ source /srv/homeassistant/bin/activate
$ pip3 install --upgrade homeassistant
$ exit
$ sudo systemctl start [email protected]
```

I did this in case it was something wrong with the last update attempt or if there had been a bug and there was a later update.

Both whatismyip and duckdns show my ISP assigned IP as being the same. I haven’t made any changes to my router. The only change I can think of between when I last knew it was working to when it wasn’t was the last update.

If you cannot log into it with the lan address then you won’t get in via the wan. Have you run the checker against your config to see if there are any errors that need fixing?

Does your HA log show any issues ?

have you added ssdp: to your config?
if i add it, and reboot HassOS, frontend never loads, and with no issues in log file
only happens on full reboot, not a restart, issue already opened on github

Yamlint.com says my configuration is ok.

It reads:

2019-06-12 14:10:13 ERROR (Thread-2) [homeassistant.util.yaml.loader] while parsing a block collection
in “/home/homeassistant/.homeassistant/configuration.yaml”, line 288, column 7
expected , but found ‘’
in “/home/homeassistant/.homeassistant/configuration.yaml”, line 295, column 8
2019-06-12 14:10:13 ERROR (MainThread) [homeassistant.bootstrap] Error loading /home/homeassistant/.homeassistant/configuration.yaml: while parsing a block collection
in “/home/homeassistant/.homeassistant/configuration.yaml”, line 288, column 7
expected , but found ‘’
in “/home/homeassistant/.homeassistant/configuration.yaml”, line 295, column 8

Here’s that section of my configuration.yaml file:

  - alias: 'Someone At The Front Door Nighttime'
    trigger:
      platform: template
      value_template: '{{states.switch.front_door_15.attributes.device_tripped}}'
    # The Condition Syntax from https://www.home-assistant.io/docs/scripts/conditions/
    condition:
      condition: time
      # At least one of the following is required.
      before: '08:00:00'
      after: '20:00:00'
      # Text to Speech
    action:
      - service: tts.google_say
        entity_id: media_player.nighttime_doorbell
        data:
          message: 'Motion Detected At The Front Door'
    # Bedroom Light On - Red at Full Brightness
      - service: light.turn_on
    #   entity_id: light.yeelight_bedside_7811dc9201bd 
        entity_id: light.yeelight_bslamp1_7811dc9201bd
    data:
           brightness: 200
           color_name: Red         

The reason the entity_id near the end was hashed out was because I noticed my lamp wasn’t coming on when I tested it (it was working previously and I assumed an update had broken it). On looking at my entity list, it appeared the ID had changed, so I copied the line, hashed out the original (in case I needed to know what it originally was) and put in the new one. Hitting the trigger button on the web page didn’t work and I hadn’t got around to further testing before this issue of the front end not loading.

According to Notepad++, line 288 is the one that reads:

  - service: tts.google_say

Line 295 is the one that reads:

    entity_id: light.yeelight_bslamp1_7811dc9201bd

With regards to this section, I can’t see what’s different (syntax wise) between it and the previous section which reads:

>   - alias: 'Someone At The Front Door Daytime'
>     trigger:
>       platform: template
>       value_template: '{{states.switch.front_door_15.attributes.device_tripped}}'
>     # The Condition Syntax from https://www.home-assistant.io/docs/scripts/conditions/
>     condition:
>       condition: time
>       # At least one of the following is required.
>       after: '08:00:00'
>       before: '20:00:00'
>       # Text to Speech
>     action:
>       - service: tts.google_say
>         entity_id: media_player.whole_house_doorbell
>         data:
>           message: 'Motion Detected At The Front Door'
>     # Bedroom Light On - Red at Full Brightness
> #      - service: light.turn_on
> #       entity_id: light.yeelight_bedside_7811dc9201bd 
> #        data:
> #           brightness: 254
> #           color_name: Red

I had to Google what SSDP was (found out it was “Simple Service Discovery Protocol”). I haven’t added that.

Sorry if the replies are late. This week I’m on early shift at work so up at 3:30am and my afternoons being free mean I’ve got to take my daughter to after-school activities and then it’s early to bed. In other words, not much time to play. :slight_smile:

A YAML checker will not tell you exactly what is wrong , you need to check the config against HA using the built in checker

sudo -u homeassistant -H -s
source /srv/homeassistant/bin/activate
hass --script check_config

The help page for Hassbian is here

Also your google tts is wrong. This platform renamed to google_translate from google since release 0.92.

See here for google tts docs

That’s indeed interesting… My tts looks like this:

tts:
  - platform: google_translate
    service_name: google_say

The google_translate was added in 0.92 as you say but it didn’t change the service_name and I didn’t either. I see in the docs it’s not there either so I guess I should delete it however it works as is with no errors and I do have a service.google_say

and then all my mini-media tts’s stopped working till I changed then from google to google_translate!

The console shows:

Testing configuration at /home/homeassistant/.homeassistant
ERROR:homeassistant.util.yaml.loader:while parsing a block collection
  in "/home/homeassistant/.homeassistant/configuration.yaml", line 288, column 7
expected <block end>, but found '<block mapping start>'
  in "/home/homeassistant/.homeassistant/configuration.yaml", line 295, column 8
Failed config
  General Errors:
    - Error loading /home/homeassistant/.homeassistant/configuration.yaml: while parsing a block collection
  in "/home/homeassistant/.homeassistant/configuration.yaml", line 288, column 7
expected <block end>, but found '<block mapping start>'
  in "/home/homeassistant/.homeassistant/configuration.yaml", line 295, column 8

The next part of https://www.home-assistant.io/docs/installation/hassbian/common-tasks/#manually-launch-home-assistant says to read the home assistant log file. Following the instructions, it shows:

2019-06-12 14:10:13 ERROR (Thread-2) [homeassistant.util.yaml.loader] while par$
  in "/home/homeassistant/.homeassistant/configuration.yaml", line 288, column 7
expected <block end>, but found '<block mapping start>'
  in "/home/homeassistant/.homeassistant/configuration.yaml", line 295, column 8
2019-06-12 14:10:13 ERROR (MainThread) [homeassistant.bootstrap] Error loading $
  in "/home/homeassistant/.homeassistant/configuration.yaml", line 288, column 7
expected <block end>, but found '<block mapping start>'
  in "/home/homeassistant/.homeassistant/configuration.yaml", line 295, column 8

I’m a little confused. Yes I know that’s not surprising :slight_smile:

You say the platform renamed from “google” to “google_translate” but I never used the line: platform: google. I used platform: template

The linked page for the TTS docs say to write:

tts:
  - platform: google_translate

My confusion relates to where, and how, does my script get changed. I’m really sorry for being thick.

Currently, (looking at just my “Daytime” section), it reads:

  - alias: 'Someone At The Front Door'
    trigger:
      platform: template
      value_template: '{{states.switch.front_door_15.attributes.device_tripped}}'
    # The Condition Syntax from https://www.home-assistant.io/docs/scripts/conditions/
    condition:
      condition: time
      # At least one of the following is required.
      after: '08:00:00'
      before: '20:00:00'
      # Text to Speech
    action:
      - service: tts.google_say
        entity_id: media_player.whole_house_doorbell
        data:
          message: 'Motion Detected At The Front Door'
    # Bedroom Light On - Red at Full Brightness
#      - service: light.turn_on
#       entity_id: light.yeelight_bedside_7811dc9201bd 
#        data:
#           brightness: 254
#           color_name: Red

Because you say the platform should be changed to google_translate, should the top part read:

  - alias: 'Someone At The Front Door'
    trigger:
      platform: google_translate
      value_template: '{{states.switch.front_door_15.attributes.device_tripped}}'

or should I be changing the “Action” setting part of the trigger-condition-action from:

action:
  - service: tts.google_say
    entity_id: media_player.whole_house_doorbell
    data:
      message: 'Motion Detected At The Front Door'

to

action:
  - platform: google_translate
    entity_id: media_player.whole_house_doorbell
    data:
      message: 'Motion Detected At The Front Door'

Anyway, getting back to the error in the logs, it says it expected a block end at line 288 but found a block mapping start. I know a block mapping start is indicated by the dash -, but not sure what a block end would look like.

Furthermore, since my nighttime section (which contains line 288) is virtually the same as the “daytime” section above it other than the 8am to 8pm section and the name of the speaker group, why is there no errors with line 266??

Thanks for all your help guys. I really am trying to understand the coding.

Hello,

I am in work at the moment so can only give a little help. What happens if you remove all your automations (temporarily) then try and restart Hassbian ? If that works then the error is 100% with your automation and we can dig further then.

Just noticed that you only have 1 action on your daytime automation therefore you do not need the dash before the service as the bedroom light is rem’d out

change this

   action:
  - service: tts.google_say
    entity_id: media_player.whole_house_doorbell
    data:
      message: 'Motion Detected At The Front Door'

to this

action:
    service: tts.google_say
    entity_id: media_player.whole_house_doorbell
    data:
      message: 'Motion Detected At The Front Door'

Looking at my config under services (far left of Developer Tools) and it shows tts.google_translate_say

Does yours show the same as mine ?

google%20ttsgoogle%20tts2

I’ve removed the dash and then PuTTY’ed in and ran the following commands:

```
sudo systemctl stop [email protected]
```

then

```
sudo systemctl start [email protected]
```

I then mapped to the Hassbian via Network on my Windows PC and the Home-Assistant.log still shows the same error message (with the current date/time stamp) showing the issue with line 288.

You said the daytime section needed the dash removed because there was only one action. In the Nighttime one, I have 2 actions, so I gather the dashes stay. It currently reads:

  - alias: 'Someone At The Front Door Nighttime'
    trigger:
      platform: template
      value_template: '{{states.switch.front_door_15.attributes.device_tripped}}'
    # The Condition Syntax from https://www.home-assistant.io/docs/scripts/conditions/
    condition:
      condition: time
      # At least one of the following is required.
      before: '08:00:00'
      after: '20:00:00'
      # Text to Speech
    action:
      - service: tts.google_say
        entity_id: media_player.nighttime_doorbell
        data:
          message: 'Motion Detected At The Front Door'
    # Bedroom Light On - Red at Full Brightness
      - service: light.turn_on
    #   entity_id: light.yeelight_bedside_7811dc9201bd 
       entity_id: light.yeelight_bslamp1_7811dc9201bd
    data:
           brightness: 200
           color_name: Red        

It is this section that contains line 288 which seems to be the issue regarding the log file.

Since I can’t access the front end at the moment, either via https://mydomain.duckdns.org/states; https://192.168.178.122/states; https://mydomain.duckdns.org:8123/states; or https://192.168.178.122:8123/states; I can’t check :frowning:

I noticed I had a section up the top that read:

# Text to speech
    tts:
      - platform: google_translate
        service_name: google_say

I tried that and now the log file reads"

2019-06-14 15:08:14 WARNING (MainThread) [homeassistant.components.http] Configuring api_password via the http component has been deprecated. Use the legacy api password auth provider instead. For instructions, see https://www.home-assistant.io/docs/authentication/providers/#legacy-api-password
2019-06-14 15:08:14 WARNING (MainThread) [homeassistant.components.http.auth] legacy_api_password support has been enabled.
2019-06-14 15:08:19 ERROR (MainThread) [homeassistant.setup] Setup failed for introduction: Integration not found.

I found that the last error means I need to remove the line:

# Show links to resources in log and frontend
introduction:

I hashed it out and restarted the services and the that line is now gone from the log file.

EDIT:

I looked at the web page the error log suggested and I think mine is set ok.

It currently reads (with adjustments for privacy/security)

http:
  # Secrets are defined in the file secrets.yaml
  # api_password: !secret http_password
  api_password: MyPassw0rd
  # Uncomment this if you are using SSL/TLS, running in Docker container, etc.
  ssl_certificate: /etc/letsencrypt/live/mydomain.duckdns.org/fullchain.pem
  ssl_key: /etc/letsencrypt/live/mydomain.duckdns.org/privkey.pem
  base_url: mydomain.duckdns.org

The above is correct I think???

EDIT:

Ok, after hashing out the introduction the front end now loads (with some errors which are a totally separate issue)

My log file error message now reads:

2019-06-14 17:07:39 WARNING (MainThread) [homeassistant.components.http] Configuring api_password via the http component has been deprecated. Use the legacy api password auth provider instead. For instructions, see https://www.home-assistant.io/docs/authentication/providers/#legacy-api-password
2019-06-14 17:07:39 WARNING (MainThread) [homeassistant.components.http.auth] legacy_api_password support has been enabled.
2019-06-14 17:07:41 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=270 from 2019-06-14 07:01:48.394661)
2019-06-14 17:07:43 ERROR (Thread-6) [yahooweather] No woid is received!
2019-06-14 17:07:43 CRITICAL (Thread-6) [homeassistant.components.yweather.sensor] Can't retrieve WOEID from yahoo!

If you now have the frontend up then you can start by adding each automation in turn and running the built in configuration checker until it passes. As we know YAML is very space dependant so it could take a while to get it to pass succesfully.

All my automations are now working. Thanks for all your help.

I’m now trying to work out from all the various posts about how to upgrade Python. It looks very confusing reading through the posts. The terminology used (such as Vens and docker) and not knowing what they mean etc. I’m such a newbie. :slight_smile:

When I first came across HA, I just followed the instructions from a post (can’t remember where now) and fumbled through various things like getting it to scan for devices on my Fritz box and Vera Hub, and doing things like trying to resolve issues like this one over the past week mean I’m not sure I can remember how I got here.

So now I’m looking at threads like this one - Upgrade Python 3.5.3 to 3.7.3 successfully but HA still shows Python 3.5.3 - and finding it confusing as to what the actual steps are.

I was told in another thread that perhaps I should be using Hass.IO and so I found this YouTube video - https://www.youtube.com/watch?v=Cr_HCM5Qnls - but the guy hasn’t put up part 2 etc as he mentions he’s working on his website which compliments his tutorials. If he had, I was thinking of just starting from scratch since I’ve “experimented” in adding cards etc, broken things, fixed things and generally fumbled my way through but still confused by everything.

Anyway, I can now access the front end. My daytime and nighttime “there’s someone at the door” triggers work. Just got to work on Python and why my security certificates didn’t auto renew and required me to manually do it, or just give it a break and think about installing Hass.io.

Thanks again everyone for your help.

That is great news Max :grinning:

I used to run Hassbian but moved over to Hassio when the python version started to become an issue. It was rather painless as you can pretty much just copy over your current config and it mostly works.

With the snapshots and the addons I think this is the best way for new or experienced peeps to play around and automate their homes.

In the middle of last year when I first came across Hassbian on YouTube and could see all the cool things it could do, I got excited, bought a Pi and tried it out.

Unfortunately it’s not super friendly for novices to end up with beautiful front ends. I’ve seen videos where people have tablets with nice wallpapers with weather info, and tabs/pages for different rooms in their house to control devices and even using a map of their homes (HA-Floorplan).

I heard about Lovelace and tried to run that side-by-side to Hassbian, but as mentioned, all this experimenting means I forgot how I got what I’ve got.

I think I’ll give Hass.IO a go. I will just wait until Ben (the YouTuber mentioned above) puts up the remainder of the instructions.

His videos have kind of stopped although he did make a brief appearance a few months ago. Dr Zzs seems to have taken over the mantle and does plenty of videos that should help you get up and running. Take a look at his youtube site I linked above :wink:

Thanks. I have seen a few Dr Zz’s videos. It was one of his that got me using Life360 when I bought my daughter a phone for Christmas last year (she just turned 11) and I used his video to put an icon at the top showing if she’s home or away and using zones etc.

Even without using it for HA, I’m glad he taught me about Life360 as it’s been great for when my daughter is not with me (sleepovers, etc) as I can check she’s ok and where she is. In this day and age, it gives a parent some peace of mind.

1 Like

Did you download a Hassbian image and install it on a blank SD card or did you already have the Raspbian OS on your SD card and just follow installation instructions from the Home Assistant documentation page.

If it’s the former there’s Hassbian scripts available that will upgrade your version of Python and update you to the latest version of HA.

If it’s the latter there’s a post that has been made over the last week or so that gives you copy/paste instructions on how to achieve similar results. Just search the forum for Python Upgrade to see it.

This is how it was installed.

I gather I just follow this - hassbian-scripts/docs/suites/python.md at dev · home-assistant/hassbian-scripts · GitHub - and simply PuTTY in and run the command:

sudo hassbian-config upgrade python

I guess what throws me (and probably other newbies like me who don’t understand what various terms imply) is that is says it will create a new virtual environment? What does that mean to us as a user? Do we still PuTTY in as usual? Do we still have the same front end? What changes do we need to make to our use of HA when it moves to a virtual environment?

What I guess I’m saying was that if the post had simply said “upgrade Python by running this command”, I would have gone ahead and done it.

The virtual environment comment worried me that it would change how I need to interact with it (to do updates) and I wouldn’t know how.

Speaking of updates, is there anyway for it to automatically update when one is available? Currently I wait until I see the notification “button” at the top of the screen and then run the commands:

$ sudo systemctl stop [email protected]
$ sudo -u homeassistant -H -s
$ source /srv/homeassistant/bin/activate
$ pip3 install --upgrade homeassistant
$ exit
$ sudo systemctl start [email protected]