-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53844bf
commit 7af501d
Showing
6 changed files
with
116 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export const IP_ADDRESS_SETTINGS_KEY = 'ip_address' | ||
export const CUSTOM_IP_ADDRESS_SETTINGS_KEY = 'custom_ip_address' | ||
export const DEBUG_DEVICES_SETTINGS_KEY = 'debug_devices' | ||
export const CUSTOM_IP_ADDRESS_PAIR_KEY = 'custom_ip_address' | ||
export const LIST_DEVICES_PAIR_KEY = 'list_devices' | ||
export const MEASURE_TEMPERATURE_CAPABILITY = 'measure_temperature' | ||
export const TARGET_TEMPERATURE_CAPABILITY = 'target_temperature' | ||
export const POLL_INTERVAL_MS = 1000 * 60 * 1 // 1 minute | ||
export const INIT_TIMEOUT_MS = 1000 * 2 // 2 seconds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,50 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script type="text/javascript" src="/homey.js" data-origin="settings"></script> | ||
<script type="text/javascript"> | ||
function onHomeyReady(Homey) { | ||
Homey.ready() | ||
<script type="text/javascript" src="/homey.js" data-origin="settings"></script> | ||
<script type="text/javascript"> | ||
function onHomeyReady(Homey) { | ||
Homey.ready() | ||
|
||
Homey.get('debug_devices', function (err, debug_devices) { | ||
if (err) return Homey.alert(err) | ||
document.getElementById('debug_devices').value = debug_devices | ||
}) | ||
} | ||
</script> | ||
var ipAddressInput = document.getElementById('ip_address') | ||
var customIpAdressInput = document.getElementById('custom_ip_address') | ||
var debugDevicesInput = document.getElementById('debug_devices') | ||
|
||
Homey.get('ip_address', function (err, ip_address) { | ||
if (err) return Homey.alert(err) | ||
ipAddressInput.value = ip_address | ||
}) | ||
|
||
Homey.get('custom_ip_address', function (err, ip_address) { | ||
if (err) return Homey.alert(err) | ||
customIpAdressInput.value = ip_address | ||
}) | ||
|
||
Homey.get('debug_devices', function (err, debug_devices) { | ||
if (err) return Homey.alert(err) | ||
debugDevicesInput.value = debug_devices | ||
}) | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<header class="homey-header"> | ||
<h1 class="homey-title" data-i18n="settings.title"></h1> | ||
</header> | ||
<fieldset class="homey-form-fieldset"> | ||
<legend class="homey-form-legend" data-i18n="settings.info_title"></legend> | ||
|
||
<div class="homey-form-group"> | ||
<label class="homey-form-label" data-i18n="settings.ip_address_label"></label> | ||
<input class="homey-form-input" id="ip_address" type="text" disabled></input> | ||
</div> | ||
|
||
<div class="homey-form-group"> | ||
<label class="homey-form-label" data-i18n="settings.custom_ip_address_label"></label> | ||
<input class="homey-form-input" id="custom_ip_address" type="text"></input> | ||
</div> | ||
|
||
<div class="homey-form-group"> | ||
<label class="homey-form-label" data-i18n="settings.debug_devices_label"></label> | ||
<textarea class="homey-form-textarea" id="debug_devices"></textarea> | ||
</div> | ||
<div class="homey-form-group"> | ||
<label class="homey-form-label" data-i18n="settings.debug_devices_label"></label> | ||
<textarea class="homey-form-textarea" id="debug_devices" disabled></textarea> | ||
</div> | ||
</fieldset> | ||
</body> | ||
</html> |