Facebook Messenger and Config:

Hi, I have been trying to get the Facebook Messenger component up and running in my HA installation. For some reason when HA is restarted it doesn’t find the relevant components. It also doesn’t find the config: component which I just tried today for the first time.

  • My HA version is: 0.39.3

  • The Python version is: Python 3.4.2

  • Hardware is: Pi 3

This is the log entry:

17-03-08 15:56:52 homeassistant.loader: Unable to find component config
17-03-08 15:56:55 homeassistant.loader: Unable to find component notify.facebook
17-03-08 15:56:55 homeassistant.bootstrap: Unable to find platform notify.facebook

I have run the script to check the configuration

hass --script check_config

but this does not show any errors.

Anybody got any ideas or similar problem?

My configuration.yaml is:

homeassistant:
  name: The Priory
  latitude: redacted
  longitude: redacted
  elevation: 50
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Europe/Dublin

  customize:
    #  Only the 'entity_id' is required.  All other options are optional.
    sensor.yr_cloudiness:
       friendly_name: Cloud
       entity_picture: /local/HASS-Cloud.png
    sensor.yr_fog:
       friendly_name: Fog
       entity_picture: /local/HASS-Fog.png
    sensor.yr_humidity:
       friendly_name: Humidity
       entity_picture: /local/HASS-Humid.png
    sensor.yr_symbol:
       friendly_name: Now
    sensor.yr_wind_direction:
       friendly_name: Wind Dir
       entity_picture: /local/HASS-WindD.png
    sensor.yr_wind_speed:
       friendly_name: Wind
       entity_picture: /local/HASS-WindS.png
    sensor.yr_temperature:
       friendly_name: Temp

# Show links to resources in log and frontend
# introduction:
# Enables the frontend

frontend:

http:
# Uncomment this to add a password (recommended!)
  api_password: !secret http_password
  # set to 1 to enable development mode
  # development: 1

# Checks for available updates
updater:

# Discover some devices automatically
discovery:

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time.
history:

# View all events in a logbook
# kitchen camera generates a lot of crap but is working so exclude it
logbook:
  exclude:
    entities:
      - camera.kitchen

# Track the sun
sun:

# enable the new configuration component
config:

switch: !include switchs.yaml
automation: !include automation.yaml
group: !include groups.yaml

#zwave:
#  device_config: !include zwave_device_config.yaml

input_select:
  location:
    name: Holidays
    options:
     - Away
     - At Home
     - Special
    initial: At Home

######################### Facebook ##########################

notify:
  - name: fbmessenger
    platform: facebook
    page_access_token: redacted

####################### Cameras ############################################

camera:
- platform: ffmpeg
  input: http: redacted
  name: Front Camera

- platform: generic
  still_image_url: http://192.168.1.27:2032/snapshot.cgi?
  username: admin
  password: !secret kitchen_cam
  name: Kitchen

######################### Weather State / Sensors ##########################

mqtt:
  broker: 192.168.1.29
  port: 1883
  client_id: hass1
  username: msqto
  password: !secret mosquitto_password

sensor:
  - platform: yr
    name: Forecast
    monitored_conditions:
      - temperature  
      - symbol
      - windSpeed
      - windDirection
      - humidity
      - fog
      - cloudiness

  - platform: time_date
    display_options:
     - 'date'
     - 'time'

  - platform: mqtt
    state_topic: 'priory/dht1'
    name: Temperature
    value_template: '{{ value_json.temperature }}'

####################### Lights etc ########################################
light:
  platform: hue
  host: 192.168.1.65

device_tracker:
  - platform: nmap_tracker
    hosts: 192.168.1.30-85
    home_interval: 10

  - platform: owntracks

############################ Shell Commands ###############################

shell_command: 
   blindm_up:  python3 /home/pi/Blinds_Main.py u
   blindm_down: python3 /home/pi/Blinds_Main.py d
   blind12_up: python3 /home/pi/Blinds_12V.py u
   blind12_down: python3 /home/pi/Blinds_12V.py d
   socket_a_on: python3 /home/pi/SilverPiV4.py A1
   socket_a_off: python3 /home/pi/SilverPiV4.py A0
   socket_b_on: python3 /home/pi/SilverPiV4.py B1
   socket_b_off: python3 /home/pi/SilverPiV4.py B0
   socket_c_on: python3 /home/pi/SilverPiV4.py C1
   socket_c_off: python3 /home/pi/SilverPiV4.py C0
   socket_d_on: python3 /home/pi/SilverPiV4.py D1
   socket_d_off: python3 /home/pi/SilverPiV4.py D0
   socket_m_on: python3 /home/pi/SilverPiV4.py M1
   socket_m_off: python3 /home/pi/SilverPiV4.py M0

Feeling a bit foolish about this. I was not using the correct procedure to update/upgrade home assistant. Have now updated correctly to 0.40 and problem is solved.

Could you share an example of your automation script using facebook messenger? I’m also trying to setup notificiation via Messenger but can’t receive notifications or pictures

An example of Facebook messenger automation. You must use the full international form of the phone number. I have changed the last digits of the phone number below for privacy.

  initial_state: False
  trigger:
    platform: time
    at: '08:30:00'
  action:
    service: notify.fbmessenger
    data:
      message: 'Good Morning - Take It'
      target:
        - '+353878888999'

Thanks Jerry_OR, Do you use FB to receive photo notifications too? If yes could you share the script?

I also get this message:

Error 400 : Error validating application. Application has been deleted. (Code 190)

I haven’t tried it with photos so far. My guess is that your Facebook account may not be set up correctly. You should check your FB settings again.