コード例 #1
0
from idiotic.item import Toggle, Trigger, Number, Group, display_unit
from idiotic import instance as c

Toggle("Entertainment Room Light",
       bindings={"x10": {
           "code": "a13"
       }},
       tags=("entertainment_room", "light"))
Toggle("Entertainment Room Air Conditioner",
       tags=("entertainment_room", "ac", "climate"))
Toggle("Entertainment Room Living Room Door",
       tags=("entertainment_room", "living_room", "door", "occupancy", "nyi"))

Toggle("Entertainment Room Laundry Room Door",
       tags=("entertainment_room", "laundry_room", "door", "occupancy"))
Trigger("Entertainment Room Motion",
        tags=("entertainment_room", "motion", "occupancy"))

Number("Entertainment Room Temperature",
       display=display_unit("C"),
       bindings={"http": {
           "pull": (60, "vinyl:8081/temp", None, float)
       }},
       tags=("entertainment_room", "temperature", "climate",
             "webui.show_sparkline", "webui.readonly"))
Number("Entertainment Room Humidity",
       display=Number.DisplayWholePercent,
       bindings={"http": {
           "pull": (60, "vinyl:8081/hum", None, float)
       }},
       tags=("entertainment_room", "humidity", "climate",
             "webui.show_sparkline", "webui.readonly"))
コード例 #2
0
ファイル: music.py プロジェクト: umbc-hackafe/idiotic-config
       tags=("music_room", "light", "alexa.exclude_iot"))

Dimmer("Music Overhead Lamp 3",
       bindings={"wink": {"name": "Music Overhead Lamp 3"}},
       tags=("music_room", "light", "alexa.exclude_iot"))

Dimmer("Music Room Lamp",
       bindings={"wink": {"name": "Music Desk Lamp"}},
       tags=("music_room", "light"))

Group("Music Room Lights",
      tags=("living_room", "light"),
      command_send=True,
      members=c.items.with_tags({'light', 'music_room'}))

Trigger("Music Room Motion",
        tags=("music_room", "motion", "occupancy", "nyi"))

Toggle("Music Room Door",
       display=Toggle.DisplayOpenClosed,
       tags=("music_room", "hallway", "door", "occupancy", "nyi"))

Number("Music Room Temperature",
       display=display_unit("C"),
       bindings={"http": {"pull": "cheerilee:8081/temp"}},
       tags=("music_room", "temperature", "climate", "webui.show_sparkline",
           "webui.readonly"))

