[NF] Senml now has a configure option to setup the guid [NF] Zway-Bot now listen on /exit [NF] Implment searchpath for Zway-Bot (/etc/zwaybot and %appdata%/zwaybot)
17 lines
531 B
C#
17 lines
531 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using BlubbFish.Utils.IoT.Connector;
|
|
using BlubbFish.Utils.IoT.Events;
|
|
|
|
namespace BlubbFish.Utils.IoT.JsonSensor {
|
|
class Pir : AJsonSensor {
|
|
public Pir(Dictionary<String, String> settings, String name, ADataBackend backend) : base(settings, name, backend) {
|
|
this.Datatypes = Types.Bool;
|
|
}
|
|
|
|
protected override Boolean UpdateValue(BackendEvent e) {
|
|
this.GetBool = (e.Message.ToLower() == "on") ? true : false;
|
|
return true;
|
|
}
|
|
}
|
|
} |