Postgresql

HAASP PostgreSQL (MONITOR) app module that reading data from HAASP Core and store it in postgreSQL DB.

Installation

Docker image:
cmtec/haasp_postgresql

Pip:
Make sure you have python3, git and pip installed
pip install -U git+https://git.cmtec.se/haasp/libhaasp.git
pip install -U git+https://git.cmtec.se/haasp/haasp_postgresql.git

Configuration

No configuration needed

Usage

Enable event object to be stored in database by <event_object>.monitor = "postgresql"

Example

class Config(ConfigObject):

    def setup(self):

        # zwave devices --------------------------------------------------------
        self.zwave_hallway_light_power = EventObject("zwave", "72057462682163904")
        self.zwave_hallway_light_power.monitor = "postgresql"
        
    def process_event(self):