Home Assistant : Q&A, Tips & Tricks, Your Configs

I'm struggling to get this automation to run

Pretty much want the pump to run if there's no load shedding and inverter voltage is greater than 0

alias: Pool pump timer 1
description: ""
triggers:
- at: "11:00:00"
trigger: time
conditions:
- condition: state
entity_id: sensor.load_shedding_area_jhbcitypower3_
state: "off"
- condition: template
value_template: "{{ states('sensor.deye_sunsynk_sol_ark_grid_voltage') | float(0) == 0 }}"
actions:
- target:
entity_id: switch.pool_pump_switch_0
action: switch.turn_on
data: {}
- delay:
hours: 3
minutes: 0
seconds: 0
- target:
entity_id: switch.pool_pump_switch_0
action: switch.turn_off
data: {}
mode: single
 
I'm struggling to get this automation to run

Pretty much want the pump to run if there's no load shedding and inverter voltage is greater than 0

alias: Pool pump timer 1
description: ""
triggers:
- at: "11:00:00"
trigger: time
conditions:
- condition: state
entity_id: sensor.load_shedding_area_jhbcitypower3_
state: "off"
- condition: template
value_template: "{{ states('sensor.deye_sunsynk_sol_ark_grid_voltage') | float(0) == 0 }}"
actions:
- target:
entity_id: switch.pool_pump_switch_0
action: switch.turn_on
data: {}
- delay:
hours: 3
minutes: 0
seconds: 0
- target:
entity_id: switch.pool_pump_switch_0
action: switch.turn_off
data: {}
mode: single
You have your it that your inverter voltage must be 0 as a condition though?
 
You know its going to be a good week when you power down your server and nas, kill the house power to do electrical work - and when done, power everything up only to have one nas drive dead - and the server harddrive refusing to boot.
 
You know its going to be a good week when you power down your server and nas, kill the house power to do electrical work - and when done, power everything up only to have one nas drive dead - and the server harddrive refusing to boot.

Oi vey
 
You know its going to be a good week when you power down your server and nas, kill the house power to do electrical work - and when done, power everything up only to have one nas drive dead - and the server harddrive refusing to boot.
Nothing like an emergency in prod to perform a nice test of your backup system. Good luck.
 
Nothing like an emergency in prod to perform a nice test of your backup system. Good luck.
My major issue is the NAS drives being about 10 years old - they dont make them anymore. So I can recover, but - the drive wont be the same.
 
My major issue is the NAS drives being about 10 years old - they dont make them anymore. So I can recover, but - the drive wont be the same.
As sucky as it is, maybe time to replace the failed and any ones with SMART warnings with new units? I am not sure how many you have in your array but if it's possible, you could also do a capacity upgrade (although this is harder when you have to have identical drives).

If I ever win the lotto, I am replacing my 5TB SMR drive with an 8TB nVME and calling it a (pricey) day. I saw a damned nice GMKTec NAS that has 4x slots for M.2's but I reckon they would get toasty without active cooling:

1742059824744.png

Bonus pic: I am currently running Hass (alongside my other VM and LXC's) on a literal potato:

1742059881948.png
 
As sucky as it is, maybe time to replace the failed and any ones with SMART warnings with new units? I am not sure how many you have in your array but if it's possible, you could also do a capacity upgrade (although this is harder when you have to have identical drives).

If I ever win the lotto, I am replacing my 5TB SMR drive with an 8TB nVME and calling it a (pricey) day. I saw a damned nice GMKTec NAS that has 4x slots for M.2's but I reckon they would get toasty without active cooling:

View attachment 1804309

Bonus pic: I am currently running Hass (alongside my other VM and LXC's) on a literal potato:

View attachment 1804310
Yeah, a bit disastrous for me. This is some Buffalo NAS I bought ages ago, so pretty limited with what you can do, I'm not even sure a different model drive will work.

Western Digital Red 4tb x8 (now 7). Fortunately RAID6. So everything is still accessible.

...

I'm now trying to sort out the server drive. Booted Ubuntu Live and seems to the entire partition table is corrupt.

..

No clue wtf happened, both have been up for over 100 days without issue. Proper shutdown before killing the house power...and theres an APC UPS between them and the house power.
 
Yeah, a bit disastrous for me. This is some Buffalo NAS I bought ages ago, so pretty limited with what you can do, I'm not even sure a different model drive will work.

Western Digital Red 4tb x8 (now 7). Fortunately RAID6. So everything is still accessible.

...

I'm now trying to sort out the server drive. Booted Ubuntu Live and seems to the entire partition table is corrupt.

..

No clue wtf happened, both have been up for over 100 days without issue. Proper shutdown before killing the house power...and theres an APC UPS between them and the house power.
Faaarkkk...hoping you can rebuild it somehow.

Some people said testdisk has been good at recovering a partition table, not sure if maybe you can give that a whirl.

I solved this. This is what I did:

I installed TestDisk and selected to not save any logs, then the partition type GPT and proceeded to scan for partitions. It found all the partitions.

After that, with parted /dev/sda > rescue and adding the start and end numbers of each partition from TestDisk I recovered everything.
 
Yeh, have that for tomorrow, running ddrescue now to create an image before messing around, although, it looks like the disk is #$#$-ed going the error rate and the img not growing.

Guess I'll be looking for new SSD for the server on Monday.
 
You know its going to be a good week when you power down your server and nas, kill the house power to do electrical work - and when done, power everything up only to have one nas drive dead - and the server harddrive refusing to boot.
Oh kuk!

This is why I hate total shutdowns. Last time I had one (couple of months ago, also for electrical work) the leccy fxcked up and sent 70K worth of surge damage through my house.

Good luck with recovering that drive.
 
Oh kuk!

This is why I hate total shutdowns. Last time I had one (couple of months ago, also for electrical work) the leccy fxcked up and sent 70K worth of surge damage through my house.

Good luck with recovering that drive.
Next time I'm unplugging the server rack completely.... Although, don't think it'd have made a difference. No clue what did this

Now I'm about to discover just how customised my setup was, and what was missing from the backups.

Sad part is I only switched the power off because one light kept shocking me while I was chasing the fitting, even though the circuit it was meant to be on was off.
 
Yeah I stuck to a more well known brand for my NUC. Went with the "Samsung 970 EVO Plus SSD 500GB - M.2 NVMe Interface Internal Solid State Drive with V-NAND Technology (MZ-V7S500B/AM)" back in 2022 May. It still runs my NUC with a bunch of VMs 100%. Very happy with it.
 
Last edited:
Have a look here. The final post is the most relevant

The TLDR, pony up for one of the more recognized brands
Yikes. I have one of these, only doing duty as a scratch drive though.

Will definitely keep an eye on it
 
Top
Sign up to the MyBroadband newsletter