How to use the pybotvac.robot.Auth function in pybotvac

To help you get started, we’ve selected a few pybotvac examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github stianaske / pybotvac / pybotvac / robot.py View on Github external
def _message(self, json):
        """
        Sends message to robot with data from parameter 'json'
        :param json: dict containing data to send
        :return: server response
        """

        try:
            response = requests.post(self._url,
                                    json=json,
                                    verify=self._vendor.cert_path,
                                    auth=Auth(self.serial, self.secret),
                                    headers=self._headers)
            response.raise_for_status()
        except (requests.exceptions.ConnectionError,
                requests.exceptions.HTTPError):
            raise NeatoRobotException("Unable to communicate with robot")

        return response

pybotvac

Python package for controlling Neato pybotvac Connected vacuum robot

MIT
Latest version published 8 months ago

Package Health Score

56 / 100
Full package analysis

Similar packages