Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[support] Spants - NodeRed, MQTT, Dashing, couchDB

Featured Replies

  • Author
12 hours ago, KMoney00 said:

With MQTT I've been getting intermittent disconnects the past few days with the below error. It's causing most of my home automation to fail since it's not getting my location updated. From Googling I see some references to this being related to version 1.4.8 but that's quite a bit out of my wheelhouse so I can't be sure.


1491447158: Socket error on client topic/myphone, disconnecting.

 

 

ok, I pushed 1.4.10 for you - see if that helps

  • Replies 551
  • Views 166.3k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Hi all, As you are discovering, this docker is quite old and needs to be updated. If you can bear with me, please try the manual steps to get a later version of MQTT and solve permissions problem

  • Yep. This container template deletes the entire database on upgrade. Hope no-one was storing anything important.   appdata/couchdb directory is mapped to Container Path: /usr/local/var/lib/c

  • Stupifier
    Stupifier

    Ya....just go into the Node-Red Docker template and change the repository as I said above and hit apply.......That's all I had to do. Love it

Posted Images

13 hours ago, spants said:

 

ok, I pushed 1.4.10 for you - see if that helps

 

Thanks for updating! It seems the version wasn't the root cause though as the problem still persists :( 

  • Author
On 07/04/2017 at 6:07 AM, KMoney00 said:

 

Thanks for updating! It seems the version wasn't the root cause though as the problem still persists :( 

ok, mine has been very stable with lots of devices attached

It's my understanding that the socket error is a Java Client issue.  Specifically it's an issue in the Paho client which other apps (such as owntracks) use.

  • 5 months later...

Thanks for the MQTT docker - worked perfectly for me to get data out of Smartthings and also out of owntracks/cloudmqtt into HomeAssistant.

 

I've setup a second owntracks/cloudmqtt instance that I also want to add - is it possible to add two .conf files?  When I do the docker won't start.

 

File1.conf

 

connection cloudmqtt
address m21.cloudmqtt.com:13451
remote_username redacted
remote_password redacted
clientid homeassistant
try_private false
start_type automatic
topic # in

File2.conf

 

connection cloudmqtt
address m20.cloudmqtt.com:14002
remote_username redacted
remote_password redacted
clientid homeassistant
try_private false
start_type automatic
topic # in

Thanks in advance

9 hours ago, DZMM said:

Thanks for the MQTT docker - worked perfectly for me to get data out of Smartthings and also out of owntracks/cloudmqtt into HomeAssistant.

 

I've setup a second owntracks/cloudmqtt instance that I also want to add - is it possible to add two .conf files?  When I do the docker won't start.

 

File1.conf

 


connection cloudmqtt
address m21.cloudmqtt.com:13451
remote_username redacted
remote_password redacted
clientid homeassistant
try_private false
start_type automatic
topic # in

File2.conf

 


connection cloudmqtt
address m20.cloudmqtt.com:14002
remote_username redacted
remote_password redacted
clientid homeassistant
try_private false
start_type automatic
topic # in

Thanks in advance

ok, I've solved.  What I’ve done is create bridges in Cloudmqtt where instance 2,3,4…n feed instance 1 with the direction set to in, and then instance 1 feeds my local MQTT broker.

  • 2 weeks later...

I am also trying to get MQTT working in Homeassistant and can not seem to do it. I have it working perfectly on my Pi3 but in my UNraid docker it refuses to work. Also, since my install is in appdata/mqtt/ I can not run dockersafe new permissions. Which is rough because I also can not see any files inside that directory even though it is shared. If I use MC, I can see everything but I don't know enough to get in and create the new file for passwords in there.
Any assistance would be appreciated.

  • Author
1 hour ago, LordShad0w said:

I am also trying to get MQTT working in Homeassistant and can not seem to do it. I have it working perfectly on my Pi3 but in my UNraid docker it refuses to work. Also, since my install is in appdata/mqtt/ I can not run dockersafe new permissions. Which is rough because I also can not see any files inside that directory even though it is shared. If I use MC, I can see everything but I don't know enough to get in and create the new file for passwords in there.
Any assistance would be appreciated.

