Any modification on configuration.yaml is not working

I’m using a Pi 3B+, running a 3rd party Debian based OS, not Raspbian. Home Assistant was installed with python3.7 pip under a venv, with root user. “~/.homeassistant/configuration.yaml” is created. I’m able to login to the dashboard and do some configurations with the lovelace interface.

The problem is, it seems regardless what I put in the “configuration.yaml”, nothing changes on the dashboard, and the default yaml file itself is a bit strange:

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
          - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

These are the things I’ve tried to add:

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
          - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

sensor:
  - platform: yr

light:
  - platform: switch
    name: Christmas Tree Lights
    entity_id: switch.christmas_tree_lights

camera:
  - platform: generic
    still_image_url: http://194.168.1.80/

None of those components appeared on the dashboard.

I tried to add an Iframe from the dashboard, it works, but I don’t see any items added to the configuration.yaml, the iframe card is added to the “.homeassistant/.storage/lovelace” only. In fact, all the 3 components (person.me, sun.sun, weather.home) are only recorded in lovelace only.

My actual goal is to add an ip camera (ESP32-CAM with Arduino IDE WebServerCamera example, which I am able to access the stream via http://194.168.1.80/) to the system, since modifying yaml doesn’t work, I tried to use the dashboard to add a picture entity with the cam’s ip address, the card showed, but the image is a broken image icon.

Some extra info in case they are relevant:

  1. I didn’t run hass as daemon or service, I just run “hass” and log is printing, I don’t see any errors but just a warning

[asyncio] socket.send() raised exception

  1. I tried “hass --script check_config” with an error deliberately put in the yaml file, it can detect the error.
  2. I created a homeassistant user account according to the official instruction, but later I found it seems not necessary, so I proceed with root user and left the “homeassistant” account.
  3. In the hass log, it seems “homeassistant.loader” is loading a lot of components as following:
2019-07-27 12:57:14 INFO (MainThread) [homeassistant.core] Starting Home Assistant
2019-07-27 12:57:14 INFO (MainThread) [homeassistant.core] Timer:starting
2019-07-27 12:57:15 INFO (SyncWorker_18) [homeassistant.loader] Loaded ps4 from homeassistant.components.ps4
2019-07-27 12:57:16 INFO (SyncWorker_14) [homeassistant.loader] Loaded dialogflow from homeassistant.components.dialogflow
2019-07-27 12:57:16 INFO (SyncWorker_2) [homeassistant.loader] Loaded adguard from homeassistant.components.adguard
2019-07-27 12:57:16 INFO (SyncWorker_12) [homeassistant.loader] Loaded toon from homeassistant.components.toon
2019-07-27 12:57:16 INFO (SyncWorker_10) [homeassistant.loader] Loaded upnp from homeassistant.components.upnp
2019-07-27 12:57:16 INFO (SyncWorker_18) [homeassistant.loader] Loaded tradfri from homeassistant.components.tradfri
2019-07-27 12:57:16 INFO (SyncWorker_16) [homeassistant.loader] Loaded ipma from homeassistant.components.ipma
2019-07-27 12:57:16 INFO (SyncWorker_4) [homeassistant.loader] Loaded locative from homeassistant.components.locative
2019-07-27 12:57:16 INFO (SyncWorker_3) [homeassistant.loader] Loaded geofency from homeassistant.components.geofency
2019-07-27 12:57:16 INFO (SyncWorker_8) [homeassistant.loader] Loaded wwlln from homeassistant.components.wwlln
2019-07-27 12:57:16 INFO (SyncWorker_13) [homeassistant.loader] Loaded hangouts from homeassistant.components.hangouts
...

Before I add the first component into the yaml file, the log stops at “INFO (MainThread) [homeassistant.core] Timer:starting”, now it’s loading all these things.
5. When I do “hass --script check_config”, only “Testing configuration at /root/.homeassistant” shows, unlike all the tutorial video which all the components will be “setting up”. This gives me a feeling that my system is not really using the configuration.yaml as it’s config input, instead, it’s only using lovelace.

Am I missing something here? Any suggestion will be appreciated, thank you!

tts:
          - platform: google_translate

The indenting in that is very wrong

tts:
  - platform: google_translate

is how it should look.

That said, look in the States menu under Developer tools for your entities.

Well, if by not necessary you mean more secure you’re right.

Those are very old videos then, that hasn’t been the case for many many months now.

Thank you for the reply, I’m sorry about the indenting, it’s a format typo when I paste it to here, indenting is fine in the yaml, thank you for pointing out.

I can see all the components I have added to the yaml under States in Developer tools as you suggested, does this mean I have to somehow add them to the dashboard manually? I did not see such step in any tutorials.

And also, I get this error in the terminal:

2019-07-28 02:43:40 ERROR (MainThread) [homeassistant.components.generic.camera] Timeout getting image from: Streaming Enabled

Here is the state I see:


I tried to call “camera.turn_on” service, but a failed error pops.

make sure you are only using spaces in your yaml file not tabs.

Thank you, I have managed to add a picture card on the dashboard with the camera’s streaming address directly put in the card config, and the video is now streaming. What I am really confusing is, the camera entity written in the configuration.yaml is not showing on the dashboard, this picture element is not the camera entity, does it require any manual operations to add it to dashboard, I tried to add a few camera related cards, but no streaming is showing.

I don’t see where you actually added the stream capability to your config.

Thanks for the link, I didn’t know the stream configuration is required. Now I have followed the instruction, but still cannot get any image. And camera related services all fail.
Here is my configuration.yaml:

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
        #  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

camera:
  - platform: generic
    name: Tester_cam
    still_image_url: http://192.168.1.80:81/stream
    verify_ssl: false
    # I tried with and without stream_source
    #stream_source: http://192.168.1.80:81/stream

stream:

And here is the picture-entity config:

camera_image: camera.tester_cam
camera_view: live
entity: streaming
type: picture-entity

This is the result:
TIM%E6%88%AA%E5%9B%BE20190729121502
At first I thought camera and display streaming on the dashboard is the same things, now I know they are different. I think the problem might be on the camera entity itself? Since I cannot call any services on camera.tester_cam.

Streaming isn’t an entity. The entity is your camera.

ok, thanks, I changed it to camera.tester_cam now there is an iframe like card that’s supposed for streaming, but there no image showing. I think the camera itself is not connected alive to the system since no camera related services can be called?

This is the output:

2019-07-29 05:49:04 INFO (MainThread) [homeassistant.components.stream] Started stream: http://192.168.1.80:81/stream
Exception in thread stream_worker:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/root/HASS/lib/python3.7/site-packages/homeassistant/components/stream/worker.py", line 49, in stream_worker
    container = av.open(stream.source, options=stream.options)
  File "av/container/core.pyx", line 275, in av.container.core.open
  File "av/container/core.pyx", line 227, in av.container.core.Container.__cinit__
  File "av/container/core.pyx", line 129, in av.container.core.ContainerProxy.__init__
  File "av/container/core.pyx", line 195, in av.container.core.ContainerProxy.err_check
  File "av/utils.pyx", line 105, in av.utils.err_check
av.AVError: [Errno 1094995529] Invalid data found when processing input: 'http://192.168.1.80:81/stream'

Are you sure that is the correct URL for the camera? Can you browse to it with your internet browser?

Yes, I can see it via a browser with this link. I am using a ESP-32 Cam module as the ip camera, I can even see the live stream if I just add a “picture” card and type in this address. I have searched the AVError a bit, there are some solutions that involve modifying the module’s code, haven’t try yet. But the problem I’m really trying to solve now is to understand why all the camera related services are not available.

From the “Stream” page:

The integration currently only supports proxying H.264 source streams to the HLS format

Does your camera output H.264 stream?

What features does the ESP-Cam support?

No…I did some research, it seems h264 is not feasible on esp32. Sorry I didn’t notice this. So this is the reason caused all camera services failed I guess?

ESP-32 hosts a web server on its port 80 with an easy interface allow me to do face detection, adjust resolution, adjust contrast, turn on and off the stream, etc…The stream video is on port 81 ./stream. Maybe api of these features are not standardised to camera service. That to be said…perhaps it will be much easier to just add iframe of this interface address, but recording will be another issue since it’s just a web.
I am sure home assistant can somehow allow users to create a customised service so I can save video from the stream to a local file according to some motion rule, but this seems a bit overkill. I got it worked with motion now…