跳转到内容
主菜单
主菜单
移至侧栏
隐藏
导航
Wiki首页
Domoticz 中文站
Domoticz 论坛
Domoticz Github
随机页面
特殊页面
特殊页面
所有页面
分类
最近更改
Domoticz
搜索
搜索
登录
个人工具
登录
查看“脚本”的源代码
页面
讨论
大陆简体
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
常规
链入页面
相关更改
特殊页面
页面信息
←
脚本
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
本页提供了有助于您获取和使用Domoticz数据的脚本和代码段。 一旦你有了数据,你可以实现自动化处理。具体脚本和逻辑可以在自动化部分找到。 =将你的脚本添加到此页面= 我们强烈建议你将你写的脚本添加到此页面!登录论坛后会自动登录到Wiki,当然你也可以直接在论坛中发布脚本或教程。 请按一下格式发布你的脚本: 脚本语言 - 简短介绍 例如 "Lua - 自动打开车库门" 或 "Bash - 没有人在家时关掉灯" 通过在标题周围放置双方括号[],Wiki会自动将其转换为指向新的空wiki页面的链接。 ==模板== 在新的脚本页面中,请写入以下相关内容: #目的 #依赖 - 硬件、软件、操作系统等 #Domoticz设置 - 开关、变量、版本要求等 #安装说明 #带注释的脚本 #使用说明 #相关论坛帖子连接 <br> 你可以使用<nowiki><syntaxhighlight lang="python"> 代码 </syntaxhighlight></nowiki>标签来高亮显示你的代码。<br> 所支持的语言请查看: https://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Supported_languages ==分类== 为了使其他人更容易找到您的脚本,请使用以下类别约定。 从以下树中选择正确的分类,如果您在树中选择较低的项目,如“电视”也包括树中较高的类别。 将他们放到wiki页面底部。 例如,你在电视分类中创建Wiki页面,从而添加“电视”类别,您还可以添加更高的类别“媒体”和“硬件”。 <syntaxhighlight lang="python"> Domotics: [[Category:Domoticz]] (选择一个或更多) [[Category:手册]] [[Category:安装]] [[Category:设置]] 硬件: [[Category:硬件]] [[Category:家用电器]] [[Category:厨房]] [[Category:灯光]] [[Category:媒体]] [[Category:AV]] [[Category:TV]] [[Cetegory:CEC]] [[Category:Audio]] [[Category:安全]] [[Category:Alarm]] [[Category:Camera]] [[Category:Keypad]] [[Category:Motion]] [[Category:Utility]] [[Category:Gas]] [[Category:Heating]] [[Category:Power]] [[Category:Water]] [[Category:环境]] [[Category:室内]] [[Category:天气]] 协议: [[Category:MQTT]] [[Category:Bluetooth]] [[Category:HTTP]] 脚本: [[Category:脚本]] [[Category:Bash]] [[Category:Batch]] [[Category:Blocky]] [[Category:PHP]] [[Category:Perl]] [[Category:C]] [[Category:JSON]] [[Category:Lua]] [[Category:Python]] 操作系统(通用脚本请留空): [[Category:Linux]] [[Category:树莓派]] [[Category:OSX]] [[Category:Windows]] </syntaxhighlight> 此列表不完整! 如果发现有分类缺失,你可以在此添加新分类!这可以帮助大家快速查找脚本。 ===例子=== 例如[[Philips_Hue_Lights|Philips HUE]]页面底部有如下分类: <syntaxhighlight lang="Bash"> [[Category:Domoticz]] [[Category:设置]] [[Category:硬件]] [[Category:照明]] [[Category:脚本]] [[Category:JSON]] [[Category:Lua]] [[Category:Bash]] </syntaxhighlight> =脚本= == 介绍 == *[[Domoticz_and_Scripting | 介绍]] ==Batch脚本 (微软Windows系统)== Use the Edit button of a switch on the Switches tab. Use in the "On Action" or "Off Action" field: '''script://Domoticz\scripts\soundplay.bat''' to execute a batch file in the directory Domoticz/scripts on the same disk as the Domoticz installation. To play tada.wav the soundplay.bat file can contain: '''c:\PROGRA~1\VIDEOLAN\VLC\vlc.exe --play-and-exit %WINDIR%\media\tada.wav''' (assumed VLC is installed). ==Blockly脚本== * [http://www.domoticz.com/forum/viewtopic.php?f=15&t=31&start=60&hilit=blocky Blockly examples] ==Lua脚本== === Tutorial === *[http://foldit.wikia.com/wiki/Lua_Scripting_Tutorial_(Advanced) Tutorial] === Trigger === *[[trigger_perl | Trigger a perl script]] *[[trigger_bash | Trigger a bash script]] *[[trigger_php | Trigger a php script]] === Library === *[[Lua - json.lua]] === Specific === *[[Lua - Electric meter pulse counter]] *[[Lua - Oil Tank Monitor]] *[[Lua - Powermonitor with Ping Using Telegram]] *[[Event_script_examples | Event Examples (To be formatted to new wiki standard AND split in different pages)]] *[[Smart_Lua_Scripts | Smart Lua Examples (To be formatted to new wiki standard AND split in different pages)]] *[[Get Weather Prediction | Get Weather Prediction]] *[[Get Doors Status | Get Doors Status]] *[[Thermostat_control | Thermostat Control (To be translated)]] *[[Alarm | Alarm]] *[[Capturing_Energy_Usage_with_Lua_Scripts | Capturing Energy Usage with Lua Scripts (To be formatted to new wiki standard)]] *[[Upload_energy_data_to_PVoutput | Lua - Upload energy data to PVOutput]] *[[Interacting_with_Google_Calendar | Interacting with Google Calendar (To be formatted to new wiki standard)]] *[[Automate_sunscreen_blinds_shades | Automate sunscreen, blinds, shades (To be formatted to new wiki standard)]] *[[Battery level check | Battery Level Check ]] *[[Get Sensors Status | Get Sensors Status]] *[[Lua - Dusk Sensor|Lua - Dusk Sensor]] *[[Lua - TI SensorTag]] *[[Humidity control|Lua - Humidity control]] *[[Battery_level_check|Lua - Battery level check]] *[[Garden Irrigation|Lua - Garden Irrigation]] *[[Presence detection through mobile phone and PC presence on the network]] *[[Control_Onkyo | Controlling a Onkyo home cinema receiver through a Lua-script]] *[[Real-time solar data without any hardware sensor : azimuth, Altitude, Lux sensor...|Lua - Real-time solar data without any hardware sensor : azimuth, Altitude, Lux sensor...]] *[[Simple_script_to_update_Philips_Hue_status | Simple script to update Philips Hue Status]] ==Bash脚本== === Tutorial === === Specific === *[[Mindergas.nl | Post Gas Reading to the Mindergas.nl site]] *[[google_voice | Use Google Translate for Voice Notifications]] *[[play_streaming_radio | Play a streaming radio]] *[[Limitless/AppLamp_LED | Limitless/AppLamp LED Control (To be formatted to new wiki standard) ]] *[[Daily_backup_to_external_hdd | Daily Backup to External Hdd (To be formatted to new wiki standard) ]] *[[Automatic_Weather_Tweets | Automatic Weather Tweets (To be formatted to new wiki standard) ]] *http://www.domoticz.com/wiki/Monitoring_domoticz#Alternative_script Monitoring & auto restart of Domoticz service *[[Monitor memory usage | Monitor memory usage of a process and log inside domoticz]] *[[Daikin_wifi | Bash - Control Daikin wifi heatpump]] *[[LG_VHOMBOT3_status_into_Domoticz| Bash - Status Hombot in Domoticz]] *[[Windows_scripts|Batch - Domoticz backup script for Windows]] *[[Rss_voice | Use VoiceRSS for Voice notifications]] *[[Installing Telegram Notification System|Installation Telegram Notification System - Telegram-Cli Method]] *[[Logging_to_Slack | Use Slack as an alternative logging mechanism and upload images]] *[[Bash - Speedtest.net Download/Upload/Ping monitoring]] *[[Rsync raspberry bash script]] *[[Raspberry pi fan control and monitoring with bash]] ==Perl脚本== === Tutorial === * [[Perl_for_Domoticz | Tutorial]] on Devices, Ping, Sqlite3, Xively, Sen.se, GPIO and Arduino === Specific === *[[ImperiHome | MyDomoAtHome interface to Imperihome android/iOS]] *[[Domoticz Pings any IP in LAN, and switching a device, using Perl|Perl - Ping IP and switching a device]] ==PHP脚本== === Tutorial === === Specific === *[[Extracting status and measuring values with PHP | Extracting status and measuring values (To be formatted to new wiki standard)]] *[[Automatic_Weather_Forecast_Tweet_(PHP_version) | Automatic Weather Forecast Tweet (To be formatted to new wiki standard)]] *[[Control_Onkyo | Controlling a Onkyo home cinema receiver through a PHP-script]] *[[Control_ZiggoHorizon | Controlling a Ziggo Horizon (SMT-G7400) receiver through a PHP-script]] *[[PHP: Store switch states and values in variables]] *[[PHP: Functions to control Domoticz]] *[[PHP: Send notifications]] *[[PHP: Google Calendar to control Domoticz]] ==Python脚本== === Tutorial === === Specific === *[[Presence_detection | Presence detection by pinging a user's smartphone]] *[[Presence_detection (SNMP) | Presence detection by checking connected devices via SNMP]] *[[Mindergas.nl|Python & Bash - Posting gasreading to mindergas.nl]] *[[DAL| Python - Read data from netduino-DAL]] *[[LG 2012 smart tv | Python - Control LG Smart TV (2012)]] *[[Notifications to PC with Snarl | Python - Notifications to PC with Snarl]] *[[Omnik Solar Inverter| Python - Omnik Solar Inverter]] *[[Meter readings monthly| Python - Pushover notification first day of month with smartmeter meter values]] *[[Domoticz Daily Usage Energy| Prowl notification for energy measuring device]] *[[Device_blink| Python Let a device blink]] *[[Doorbel a virtual Switch|Connect your doorbell to Domoticz (through GPIO)]] *[[Toon2domoticz | Get current state from Eneco Toon and save it as a uservariable in Domoticz]] *[[UPS Pico | UPS Pico (pimodules) integration with Domoticz]] *[[Python - Monitor Domoticz IP address]] *[[Python - Read-out of DDS238 kWh-meter and upload to Domoticz and to PVOutput]] [[Category:Domoticz]] [[Category:手册]] [[Category:设置]] [[Category:脚本]] [[Category:Lua]] [[Category:PHP]] [[Category:Bash]] [[Category:Perl]] [[Category:Blocky]]
返回
脚本
。
开关有限宽度模式