samsta / BatteryController

GNU General Public License v3.0
0 stars 0 forks source link

Implement emergency shutdown #3

Open samsta opened 4 years ago

samsta commented 4 years ago

When the inverter sends an emergency shutdown message 0x018 we need to turn the contactor off. I presume it stays off until the system is restarted as there seems to be no message to cancel the emergency shutdown and I'd assume that the emergency shutdown overrides the command to battery in 0x360

NiallDarwin commented 4 years ago

Agreed

NiallDarwin commented 3 years ago

How long after the inverter goes quiet do we switch the battery off?

I switched the inverter off with the battery connected and waited for 5-10 seconds. The pi did not disconnect the contactors, So I switched the pi off and the contactors disconnected.

samsta commented 3 years ago

20 seconds. I realise that's a bit long. I'll have to have a look at the expected message rate from the inverter to come up with a number that doesn't cause it to be switched off unintentionally

samsta commented 3 years ago

I just noticed that @JimsterCoder has changed this to 100s on his branch, so it really depends on the branch you're on.

samsta commented 3 years ago

Also, if you still have that piece of code commented out that I helped you over the phone with, it won't do it at all