ESP8266-HTTP-IR-Blaster icon indicating copy to clipboard operation
ESP8266-HTTP-IR-Blaster copied to clipboard

Added MQTT messaging support

Open vsimonaitis opened this issue 6 years ago • 6 comments

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

vsimonaitis avatar Jul 22 '18 09:07 vsimonaitis

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?

mdhiggins avatar Jul 22 '18 13:07 mdhiggins

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.

vsimonaitis avatar Jul 22 '18 15:07 vsimonaitis

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

mdhiggins avatar Jul 22 '18 19:07 mdhiggins

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.

kokarn avatar Jul 23 '18 07:07 kokarn

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

skorokithakis avatar Oct 10 '18 13:10 skorokithakis

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.

Ian-Zz avatar Jul 29 '21 19:07 Ian-Zz