Giter Club home page Giter Club logo

pyhpsu's People

Contributors

emilianomaina avatar glynhudson avatar spanni26 avatar zanac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyhpsu's Issues

Transcript to english

Any objects if I transcript so comments and other word into english?
Will do this by pull requests.....

canpi.py - rendere retry configurabili

Estrapolare dal codice e rendere configurabili:

  • numero di retry per sincronizzazione (15)

Grazie !

    while notTimeout:
        i += 1
        timeout = self.timeout
        rcBUS = None
        try:
            rcBUS = self.bus.recv(timeout)
        except Exception:
            self.hpsu.printd('exception', 'Error recv')                    

        if rcBUS:
            if (msg_data[2] == 0xfa and msg_data[3] == rcBUS.data[3] and msg_data[4] == rcBUS.data[4]) or (msg_data[2] != 0xfa and msg_data[2] == rcBUS.data[2]):
                rc = "%02X %02X %02X %02X %02X %02X %02X" % (rcBUS.data[0], rcBUS.data[1], rcBUS.data[2], rcBUS.data[3], rcBUS.data[4], rcBUS.data[5], rcBUS.data[6])
                notTimeout = False
        
        if notTimeout:
            self.hpsu.printd('warning', 'msg not sync, retry: %s' % i)
            **if i >= 15:**
                self.hpsu.printd('error', 'msg not sync, timeout')
                notTimeout = False
                rc = "KO"

Canbus Cable

Where to buy a canbus cable tha fits to J13 on Daikin Altherma?

pyHPSU.py - rendere retry configurabili

Estrarre dal codice e mettere in file di configurazione:

  • il numero di tentativi di retry (4)
  • il tempo di ritardo tra un retry ed il prossimo (2)

Grazie !

for c in hpsu.commands:
i = 0
while i <= 3:
rc = hpsu.sendCommand(c)
if rc != "KO":
i = 4
response = hpsu.parseCommand(cmd=c, response=rc, verbose=verbose)
resp = hpsu.umConversion(cmd=c, response=response, verbose=verbose)

            arrResponse.append({"name":c["name"], "resp":resp, "timestamp":response["timestamp"]})
        else:
            i += 1
            **time.sleep(2.0)**
            hpsu.printd('warning', 'retry %s command %s' % (i, c["name"]))
            **if i == 4:**
                hpsu.printd('error', 'command %s failed' % (c["name"]))

Lowercase nibble in commands_hpsu.csv

In HPSU.py the logic on "commands" require them to be defined with all nibble uppercase (e.g. if command[6:8] != "FA").

the file etc/pyHPSU/commands_hpsu.csv has a last row with some lowercase nibble

t_flow_cooling;61 00 fa 03 dd 00 00;190;d;10;w

this should be

t_flow_cooling;61 00 FA 03 DD 00 00;190;d;10;w

Supporto python 3 per ELM327

Ciao zanac,
ho avuto problemi nell'uso di python 3 con ELM327 per via della diversa codifica delle stringhe.
ho apportato alcune modifiche (principalmente decode('utf-8')) che mi hanno reso funzionante il tuo script ma sarebbe preferibile se rilasciassi tu una versione compatibile.

Grazie,
fabio

pyHPSUd.py not working

When I call pyHPSUd.py -d PYCAN I get:
root@rotex:~/zanac_pyHPSU# python3 pyHPSUd.py -d PYCAN
Traceback (most recent call last):
File "pyHPSUd.py", line 137, in
main.main2(sys.argv[1:])
File "pyHPSUd.py", line 85, in main2
connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))
File "/usr/lib/python3/dist-packages/pika/adapters/blocking_connection.py", line 339, in init
self._process_io_for_connection_setup()
File "/usr/lib/python3/dist-packages/pika/adapters/blocking_connection.py", line 374, in _process_io_for_connection_setup
self._open_error_result.is_ready)
File "/usr/lib/python3/dist-packages/pika/adapters/blocking_connection.py", line 395, in _flush_output
raise exceptions.ConnectionClosed()
pika.exceptions.ConnectionClosed

Is the daemon working anywhere?

canpi.py - Inserire messaggio in log errore

I log non includono il messaggio che ha determinato l'errore per cui non si puo' fare analisi.

Aggiungere il messaggio che ha determinato l'errore nel log.

