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

This is where I will be hosting some dockers that I find useful, built on a Phusion or Linuxserver base.

Add to your templates if you wish.

 

https://github.com/spants/unraidtemplates/

*** Also added template support for the official NodeRed docker image - loads the latest version!!!. You can extra nodes through the Palette menu option. Therefore I will retire my unofficial version. Make a copy of your appdata directory and rename any 'flow' files to 'flows' ***

 

 

 

NodeRed

======

This is THE Internet of Things package!. See http://www.nodered.org and http://flows.nodered.org for more info. I use this to link with my TADO heating system, Ciseco wireless sensors and Open weathermap linked with EmonCMS to produce heating graphs.

 

It uses building blocks to manipulate data from devices/databases/twitter/http/mqtt etc etc - very powerful!

 

MQTT  *** Revert to Mosquitto 1.4.8 and Alpine Linux 3.3 27th Jan 2020 - due to timeout bug found ***

====

Please see Skylord123's excellent tutorial on setting this up  https://skylar.tech/installing-mqtt-under-docker/

 

Setup for port 1883 and websockets on Port 9001. Supports usernames/passwords and certificates.

 

To add authenticated users to MQTT, create a file named passwords.txt and save in the config directory. On restart, these will be encrypted and added to the top of the passwords.mqtt file.

 

You might need to run NEWPERMS to edit the config file.

 

Dashing  *** Updated 08-Dec-2015, added dev tools ***

======================================

From dashing.io =

Dashing is a Sinatra based framework that lets you build beautiful dashboards.

 

Key features:

 

Use premade widgets, or fully create your own with scss, html, and coffeescript.

Widgets harness the power of data bindings to keep things DRY and simple. Powered by batman.js.

Use the API to push data to your dashboards, or make use of a simple ruby DSL for fetching data.

Drag & Drop interface for re-arranging your widgets.

Host your dashboards on Heroku in less than 30 seconds.

This project was created at Shopify for displaying custom dashboards on TVs around the office.

 

Sample dashboards installed at IPaddress:3030/sample  and IPaddress:3030/sampletv

 

couchDB

=======

unRaid template for the (semi)official Apache couchDB docker https://github.com/apache/couchdb-docker

Edited by spants
update mqtt

  • Replies 551
  • Views 166.4k
  • 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

Looks really interesting.  Have to sit down over a weekend and play with it some time

 

  • 1 month later...
  • 1 month later...

Installing new nodes.

How do I install additional nodes into you Docker for NodeRed?

This is great.

It took me about 15min to install and connect to a "hidden" API on Efergy to read my real time energy consumption and write it to a file.

Just for fun I attached a web-service to dump the file back to a website.

 

I followed the video on the first post and this little blog:

http://blog.krisdaniels.be/efergy-engage-api/

 

Next challenge to store the data in a MariaDB.

efergy_flow.png.ed38167ff8c419620f0cc92a8802393e.png

  • Author

Glad its working!. I did a similar thing with my Tado heating system.

Why not use emoncms as the back end for the energy data?. Actually that may be a great docker to build......

 

@Dallas.toth, which nodes would you like?

 

Thanks, emoncms looks interesting.

 

Since you are asking, some MySQL/MariaDB nodes would be great.

And some MSSQL ones as well. Looking to connect to a MS SQL DB for some big data querying.

Thanks

There is also a emoncms  connector...,

 

I saw it is rather simple to add the nodes, but would they "survive" a docker rebuild?

 

On a different question, once I started writing to the file the disk obviously does not spin down anymore. Do you just write to your cache drive?

 

Thanks

node-red-contrib-odbc is a good all around MSSQL DB connector.

  • 2 months later...
  • 3 weeks later...

Any update on being able to setup a username/password for MQTT?

 

I'm also holding off for username/password. I'm not comfortable opening this up onto the internet without it. Thanks!!

  • Author

Sorry

- I had forgotten about adding MQTT passwords, I will add it shortly.

- I am also planning some updates to Node-Red nodes

 

Tony

  • Author

I have updated the Node-Red container - added lots more nodes, updated Node-Red and Node to the latest versions.

MQTT is next on my list. I would like to add username/password to the settings page - I'm reading up on that....

Thanks for updating Node-Red, but why remove the EmonCMS node?  I had to add it back in manually to keep all my energy posting flows working.

 

Also, if you plan on updating MQTT you should jump up the latest version of Mosquitto as the current version in your container is very old.  The statements below will add the new repository and install the current 1.4.3 version.

 

RUN add-apt-repository ppa:mosquitto-dev/mosquitto-ppa -y

RUN apt-get update

RUN apt-get install -y mosquitto mosquitto-clients

  • Author

good catch on emoncms, I use it myself but missed it off the list.

I will add it now. ***** now added *****

 

Thanks for the mosquitto hints. I have something in beta but will look at your notes.

I need to add websockets support/ passwords and options for certificates

 

Tony

  • Author

MQTT completely updated - latest Mosquitto version 1.4.3, password support and more.

 

Typo in the XML file.  Issued a Pull Request on MQTT.xml

  • Author

Be aware that Openweather map and Forecast.io nodes do not seem to work correctly on the latest NodeRed....

 

I use the following code in Node Red to get the current temperature instead: (copy and then Import)

 

