Commit db116557 authored by Peter-Bernd Otte's avatar Peter-Bernd Otte

FSVA-230V included

parent df3254c7
......@@ -23,7 +23,7 @@ logger.setLevel(logging.WARNING-(args.verbosity*10 if args.verbosity <=2 else 20
supportedSensors = {"TFBHSB55":"TippFunk Bewegungsmelder", "FBH63":"Bewegungsmelder", "PTM215":"Taster",
"FHF":"Funk Fenstergriff", "FTKE":"Hebel Sensor", "FTK":"Solar Reed Sensor", "FRW":"Funk Rauch-Sensor",
"FSM60B":"Funk Wasser Sensor" }
"FSM60B":"Funk Wasser Sensor", "FSVA-230V":"Funkschaltsteckdose mit VA-Messung", "FSVA-230V-Power":"Funkschaltsteckdose mit VA-Messung Leistungsmessung" }
ConfigFile = args.config_file
if not os.path.exists(ConfigFile):
......@@ -129,6 +129,14 @@ def on_message(client, userdata, message):
if j['data'][1] == 0x30:
dataToSend['descr'] = "battery empty"
dataToSend['volts'] = 0 #returns 0 if battery empty
elif data[s]['type'] == "FSVA-230V": #Funkschaltsteckdose mit VA-Messung
dataToSend['v'] = 1 if j['data'][1] ==0x70 else 0 #returns 1 if switched on
elif data[s]['type'] == "FSVA-230V-Power": #Funkschaltsteckdose mit VA-Messung, Adresse der VA-Messung
if j['data'][4] == 0xC:
dataToSend['v'] = j['data'][1]*256*256 + j['data'][2]*256 + j['data'][3]
dataToSend['descr'] = "VA power in Watts"
else:
logger.info("FSVA-230V-Power send some initialize message.")
else:
logger.warning("This enocean type is not yet supported.")
if data[s]['type'] not in ("PTM215"):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment