v411e / hasswebhookbot Goto Github PK
View Code? Open in Web Editor NEWA simple maubot to get homeassistant-notifications in your favorite matrix room
License: MIT License
A simple maubot to get homeassistant-notifications in your favorite matrix room
License: MIT License
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
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.
It would be cool if the bot could send stickers!
For limiting access.
It would be great if messages could be deleted by the bot after a given time. This would lead to cleaner rooms.
A lifetime
attribute 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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.