Giter Club home page Giter Club logo

hasswebhookbot's People

Contributors

alexanderbabel avatar v411e avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hasswebhookbot's Issues

ModuleNotFoundError: No module named 'playground'

When trying to create an instance, the creation fails with the following error:

15:02:09	ERROR	server	Traceback (most recent call last):
  File "/opt/maubot/maubot/loader/zip.py", line 203, in _load
    importer.load_module(module)
  File "/opt/maubot/maubot/lib/zipimport.py", line 282, in load_module
    exec(code, mod.__dict__)
  File "/data/plugins/com.valentinriess.hasswebhook-v0.0.8.mbp/hasswebhook.py", line 10, in <module>
    from playground.hasswebhookbot.config import Config
ModuleNotFoundError: No module named 'playground'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/maubot/maubot/management/api/middleware.py", line 48, in error
    return await handler(request)
  File "/opt/maubot/maubot/management/api/instance.py", line 87, in update_instance
    return await _update_instance(instance, data)
  File "/opt/maubot/maubot/management/api/instance.py", line 71, in _update_instance
    await instance.update_started(data.get("started", None))
  File "/opt/maubot/maubot/instance.py", line 289, in update_started
    await (self.start() if started else self.stop())
  File "/opt/maubot/maubot/instance.py", line 173, in start
    cls = await self.loader.load()
  File "/opt/maubot/maubot/loader/zip.py", line 188, in load
    return self._load(reset_cache)
  File "/opt/maubot/maubot/loader/zip.py", line 207, in _load
    raise MaubotZipLoadError(f"Failed to load module {module}")
maubot.loader.zip.MaubotZipLoadError: Failed to load module hasswebhook

Feature request - attach image as file

Hi!

The plugin is working really well. But I am lacking one thing and that is to attach an image as a file instead.

An example is the use of camera.snapshot in Homeassistant, it saves the image as a file. I would like to ad that file as a payload instead of the Base64 string that is needed now for images.

I have not yet found a way in homeassistant to encode camera.snapshot to a base64 string so the bot can accept it.

[Feature] Message lifetime

It would be great if messages could be deleted by the bot after a given time. This would lead to cleaner rooms.

A lifetimeattribute could be added (time in minutes)

A message then could look like this:

service: notify.hass_maubot
data:
  message: Die Post ist da! ๐Ÿ“ฌ
  data:
    type: message
    identifier: letterbox.status
    lifetime: 1440

Image Support

Can an example YAML be provided for image support (#11)?
@v411e @AlexanderBabel

This does not work:

service: notify.hass_maubot
data:
  message: None
  data:
    type: image
    image: <url of image>

Edit: Home Assistant log for the call above

ERROR (MainThread) [homeassistant.components.rest.notify] Client error. Response 400: Bad Request: NoneType: None

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.