Refactor concepts/categories.md page. (#1103)
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>pull/1115/head
parent
b714008d16
commit
d4aed208db
|
@ -5,26 +5,25 @@ def process_main_docs(docs_source_dir)
|
|||
puts ">>> Migrating the introduction article"
|
||||
process_file(".", "introduction.md", "docs", "https://github.com/openhab/openhab-docs/blob/master/introduction.md")
|
||||
FileUtils.mv("docs/introduction.md", "docs/readme.md")
|
||||
|
||||
|
||||
|
||||
|
||||
puts ">>> Migrating common images"
|
||||
FileUtils.mkdir_p("docs/images")
|
||||
FileUtils.cp_r("#{docs_source_dir}/images/distro.png", "docs/images")
|
||||
FileUtils.cp_r("#{docs_source_dir}/images/dashboard.png", "docs/images")
|
||||
|
||||
|
||||
|
||||
|
||||
puts ">>> Migrating logos"
|
||||
FileUtils.cp_r("#{docs_source_dir}/images/addons", ".vuepress/public/logos")
|
||||
|
||||
|
||||
|
||||
puts ">>> Migrating the Concepts section"
|
||||
|
||||
|
||||
|
||||
|
||||
if Dir.exists?("#{docs_source_dir}/concepts") then
|
||||
Dir.glob("#{docs_source_dir}/concepts/*.md").each { |path|
|
||||
file = File.basename(path)
|
||||
next if file == "categories.md"
|
||||
puts " -> #{file}"
|
||||
process_file("#{docs_source_dir}/concepts", file, "docs/concepts", "#{$esh_repo_root}/concepts/#{file}")
|
||||
}
|
||||
|
@ -34,12 +33,12 @@ def process_main_docs(docs_source_dir)
|
|||
else
|
||||
puts " Skipping non-existing section!"
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
puts ">>> Migrating the Installation section"
|
||||
|
||||
|
||||
|
||||
|
||||
Dir.glob("#{docs_source_dir}/installation/*.md") { |path|
|
||||
file = File.basename(path)
|
||||
next if file == "designer.md"
|
||||
|
@ -48,12 +47,12 @@ def process_main_docs(docs_source_dir)
|
|||
}
|
||||
puts " -> images"
|
||||
FileUtils.cp_r("#{docs_source_dir}/installation/images", "docs/installation/images")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
puts ">>> Migrating the Tutorial section"
|
||||
|
||||
|
||||
|
||||
|
||||
Dir.glob("#{docs_source_dir}/tutorials/beginner/*.md") { |path|
|
||||
file = File.basename(path)
|
||||
puts " -> #{file}"
|
||||
|
@ -62,12 +61,12 @@ def process_main_docs(docs_source_dir)
|
|||
puts " -> images"
|
||||
FileUtils.cp_r("#{docs_source_dir}/tutorials/beginner/images", "docs/tutorial/images")
|
||||
# FileUtils.cp_r("#{docs_source_dir}/tutorials/images/*", "docs/tutorial/images")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
puts ">>> Migrating the Configuration section"
|
||||
|
||||
|
||||
|
||||
|
||||
Dir.glob("#{docs_source_dir}/configuration/*.md") { |path|
|
||||
file = File.basename(path)
|
||||
next if file == "transform.md" # Useless, copy the one from addons
|
||||
|
@ -81,12 +80,12 @@ def process_main_docs(docs_source_dir)
|
|||
process_file("#{docs_source_dir}/tutorials", "migration.md", "docs/configuration/migration", "#{$docs_repo_root}/tutorials/migration.md")
|
||||
FileUtils.mv("docs/configuration/migration/migration.md", "docs/configuration/migration/index.md")
|
||||
FileUtils.cp_r("#{docs_source_dir}/tutorials/images", "docs/configuration/migration")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
puts ">>> Migrating the UI section"
|
||||
|
||||
|
||||
|
||||
|
||||
Dir.glob("#{docs_source_dir}/_addons_uis/**") { |path|
|
||||
next if path =~ /habpanel/ || path =~ /paper/ # Those already have their own article, no need to include the readme...
|
||||
addon = File.basename(path)
|
||||
|
@ -96,12 +95,12 @@ def process_main_docs(docs_source_dir)
|
|||
puts " -> images (#{addon})"
|
||||
FileUtils.cp_r("#{docs_source_dir}/_addons_uis/#{addon}/doc", "docs/configuration/ui/#{addon}") if Dir.exists?("#{docs_source_dir}/_addons_uis/#{addon}/doc")
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
puts ">>> Migrating the Apps section"
|
||||
|
||||
|
||||
|
||||
|
||||
Dir.glob("#{docs_source_dir}/addons/uis/apps/*.md") { |path|
|
||||
file = File.basename(path)
|
||||
puts " -> #{file}"
|
||||
|
@ -109,12 +108,12 @@ def process_main_docs(docs_source_dir)
|
|||
}
|
||||
puts " -> images"
|
||||
FileUtils.cp_r("#{docs_source_dir}/addons/uis/apps/images", "docs/apps")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
puts ">>> Migrating the Administration section"
|
||||
|
||||
|
||||
|
||||
|
||||
Dir.glob("#{docs_source_dir}/administration/*.md") { |path|
|
||||
file = File.basename(path)
|
||||
puts " -> #{file}"
|
||||
|
@ -122,11 +121,11 @@ def process_main_docs(docs_source_dir)
|
|||
}
|
||||
puts " -> images"
|
||||
FileUtils.cp_r("#{docs_source_dir}/administration/images", "docs/administration/images")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
puts ">>> Migrating the Developer section"
|
||||
|
||||
|
||||
|
||||
Dir.glob("#{docs_source_dir}/developers/*.md") { |path|
|
||||
file = File.basename(path)
|
||||
|
|
|
@ -11,19 +11,46 @@ Categories in openHAB are used to provide meta information about Things, Channel
|
|||
|
||||
## Differences between categories
|
||||
|
||||
We separate the categories into `functional` and `visual`.
|
||||
We separate the categories into `functional` and `visual`.
|
||||
Therefore we treat `Thing categories` as how the physical device **looks like** and `Channel categories` as something that describes the **functional purpose** of the Channel.
|
||||
|
||||
## Thing Categories
|
||||
|
||||
The Thing type definition allows to specify a category.
|
||||
User interfaces can parse this category to get an idea how to render this Thing.
|
||||
A Binding can classify each Thing into one of the existing categories.
|
||||
The Thing type definition allows to specify a category.
|
||||
User interfaces can parse this category to get an idea how to render this Thing.
|
||||
A Binding can classify each Thing into one of the existing categories.
|
||||
The list of all predefined categories can be found in our categories overview:
|
||||
|
||||
| Category | Description | Icon Example | |
|
||||
|-------------------|--------------------------|-{% for category in site.data.categories_thing %}---------------------------------------|--------------|
|
||||
| {{category.name}} | {{category.description}} | ![{{category.icon}}](/iconsets/classic/{{category.icon}}){:height="36px" width="36px"} | {% endfor %} |
|
||||
| Category | Description | Icon Example |
|
||||
|------------------|------------------------------------------------------------------------------------------------------|-----------------|
|
||||
| Battery | Batteries, Energy Storages | ![](/iconsets/classic/battery.png) |
|
||||
| Blinds | Roller shutters, window blinds, etc. | ![](/iconsets/classic/blinds.png) |
|
||||
| Camera | All kinds of cameras | ![](/iconsets/classic/camera.png) |
|
||||
| Car | Smart Cars | |
|
||||
| CleaningRobot | Vacuum robots, mopping robots, etc. | |
|
||||
| Door | Door | ![](/iconsets/classic/door.png) |
|
||||
| FrontDoor | Front Door | ![](/iconsets/classic/frontdoor.png) |
|
||||
| GarageDoor | Garage Door | ![](/iconsets/classic/garagedoor.png) |
|
||||
| HVAC | Air condition devices, Fans | |
|
||||
| Inverter | Power inverter, such as solar inverters etc. | |
|
||||
| LawnMower | Lawn mowing robots, etc. | ![](/iconsets/classic/lawnmower.png) |
|
||||
| Lightbulb | Devices that illuminate something, such as bulbs, etc. | ![](/iconsets/classic/lightbulb.png) |
|
||||
| Lock | Devices whose primary pupose is locking something | ![](/iconsets/classic/lock.png) |
|
||||
| MotionDetector | Motion sensors/detectors | |
|
||||
| NetworkAppliance | Bridges/Gateway need to access other devices like used by Philips Hue for example, Routers, Switches | |
|
||||
| PowerOutlet | Small devices to be plugged into a power socket in a wall which stick there | ![](/iconsets/classic/poweroutlet.png) |
|
||||
| Projector | Devices that project a picture somewhere | ![](/iconsets/classic/projector.png) |
|
||||
| RadiatorControl | Controls on radiators used to heat up rooms | |
|
||||
| Receiver | Audio/Video receivers, i.e. radio receivers, satelite or cable receivers, recorders, etc. | ![](/iconsets/classic/receiver.png) |
|
||||
| Screen | Devices that are able to show a picture | ![](/iconsets/classic/screen.png) |
|
||||
| Sensor | Device used to measure something | |
|
||||
| Siren | Siren used by Alarm systems | ![](/iconsets/classic/siren.png) |
|
||||
| SmokeDetector | Smoke detectors | |
|
||||
| Speaker | Devices that are able to play sounds | |
|
||||
| WallSwitch | Any device attached to the wall that controls a binary status of something, for ex. a light switch | ![](/iconsets/classic/wallswitch.png) |
|
||||
| WebService | Account with credentials for a website | |
|
||||
| Window | Window | ![](/iconsets/classic/window.png) |
|
||||
| WhiteGood | Devices that look like Waschingmachines, Dishwashers, Dryers, Fridges, Ovens, etc. | ![](/iconsets/classic/whitegood.png) |
|
||||
|
||||
### Channel Group Categories
|
||||
|
||||
|
@ -31,19 +58,76 @@ Channel Groups can be seen as a kind of `sub-device` as they combine certain (ph
|
|||
|
||||
## Channel Categories
|
||||
|
||||
The Channel type definition allows to specify a category.
|
||||
A Binding should classify each Channel into one of the existing categories or leave the category blank, if there is no good match.
|
||||
The Channel type definition allows to specify a category.
|
||||
A Binding should classify each Channel into one of the existing categories or leave the category blank, if there is no good match.
|
||||
There are different types of categories for Channels, which are listed below.
|
||||
|
||||
{% for category in site.data.categories %}
|
||||
{% assign typesStr = typesStr | append: category.type | append: ',' %}
|
||||
{% endfor %}
|
||||
{% assign types = typesStr | split: ',' | uniq %}
|
||||
#### Widgets
|
||||
|
||||
{% for type in types %}
|
||||
#### {{ type }}
|
||||
| Category | Icon Example |
|
||||
|---------------|------------------------------------------|
|
||||
| Colorpicker | ![](/iconsets/classic/colorpicker.png) |
|
||||
| Number | ![](/iconsets/classic/number.png) |
|
||||
| Rollershutter | ![](/iconsets/classic/rollershutter.png) |
|
||||
| Slider | ![](/iconsets/classic/slider.png) |
|
||||
| Switch | ![](/iconsets/classic/switch.png) |
|
||||
| Text | ![](/iconsets/classic/text.png) |
|
||||
| Group | ![](/iconsets/classic/group.png) |
|
||||
|
||||
| Category | Icon Example | | | |
|
||||
|-------------------|-------------------|-{% for category in site.data.categories %}{% if category.type == type %}-|-----------------------------------------------|-------------------------|
|
||||
| {{category.name}} | ![{{category.name | downcase}}](/iconsets/classic/{{category.name | downcase }}.png){:height="36px" width="36px"} | {% endif %}{% endfor %} |
|
||||
{% endfor %}
|
||||
#### Weather
|
||||
|
||||
| Category | Icon Example |
|
||||
|-------------|----------------------------------------|
|
||||
| Sun | ![](/iconsets/classic/sun.png) |
|
||||
| Moon | ![](/iconsets/classic/moon.png) |
|
||||
| Clouds | ![](/iconsets/classic/clouds.png) |
|
||||
| Sun_Clouds | ![](/iconsets/classic/sun_clouds.png) |
|
||||
| Rain | ![](/iconsets/classic/rain.png) |
|
||||
| Snow | ![](/iconsets/classic/snow.png) |
|
||||
| Wind | ![](/iconsets/classic/wind.png) |
|
||||
| Humidity | ![](/iconsets/classic/humidity.png) |
|
||||
| Temperature | ![](/iconsets/classic/temperature.png) |
|
||||
|
||||
#### Properties
|
||||
|
||||
| Category | Icon Example |
|
||||
|------------------|---------------------------------------------|
|
||||
| BatteryLevel | ![](/iconsets/classic/batterylevel.png) |
|
||||
| LowBattery | ![](/iconsets/classic/lowbattery.png) |
|
||||
| CarbonDioxide | ![](/iconsets/classic/carbondioxide.png) |
|
||||
| Energy | ![](/iconsets/classic/energy.png) |
|
||||
| Gas | ![](/iconsets/classic/gas.png) |
|
||||
| Oil | ![](/iconsets/classic/oil.png) |
|
||||
| Water | ![](/iconsets/classic/water.png) |
|
||||
| Light | ![](/iconsets/classic/light.png) |
|
||||
| ColorLight | ![](/iconsets/classic/colorlight.png) |
|
||||
| Temperature | ![](/iconsets/classic/temperature.png) |
|
||||
| Smoke | ![](/iconsets/classic/smoke.png) |
|
||||
| SoundVolume | ![](/iconsets/classic/soundvolume.png) |
|
||||
| Pressure | ![](/iconsets/classic/pressure.png) |
|
||||
| Fire | ![](/iconsets/classic/fire.png) |
|
||||
| Motion | ![](/iconsets/classic/motion.png) |
|
||||
| QualityOfService | ![](/iconsets/classic/qualityofservice.png) |
|
||||
| Moisture | ![](/iconsets/classic/moisture.png) |
|
||||
| Noise | ![](/iconsets/classic/noise.png) |
|
||||
| Flow | ![](/iconsets/classic/flow.png) |
|
||||
| Price | ![](/iconsets/classic/price.png) |
|
||||
| Time | ![](/iconsets/classic/time.png) |
|
||||
|
||||
#### Control
|
||||
|
||||
| Category | Icon Example |
|
||||
|--------------|-----------------------------------------|
|
||||
| Heating | ![](/iconsets/classic/heating.png) |
|
||||
| MediaControl | ![](/iconsets/classic/mediacontrol.png) |
|
||||
| MoveControl | ![](/iconsets/classic/movecontrol.png) |
|
||||
| Zoom | ![](/iconsets/classic/zoom.png) |
|
||||
|
||||
#### Purpose
|
||||
|
||||
| Category | Icon Example |
|
||||
|----------|-------------------------------------|
|
||||
| Alarm | ![](/iconsets/classic/alarm.png) |
|
||||
| Presence | ![](/iconsets/classic/presence.png) |
|
||||
| Vacation | ![](/iconsets/classic/vacation.png) |
|
||||
| Party | ![](/iconsets/classic/party.png) |
|
||||
|
|
Loading…
Reference in New Issue