Hi,
I am completly new to HA. It looks awesome so far, but I am having trouble with the syntax. As a first test to see If I like HA I tried to make a Telegram notification when someone logs into the Wifi. I watched a lot of Youtube Videos, I read every bit of documentration on the HA website for two days, and now I am ready to throw my Keyboard out of the window because I can´t get it to work. The logfile states an error in a specific line, but I am too blind to find it. I am missing something small, possibly a syntax error I guess. Please help my poor keyboard to survive the day
automation:
trigger:
platform: state
entity_id: device_tracker.Sebi
from: 'not_home'
to: 'home'
action:
service: notify.Telegram
data:
message: 'Person is now home'
And here is the logfile output:
2017-05-24 08:27:12 ERROR (Thread-1) [homeassistant.util.yaml] while parsing a block mapping
in “/home/homeassistant/.homeassistant/configuration.yaml”, line 1, column 1
expected , but found ‘’
in “/home/homeassistant/.homeassistant/configuration.yaml”, line 61, column 3
2017-05-24 08:27:12 ERROR (MainThread) [homeassistant.bootstrap] Error loading /home/homeassistant/.homeassistant/configuration.yaml: while parsing a block mapping
in “/home/homeassistant/.homeassistant/configuration.yaml”, line 1, column 1
expected , but found ‘’
in “/home/homeassistant/.homeassistant/configuration.yaml”, line 61, column 3
Also, you ask nmap to scan for ip between 1 and 24… then ask it to reject the 1 and 35… You could directly put hosts: 192.168.2/24
and then remove your exclude part
Ok… well… it kind of worked. It was indeed the “-” which was in the wrong place. The error I posted above is gone, but now the logfile shows a new one, and I don´t have a clue whats going on.
Have a look at my config. Maybe this helps you to take the right steps (I commented something for you after the “#”)
notify:
- name: Telegram # this is your notify.service you are calling. In this case notify.telegram
platform: telegram
chat_id: 123456789
- name: Telegram_Haushalt #And in this case notify.telegram_haushalt (I have two chats)
platform: telegram
chat_id: 987654321
telegram_bot:
platform: polling
api_key: 12346ABCDEF
allowed_chat_ids:
- 123456789 #use the chat IDs from above
- 987654321
@mny@HeavyMettAal
Somehow home-assistant is losing internet connection (?) and throwing
Fatal read error on socket transport error.
I don’t think this is Telegram bot related. However the polling component immediately tries to reconnect but can’t flooding the log as a result. The component now has added a timeout to the reconnect. This prevents flooding the log but not the Fatal read error.
I guess a little part of the solution. Is this helping you too ?