try:
msg = can.Message(arbitration_id=receiver_id, data=msg_data, extended_id=False, dlc=7)
self.bus.send(msg)
except Exception:
self.hpsu.printd('exception', 'Error sending msg')

    while notTimeout:
        i += 1
        timeout = self.timeout
        rcBUS = None
        try:
            rcBUS = self.bus.recv(timeout)
        except Exception:
            **self.hpsu.printd('exception', 'Error recv')**                    

        if rcBUS:
            if (msg_data[2] == 0xfa and msg_data[3] == rcBUS.data[3] and msg_data[4] == rcBUS.data[4]) or (msg_data[2] != 0xfa and msg_data[2] == rcBUS.data[2]):
                rc = "%02X %02X %02X %02X %02X %02X %02X" % (rcBUS.data[0], rcBUS.data[1], rcBUS.data[2], rcBUS.data[3], rcBUS.data[4], rcBUS.data[5], rcBUS.data[6])
                notTimeout = False
        
        if notTimeout:
            **self.hpsu.printd('warning', 'msg not sync, retry: %s' % i)**
            if i >= 15:
                **self.hpsu.printd('error', 'msg not sync, timeout')**
                notTimeout = False
                rc = "KO"

Where to obtain J13 connector

Hi!
Where do I obtain the connector that connects to J13 inside the Rotex control unit?
Thanks!

I'd like to try to connect the Rotex HPSU Compact to OpenHAB, but first want to see if I get CAN working.

EDIT: It seems the connector is already present in the HPSU and is plugged onto the controller board. Next question: How to deal with the terminating resistor of the CAN bus?

Add support to run on Rotex rocon-g1 device

With my HPSU compact I got Rotex rocon-g1 gateway, to run it using Rotex Cloud. I don't like that much, so I tried to check what's inside and found Beagle Bone Black with CAN module.

https://www.heizungsdiscount24.de/regelungstechnik/rotex-gateway-rocon-g1-zur-ankopplung-der-steuerung-an-das-internet.html

I got root to the device and found there Debian

# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 7.8 (wheezy)
Release:        7.8
Codename:       wheezy
# cat /etc/issue  
Debian GNU/Linux 7 \n \l
BeagleBoard.org Debian Image 2015-03-01
 ip link show  can0
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT qlen 10
    link/can 

I installed can-utils and can dump can frames:

root@rocon-g1:~/pyHPSU# /root/can-utils/candump can0
  can0  69D   [7]  C1 0F FA 01 99 00 00
  can0  69D   [7]  31 00 FA 01 48 00 00
  can0  180   [7]  D2 1D FA 01 48 00 00
  can0  69D   [7]  31 00 FA 00 0C 00 00
  can0  180   [7]  D2 1D FA 00 0C 00 2D
  can0  69D   [7]  31 00 FA 0A 0C 00 00
  can0  180   [7]  D2 1D FA 0A 0C 80 00
  can0  69D   [7]  31 00 FA 01 22 00 00
  can0  180   [7]  D2 1D FA 01 22 0D 00
  can0  69D   [7]  31 00 FA 01 23 00 00
  can0  180   [7]  D2 1D FA 01 23 01 00
  can0  69D   [7]  31 00 FA 01 24 00 00
  can0  180   [7]  D2 1D FA 01 24 12 00
  can0  69D   [7]  31 00 FA 01 25 00 00
  can0  180   [7]  D2 1D FA 01 25 0A 00
  can0  69D   [7]  31 00 FA 01 26 00 00
  can0  180   [7]  D2 1D FA 01 26 1C 00
  can0  69D   [7]  31 00 FA 01 12 00 00
  can0  180   [7]  D2 1D FA 01 12 03 00

I had to install python from sources to get working as python in packages is outdated. I'm not sure what driver use to get it working?

/usr/local/bin/python3 pyHPSU.py -l EN  -c t_hc_set -c t_dhw_set -c t_ext -c t_outdoor_ot1 -c ta2 -o JSON -v 1
Traceback (most recent call last):
  File "pyHPSU.py", line 148, in <module>
    main(sys.argv[1:])
  File "pyHPSU.py", line 88, in main
    hpsu = HPSU(driver=driver, logger=logger, port=port, cmd=cmd, lg_code=lg_code)
  File "/root/pyHPSU/HPSU/HPSU.py", line 58, in __init__
    desc = row[2]
IndexError: list index out of range
/usr/local/bin/python3 pyHPSU.py -l EN -d EMU -c t_hc_set -c t_dhw_set -c t_ext -c t_outdoor_ot1 -c ta2 -o JSON -v 1
Traceback (most recent call last):
  File "pyHPSU.py", line 148, in <module>
    main(sys.argv[1:])
  File "pyHPSU.py", line 88, in main
    hpsu = HPSU(driver=driver, logger=logger, port=port, cmd=cmd, lg_code=lg_code)
  File "/root/pyHPSU/HPSU/HPSU.py", line 58, in __init__
    desc = row[2]
IndexError: list index out of range

Need your help to get pyHPSU working with can0 in this device.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.