Number("Music Room Humidity",
       display=Number.DisplayWholePercent,
       bindings={"http": {"pull": "cheerilee:8081/hum"}},
       tags=("music_room", "humidity", "climate", "webui.show_sparkline",
コード例 #3
0
from idiotic.item import Toggle, Trigger, Number, Group

Trigger("Garbage", tags=["button", "interaction", "nyi"])
Trigger("Do Something", tags=["button", "interaction"])
コード例 #4
0
ファイル: hall.py プロジェクト: umbc-hackafe/idiotic-config
from idiotic.item import Toggle, Trigger, Number, Group, Dimmer, display_unit
from idiotic import instance as c

Dimmer("Hall Light 1", bindings={"wink": {}}, tags=("hallway", "light"))

Dimmer("Hall Light 2", bindings={"wink": {}}, tags=("hallway", "light"))

Group("Hallway Light",
      display=Toggle.DisplayOnOff,
      tags=("hallway", "light", "nightlight"),
      commands=False,
      command_send=True,
      members=[c.items.hall_light_1, c.items.hall_light_2])

Trigger("Hallway Motion", tags=("hallway", "motion", "occupancy"))

Number("Hallway Temperature",
       display=display_unit("C"),
       bindings={"http": {
           "pull": (60, "scootaloo:8081/temp", None, float)
       }},
       tags=("hallway", "temperature", "climate", "webui.show_sparkline",
             "webui.readonly"))
Number("Hallway Humidity",
       display=Number.DisplayWholePercent,
       bindings={"http": {
           "pull": (60, "scootaloo:8081/hum", None, float)
       }},
       tags=("hallway", "humidity", "climate", "webui.show_sparkline",
             "webui.readonly"))
コード例 #5
0
from idiotic.item import Toggle, Trigger, Number, Group

Toggle("Laundry Room Light",
       tags=("laundry_room", "light"),
       bindings={"x10": {"code": "a10"}})

Trigger("Laundry Room Motion",
        tags=("laundry_room", "motion", "occupancy"))

Toggle("Laundry Room Door",
       display=Toggle.DisplayOpenClosed,
       tags=("laundry_room", "exterior_door", "occupancy", "nyi"))
コード例 #6
0
from idiotic.item import Toggle, Trigger, Number, Group, Dimmer, display_unit
from idiotic import instance as c

Toggle("Office Light",
       bindings={"x10": {
           "code": "b4"
       }},
       tags=("office", "light"))

Trigger("Office Motion", tags=("office", "motion", "occupancy"))

Toggle("Office Door",
       display=Toggle.DisplayOpenClosed,
       tags=("office", "hallway", "door", "occupancy", "nyi"))

Number("Office Temperature",
       display=display_unit("C"),
       bindings={"http": {
           "pull": "pinkie:8081/temp"
       }},
       tags=("office", "temperature", "climate", "webui.show_sparkline",
             "webui.readonly"))

Number("Office Humidity",
       display=Number.DisplayWholePercent,
       bindings={"http": {
           "pull": "pinkie:8081/hum"
       }},
       tags=("office", "humidity", "climate", "webui.show_sparkline",
             "webui.readonly"))
コード例 #7
0
ファイル: living.py プロジェクト: umbc-hackafe/idiotic-config
       bindings={"x10": {
           "code": "a5"
       }})

livingRoomAC = Toggle(
    "Living Room Air Conditioner",
    bindings={"modlet": {
        "device": "garage",
        "control": True
    }},
    tags=("living_room", "ac", "climate"))

Toggle("Front Door",
       display=Toggle.DisplayOpenClosed,
       tags=("living_room", "exterior_door", "occupancy", "nyi"))
Trigger("Living Room Motion", tags=("living_room", "motion", "occupancy"))
Toggle("Alert Beacon", tags=("living_room", "light", "notification", "nyi"))
Toggle("Lava Lamp", tags=("living_room", "light", "nyi"))
Toggle("Black Light", tags=("living_room", "light", "nyi"))
Toggle("Disco Lights", tags=("living_room", "light", "nyi"))
Toggle("Other Disco Lights", tags=("living_room", "light", "nyi"))

for name in [
        "Lamp Blue", "Lamp White", "Lamp Green", "Lamp Grellow",
        "Lamp Dark Blue"
]:
    Dimmer(name,
           bindings={"wink": {}},
           groups=[c.items.living_room_lamp],
           tags=('living_room', 'light', 'alexa.iot_exclude'))
コード例 #8
0
Toggle("Bedroom Fan",
       bindings={
           "http": {
               "push": [("on", "rarity:8081/high"),
                        ("off", "rarity:8081/fanoff")]
           }
       },
       tags=("bedroom", "fan", "climate"))

Toggle("Bedroom Air Conditioner",
       tags=("bedroom", "ac", "climate"),
       bindings={"modlet": {
           "device": "bedroom",
           "control": True
       }})
Trigger("Bedroom Motion", tags=("bedroom", "motion", "occupancy", "nyi"))

Toggle("Bedroom Door", tags=("bedroom", "hallway", "door", "occupancy", "nyi"))

Number("Bedroom Temperature",
       display=display_unit("C"),
       bindings={"http": {
           "pull": (60, "rarity:8081/temp", None, float)
       }},
       tags=("bedroom", "temperature", "climate", "webui.show_sparkline",
             "webui.readonly"))

Number("Bedroom Humidity",
       display=Number.DisplayWholePercent,
       bindings={"http": {
           "pull": (60, "rarity:8081/hum", None, float)
コード例 #9
0
       display=display_unit("C"),
       tags=("kitchen", "food", "nyi"),
       bindings={
           "http": {
               "push": [("set", "kimiko.hackafe.net/teakettle/heat/{state}")]
           }
       })

Number("Kettle Current", tags=("kitchen", "food", "nyi"))

Text("Kettle Status",
     tags=("kitchen", "food", "nyi"),
     ignore_redundant=True,
     bindings={
         "sign": {
             "state": {
                 "message": "{state}",
                 "effects": ["scroll"],
                 "lifetime": 10
             }
         }
     })

Toggle("Kitchen Door",
       display=Toggle.DisplayOpenClosed,
       tags=("kitchen", "exterior_door", "occupancy", "nyi"))

Trigger("Kitchen Motion",
        tags=("kitchen", "motion", "occupancy"),
        ignore_redundant=True)