RocketChat issue with HA 0.88.1

Hi to all, i configured rocketchat with this parameters:
- platform: rocketchat
name: RC
url: !secret rc_url
username: !secret rc_usr
password: !secret rc_pwd
room: !secret rc_room
(like “component page” describe Rocket.Chat - Home Assistant)

but i can’t see it in the notify service and it show me one error:

Log Details (ERROR)
Tue Feb 26 2019 22:53:00 GMT+0100 (Ora standard dell’Europa centrale)
Error setting up platform rocketchat
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/notify/”, line 76, in async_setup_platform
platform.get_service, hass, p_config, discovery_info)
File “/usr/local/lib/python3.7/concurrent/futures/”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/notify/”, line 41, in get_service
return RocketChatNotificationService(url, username, password, room)
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/notify/”, line 60, in init
self._server = RocketChat(username, password, server_url=url)
File “/usr/local/lib/python3.7/site-packages/rocketchat_API/”, line 19, in init
self.login(user, password)
File “/usr/local/lib/python3.7/site-packages/rocketchat_API/”, line 63, in login
if login_request.json().get(‘status’) == “success”:
File “/usr/local/lib/python3.7/site-packages/requests/”, line 897, in json
return complexjson.loads(self.text, **kwargs)
File “/usr/local/lib/python3.7/site-packages/simplejson/”, line 518, in loads
return _default_decoder.decode(s)
File “/usr/local/lib/python3.7/site-packages/simplejson/”, line 370, in decode
obj, end = self.raw_decode(s)
File “/usr/local/lib/python3.7/site-packages/simplejson/”, line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Connessione persa. Riconnessione…

I noticed that the link to the .py is no longer eistente and the component is no longer present under the gitub folder (core/homeassistant/components/rocketchat/ at dev · home-assistant/core · GitHub) …

is it still supported? because I would prefer it to Slack

thanks in advance for your help

Resurrecting an old thread. I was eventually able to get this to work with rocketchat.

I created these folders and files in config:



"""The rocketchat component."""


    "domain": "rocketchat",
    "name": "Rocket.Chat",
    "documentation": "",
    "requirements": ["rocketchat-API==0.6.1"],
    "codeowners": []


"""Rocket.Chat notification service."""
import logging

from rocketchat_API.APIExceptions.RocketExceptions import (
from rocketchat_API.rocketchat import RocketChat
import voluptuous as vol

from homeassistant.components.notify import (
from homeassistant.const import (
import homeassistant.helpers.config_validation as cv

_LOGGER = logging.getLogger(__name__)

# pylint: disable=no-value-for-parameter
        vol.Required(CONF_URL): vol.Url(),
        vol.Required(CONF_USERNAME): cv.string,
        vol.Required(CONF_PASSWORD): cv.string,
        vol.Required(CONF_ROOM): cv.string,

def get_service(hass, config, discovery_info=None):
    """Return the notify service."""

    username = config.get(CONF_USERNAME)
    password = config.get(CONF_PASSWORD)

    url = config.get(CONF_URL)
    room = config.get(CONF_ROOM)

        return RocketChatNotificationService(url, username, password, room)
    except RocketConnectionException:
        _LOGGER.warning("Unable to connect to Rocket.Chat server at %s", url)
    except RocketAuthenticationException:
        _LOGGER.warning("Rocket.Chat authentication failed for user %s", username)"Please check your username/password")

    return None

class RocketChatNotificationService(BaseNotificationService):
    """Implement the notification service for Rocket.Chat."""

    def __init__(self, url, username, password, room):
        """Initialize the service."""

        self._room = room
        self._server = RocketChat(username, password, server_url=url)

    def send_message(self, message="", **kwargs):
        """Send a message to Rocket.Chat."""
        data = kwargs.get(ATTR_DATA) or {}
        resp = self._server.chat_post_message(message, channel=self._room, **data)
        if resp.status_code == HTTP_OK:
            success = resp.json()["success"]
            if not success:
                _LOGGER.error("Unable to post Rocket.Chat message")
                "Incorrect status code when posting message: %d", resp.status_code

Then I added this to configurations.yaml

Note: Prismbot is the name of my user in my rocketchat server, you’ll need to pick your own. This is what will show up when you use the service dropdown.

  - platform: rocketchat
    name: PRISMBOT
    url: http://local ip redacted:3000
    username: redacted
    password: redacted
    room: "#homeautomation"

At this point you’ll need to do a full reboot. When it boots, it will pull this new service into its services list. notify.prismbot should show up in the drop-down, if it doesn’t you probably missed a step somewhere.

(This was a motion sensor to tell me that my dog snuck downstairs to rifle through our pantry lol)

Note: The user that you use for login has to be a member of the channel you’re posting to and also needs to have ADMIN privs! I couldn’t get it to work without this.

I hope this helps someone, this is my first time posting here and I’m new to hassio but I really like rocketchat and am trying to build it into the centerpiece of my entire self-hosted empire.

If anyone knows how to get rocketchat to send commands to home-assistant, feel free to point me in the right direction. That’s my next goal!