Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get value for state of backup heater #32

Open
pdcemulator opened this issue Nov 24, 2020 · 8 comments
Open

get value for state of backup heater #32

pdcemulator opened this issue Nov 24, 2020 · 8 comments

Comments

@pdcemulator
Copy link

Hi,

I am using pyHPSU for quite a long time, everything is working fine.
But I found that it does not report when the backup heater is running. Based on the docs it should be the ehs value. But its reporting 0, even when the backup heater is active. And the value for qboh is increasing.

Is someone getting data for ehs?
Regarding to #24, maybe 31 00 FA C0 F9 is the wrong CAN command?

@Spanni26
Copy link
Owner

Spanni26 commented Nov 25, 2020 via email

@ahermann86
Copy link

ahermann86 commented Nov 25, 2020

Hello,

the problem is, that you get more than one responses with this request ([responseMsg]\r[responseMsg]\r).
You have to parse the whole buffer after a request and split the resulting string with \r.

I dont have time to make this in this Python script. I made this with perl in my FHEM Module 70_HPSU.pm and it look like this:

`
.....
while($msg =~ m/\r/)
{
my $msgSplit = "";

      ($msgSplit, $msg) = split("\r", $msg, 2);
      $msgSplit =~ s/ +$//; #delete whitespace

      my ($name, $nicename, $out) = HPSU_CAN_ParseMsg($hash, $msgSplit);

      if ($name and $out)
      {
        readingsSingleUpdate($hash, "HPSU.$nicename", $out, 1);
        $hash->{jcmd}->{$name}->{FHEMLastResponse} = gettimeofday();
        $hash->{jcmd}->{$name}->{AktVal} = $out; #for "verify"...
        $hash->{helper}{CANRequestPending} = 0;
      }
      $hash->{helper}{CANRequestPending} = 0 if ($hash->{helper}{CANHeaderID} eq "680");  #NoData
    }

`

Maybe someone can fix this with Python in this project...

For testing, you can connect the ELM327 with a terminal programm and look what you get.

Greetings
Axel

@Spanni26
Copy link
Owner

Spanni26 commented Nov 25, 2020 via email

@pdcemulator
Copy link
Author

pdcemulator commented Nov 30, 2020

At the moment its to warm for the backup heater.

For heating, yes. But when the warm water temperature is near the lower threshold and the bathtub is filled... in short the water is too cold, then the backup heater is starting.
And yes, my goal is to minimize the usage of the heater :-)

@ahermann86
Copy link

Hello,

if you send request: 31 00 FA C0 F9<\r>
youre response will be:
22 0A FA C0 FB 00 64 <\r>
32 10 FA C0 F9 17 70 <\r>
<\r>

17 70 -> 6000 W

This Python script has not implemented the responses who are not requested like "22 0A FA C0 FB 00 64" in this example.
Someone have to fix this in the script...

Hardware:
EHS 6kW

My FHEM Module
EHS_FHEM

Greetings
Axel

@hackepeterOli
Copy link

hackepeterOli commented Nov 30, 2020 via email

@Spanni26
Copy link
Owner

Spanni26 commented Feb 11, 2021

Ok, its cold here and the HPSU is using the backup heater.

So I checked it:

root@rotex:~# pyHPSU.py -c ehs -o json
[{'name': 'ehs', 'resp': '9000', 'timestamp': 1613062272.084939}]
root@rotex:~# pyHPSU.py -c ehs -o json
[{'timestamp': 1613062285.739523, 'resp': '0', 'name': 'ehs'}]
root@rotex:~# pyHPSU.py -c ehs -o json
[{'timestamp': 1613062290.793521, 'name': 'ehs', 'resp': '0'}]
root@rotex:~# pyHPSU.py -c ehs -o json
[{'name': 'ehs', 'timestamp': 1613063267.158688, 'resp': '0'}]
root@rotex:~# pyHPSU.py -c ehs -o json
[{'resp': '3000', 'timestamp': 1613064168.072003, 'name': 'ehs'}]

As we can see, at the first shot it runs with 9KW, then it was switched of. On the last shot it was used with 3kW.
So I think it works as expected.

@ckohrt
Copy link

ckohrt commented Mar 8, 2021

It works also for me. Same results as above from Daniel.
e.g.
pyHPSU.py -c ehs -d PYCAN -p /dev/ttyS0 -o CSV
1615202591.456367,ehs,0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants