Skip to content

Commit

Permalink
added http support
Browse files Browse the repository at this point in the history
  • Loading branch information
claudio-petrini committed May 14, 2020
1 parent 122fcd1 commit be91357
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 39 deletions.
6 changes: 0 additions & 6 deletions devices/docgen/docgen.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const fs = require('fs');
const path = require('path');
const zigbeeDevices = require('zigbee-herdsman-converters').devices;
const modbusDevices = require('@instathings/modbus-herdsman-converters').devices;
const httpDevices = require('@instathings/http-herdsman-converters').devices;

const supportDevicesFn = require('./supported-devices');
const utils = require('./utils');
Expand All @@ -20,11 +19,6 @@ const pages = [
protocol: 'Modbus',
devices: modbusDevices
},
{
id: 'http-devices',
protocol: 'HTTP',
devices: httpDevices
}
]

pages.forEach((page) => {
Expand Down
Binary file added devices/docs/images/devices/HTTP-DEVICE.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed devices/docs/images/devices/SHBLB.jpg
Binary file not shown.
Binary file removed devices/docs/images/devices/SHPLG-S.jpg
Binary file not shown.
Binary file added docs/assets/all-devices/http.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 2 additions & 30 deletions docs/http-devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,6 @@ id: http-devices
title: Supported HTTP devices
---

<style type="text/css">
.main-content-devices table {
table-layout: fixed;
display: table !important;
}
.main-content-devices table tr th:nth-child(1) {
width: 15%;
}
.main-content-devices table tr th:nth-child(2) {
width: 60%;
}
.main-content-devices table tr th:nth-child(3) {
width: 25%;
}
Instathings supports any HTTP device that exposes REST API with a JSON payload to control.

</style>

Currently **2** HTTP devices are supported from **1** different vendors.

<div class="main-content-devices" role="main">

## Shelly

| Model | Description | Picture |
| ------------- | ------------- | -------------------------- |
| SHPLG-S | Shelly Smart Plug - Power meter (on/off, power measurement) | ![./assets/devices/SHPLG-S.jpg](./assets/devices/SHPLG-S.jpg) |
| SHBLB | Shelly E27 Smart bulb with Red, Green, Blue and White LEDs. ( on/off, brightness, color rgb) | ![./assets/devices/SHBLB.jpg](./assets/devices/SHBLB.jpg) |



</div>
As an example you can use devices from [Shelly](https://shelly-api-docs.shelly.cloud/) or [Sonoff](http://developers.sonoff.tech/) seamlessly using the manufacturer APIs through Instathings Cloud.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"docgen": "node devices/docgen/docgen.js && cp -R devices/docs/images/devices docs/assets"
},
"devDependencies": {
"@instathings/http-herdsman-converters": "^1.0.5",
"@instathings/modbus-herdsman-converters": "2.0.3",
"docusaurus": "^1.14.4",
"zigbee-herdsman": "0.12.83",
Expand Down
2 changes: 0 additions & 2 deletions website/pages/en/protocols.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const React = require('react');
const zigbeeDevices = require('zigbee-herdsman-converters').devices;
const modbusDevices = require('@instathings/modbus-herdsman-converters').devices;
const httpDevices = require('@instathings/http-herdsman-converters').devices;

const CompLibrary = require('../../core/CompLibrary.js');

Expand All @@ -20,7 +19,6 @@ class Protocols extends React.Component {
<br />
{protocol.id === 'zigbee' && <span>{zigbeeDevices.length} </span>}
{protocol.id === 'modbus' && <span>{modbusDevices.length} </span>}
{protocol.id === 'http' && <span>{httpDevices.length} </span>}
<span className="caption">
{protocol.caption} devices
</span>
Expand Down

0 comments on commit be91357

Please sign in to comment.