[{"id":"9e1f670b.61e098","type":"mqtt-broker","broker":"localhost","port":"1883","clientid":""},{"id":"8c7d3ed4.7382c","type":"function","name":"Outside Temp","func":"\nif (msg.payload == \"\" ) {\n\treturn null;\n\t}\n\nvar weather = JSON.parse(msg.payload); \n//msg1 = {topic:\"Buxted/sunrise\", payload:weather.sys.sunrise};\n//msg2 = {topic:\"Buxted/sunset\", payload:weather.sys.sunset};\nweathertemp = Math.round( weather.main.temp * 10 ) / 10;\nmsg = {topic:\"House/Temp/Outside\", payload:weathertemp};\nreturn msg;","outputs":"1","x":607.638916015625,"y":222.74993896484375,"z":"a4d9ce41.5b263","wires":[["bd4969.ff42b698"]]},{"id":"c950f21e.36af1","type":"http request","name":"Openweathermap","method":"GET","ret":"txt","url":"http://api.openweathermap.org/data/2.5/weather?q=London,uk&units=metric","x":378.4167175292969,"y":222.08331298828125,"z":"a4d9ce41.5b263","wires":[["8c7d3ed4.7382c"]]},{"id":"9116d09f.6ee93","type":"inject","name":"1 Min Timer","topic":"","payload":"","payloadType":"date","repeat":"60","crontab":"","once":false,"x":194.0000457763672,"y":221.77777099609375,"z":"a4d9ce41.5b263","wires":[["c950f21e.36af1"]]},{"id":"bd4969.ff42b698","type":"mqtt out","name":"","topic":"","qos":"1","retain":"true","broker":"9e1f670b.61e098","x":825,"y":223,"z":"a4d9ce41.5b263","wires":[]}]

I have the MQTT docker up and running and it is great! Thank you! I have installed the OwnTracks app on my iPhone and it is reporting back as my location changes. I see on the OwnTracks web site that they have a client that consumes MQTT location information and can store it in a database, reverse geocode it and then show it on a map.

 

Would it be possible to get an unraid Docker containing their o2s / Pista ?

http://owntracks.org/booklet/guide/clients/

https://github.com/owntracks/pista

 

hoping,

 

 

  • 2 weeks later...

I've been having some problems after the MQTT rewrite. I keep getting connection refused when I try to connect using mosquitto_sub on another machine.

 

If I overwrite the entry point of the docker with the command 'mosquitto', it runs just fine but passwords are not validated and everyone just has access.

 

Running the docker from the command line with TTY attached, I see these errors:

 

root@Hydra:/mnt/cache/app_config/mqtt# docker run -t -i --net="bridge" -e TZ="America/Los_Angeles" -p 1883:1883/tcp -v "/mnt/cache/app_config/mqtt/":"/config":rw spants/mqtt
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/10_add_user_abc.sh...
/etc/my_init.d/10_add_user_abc.sh: line 3: [: : integer expression expected
/etc/my_init.d/10_add_user_abc.sh: line 4: [: : integer expression expected

-----------------------------------
GID/UID
-----------------------------------
User uid:    911
User gid:    8378
-----------------------------------

*** Running /etc/my_init.d/60_update_apps.sh...
(Reading database ... 13828 files and directories currently installed.)
Preparing to unpack .../mosquitto_1.4.4-0mosquitto1_amd64.deb ...
invoke-rc.d: policy-rc.d denied execution of stop.
Unpacking mosquitto (1.4.4-0mosquitto1) over (1.4.3-0mosquitto1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up mosquitto (1.4.4-0mosquitto1) ...
invoke-rc.d: policy-rc.d denied execution of start.
*** Running /etc/my_init.d/80_set_config.sh...
*** Running /etc/my_init.d/90_new_user.sh...
/etc/my_init.d/90_new_user.sh: line 3: [: : integer expression expected
/etc/my_init.d/90_new_user.sh: line 4: [: : integer expression expected

-----------------------------------
GID/UID
-----------------------------------
User uid:    911
User gid:    8378
-----------------------------------

*** Running /etc/rc.local...
*** Booting runit daemon...
*** Runit started as PID 139
Error: Unable to open config file /config/mosquitto.conf

Error found at /config/mosquitto.conf:32764.
Error: Unable to open configuration file.
Sep 20 12:24:38 b38c5292ebd4 syslog-ng[145]: syslog-ng starting up; version='3.5.3'
Error: Unable to open config file /config/mosquitto.conf

Error found at /config/mosquitto.conf:32764.
Error: Unable to open configuration file.
Error: Unable to open config file /config/mosquitto.conf

Error found at /config/mosquitto.conf:32767.
Error: Unable to open configuration file.
Error: Unable to open config file /config/mosquitto.conf

If I run a bash shell inside the container and run 'mosquitto -c /config/mosquitto.conf' I get the following:

 

root@0058acdb3406:/config# mosquitto -c mosquitto.conf
1442777398: Error: Unable to open log file /config/log/mosquitto.log for writing.
1442777398: mosquitto version 1.4.3 (build date Wed, 19 Aug 2015 12:10:03 +0100) starting
1442777398: Config loaded from mosquitto.conf.
1442777398: Error: Unable to open pwfile "/config/passwords.mqtt".
1442777398: Error opening password file "/config/passwords.mqtt".

If I run from bash chmod +x on the config directories it will work. But the permissions get reverted after I restart container.

 

# From /config
chmod +x . log data conf.d certs ca_certificates/

 

 

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.