Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added MQTT messaging support #197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vsimonaitis
Copy link

Sends MQTT messages when signal is received or sent.
Also accepts JSON commands via /[host_name]/cmd

@mdhiggins
Copy link
Owner

Ideally the way to do this would be to eliminate the need for HTTP commands all together and only use MQTT for the Alexa skill

Problem is to do that via the Alexa skill I would need to build my own broker and handle the registration of devices. I'd also have to rewrite the Alexa skill back end. Ever set up a broker before or are there reliable free ones I can use for all users of this project?

@vsimonaitis
Copy link
Author

I use Raspberry Pi for home automation. If you have RPI, I would suggest to use Hypriot RPI image that has Docker support. With this setup you can very easily install Mosquito docker image and it is ready to use out of the box.
There are public mqtt brockers as well, but I haven't used any myself, so can not give you any recomendations.

@mdhiggins
Copy link
Owner

I'll need something more robust than the Pi probably, skill does about 7000 commands a month for the userbase
I'll look into some alternatives

@kokarn
Copy link

kokarn commented Jul 23, 2018

7000 a month is a very very low number for a broker, even on a RPI. Most brokers easily handle a couple of thousand a second on a standard computer, so cut that in 4 or whatever you feel is the right amount and you should still be nowhere near some limit.

@skorokithakis
Copy link
Contributor

You can use the public Mosquitto broker, 7000/mo won't even register.

@Ian-Zz
Copy link

Ian-Zz commented Jul 29, 2021

Dear vsimonaitis, Thanks so much for this mqtt support. I think it's just what I was looking for (a way to use this blaster in a reverse sort of way with Home Assistant).

I got it working today but one issue I have... the topics sent to my broker.
right now they are in this kind of arrangement
\/ 192.168.1.114 \/ this line is blank \/ ESP-7C274A received = [{'data':'blah blah'}] sent = [{'data':'','blah blah'}]

I would like to have the blaster write/publish to homeassistant/sensor/irblaster or similar.

like this maybe...
\/ 192.168.1.114 \/ homeassistant \/ sensor \/ irblaster received = [{'data':'blah blah'}] sent = [{'data':'','blah blah'}]

I did some fiddling (very little) to try to set the topics but couldn't pull it off. Thanks anybody for any clues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants