OpenEnergyMonitor Community

Adding further low temp rules to the controller

@Stuart, is there an easy way for me to add more low temp relay rules?
I think I could make use of 3:

  1. At 7C turn on Battery Heater
  2. At 4C disconnect charging sources
  3. At -17C disconnect loads

I’m happy to tweak the code, but I’m no expert and so I’m not sure if I’m looking in the correct files. All 3 would use the same logic, but would be used to fire relays at different temperatures.

Obviously you can change the code, the rules are not the cleanest code and quite complex.

Would you still need the other rules if you are heating at 7C?

Yes, there’s a couple of situations that may occur:

  1. The van isnt in use so, rather just turn everything off
  2. It’s soo cold the heater can’t keep up.

@stuart sorry to bother you again. I think I’ve managed to work my way through the code and add in the extra relay triggers. But being a bit of a beginner I can’t quite work out how to compile and deploy the code properly, any tips?

It’s all, so that should compile and upload to the esp32 automatically. Just use the upload and monitor option.

@stuart hmm, something is not right then. I’m using D1 mini so I’ve done this on the older esp8266 code, but I guess it’s still the same process with Platform IO.

Unfortunately it’s doesn’t work. I get a WinError 5, permission denied error. I’ve tried two different laptops and I still get the same error. This is where my inexperience comes in to play. I don’t really know where to start with debugging this. The code won’t build, so it just trips up.

I’ve tried googling the issue. There was mention of perhaps the antivirus being the problem, so I switched to my personal laptop where I knew I could turn the AV off, but it didn’t make any difference.

Any screenshot of the error?

Common issues I’ve found help fix this…

1 install GitHub desktop application
2 check the COM port is correct in platformio.ini file

OK, I got it built and uploaded. Unfortunately I must’ve missed some of the logic somewhere, my extra rules are visible on the webpage, but they didn’t change to green or trigger the relay.

I guess there’s another file with some logic on it that I’ve missed.

Ok, actually I think this does in fact work fine. The only issue I need to work out is how to be able to set a negative value.

@stuart I have another quick question. I don’t seem to be able to set the timer rules to X, so twice in the day they turn on all of my relays. I try setting them to X, hit save, but when I refresh the page they’ve reset to On.

Ok, do you get the green “saved” bar at the top when you do this? Can you raise an issue over on GITHUB for me to investigate?

[Issues · stuartpittaway/diyBMSv4ESP32 · GitHub]

I’ll check again later and raise it on Github. Thanks.