WoW Hubitat

Very impressive the way the Hubitat Company/People go about their business. Updates/fixes/Request they try and do it all. Pretty damn good and fast.

Release 2.2.5.127 Available

Changes from 2.2.5.126

Bug Fixes:

  • Properly handle hub names with ampersand.
  • Consistent enable/disable events for hub mesh.

Enhancements:

  • Prefix backup download with hub hame.
  • Added "dismiss" to version update alert.
  • Thermostat controller update.
14 Likes

Happy dance!!

6 Likes

I know... Such a small thing, but so appreciated on my end!

2 Likes

So small that I would never have even thought to ask for it. But such a nice touch for those of us keeping backups for multiple hubs.

3 Likes

I'm so easy to please...this is a great feature

so happy for this! i suggested it a while ago, glad they were able to make it happen :smiley:

I haven't updated yet, is this an option or forced? Asking because it will break my scripts that download backups and upload to my NAS so I want to know if those will break on me.

I've been using home automation platforms for at least 15 years now. One of the things that always annoyed me with other systems was when the user community found a bug, we often had to wait months for a fix (if it was addressed at all). The Hubitat crew really seems to have learned from the experience they likely had with those platforms, as users themselves. GREAT to see, and appreciated. This is by far the best experience as a user I've ever had.

4 Likes

Forced I think. At least I didn't see an option for it.

1 Like

@dman2306, my backups to my NAS did not break with this upgrade, all four went as scheduled this morning.

1 Like

what kind of scripts if you don't mind me asking? i've gotten lazy recently and not taking as frequent backups as i'd like, and if i can automate it, i'm definitely down to do so

I have my scripts running on a windows machine.. with a scheduled task.. it uses curl..
here is the script if you would like to use it.. my hubs are password protected .. so you have to update the script with your username and password and IP address of hub. and Also update the path of curl. ( after downloading it from the web )

here is the script... I have copied row 17 -20 for extra hubs, and updated for their IP addresses.
**** download_backups.vbs****

Set args = WScript.Arguments

Set WshShell = WScript.CreateObject("WScript.Shell")

Dim exeName
Dim statusCode

curl_path="C:\curl\curl-7.72.0-win64-mingw\bin"
my_download_path="Y:\Hubitat\Backups"
my_date = DatePart("yyyy",now()) & lpad(DatePart("m",now()),"0",2) & lpad(DatePart("d",now()),"0",2) & "_" & lpad(hour(now()),"0",2) & lpad(minute(now()),"0",2) & lpad(second(now()),"0",2)

exeName = curl_path & "curl.exe -c cookie.txt -d ""username=YOUR_USERNAME"" -d ""password=YOUR_PASSWORD"" http://IP_ADDRESS_OF_HUB/login"
statusCode = WshShell.Run (exeName, 1, true)
my_save_file=my_download_path & "Hubitat_" & my_date & ".lzf"
exeName = curl_path & "curl.exe -sb cookie.txt http://IP_ADDRESS_OF_HUB/hub/backupDB?fileName=latest -o """ & my_save_file & """"
statusCode = WshShell.Run (exeName, 1, true)

Function LPad (str, pad, length)
LPad = String(length - Len(str), pad) & str
End Function

1 Like

I use this as a nightly task on a Synology NAS. I think I found it on the forum and modified it, can't remember! I then use CloudSync to send it up to the cloud. And @douglaspitman was right, no changes needed with this change to the filenames.

he_login=myuser
he_passwd=mypass

he_ipaddr=$1
backupdir="/volume1/backups/$2"
cookiefilename='cookiefile.txt'
cookiefile=$cookiefilename

find $backupdir* -mtime +14 -exec rm {} \;

curl -k -c $cookiefile -d username=$he_login -d password=$he_passwd https://$he_ipaddr/login

curl -k -sb $cookiefile https://$he_ipaddr/hub/backup | grep download | awk -F"=" '{ print $4}' | awk -F'"' '{print $2}' | sed '/^$/d' | tail -1 | xargs -I @ curl -k -sb $cookiefile https://$he_ipaddr/hub/backupDB?fileName=@ -o $backupdir/Hubitat_$(date +%Y-%m-%d-%H%M).lzf
3 Likes