Error in New Notification pushsafer

Setting up pushsafer with:

notify:
  - name: NOTIFIER_NAME
    platform: pushsafer
    private_key: ABCDEFGHJKLMNOPQRSTUVXYZ

On restart getting Error:

17-03-06 22:10:15 ERROR (MainThread) [homeassistant.bootstrap] Invalid config for [notify.pushsafer]: required key not provided @ data['api_key']. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/notify.pushsafer/

Thought maybe use api_key?

notify:
  - name: NOTIFIER_NAME
    platform: pushsafer
    api_key: ABCDEFGHJKLMNOPQRSTUVXYZ

No error on startup, but testing the notification raises error:
Traceback (most recent call last): File "/usr/lib/python3.4/asyncio/tasks.py", line 242, in _step result = coro.throw(exc) File "/srv/homeassi/lib/python3.4/site-packages/homeassistant/core.py", line 1001, in _event_to_service_call yield from service_handler.func(service_call) File "/srv/homeassi/lib/python3.4/site-packages/homeassistant/components/notify/__init__.py", line 136, in async_notify_message yield from notify_service.async_send_message(**kwargs) File "/usr/lib/python3.4/asyncio/futures.py", line 358, in __iter__ yield self # This tells Task to wait for completion. File "/usr/lib/python3.4/asyncio/tasks.py", line 297, in _wakeup future.result() File "/usr/lib/python3.4/asyncio/futures.py", line 274, in result raise self._exception File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run result = self.fn(*self.args, **self.kwargs) File "/srv/homeassi/lib/python3.4/site-packages/homeassistant/components/notify/pushsafer.py", line 68, in send_message "0", "", "", "") File "/home/homeassi/.homeassistant/deps/pushsafer.py", line 106, in send_message return MessageRequest(payload) File "/home/homeassi/.homeassistant/deps/pushsafer.py", line 61, in __init__ Request.__init__(self, "post", MESSAGE_URL, payload) File "/home/homeassi/.homeassistant/deps/pushsafer.py", line 48, in __init__ raise InitError pushsafer.InitError: No privatekey provided. Init the pushsafer module by calling the init function
Has anyone this notification working?

Thanks for reading!

cc @pushsafer

i updated the plugin > https://github.com/home-assistant/home-assistant/pull/6470

Do VDRainer wait for the next full release or can he replace this file: homeassistant/components/notify/pushsafer.py

Kevin

but it’s normal that android app has no sound notification?

@pushsafer, thanks it works!

I replaced the pushsafer.py for testing.

The log raises an error:
17-03-07 19:24:45 ERROR (Thread-10) [homeassistant.components.notify.pushsafer] Not possible to send notification

but the notification arrive on my iphone.

Thanks for that very fast support!
Rainer

Edit:
@pushsafer, for testing i changed the last line in pushsaver.py with:
_LOGGER.error(response.json())

The output in the log is:
17-03-07 19:38:48 ERROR (Thread-8) [homeassistant.components.notify.pushsafer] {'available': {'myid': {'phone_name': '16'}}, 'status': 1, 'success': 'message transmitted'}

Hope that helps!
Rainer

@hangy
In your Pushsafer dashboard, create an alias key with predefined parameters included sound. The provided alias key you have to use in HA.

@VDRainer
I updated the code for checking the response, now it should raise no errors after sending the push

Kevin

@pushsafer, sorry, error raises anyway.
The response.status_code is a number.
With:
if response.status_code != 200:
it works! :slight_smile:

@VDRainer
Thanks for your help, i changed this.

Kevin