summaryrefslogtreecommitdiffstats
path: root/test.nim
blob: c3af19b080dc8b5664b9c37eba5e387e3bf1d857 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import types, tradfri, json, tables

let tradfriGateway = newTradfriGateway(
    host = "192.168.100.225",
    port = 5684,
    user = "ctucx",
    pass = "JrSGx6WkAVJUl53b"
  )


let devices = tradfriGateway.getDevices()

for id, device in devices.pairs:
  let device = %* device

  echo $id & ": " & pretty device