spants Posted April 6, 2017 Author Share Posted April 6, 2017 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 Quote Link to comment
KMoney00 Posted April 7, 2017 Share Posted April 7, 2017 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 Quote Link to comment
spants Posted April 8, 2017 Author Share Posted April 8, 2017 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 Quote Link to comment
silversrfr Posted April 12, 2017 Share Posted April 12, 2017 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. Quote Link to comment
DZMM Posted September 15, 2017 Share Posted September 15, 2017 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 Quote Link to comment
DZMM Posted September 16, 2017 Share Posted September 16, 2017 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. Quote Link to comment
LordShad0w Posted September 26, 2017 Share Posted September 26, 2017 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. Quote Link to comment
spants Posted September 26, 2017 Author Share Posted September 26, 2017 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 Quote Link to comment
LordShad0w Posted September 26, 2017 Share Posted September 26, 2017 (edited) 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 September 26, 2017 by LordShad0w Quote Link to comment
spants Posted September 26, 2017 Author Share Posted September 26, 2017 Unfortunately I dont use home-assistant... I built all my Home Automation on NodeRed (and mqtt) Quote Link to comment
LordShad0w Posted September 26, 2017 Share Posted September 26, 2017 (edited) Any chance you would be able to point me to a solid resource on getting MQTT talking to another docker then? Edited September 26, 2017 by LordShad0w Quote Link to comment
live4soccer7 Posted December 6, 2017 Share Posted December 6, 2017 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. Quote Link to comment
spants Posted December 6, 2017 Author Share Posted December 6, 2017 (edited) I seem to remember that the default name for the flows/creds changed some time back....now flows.json and flows_cred.json Edited December 6, 2017 by spants Quote Link to comment
live4soccer7 Posted December 6, 2017 Share Posted December 6, 2017 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? Quote Link to comment
beire Posted December 6, 2017 Share Posted December 6, 2017 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.jsonIf what I seem to remember is correct [emoji14]Sent from my Pixel XL using Tapatalk Quote Link to comment
live4soccer7 Posted December 6, 2017 Share Posted December 6, 2017 Here is a screenshot of the files I have in my NodeRed folder BTW, anyone know what forum platform this is, I like it? Quote Link to comment
spants Posted December 6, 2017 Author Share Posted December 6, 2017 (edited) change flow to flows for each.... (keep a backup) ie to: flows.json flows_cred.json Edited December 6, 2017 by spants Quote Link to comment
live4soccer7 Posted December 6, 2017 Share Posted December 6, 2017 (edited) 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. Edited December 6, 2017 by live4soccer7 Quote Link to comment
goinsnoopin Posted December 7, 2017 Share Posted December 7, 2017 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 Quote Link to comment
spants Posted December 7, 2017 Author Share Posted December 7, 2017 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 Quote Link to comment
beire Posted December 7, 2017 Share Posted December 7, 2017 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. 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 Quote Link to comment
live4soccer7 Posted December 7, 2017 Share Posted December 7, 2017 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. Quote Link to comment
live4soccer7 Posted December 7, 2017 Share Posted December 7, 2017 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. Quote Link to comment
Guest spants01 Posted December 7, 2017 Share Posted December 7, 2017 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 Quote Link to comment
ZipsServer Posted December 10, 2017 Share Posted December 10, 2017 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! Quote Link to comment
Recommended Posts
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.