ricott / homey-no.easee

Easee app for Homey
GNU General Public License v3.0
5 stars 5 forks source link

Detect number of phases #70

Open blarsern opened 5 months ago

blarsern commented 5 months ago

I have two cars. One is charging with 3 phase. The other with 1 phase.

So to calculate the correct amps for both. I need to know if i'm charging with 1 or 3 phases.

I have created a flow that will keep me as close as i can to a target, 15KW. And i'm adjusting the charger amps depending on the power used in the house.

Works fine but the phase detection is challenging. The 1 phase car sometimes charges on L1 and L2. And sometimes on L2 and L3.

I have made something that works, but the script is messy.

It would have been nice with a: When charger has started.. And number of phases is 3 Then..

Current Px bigger than card triggers before charger do a status changed. Sometimes they trigger after.

Thanks.

blarsern commented 5 months ago

Ok, this was a bit more complicated than i initially thought.

You cant really do a after charging started and number of phases is 3. Then youre done with phases.

You need to constantly monitor number of phases, so it would be better to have a tag that always contains number of phases.

This is what happens sometimes when i charge my 3 phase car.

It starts charging on 1 phase. Maybe for 1 minute. Then Easee finds out that it can charge 3 phases. So it shuts down charging and restarts at 3 phases. The dip down below 1A is very short so the event that says when current drops below n Amps is unreliable. Other times it starts directly on 3 phases without this negotiation. Not sure what causes this, maybe because previous charging was on my 1 phase car.

So what i do now is: When han sensor triggers every 30 sek. I detect which phases has current and updates number of phases. And i don't process charger logic before i have either 1 or 3 phases. When all phases is below 1A, i reset to 0 phases.

But the script is messy.. So a phase count tag which is updated when charger is running, that would have been perfect.

I can't calculate the power correctly without knowing number of phases.

Anyway just a suggestion..