view service/rdf_to_mqtt/config.n3 @ 1532:7cc7700302c2

more service renaming; start a lot more serv.n3 job files Ignore-this: 635aaefc7bd2fa5558eefb8b3fc9ec75 darcs-hash:2c8b587cbefa4db427f9a82676abdb47e651187e
author drewp <drewp@bigasterisk.com>
date Thu, 06 Feb 2020 16:36:35 -0800
parents
children
line wrap: on
line source

@prefix : <http://projects.bigasterisk.com/room/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix fr: <http://bigasterisk.com/foaf/> .

:kitchenSkylight a :Device;
  :mqttTopicHead ("h801_skylight" "light");
  :convertedAttr [
    :deviceAttr :white;
    :mqttTopicTail ("kit_w1" "command");
    :valueConversion :to8Bit;
    :message '{"state":"ON","brightness":%value%}'
  ],
  :convertedAttr [
    :deviceAttr :color;
    :mqttTopicTail ("kit_r" "command");
    :valueConversion :extractRed8Bit;
    :message '{"state":"ON","brightness":%value%}'
   ],
  :convertedAttr [
    :deviceAttr :color;
    :mqttTopicTail ("kit_g" "command");
    :valueConversion :extractGreen8Bit;
    :message '{"state":"ON","brightness":%value%}'
   ],
  :convertedAttr [
    :deviceAttr :color;
    :mqttTopicTail ("kit_r" "command");
    :valueConversion :extractBlue8Bit;
    :message '{"state":"ON","brightness":%value%}'
   ],

:nightlightAriTemperature a :ExportedMeasurement;
  :mqttTopicHead ("nightlight_ari" "sensor" "temperature" "state");

  :missingAfterSec 150;
  :ignoreInputValueBelow -999;

  :valueProcess [
    :conversion :celsiusToFarenheit; #and round(x,2)
    ];

  :graphStatements [
    :outputPredicate :temperatureF;  
    :statementLifetime :untilReplaced;

    # is this just another valueProcess?
    :outputRecentPredicate :recentLowTemperatureF; :recentPeriodSec 30;
  ],
  
  :influxMeasurement [
    :measurement "temperatureF";
    :predicate :temperatureF;
    :tag [:key "host"; :value "nightlight_ari"],
         [:key "location"; :value "ariRoom"]] .