QNAP NAS Integrations for UPS Monitoring, NodeRed, Home Bridge, etc


#1

For those of you with a NAS, especially QNAP brand, I wanted to share ways that I am utilizing my NAS for various integrations. I don't have any familiarity with other NAS brands like Synology but I understand that many support Docker containers so these may be possible on those devices as well. Feel free to comment with other ways you are using your NAS for HE integrations.

  • UPS Integration - I have a UPS connected via USB to my NAS. When power outages occur, I wanted the ability to automate shutting down of devices within my home via my Web Power Switch as well as shut down my multiple HE hubs gracefully. This integration polls the QNAP NUT Server for status on a set interval. Huge thank you to @guyeeba for posting a RPi driver on the community that inspired me to create my own version for use with my NAS and @stephack for helping me test this driver! You can find the driver code and instructions here:
    NUT-UPS-Monitor/README.md at master · HubitatCommunity/NUT-UPS-Monitor · GitHub
  • NodeRed - there are several posts on this Community on how to setup NodeRed on RPis such as this one but QNAP has a QIoT Suite feature that includes NodeRed. QIoT requires that your QNAP NAS supports/handles Container Station (aka Docker Containers) in order to enable this feature. Once setup you can automate things via NodeRed. I have the following integrations as an example:
    • Every night at 4 AM a flow downloads the HE backups of my 3 hubs and puts it in a folder on my NAS.
    • Connection to the HE web socket to log events into InfluxDB and Grafana as well as SQL server
    • Using QNAP QcalAgent (which downloads my Google Calendar) check for specific calendar event descriptions and if an event is found turn on/off virtual switches within HE. I then have Rules that are restricted based on the state of these virtual switches.
  • Container Station Containers:

I am happy to answer any questions you may have but I wanted to foster ideas on how to better utilize features on your NAS.


Hue Bulbs direct to Hubitat. Power on options?
Hub error 500
[RELEASE] APC UPS Monitor Driver
#2

@ritchierich, I'm glad you decided to share this. I have it installed on my Dev hub and use it together with RM to shutdown my main hub if I have an extended power outage and the battery falls below 30%. Works perfectly as designed.

Unfortunately my Qnap does not support Container Station but I'm looking to upgrade as soon as I can gather the funds. Then I can move the NR instance, influxdb and Grafana from my win10 box to my Nas.


#3

I have a QNAP NAS and I’m struggling to get Node.JS in container station up and running. Do you have any step by step instruction on how you managed to get this working for use with the Alexa TTS that Id like to convert over too?


#4

FYI I have the 453 with added ram sticks.


#5

I have a 451 with added ram - 8GB I believe

I went to ContainerStation


#6

Awesome, thanks for sharing!

I’m running homebridge in a docker container, but have been meaning to look into integrating the UPS I recently bought. I might want to give NodeRed a try as well for the scheduled backups and to visualize some data graphically.


#7

If a UPS is connected to a QNAP NAS via USB, is there a way to automate shutting down a windows 10 PC as well if the power goes out and the NAS switches to battery?


#8

There is a program called "winnut" that you can install on the windows box and then set it up as another IP within QNAP to talk to. The winnut code is very old but it still works on one of my PCs. Here is a very old post of mine on the QNAP forum with some details:
https://forum.qnap.com/viewtopic.php?t=33248

Then search using your favorite engine for "winnut" to download the program. I believe I am using this one:
https://code.google.com/archive/p/winnut/downloads

Edit, there are third party programs that you can install as well that HE could potentially call to shut it down such as the first item in this list:


#9

What ports are you using for Node.JS? 81 and 82 didn’t work for me.


#10

Typically when I need to configure something within the docker container I use bridge mode and set a static IP. Here are my container network settings:


#11

Which version of Nodejs are you running? I've got 12.4.0 successfully setup but I'm having cookie issues and can't get the AlexaTTS setup to work. I keep getting an invalid cookie message notification from Hubitat :frowning: Just want to rule out it's not a version problem I'm having.


#12

Version 9, see screenshot above for details on exact image I chose. Re version/install problem you may want to post a question in that other thread and maybe folks more familiar with Node may help. Unfortunately I don’t know a ton about it and was lucky to get it working. :grin: