特殊:Badtitle/NS100:1wireSoftware:修订间差异
小 新页面: {{From|https://help.ubuntu.com/community/1wireSoftware}} {{Languages|UbuntuHelp:1wireSoftware}} There are several kinds of software available to work with 1wire technology, I'll be detail... |
小无编辑摘要 |
||
第83行: | 第83行: | ||
I've not used anything else, though I know there are alternatives, even alternatives for Windows, if you're so afflicted. :) | I've not used anything else, though I know there are alternatives, even alternatives for Windows, if you're so afflicted. :) | ||
== An Example: CounterMoon.org == | == An Example: CounterMoon.org == | ||
I'm working on a trailer that uses Ubuntu, OWFS, and 1Wire technology. Come see what it looks like: [[1wireAppCountermoon.org]] | I'm working on a trailer that uses Ubuntu, OWFS, and 1Wire technology. Come see what it looks like: [[UbuntuHelp:1wireAppCountermoon.org]] | ||
Back to the Meta [[1wire]] | Back to the Meta [[UbuntuHelp:1wire]] | ||
---- | ---- | ||
[[category:CategoryDocumentation]] | [[category:CategoryDocumentation]] | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2008年10月19日 (日) 14:05的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/1wireSoftware }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/af | • {{#if: UbuntuHelp:1wireSoftware|Afrikaans| [[::1wireSoftware/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/ar | • {{#if: UbuntuHelp:1wireSoftware|العربية| [[::1wireSoftware/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/az | • {{#if: UbuntuHelp:1wireSoftware|azərbaycanca| [[::1wireSoftware/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/bcc | • {{#if: UbuntuHelp:1wireSoftware|جهلسری بلوچی| [[::1wireSoftware/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/bg | • {{#if: UbuntuHelp:1wireSoftware|български| [[::1wireSoftware/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/br | • {{#if: UbuntuHelp:1wireSoftware|brezhoneg| [[::1wireSoftware/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/ca | • {{#if: UbuntuHelp:1wireSoftware|català| [[::1wireSoftware/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/cs | • {{#if: UbuntuHelp:1wireSoftware|čeština| [[::1wireSoftware/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/de | • {{#if: UbuntuHelp:1wireSoftware|Deutsch| [[::1wireSoftware/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/el | • {{#if: UbuntuHelp:1wireSoftware|Ελληνικά| [[::1wireSoftware/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/es | • {{#if: UbuntuHelp:1wireSoftware|español| [[::1wireSoftware/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/fa | • {{#if: UbuntuHelp:1wireSoftware|فارسی| [[::1wireSoftware/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/fi | • {{#if: UbuntuHelp:1wireSoftware|suomi| [[::1wireSoftware/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/fr | • {{#if: UbuntuHelp:1wireSoftware|français| [[::1wireSoftware/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/gu | • {{#if: UbuntuHelp:1wireSoftware|ગુજરાતી| [[::1wireSoftware/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/he | • {{#if: UbuntuHelp:1wireSoftware|עברית| [[::1wireSoftware/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/hu | • {{#if: UbuntuHelp:1wireSoftware|magyar| [[::1wireSoftware/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/id | • {{#if: UbuntuHelp:1wireSoftware|Bahasa Indonesia| [[::1wireSoftware/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/it | • {{#if: UbuntuHelp:1wireSoftware|italiano| [[::1wireSoftware/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/ja | • {{#if: UbuntuHelp:1wireSoftware|日本語| [[::1wireSoftware/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/ko | • {{#if: UbuntuHelp:1wireSoftware|한국어| [[::1wireSoftware/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/ksh | • {{#if: UbuntuHelp:1wireSoftware|Ripoarisch| [[::1wireSoftware/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/mr | • {{#if: UbuntuHelp:1wireSoftware|मराठी| [[::1wireSoftware/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/ms | • {{#if: UbuntuHelp:1wireSoftware|Bahasa Melayu| [[::1wireSoftware/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/nl | • {{#if: UbuntuHelp:1wireSoftware|Nederlands| [[::1wireSoftware/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/no | • {{#if: UbuntuHelp:1wireSoftware|norsk| [[::1wireSoftware/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/oc | • {{#if: UbuntuHelp:1wireSoftware|occitan| [[::1wireSoftware/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/pl | • {{#if: UbuntuHelp:1wireSoftware|polski| [[::1wireSoftware/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/pt | • {{#if: UbuntuHelp:1wireSoftware|português| [[::1wireSoftware/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/ro | • {{#if: UbuntuHelp:1wireSoftware|română| [[::1wireSoftware/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/ru | • {{#if: UbuntuHelp:1wireSoftware|русский| [[::1wireSoftware/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/si | • {{#if: UbuntuHelp:1wireSoftware|සිංහල| [[::1wireSoftware/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/sq | • {{#if: UbuntuHelp:1wireSoftware|shqip| [[::1wireSoftware/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/sr | • {{#if: UbuntuHelp:1wireSoftware|српски / srpski| [[::1wireSoftware/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/sv | • {{#if: UbuntuHelp:1wireSoftware|svenska| [[::1wireSoftware/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/th | • {{#if: UbuntuHelp:1wireSoftware|ไทย| [[::1wireSoftware/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/tr | • {{#if: UbuntuHelp:1wireSoftware|Türkçe| [[::1wireSoftware/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/vi | • {{#if: UbuntuHelp:1wireSoftware|Tiếng Việt| [[::1wireSoftware/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/yue | • {{#if: UbuntuHelp:1wireSoftware|粵語| [[::1wireSoftware/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/zh | • {{#if: UbuntuHelp:1wireSoftware|中文| [[::1wireSoftware/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/zh-hans | • {{#if: UbuntuHelp:1wireSoftware|中文(简体)| [[::1wireSoftware/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:1wireSoftware | UbuntuHelp:1wireSoftware | {{#if: | :}}1wireSoftware}}/zh-hant | • {{#if: UbuntuHelp:1wireSoftware|中文(繁體)| [[::1wireSoftware/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:1wireSoftware|:1wireSoftware|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :1wireSoftware/zh | | {{#ifexist: 1wireSoftware/zh | | {{#ifeq: {{#titleparts:1wireSoftware|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:1wireSoftware|1|-1|}} | zh | | }}
There are several kinds of software available to work with 1wire technology, I'll be detailing those I know. Please feel free to add or edit what you see.
Introduction
1wire technology gives you the chance to read temperatures, humidities, even detect rain and count door closures at great distances. Some of the software available for Linux makes controlling these things so simple as to nearly be trivial. And like always, there's choice and style.
OWFS
OWFS is a set of tools for reading/writing to the 1wire network. It's primary and IMO most clever one is OWFS itself: it reads the network and creates a directory of all that it sees. Reading a temperature becomes trivial. Here's how I turn on the exhaust fan in my trailer:
echo "1" > /var/1wire/1F.38C704000000/main/05.62E531000000/PIO
Here's how I turn it off:
echo "0" > /var/1wire/1F.38C704000000/main/05.62E531000000/PIO
Did I leave the fan on, or off?
cat /var/1wire/1F.38C704000000/main/05.62E531000000/PIO 0
No, it's off. Good thing, too- might rain. The project's located at: http://owfs.sourceforge.net/
owhttpd
This part of the package listens on port 81 like a web server, allowing you to 'walk around' the net and read values, setting some too. (screenshot)
owserver
This part lets you summarize the activity on one machine that actually connects tot the 1wire network, and remotely control it from across the globe.
owperl
A module that integrates nicely into perl for working with the network.
owpython
A module that integrates nicely into Python.
owphp
A set of bindings for PHP
owtcl
TCL bindings.
Building under Dapper
OWFS sure takes the work out of dealing with the network, and it provides a lot of options for other languages and protocols. Hey, let's build on on Dapper, shall we? What follows is largely based on Tomasz' Howto at [[1]]
Install required software
The Universe repository is required to get fuse-utils.
apt-get install automake autoconf autotools-dev gcc g++ \ libtool libusb-dev fuse-utils libfuse-dev swig \ python2.4-dev tcl8.4-dev php5-dev
Get OWFS: Notice the version number will change.
cd /usr/src wget http://umn.dl.sourceforge.net/sourceforge/owfs/owfs-2.4p3.tar.gz
Extract the file:
tar zxpf owfs-2.4p3.tar.gz
Compile and install:
cd owfs-2.4p3 ./configure make && make install
Mount the 1wire filesystem:
mkdir /var/lib/1wire modprobe fuse /opt/owfs/bin/owfs -U -F /var/1wire
See if it's there:
ls /var/1wire 09.CF9EC8010000 10.64502F000800 alarm bus.0 simultaneous statistics structure system uncached
The 1F.XXXXXXXXXXXX devices there are hubs, that have other devices 'behind' them. The 10.64502F000800 above is a device for reading temperature. If you see something that looks similar, it's done. Several options are available, too; things specific to hardware, as well as whether to build the other packages, etc at the OWFS site.
Other Software
I've not used anything else, though I know there are alternatives, even alternatives for Windows, if you're so afflicted. :)
An Example: CounterMoon.org
I'm working on a trailer that uses Ubuntu, OWFS, and 1Wire technology. Come see what it looks like: UbuntuHelp:1wireAppCountermoon.org Back to the Meta UbuntuHelp:1wire