From 366b49ce61a088416f23e288b9711e636ea790da Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 2 Sep 2016 22:44:30 +0200 Subject: [PATCH] Add initial netio docs --- source/_components/switch.netio.markdown | 112 +++++++++++++++++++++++ source/images/supported_brands/netio.png | Bin 0 -> 4107 bytes 2 files changed, 112 insertions(+) create mode 100644 source/_components/switch.netio.markdown create mode 100644 source/images/supported_brands/netio.png diff --git a/source/_components/switch.netio.markdown b/source/_components/switch.netio.markdown new file mode 100644 index 00000000000..b30efab2212 --- /dev/null +++ b/source/_components/switch.netio.markdown @@ -0,0 +1,112 @@ +--- +layout: page +title: "Netio Switch" +description: "Instructions how to integrate Netio switches into Home Assistant." +date: 2016-09-02 19:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: netio.png +ha_category: Switch +ha_iot_class: "Local Polling" +ha_release: 0.24 +--- + + +The `netio` switch platform allows you to control your [Netio](http://www.netio-products.com/en/overview/) Netio4, Netio4 All, and Netio 230B. These are smart outlets controllable through ethernet and/or WiFi that reports consumptions (Netio4all). + +To use Netio devices in your installation, add the following to your `configuration.yaml` file: + +``` +# Example configuration.yaml entry +switch: + - platform: netio + host: 192.168.1.43 + port: 1234 + username: user + password: pwd + outlets: + 1: Free + 2: TV + 4: Lamp +``` + +Configuration variables: + +- **host** (*Required*): The IP address of your Netio plug, eg. http://192.168.1.32 +- **port** (*Optional*): The port to communicate with the switch. Defaults to `1234`. +- **username** (*Required*): The username for your plug. +- **password** (*Required*): The password for your plug. +- **outlets** (*Required*) array: List of all outlets. + - **[No.]: [Name]** (*Required*): Identification of an outlet. + + + +To get pushed updates from the Netio devices, one can add this Lua code in the device interface as an action triggered on "Netio" "System variables updated" +with an 'Always' schedule: + + +```lua +-- this will send socket and consumption status updates via CGI +-- to given address. Associate with 'System variables update' event +-- to get consumption updates when they show up + +local address='ha:8123' +local path = '/api/netio/' + + +local output = {} +for i = 1, 4 do for _, what in pairs({'state', 'consumption', + 'cumulatedConsumption', 'consumptionStart'}) do + local varname = string.format('output%d_%s', i, what) + table.insert(output, + varname..'='..tostring(devices.system[varname]):gsub(" ","|")) +end end + +local qs = table.concat(output, '&') +local url = string.format('http://%s%s?%s', address, path, qs) +devices.system.CustomCGI{url=url} +``` + + + + + + + + + + + + + + + + + + + + + +The `dlink` switch platform allows you to control the state of your [D-Link Wi-Fi Smart Plugs](http://us.dlink.com/product-category/home-solutions/connected-home/smart-plugs/). + +Supported devices (tested): + +- DSP-W215 +- DSP-W110 + +To use your D-Link smart plugs in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +switch: + platform: dlink + host: IP_ADRRESS + name: D-Link plug + username: YOUR_USERNAME + password: YOUR_PASSWORD +``` + + + diff --git a/source/images/supported_brands/netio.png b/source/images/supported_brands/netio.png new file mode 100644 index 0000000000000000000000000000000000000000..1cd239537b2d1937b3e517146d713c88d2fa7e1f GIT binary patch literal 4107 zcmV+m5cKbfP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIc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