Passwords for Mosquitto
=======================

Mosquitto likes encrypted passwords, but these are difficult create for a docker instance.
In the mosquitto.conf file, you will see the password file is called passwords.mqtt. Do not change this.

To add passwords to the MQTT instance, just store a file called passwords.txt in this directory and restart the docker.
The passwords will be encrypted and stored in passwords.mqtt and the old passwords.txt file will be deleted.

The contents of passwords.txt should look like this:

bob:bobpassword
fred:fredpassword


The new passwords are added to the top of password.mqtt when they are encrypted. MQTT uses the first username/password
combo that it finds. You can delete the old passwords manually if you wish.

1) stop the mqtt docker

2) ssh to the unraid server and navigate to the appdata directory

3) type     nano passwords.txt          and add your user:password

4) save file and exit nano

5) restart docker = it should import and create the users and put them in passwords.mqtt

(use MC, highlight passwords.mqtt and press F3

 

Hope that helps

Thanks for the quick reply. I was actually able to do it much more simply. I went in to CMD then MC and then into the MQTT directory and used ```touch passwords.txt``` to create the file then I edited it and saved and restarted the docker. So, that worked. However, I can not for the life of me get MQTT to actually contol what is happening in Homeassistant. Using MQTTfx, I can see that both the HA docker and the MQTT docker are talking to each other as evidenced by me hitting a switch to activate a device from within HA. The input is shown in MQTT.fx but there is no actual state change for the device I am trying to control. Very odd.
By state change, I mean the physical device does not actually respond in any way, ie. turn on/off.

Edited by LordShad0w

  • Author

Unfortunately I dont use home-assistant... I built all my Home Automation on NodeRed (and mqtt) 

Any chance you would be able to point me to a solid resource on getting MQTT talking to another docker then?

 

Edited by LordShad0w

  • 2 months later...

I just decided to open up nodered again on my unraid install. I had used it for a few home automation things in my previous home and I moved about a year ago and haven't opened it back up because I just haven't had time to get anything setup hardware wise. I decided to try something today and opened up nodered and it autoupdated upon starting and now it seems like nothing works.

 

The import option just shows a black bar with no options for importing.

My previously imported libraries are gone

When I hit deploy it says that it has deployed, but then I go to inject into a debug msg.payload and it says the node is not deployed. 

 

Clearly, something has gone completely wrong here. Any ideas/input? I really don't want to lose my work flows/nodes that I've created and hopefully this won't be an issue in the future as I like things to be stable so I can count on them to work all the time.

  • Author

I seem to remember that the default name for the flows/creds changed some time back....now flows.json and flows_cred.json

Edited by spants

Thanks. Any idea on what I can do to get this thing back up and running? I loved node red and used it to interface with all of my devices before rendering information to a UI.

 

The flow of my setup: Hardware ---> MQTT ---> NodeRed ---> OpenHab

 

Should I nuke the docker and start from scratch? Can I save the flow*.json files to keep my flows?

If your problem is what spants is referring to you should have a flows.json file in the node-red appears folder. This file would be empty.
Your old flow.json file should still be there in that same folder.
You should backup that file, remove the newer(empty) flows.json and rename your old flow.json file to flows.json

If what I seem to remember is correct [emoji14]

Sent from my Pixel XL using Tapatalk

Here is a screenshot of the files I have in my NodeRed folder

 

BTW, anyone know what forum platform this is, I like it?

Screen Shot 2017-12-06 at 11.40.50 AM.png

  • Author

change flow to flows for each.... (keep a backup)

 

ie to:

flows.json

flows_cred.json

Edited by spants

I did that and i was able to create a flow that actually worked, simply input in to debug.

 

My old flows are not there anymore (kept a backup). It seems that nodered created another flow.json even when I changed it to flows.json.

 

I have also taken a screenshot of the import area and what it does.

5a2851f8055fe_ScreenShot2017-12-06at12_21_58PM.thumb.png.ddbba4ae6d437d3e810aa6e56940d8e9.png

Screen Shot 2017-12-06 at 12.20.48 PM.png

 

Edited by live4soccer7

Spants,

 

I am looking to use the MQTT docker with the letsencrypt reverse proxy.  My goal was to use my domain name   mqtt.MYDOMAINNAME.com for MQTT messages for cell phones for location detection and other devices that are not on my local lan.  

 

I have been having difficulty getting this to work...clients are failing to connect.  I may have a bust in my letsencrypt config.  While investigating this, I came across this website:  http://frankfurtlovesyou.com/posts/mqtt-bridge-with-mosquitto-and-nginx.html   

 

Just wondering how you handle MQTT when you are not on your local lan.  I am trying to avoid a port forward as I feel reverse proxy is safer.   Any thoughts?

 

Thanks,

 

Dan

  • Author
7 hours ago, goinsnoopin said:

Spants,

 

I am looking to use the MQTT docker with the letsencrypt reverse proxy.  My goal was to use my domain name   mqtt.MYDOMAINNAME.com for MQTT messages for cell phones for location detection and other devices that are not on my local lan.  

 

I have been having difficulty getting this to work...clients are failing to connect.  I may have a bust in my letsencrypt config.  While investigating this, I came across this website:  http://frankfurtlovesyou.com/posts/mqtt-bridge-with-mosquitto-and-nginx.html   

 

Just wondering how you handle MQTT when you are not on your local lan.  I am trying to avoid a port forward as I feel reverse proxy is safer.   Any thoughts?

 

Thanks,

 

Dan

 

I use a non-standard port number with user/pass. The url is maintained by a dynamic dns service.

You can also limit the Topics and actions by username to restrict access

 

I did that and i was able to create a flow that actually worked, simply input in to debug.
 
My old flows are not there anymore (kept a backup). It seems that nodered created another flow.json even when I changed it to flows.json.
 
I have also taken a screenshot of the import area and what it does.
5a2851f8055fe_ScreenShot2017-12-06at12_21_58PM.thumb.png.ddbba4ae6d437d3e810aa6e56940d8e9.png
5a2851d37d551_ScreenShot2017-12-06at12_20_48PM.thumb.png.06e3dfce31d479057f9e3ee559092c5e.png
 
Are you also still using spants's original docker?
You should migrate to the newer official node-red template by spants.
You are running 14.7 while the official docker is at 15.7(?).



Sent from my Pixel XL using Tapatalk

Thanks! Well that may just be it. I installed the one by spants probably 2 yrs ago and then haven't started it in the last year until a few days ago to start using it for some functionality that would save me some sleep by autostarting a device that I typically would have to wake up for each day during the colder months.

I got it updated. How do I import new libraries? I figured I would go to Menu -- Import -- Library --- Choose file. Do I need to put the file in the docker directory first for it to show up there? It has been so long since I did this that I can't recall what I did back then.

I got it updated. How do I import new libraries? I figured I would go to Menu -- Import -- Library --- Choose file. Do I need to put the file in the docker directory first for it to show up there? It has been so long since I did this that I can't recall what I did back then.
Manage palette is how you add new nodes.

Sent from my SM-G935F using Tapatalk

Hello!

 

I have a few questions about the username/password combo and encryption for MQTT.

 

I have already setup my username and password for the MQTT server. I have also seen that the passwords on the server side are encrypted once added. However, as I understand it, the MQTT clients will still send the username/password as unencrypted plain text to the server if SSL/TLS are not used.

 

Is my understanding correct here? 

 

The docker description states that it supports certificates. How do I setup SSL/TLS for the MQTT broker?

 

Is there another way to secure the MQTT clients from packet sniffing?

 

Thanks!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.