October 17, 2019, 08:09:53 PM

Author Topic: Chat-bot for the home, IRC or XMPP?  (Read 226 times)

Offline Scaremonger

  • Jr. Member
  • **
  • Posts: 73
    • ITSpeedway - Ramblings of a geek!
Chat-bot for the home, IRC or XMPP?
« on: June 24, 2019, 06:06:23 PM »
At the heart of my home sits a few Raspberry Pi running an MQTT broker, node-red, Domoticz, Home assistant and dozens of applications and scripts that interface my lighting, sockets, Kodi, TV, infrared, temperature and moisture guages etc, etc. I can use Amazon Echo (alexa) to control some features, and tasker on my phone to send JSON/http to control things manually.

It's basically a mix of unrelated equipment held together with MQTT, Python and Node!

To simplify things I want to remove Tasker, the JSON/HTTP interfaces, and Domoticz by adding a chat -bot to send messages to the house and allow it to message me. I intend to interface MQTT with the bot so that any device/script can publish on a topic to send me an alert or message. My messages would also be published on a topic so that node-red could perform actions based on what I ask.

I started with a Facebook messenger chat-bot, but I got the impression I was making things more complex than necessary.

Would you guys have a suggestion whether to use IRC, XMPP or something else? I already use both of these clients along with discord and a few others, so the client software isn't too important.

Cheers,
Si...

Follow me at ITSpeedway.net.

Offline Hezkore

  • Jr. Member
  • **
  • Posts: 79
  • 🍑 Juicy
Re: Chat-bot for the home, IRC or XMPP?
« Reply #1 on: June 24, 2019, 06:23:53 PM »
IRC is a classic, and super simple to make your own client and bot for.
But I'd like to recommend Telegram!
It's got a nice API. And the desktop app, along with the mobile apps are super nice! :)
You can create group chats and invite your bot and have it post or respond to anything, you can invite other people as well.
I have a group chat for my home notifications, as well as things like Plex and server information in Telegram.
Telegram can even tell you when your bot has crashed or stopped responding.

Telegram: https://telegram.org/
Api: https://core.telegram.org/
Keep it simple.

Offline Derron

  • Hero Member
  • *****
  • Posts: 2484
Re: Chat-bot for the home, IRC or XMPP?
« Reply #2 on: June 24, 2019, 07:31:25 PM »
If you want to have software where your hardware is ... XMPP.
If you want to use some 3rd party tools ... Telegram might be nice - especially if you already are using it.


BTW: still looking for a simple (non-nodejs, non-GO ..) php or so skill to play my local MP3 files via my echo dots (especially some old audio books for the kids).


bye
Ron

Offline Scaremonger

  • Jr. Member
  • **
  • Posts: 73
    • ITSpeedway - Ramblings of a geek!
Re: Chat-bot for the home, IRC or XMPP?
« Reply #3 on: June 24, 2019, 10:15:31 PM »
@Hezkore:
Thanks, I'll take a look at Telegram.

@Deron:
XMPP seems a bit heavy to put directly on a microcontroller! I know there is an IRC library, but i was planning to use MQTT or SNMP between the hardware and the core with node-red performing the interface to the chat bot.

I have "Play mp3 library on alexa" on my list too with a couple of options to test at some point:
1. Pair echo to a PC or RPi using Bluetooth and just use it as a speaker!
2. Install the "Plex" skill.
3. I've got this bookmarked:
https://forum.kodi.tv/showthread.php?tid=254502&page=74
Follow me at ITSpeedway.net.

Offline Scaremonger

  • Jr. Member
  • **
  • Posts: 73
    • ITSpeedway - Ramblings of a geek!
Re: Chat-bot for the home, IRC or XMPP?
« Reply #4 on: June 25, 2019, 11:26:44 PM »
I've just found a node-red XMPP node:

https://flows.nodered.org/node/node-red-node-xmpp

Looks like this might be a simple way to implement a chat-bot, at least for testing purposes!




Follow me at ITSpeedway.net.