Looks ok to me.
I’ve never managed to get both message and attachment to work in the same rule (often get timeouts for pictures). Try splitting the two.
Not sure whether https is supported though.
Looks ok to me.
I’ve never managed to get both message and attachment to work in the same rule (often get timeouts for pictures). Try splitting the two.
Not sure whether https is supported though.
I said too much. Sending pictures as data worked for a while, but now I get tons of:
2017-11-02 22:05:20 ERROR (SyncWorker_18) [homeassistant.components.notify.facebook] Error 400 : (#10) Requires phone matching access fee to be paid by this page unless the recipient user is an admin, developer, or tester of the app. (Code 10)
and
2017-11-02 18:25:04 ERROR (SyncWorker_12) [homeassistant.components.notify.facebook] Error 500 : An unknown error has occurred. (Code 1)
Sigh
M
All my users have the required access right and receive text messages without problems. Trying to send pictures causes the problem since a week or so.
Thinking of throwing out the messenger component alltogether. It has caused mayhem since the 0.55 update.
I also noticed that facebook messenger stopped sending messages after updating recently. Adding single quotes around the target phone number fixed things up. Thanks for the tip!
This worked for me, all working again, thanks
If your Facebook Messenger notifier suddenly stops after upgrading, single quotes is the solution.
Thanks!
…and for some strange reason things started working again from 0.57.3.
This totally stopped working for me again with this in my logs (even for simple messages):
[homeassistant.components.notify.facebook] Error 400 : (#10) Requires phone matching access fee to be paid by this page unless the recipient user is an admin, developer, or tester of the app. (Code 10)
Here’s my test script:
test_facebook_message:
sequence:
service: notify.facebook
data:
message: Testing, one, two
target: !secret notify_phone_number
and my phone number secret is formatted as: '+155512345678'
I haven’t really dug in, but it’s possible that I broke my facebook app/page somehow. Is this working for others?
Yes, Works fine for me in, version 0.58.0, with single quotes.
well, that’s good at least. it doesn’t even work for me using curl anymore. i must’ve messed up my facebook app/page somehow.
Good to hear PetrolHead. Were you also able to pull a screenshot with FB messenger? If yes, could you share your script?
How do you attach a local image to the Facebook messenger notification?
I’m still looking into this issue but don’t have the time. I can make a snapshot and save it locally but can’t attach it to Messenger with the payload function. Any help is appreciated!
- alias: Test Automation
initial_state: 'on'
hide_entity: True
trigger:
- platform: state
entity_id: binary_sensor.door_window_sensor_158d00014db7b2
from: 'off'
to: 'on'
action:
- service: camera.snapshot
data_template:
entity_id: camera.dahua_ipc
filename: "/config/www/snapshots/camera.dahua_ipc{{ trigger.to_state.last_changed }}.jpg"
- service: notify.facebook
data:
message: 'This is a test'
data:
attachment:
type: 'image'
payload:
url: /config/www/snapshots/camera.dahua_ipc{{ trigger.to_state.last_changed_urlencode }}.jpg
target - '+31xxxxxxxxxx'
I cannot get it to work. My number is formatted “+491…”, I am an admin on the page and my token is valid (I verify through CURL) and I am always getting Requires phone matching access fee to be paid by this page unless the recipient user is an admin, developer, or tester of the app. (Code 10)
I had this same problem - I had to add my additional users as testers. My admin user worked fine out of the box. I stopped using FB messenger because it wasn’t reliable (ended up going to HTML5 on Android and the HASS app on iOS.) I read (at the time) that the API was changing for FB messenger as well. My PH#s were formatted as +1xxxyyyzzzz
When I tried to send a message to my phone number,
I encountered the error:
2019-03-14 01:36:55 ERROR (SyncWorker_0) [homeassistant.components.notify.facebook] Error 400 : (#10) Access to the Customer Matching API and Customer Matching via the Send API is currently available in limited release. To learn more, contact your Facebook partner manager or representative. (Code 10)
I also tried to add another user as a tester, and the same error occurred when I send a message to his phone number.
The steps I took was.
1: Sign up for FB developer account.
2: Create Facebook page
3: Create App page
4: Add Messenger on App page.
5: Get Page Token
6: Use token in configuration.yaml
Same issue with you, please share if you figureout. Thank
At this point, I just gave up and used Telegram instead. It’s simpler and it just works.
Do you have an example script of your Telegram approach?
I basically just followed the setup instructions at
https://www.home-assistant.io/components/notify.telegram
If I recall correctly, this is what I did.
1) Download Telegram
2) Sign up for telegram account
3) Message @botfather to create a bot
4) ask botfather for API key
5) Get your chat id by messaging @myidbot
6) Make sure to send you bot a message because the bot can't initiate a conversation.
7) Put this in the configuration.yaml:
telegram_bot:
- platform: polling
api_key: YOUR_API_KEY
allowed_chat_ids:
- YOUR_CHAT_ID
# Example configuration.yaml entry for the notifier
notify:
- name: telegram
platform: telegram
chat_id: YOUR_CHAT_ID
8) When you need to send a notifcation, use this:
action:
- service: notify.telegram
data:
message: 'the text message'
9) You can send photos and videos also (url or local file). Remember if you want to send a local mp4 file or jpeg, you have to whitelist that directory.
Hope this helps.
After trying to setup the Facebook Messenger component without success, I decided to use the API below to send Text Messages and Images via Messenger.
It is super simple to use with Home Assistant.
If you want to ask me why I use Facebook messenger, the answer is → young daughter…