MQTT? / Home automation?

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
Rob_wrt
DD-WRT User


Joined: 25 Apr 2012
Posts: 56

PostPosted: Mon Apr 10, 2017 22:45    Post subject: MQTT? / Home automation? Reply with quote
Hi All, I have not been here for a while.
My Buffalo and Linksys have been running build 23919 with no problems, and I did not feel the need to upgrade.


Anyway, I have a question about MQTT on dd-wrt. I googled around and search forum - did not find much, so I think I know my answer. But anyway, still posting the question.

Are there any implementations of MQTT broker on dd-wrt?
Anyone successfully using it (on dd-wrt, if exists, or any other flavour of WRT)?
Or anyone using dd-wrt in any diy home automation setup?

Thanks,
Rob
Sponsor
carloher
DD-WRT Novice


Joined: 26 Aug 2014
Posts: 13

PostPosted: Mon Jun 18, 2018 13:47    Post subject: Reply with quote
Maybe is too late, but it can be useful anyway...

I've installed mosquitto MQTT broker in DD-WRT by using entware. Instructions to install entware can be found here: https://wiki.dd-wrt.com/wiki/index.php/Installing_Entware

Then you can isntall mosquitto --or any other entware package-- by typing:

Code:
opkg install mosquitto
mjforan
DD-WRT Novice


Joined: 07 Feb 2020
Posts: 11

PostPosted: Wed Feb 19, 2020 0:11    Post subject: MQTT? / Home automation? Reply with quote
Sorry to necro this thread, but it's one of the top search results so maybe I can save someone else some frustration.

The Entware package of Mosquitto runs out of the box on OpenWRT, but for DD-WRT it's not as easy. I added some additional startup commands to create a user for Mosquitto and start the process. You could also change the user in the mosquitto.conf file to be root if you want. Here is my working startup script:
Code:
grep -q FTPuser /tmp/etc/passwd || echo "mosquitto:*:1100:1160:mosquitto:/opt/etc/mosquitto:/bin/false" >> /tmp/etc/passwd
sleep 10
/opt/etc/init.d/rc.unslung start
/opt/sbin/mosquitto
lexridge
DD-WRT User


Joined: 07 Jun 2006
Posts: 364
Location: WV, USA

PostPosted: Fri Oct 16, 2020 17:50    Post subject: Re: MQTT? / Home automation? Reply with quote
mjforan wrote:
Sorry to necro this thread, but it's one of the top search results so maybe I can save someone else some frustration.

The Entware package of Mosquitto runs out of the box on OpenWRT, but for DD-WRT it's not as easy. I added some additional startup commands to create a user for Mosquitto and start the process. You could also change the user in the mosquitto.conf file to be root if you want. Here is my working startup script:
Code:
grep -q FTPuser /tmp/etc/passwd || echo "mosquitto:*:1100:1160:mosquitto:/opt/etc/mosquitto:/bin/false" >> /tmp/etc/passwd
sleep 10
/opt/etc/init.d/rc.unslung start
/opt/sbin/mosquitto


I just got this working myself, albeit a bit differently. First I created a Samba user, then used that user to run mosquitto. This way I don't have to recreate the user on every boot. Then in Startup I just added this:

/opt/sbin/mosquitto -c /opt/etc/mosquitto/mosquitto.conf&

Works like a charm.

_________________
Linksys EA8500 (Internet Gateway, AP) - DD-WRT r44719
Netgear R6250 (AP, VAP) - DD-WRT r44772
Linksys EA8500 (Gateway Backup) - DD-WRT r44236
Features in use: Samba, OpenVPN, WireGuard, Entware for Mosquitto
Member #248
lexridge
DD-WRT User


Joined: 07 Jun 2006
Posts: 364
Location: WV, USA

PostPosted: Tue Oct 20, 2020 2:04    Post subject: Reply with quote
After a few days of using this, I am quite impressed with the EA8500 and Entware. The CPU load on the router is minimal and I have a dozen sensors speaking to it via MQTT.

Even though I already have OpenVPN set up, I wonder how safe it would be to open this MQTT service up on the WAN side of the router. It would be quite handy to be able to communicate with some of my cloud servers. Any recommendations here?

_________________
Linksys EA8500 (Internet Gateway, AP) - DD-WRT r44719
Netgear R6250 (AP, VAP) - DD-WRT r44772
Linksys EA8500 (Gateway Backup) - DD-WRT r44236
Features in use: Samba, OpenVPN, WireGuard, Entware for Mosquitto
Member #248
PayneEdward
DD-WRT Novice


Joined: 21 Jan 2021
Posts: 1

PostPosted: Sat Jan 23, 2021 2:48    Post subject: Reply with quote
I, just like you, could not set up home automation, with the MQTT broker on dd-wrt and I just invited a specialist and he fixed everything. Basically, I really like the concept that everyone should do what they do best, and recieves good pay for it, then orders what others do best for it. This is much better than spending a lot of time yourself and do something that you are not an expert in. And as they say, time is money. So when I needed to take out a mortgage, I just went to Mortgage Broker Bristol instead of wasting a several days researching mortgages on my own.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum