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


Recommended Posts

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

Link to comment
  • 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

Link to comment
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.

Link to comment
  • 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.

Link to comment
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

Link to comment

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
Link to comment
  • 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.

Link to comment

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?

Link to comment

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

Sent from my Pixel XL using Tapatalk

Link to comment

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
Link to comment

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

Link to comment
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

 

Link to comment
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

Link to comment
Guest spants01
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

Link to comment

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!

Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.