

8·
1 month agoIf you don’t shy away from python, I just use the requests library most of the time:
homeserver_url = “XXX”
access_token = “XXX”
room_id = “!XXX”
url = f{homeserver_url}/_matrix/client/r0/rooms/{room_id}/send/m.room.message"
headers = {“Authorization”: f"Bearer {access_token}",“Content-Type”: “application/json”,}
data = “msgtype”: “m.text”,“body”: “Question of the day!”,}
response = requests.post(url, headers=headers, data=json.dumps(data))
Alternatively I also have a bot I use in NodeRed connected to Home Assistant.
Double Alternatively, I’ve used AppRise successfully within various tools like ChangeDetection to notify me via matrix.
Recently discovered changedetection.io. It nicely filled the need I had. I have it watching a few static forum posts for updates that are communicated that way.