Page 1 of 1

RWE SmartHome plugin

Posted: Sun Apr 12, 2015 4:00 pm
by lms0815
This it to introduce my RWE SmartHome plugin.
http://www.rwe-smarthome.de

With this plugin you can integrate the RWE SmartHome Center into EG.

You can manipulate:
  • AlarmDevices
    ActuatorDevice
    GenericDevice
    RollerShutter
You will receive events for any status change.
Any non boolean events will supply a payload which can be evaluated with:
Macro: EventGhost: Python Command

Code: Select all

eg.result  = (float(eg.event.payload) > float(45.0))
You can write logfiles by dumping the payload.

Code: Select all

import datetime
#print eg.event.string,': ',eg.event.payload

def UniCoder(*a):
    r=u''
    for u in a: r += u if type(u).__name__=='unicode' else unicode(u)
    return r

if not eg.event.payload is None:
    with open("RWE_SHC_log.csv", "a") as f:
        f.write(    UniCoder(   datetime.datetime.now().strftime("%Y-%m-%d %H:%M"),'\t',
                                eg.event.suffix,'\t',
                                eg.event.payload,'\n'
                            ).encode('iso-8859-1')
                    )
followed by a
Macro: EventGhost: Jump
Payload evaluation
Payload evaluation
To speed up Switching of groups you can combine/collect several Actions into one command by issuing MultipleCollect/MultipleCommit pair.
Unbenannt.JPG

Have Fun