Great solution. The only issue is with ignoring device provisioning and data stored in the database. I would also want all my esphome device setups and mariadb data so I don't have to loose that. The other automation that might be beneficial is to send a notification to me when files are sent OR don't automatically push, but tell the user when a push is necessary. I could also see the benefit behind stopping future pushes when the system shows errors in logs or when the configs are broken.
Since response values can be included the service for Shell Commands provide all the command output so you could parse that in an automation to look for problems.
Urgh, idk how but the terminal closed and i lost connection in the middle of things. I restarted the terminal, I was as far as putting my key in github, ( around 9:02 ) am i ok to pick up where i left off?
Thanks for the video, it was very helpful. Unfortunately I ran into an issue with creating the sh file. I literally copied the commands I used manually first, but when I run it through the sh file it gives me an error: fatal: pathspec '.?' did not match any files If I do the git add . manually first and remove that line from the shell file I'm able to run it. Any idea why the git add doesn't work from my shell file?
Thanks for a great video! I followed it until the upload... I get this error "[core-ssh config]$ git push -u origin master ssh: Could not resolve hostname _f: Name does not resolve fatal: Could not read from remote repository. Please make sure you have the correct access rights What did I miss in your video?
How can I get my "SmartThings Home Monitor" (alarm system) into a dashboard in Home Assistant. Also how do I bring in my RING alarm system into Home Assistant? Ideally I would want both and have them both in a control panel where I can check their status and arm or disarm them.
Jeff. For Ring, take a look at www.home-assistant.io/integrations/ring/ and community.home-assistant.io/t/ring-device-integration-via-mqtt-w-video-streaming/102105. I can't vouch for either of those but that's a start. There is an integration for Smart Things as well: www.home-assistant.io/integrations/smartthings/ I don't know if the smart monitor is part of the supported devices. There is a link under number 1 in the first paragraph that links to the device list.
@@mostlychris thank you Chris. I have already integrated both Ring and Smart Things however neither of them see the alarm system in the Ring integration or "home monitor"/alarm in Smartthings.
The unfortunate thing about cloud based services is that they control what they allow others to access. I've been lucky that my alarm system has a local IP connection and the company that makes the card hasn't turned off access. Maybe someone else on here has an idea how to integrate Ring if Ring itself allows it.
Excellent video Chris! I just recently moved from HA container to HAOS. This was a perfect walk through to backup my files to github. I added a little extra code to the end of the git commit line: git commit -m "config files on `date +'%d-%m-%Y %H:%M:%S'`" >/config/git_log.txt 2>&1 which outputs the results into a log file. I then have sensors that read the file. If the log shows an error, then I get a notification to investigate.
@@thomaskronawitter7306 sure! I have 3 command line sensors that read the log file and 1 template sensor that I monitor in an automation (I use node red). If the template sensor named "Github Backup Status" ever returns "Error" as the state, I will be sent a notification. - platform: command_line name: Github No Changes command: 'dd if=/config/git_log.txt ibs=1 skip=17 count=25' - platform: command_line name: Github Changes command: 'dd if=/config/git_log.txt ibs=1 skip=541 count=53' - platform: command_line name: Github Grep Changes command: "grep -c 'changed' /config/git_log.txt" - platform: template sensors: github_backup_status: friendly_name: GitHub Backup Status value_template: > {% if is_state("sensor.github_no_changes", "Your branch is up to date") %} Up To Date {% elif states("sensor.github_grep_changes") | float(0) > 0 %} Changes Made: {{ states('sensor.github_changes') }} {% else %} Error {% endif %}
@@techdad6135 If someone reads this: this way is outdated since december 2023. Now the sensors need to be placed under command_line: in your configuration.yaml. command_line: - sensor: name: Github No Changes command: "dd if=/config/git_log.txt ibs=1 skip=17 count=26" - sensor: name: Github Changes command: "dd if=/config/git_log.txt ibs=1 skip=541 count=53" - sensor: name: Github Grep Changes command: "grep -c 'changed' /config/git_log.txt" If you want to declutter your configuration.yaml, you can create a seperate file "command_line.yaml" and then put "command_line: !include command_line.yaml" in your configuration.yaml, and then put the above code in that file, without the first "command_line:" line. The last sensor is a template sensor and still can be placed under sensor: for now.
Hi … NEED HELP I just want to update my System…. But I get this Message…. 'HomeAssistantCore.update' blocked from execution, system is not healthy You have 2022.3.3 installed. Click Update to upgrade to version 2022.4.1. What can i do ? Whats wrong or what happend ? THANKS alot
anybody know how to delete a file from github repo but have it untouched from my main local config? I included secrets in gitignore but it still uploaded it to github repo. Even though it's private repo I would feel more at ease not having that file online.
Thanks i followed all this and is running nicly, one issue i ran into was getting the commits with the default root user not my own github username and password, so i added git config --global user.email "MYemail and git config --global user.name "myname", looks like it won't remember it , for next run don't know why, but i added the 2 lines to my push sh file so it gets set all the time... thanks again
First, thank you for the Video. A few improvements you could make in the futur is planning the whole video and then recording it, because its a little bit frustrating to write a config and then have to edit it again. And it would also be great if you could link the configs and the commands in the description so you dont have to type all this manually from the screen. But still thanks for your engagement :D
Thanks for the feedback. Most videos flow well. Every once in awhile I get a little backwards and then just simply run out of time to start the whole thing over. That's where creative editing comes in and saves the day--mostly. I'll try and do a better job of posting command in the description where applicable.
@@mostlychris I think it's not frustrating at all seeing you making changes to the config files. It just shows how to solve problems. Seing the whole process for me was especially motivating.
Exellent, I need to try this. I upload to github manually right now, but this is better. The first line in .gitignore should/could be /* That will ignore everything, then you include the stuff you want. That way you don't accidentally upload something that HA suddenly decides to add...
Thanks for the tip. And thanks to Chris for the great video. Here's a variation that allows exceptions for backups in subfolders (which would otherwise be ignored) * # ignore everything !*/ # but allow searching in subdirectories !*.yaml !.gitignore !lovelace* # if you use UI controlled dashboards, then you'll want to copy the js versions of the YAML files from the .storage directory, since config/lovelace.yaml is not used in that situation
if anyone else have a hard time re-writing the code when the 128 error occurs, here it is: git config core.sshCommand 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa -F /dev/null'
Thanks!
That was awesome. I learned a lot from this video. This was on my list of things to do.
Thanks Chris. It took me a couple of attempts at this and much angst over the gitignore file, but I got there eventually.
Perfectly timed! I have been kicking around how to achieve this for the past few days. Thanks!
Great to hear!
awesome! needed a way to do this!
Thanks!
Great solution.
The only issue is with ignoring device provisioning and data stored in the database.
I would also want all my esphome device setups and mariadb data so I don't have to loose that.
The other automation that might be beneficial is to send a notification to me when files are sent OR don't automatically push, but tell the user when a push is necessary.
I could also see the benefit behind stopping future pushes when the system shows errors in logs or when the configs are broken.
Since response values can be included the service for Shell Commands provide all the command output so you could parse that in an automation to look for problems.
Danke!
You're welcome. Apologies for the VERY late response. Holidays and moving just ate my time.
Thx for the clear explanation, should have come here first, because i got stuck on the error 128.
But luckily you had the solution for that problem
Excellent. Thanks for watching!
SAME!
Urgh, idk how but the terminal closed and i lost connection in the middle of things. I restarted the terminal, I was as far as putting my key in github, ( around 9:02 ) am i ok to pick up where i left off?
Thanks for the video, it was very helpful. Unfortunately I ran into an issue with creating the sh file. I literally copied the commands I used manually first, but when I run it through the sh file it gives me an error:
fatal: pathspec '.?' did not match any files
If I do the git add . manually first and remove that line from the shell file I'm able to run it. Any idea why the git add doesn't work from my shell file?
Looks like the SSH key in GitHub has changed name to "Deply Keys", although working the same way and you need to enable write
its prompting me for my github username and password in terminal when I try doing the commit. Any idea what wrong? Thanks
Another great video, thanks for doing this one. Apart from my fat fingers it all worked well.
Excellent and you're welcome!
Hi sir, I am not getting information in developer tool to call services....in the developer tool service tab is showing completely blank
Can you jump over to my discord and post a screenshot of what you are seeing?
Thanks for a great video! I followed it until the upload... I get this error "[core-ssh config]$ git push -u origin master
ssh: Could not resolve hostname _f: Name does not resolve
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
What did I miss in your video?
Tutorial for docker unraid users?
How can I get my "SmartThings Home Monitor" (alarm system) into a dashboard in Home Assistant. Also how do I bring in my RING alarm system into Home Assistant? Ideally I would want both and have them both in a control panel where I can check their status and arm or disarm them.
Jeff. For Ring, take a look at www.home-assistant.io/integrations/ring/ and community.home-assistant.io/t/ring-device-integration-via-mqtt-w-video-streaming/102105. I can't vouch for either of those but that's a start.
There is an integration for Smart Things as well: www.home-assistant.io/integrations/smartthings/ I don't know if the smart monitor is part of the supported devices. There is a link under number 1 in the first paragraph that links to the device list.
@@mostlychris thank you Chris. I have already integrated both Ring and Smart Things however neither of them see the alarm system in the Ring integration or "home monitor"/alarm in Smartthings.
The unfortunate thing about cloud based services is that they control what they allow others to access. I've been lucky that my alarm system has a local IP connection and the company that makes the card hasn't turned off access. Maybe someone else on here has an idea how to integrate Ring if Ring itself allows it.
Excellent video Chris! I just recently moved from HA container to HAOS. This was a perfect walk through to backup my files to github. I added a little extra code to the end of the git commit line: git commit -m "config files on `date +'%d-%m-%Y %H:%M:%S'`" >/config/git_log.txt 2>&1 which outputs the results into a log file. I then have sensors that read the file. If the log shows an error, then I get a notification to investigate.
Excellent. That is very helpful. I have a sensor that tells me when my local backups run, but nothing for github so this would be a nice addition.
Can you elaborate how this kind of sensor is configured?
@@thomaskronawitter7306 sure!
I have 3 command line sensors that read the log file and 1 template sensor that I monitor in an automation (I use node red). If the template sensor named "Github Backup Status" ever returns "Error" as the state, I will be sent a notification.
- platform: command_line
name: Github No Changes
command: 'dd if=/config/git_log.txt ibs=1 skip=17 count=25'
- platform: command_line
name: Github Changes
command: 'dd if=/config/git_log.txt ibs=1 skip=541 count=53'
- platform: command_line
name: Github Grep Changes
command: "grep -c 'changed' /config/git_log.txt"
- platform: template
sensors:
github_backup_status:
friendly_name: GitHub Backup Status
value_template: >
{% if is_state("sensor.github_no_changes", "Your branch is up to date") %}
Up To Date
{% elif states("sensor.github_grep_changes") | float(0) > 0 %}
Changes Made: {{ states('sensor.github_changes') }}
{% else %}
Error
{% endif %}
@@techdad6135 Great stuff. Thank you for your answer.
@@techdad6135
If someone reads this: this way is outdated since december 2023. Now the sensors need to be placed under command_line: in your configuration.yaml.
command_line:
- sensor:
name: Github No Changes
command: "dd if=/config/git_log.txt ibs=1 skip=17 count=26"
- sensor:
name: Github Changes
command: "dd if=/config/git_log.txt ibs=1 skip=541 count=53"
- sensor:
name: Github Grep Changes
command: "grep -c 'changed' /config/git_log.txt"
If you want to declutter your configuration.yaml, you can create a seperate file "command_line.yaml" and then put "command_line: !include command_line.yaml" in your configuration.yaml, and then put the above code in that file, without the first "command_line:" line.
The last sensor is a template sensor and still can be placed under sensor: for now.
Hi … NEED HELP
I just want to update my System….
But I get this Message….
'HomeAssistantCore.update' blocked from execution, system is not healthy
You have 2022.3.3 installed. Click Update to upgrade to version 2022.4.1.
What can i do ?
Whats wrong or what happend ?
THANKS alot
Jimmy, this might be a good discussion for my Discord server. Lots of smart folks in there. This can be caused by all sorts of reasons.
anybody know how to delete a file from github repo but have it untouched from my main local config? I included secrets in gitignore but it still uploaded it to github repo. Even though it's private repo I would feel more at ease not having that file online.
git rm -cache nameoffile
Thanks i followed all this and is running nicly, one issue i ran into was getting the commits with the default root user not my own github username and password, so i added git config --global user.email "MYemail and git config --global user.name "myname", looks like it won't remember it , for next run don't know why, but i added the 2 lines to my push sh file so it gets set all the time... thanks again
Good workaround.
First, thank you for the Video. A few improvements you could make in the futur is planning the whole video and then recording it, because its a little bit frustrating to write a config and then have to edit it again. And it would also be great if you could link the configs and the commands in the description so you dont have to type all this manually from the screen. But still thanks for your engagement :D
Thanks for the feedback. Most videos flow well. Every once in awhile I get a little backwards and then just simply run out of time to start the whole thing over. That's where creative editing comes in and saves the day--mostly. I'll try and do a better job of posting command in the description where applicable.
@@mostlychris Thanks for your great Work! :D
@@mostlychris I think it's not frustrating at all seeing you making changes to the config files. It just shows how to solve problems. Seing the whole process for me was especially motivating.
Exellent, I need to try this. I upload to github manually right now, but this is better.
The first line in .gitignore should/could be /*
That will ignore everything, then you include the stuff you want.
That way you don't accidentally upload something that HA suddenly decides to add...
Excellent tip. I was actually playing around with that to ignore all because I got a bunch of junk I didn't want the first time.
Thanks for the tip. And thanks to Chris for the great video. Here's a variation that allows exceptions for backups in subfolders (which would otherwise be ignored)
* # ignore everything
!*/ # but allow searching in subdirectories
!*.yaml
!.gitignore
!lovelace* # if you use UI controlled dashboards, then you'll want to copy the js versions of the YAML files from the .storage directory, since config/lovelace.yaml is not used in that situation
if anyone else have a hard time re-writing the code when the 128 error occurs, here it is:
git config core.sshCommand 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa -F /dev/null'
Thanks for the tip!
thank you! I don't understand how the video creater didn't put this in the video description. 2022