Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.4.4 Maintenance Release #42

Merged
merged 21 commits into from
Jul 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
node_modules/
node_modules/*
Thumbs.db
package-lock.json
package-lock.json
dev_*
5 changes: 5 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
Thumbs.db
test/
test/*
*/test/
*/test/*
backup/
backup/*
*/backup/*
*/backup/
.travis.yml
.gitignore
.gitconfig
.gitattributes
.jsbeautifyrc
dev_*
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# node-red-contrib-sun-position

#### 0.4.6: Maintenance Release

- time-comp
- fixed css for multiselect in node-red Beta
- added tooltip for time select fields
- time-span
- added tooltip for time select fields
- enhanced readme and added links to changelog #43

#### 0.4.5: Maintenance Release

- time-compare
- node added option "otherwise"
- time-span
- node added option "otherwise"
- fixed error time-span output
- dayOfMonth
- fixed wrong entry in type edit
- fixed exception on empty date in offset calculation

#### 0.4.4: Maintenance Release

- all previous changes
- enhanced Documentation
- redesigned minimum and maximum rule level types again

#### 0.4.4-beta: Maintenance Release

- fixed critical problem in sun - calculating Julian cycle which leads into wrong sun times if it is calculated at certain times
Expand Down
115 changes: 61 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,48 +19,49 @@ In addition, there is now a blind controller, which can set blind position time

## Table of contents

* [node-red-contrib-sun-position for NodeRED](#node-red-contrib-sun-position-for-NodeRED)
* [Table of contents](#Table-of-contents)
* [Preconditions](#Preconditions)
* [Installation](#Installation)
* [General](#General)
* [Saving resources](#Saving-resources)
* [second based accuracy](#second-based-accuracy)
* [Implemented Nodes](#Implemented-Nodes)
* [sun-position](#sun-position)
* [sun-position - Node settings](#sun-position---Node-settings)
* [Node Input](#Node-Input)
* [sun-position - Node Output](#sun-position---Node-Output)
* [moon-position](#moon-position)
* [moon-position - Node settings](#moon-position---Node-settings)
* [moon-position - Node Output](#moon-position---Node-Output)
* [time-inject](#time-inject)
* [time-inject - Node settings](#time-inject---Node-settings)
* [time-inject - Node Input](#time-inject---Node-Input)
* [time-inject - Node Output](#time-inject---Node-Output)
* [within-time](#within-time)
* [within-time - Node settings](#within-time---Node-settings)
* [time-comp](#time-comp)
* [time-comp - Node settings](#time-comp---Node-settings)
* [time-span](#time-span)
* [time-span - Node settings](#time-span---Node-settings)
* [blind-control](#blind-control)
* [Times definitions](#Times-definitions)
* [sun times](#sun-times)
* [remarks](#remarks)
* [blue hour](#blue-hour)
* [amateurDawn /amateurDusk](#amateurDawn-amateurDusk)
* [alternate properties](#alternate-properties)
* [moon times](#moon-times)
* [message, flow or global property or JSONATA expression](#message-flow-or-global-property-or-JSONATA-expression)
* [input parse formats](#input-parse-formats)
* [output timestamp formats](#output-timestamp-formats)
* [output timespan formats](#output-timespan-formats)
* [Conditions](#Conditions)
* [TODO](#TODO)
* [Bugs and Feedback](#Bugs-and-Feedback)
* [LICENSE](#LICENSE)
* [Other](#Other)
- [node-red-contrib-sun-position for NodeRED](#node-red-contrib-sun-position-for-NodeRED)
- [Table of contents](#Table-of-contents)
- [Preconditions](#Preconditions)
- [Installation](#Installation)
- [General](#General)
- [Saving resources](#Saving-resources)
- [second based accuracy](#second-based-accuracy)
- [Implemented Nodes](#Implemented-Nodes)
- [sun-position](#sun-position)
- [sun-position - Node settings](#sun-position---Node-settings)
- [Node Input](#Node-Input)
- [sun-position - Node Output](#sun-position---Node-Output)
- [moon-position](#moon-position)
- [moon-position - Node settings](#moon-position---Node-settings)
- [moon-position - Node Output](#moon-position---Node-Output)
- [time-inject](#time-inject)
- [time-inject - Node settings](#time-inject---Node-settings)
- [time-inject - Node Input](#time-inject---Node-Input)
- [time-inject - Node Output](#time-inject---Node-Output)
- [within-time](#within-time)
- [within-time - Node settings](#within-time---Node-settings)
- [time-comp](#time-comp)
- [time-comp - Node settings](#time-comp---Node-settings)
- [time-span](#time-span)
- [time-span - Node settings](#time-span---Node-settings)
- [blind-control](#blind-control)
- [Times definitions](#Times-definitions)
- [sun times](#sun-times)
- [remarks](#remarks)
- [blue hour](#blue-hour)
- [amateurDawn /amateurDusk](#amateurDawn-amateurDusk)
- [alternate properties](#alternate-properties)
- [moon times](#moon-times)
- [message, flow or global property or JSONATA expression](#message-flow-or-global-property-or-JSONATA-expression)
- [input parse formats](#input-parse-formats)
- [output timestamp formats](#output-timestamp-formats)
- [output timespan formats](#output-timespan-formats)
- [Conditions](#Conditions)
- [CHANGELOG](#CHANGELOG)
- [TODO](#TODO)
- [Support, Bugs and Feedback](#Support-Bugs-and-Feedback)
- [LICENSE](#LICENSE)
- [Other](#Other)

## Preconditions

Expand Down Expand Up @@ -634,22 +635,26 @@ The operators are:
* `false expression` - the condition is fulfilled if the *property* is a number and **not** less than or equal `0` or a Boolean which is **not** `false` or a string containing **none** of the following values `false`, `no`, `off`, `nein`.
* `<`, `<=`, `==`, `!=`, `>`, `>=` - compares the value of the *property* with a *threshold*. Typically this makes only sense if the *property* and the *threshold* are numbers.
* `contain` - the condition is fulfilled if the *property* contains the string defined in the *threshold*.
* `containSome` - the *threshold* must be a string separated with comma `,`, semicolon `;` or pipe `|`. The condition is fulfilled as soon as only one of the seperated parts of the *threshold* string is is included in the *property* value.
* `containEvery` - the *threshold* must be a string separated with comma `,`, semicolon `;` or pipe `|`. The condition is fulfilled as soon as all of the seperated parts of the *threshold* string are included in the *property* value.
* `containSome` - the *threshold* must be a string separated with comma `,`, semicolon `;` or pipe `|`. The condition is fulfilled as soon as only one of the separated parts of the *threshold* string is is included in the *property* value.
* `containEvery` - the *threshold* must be a string separated with comma `,`, semicolon `;` or pipe `|`. The condition is fulfilled as soon as all of the separated parts of the *threshold* string are included in the *property* value.

A JSONata expression in the *property* must be always a boolean with value true, in this case the operator can not be chosen.

## CHANGELOG

- see [here the releases at npm](https://github.com/rdmtc/node-red-contrib-sun-position/releases).
- see [here the changelog of master](https://github.com/rdmtc/node-red-contrib-sun-position/blob/HEAD/CHANGELOG.md)
- see [here the changelog of dev](https://github.com/rdmtc/node-red-contrib-sun-position/blob/dev/CHANGELOG.md)

## TODO

* [ ] add possibility to select input/output timezone
* [x] select auto add get info from getTimezoneOffset
* [x] solve problem of DST
* [ ] Add more exception possibilities (oversteer) to Blind-control
- [ ] add possibility to select input/output timezone
- [ ] Add new node time-control as a stripped down node of the blind control with only rules for control other devices like dimmer and thermostats

## Bugs and Feedback
## Support, Bugs and Feedback

For bugs, questions and feature requests please use the
[GitHub Issues](https://github.com/rdmtc/node-red-contrib-sun-position/issues).
[GitHub Issues](https://github.com/rdmtc/node-red-contrib-sun-position/issues), the [Homematic forum](https://homematic-forum.de/forum/viewforum.php?f=77) or the [RedMatic Slack](https://join.slack.com/t/homematicuser/shared_invite/enQtNDgyNDM2OTkyMDA2LWY1YjY0NTE0NmY0OWM3YWUzMzAzMTgxYmRjMTMyOWE3NjkxNDdlMDY5ZjlhYzM5Nzg2N2U2YjdmNzNlYWNhNTU).

:moneybag: Donations [![Donate](https://img.shields.io/badge/donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4PCF5YW5ASHBN)

Expand All @@ -668,9 +673,11 @@ specific language governing permissions and limitations under the License.

## Other

[![Greenkeeper badge](https://badges.greenkeeper.io/rdmtc/node-red-contrib-sun-position.svg)](https://greenkeeper.io/)

this node is published also here:

* [npm Releases / changelog](https://github.com/rdmtc/node-red-contrib-sun-position/releases)
* [RedMatic Slack](https://join.slack.com/t/homematicuser/shared_invite/enQtNDgyNDM2OTkyMDA2LWY1YjY0NTE0NmY0OWM3YWUzMzAzMTgxYmRjMTMyOWE3NjkxNDdlMDY5ZjlhYzM5Nzg2N2U2YjdmNzNlYWNhNTU)
* [newreleases.io](https://newreleases.io/npm/node-red-contrib-sun-position)
* [![Greenkeeper badge](https://badges.greenkeeper.io/rdmtc/node-red-contrib-sun-position.svg)](https://greenkeeper.io/)
* [RedMatic Slack (chat like WhatsApp or Facebook Messenger)](https://join.slack.com/t/homematicuser/shared_invite/enQtNDgyNDM2OTkyMDA2LWY1YjY0NTE0NmY0OWM3YWUzMzAzMTgxYmRjMTMyOWE3NjkxNDdlMDY5ZjlhYzM5Nzg2N2U2YjdmNzNlYWNhNTU)
* [Github](https://github.com/rdmtc/node-red-contrib-sun-position)
* [NPM package](https://www.npmjs.com/package/node-red-contrib-sun-position)
* [Node-Red](https://flows.nodered.org/node/node-red-contrib-sun-position)
31 changes: 28 additions & 3 deletions blind_control.md

Large diffs are not rendered by default.

109 changes: 18 additions & 91 deletions nodes/blind-control.html
Original file line number Diff line number Diff line change
Expand Up @@ -484,33 +484,6 @@

// #region Dialog
/**
* save dialog data back to rule
*/
/*
function _dialogSaveData() {
console.log('dialogSaveData'); // eslint-disable-line
if (!$dialogConnFields) { return; }
// ...
$dialogRule.dialog('close');
}
const $dialogConnFields = {};

const $dialogRule = $('#dialog-edit-rule').dialog({
title: node._('blind-control.label.dialogtitle'),
autoOpen: false,
resizable: true,
height: Math.min(580, $(window).height() * 0.8),
width: Math.min(530, $(window).width() * 0.8),
modal: true,
closeOnEscape: true,
buttons: {
Ok: _dialogSaveData,
Cancel: () => {
$dialogRule.dialog('close');
}
}
});

const $dialogCtx = $('#dialog-select-context').dialog({
autoOpen: false,
height: 400,
Expand Down Expand Up @@ -699,13 +672,6 @@
$validOperator.val(data.validOperator || selFields.comparator[0].id);
const finalspan = $('<span/>',{style:'float: right;margin-top: 6px;'}).appendTo($row1);
finalspan.append('<span class="node-input-rule-index">'+(containerIndex+1)+'</span> ');

/*
const $btn = $('<a />', {
class: 'node-button-item-edit btn ui-button ui-widget ui-corner-all'
}).append('<i class= "fa fa-pencil-square-o" >').appendTo(row);
*/

// #endregion row1
// #region row2 - property threshold -- lbl - [none / Bedingung]
addLabel($row2, 'node-input-rule-condOpB', 'fa fa-ellipsis-h', node._('blind-control.label.ruleConditionThreshold'));
Expand Down Expand Up @@ -776,6 +742,8 @@
$levelOperator.append($('<option></option>').val(0).text(node._('blind-control.label.ruleLevelAbs')));
$levelOperator.append($('<option></option>').val(1).text(node._('blind-control.label.ruleLevelMin')));
$levelOperator.append($('<option></option>').val(2).text(node._('blind-control.label.ruleLevelMax')));
$levelOperator.append($('<option></option>').val(3).text(node._('blind-control.label.ruleLevelResetMin')));
$levelOperator.append($('<option></option>').val(4).text(node._('blind-control.label.ruleLevelResetMax')));
$levelOperator.val(data.levelOp || 0);
// #endregion row5
// #region fields changes
Expand Down Expand Up @@ -876,14 +844,6 @@
}
});

if (node.rules) {
for (let i = 0; i < node.rules.length; i++) {
const rule = node.rules[i];
// rule.index = i;
$('#node-input-rule-container').editableList('addItem', rule);
}
}

// #region Button
const $btnAdd = $('#node-button-add');
$btnAdd.click(() => {
Expand Down Expand Up @@ -1259,7 +1219,22 @@
step: 1
});
// #endregion Enhanced settings
$('#node-input-sunControlMode').change();
// fill rules
if (node.rules) {
for (let i = 0; i < node.rules.length; i++) {
const rule = node.rules[i];
// rule.index = i;
$('#node-input-rule-container').editableList('addItem', rule);
}
setTimeout(() => {
$('#node-input-sunControlMode').change();
const postrules = $('#node-input-rule-container').editableList('items');
postrules.each(function (_i) {
resizeRule($(this));
});
resizeContainer();
}, 1500);
}
}; // setup
$.getScript('sun-position/js/htmlglobal.js')
.done((_data, _textStatus, _jqxhr) => {
Expand Down Expand Up @@ -1529,54 +1504,6 @@

<!-- DIALOG ######################################################################## -->
<!--
<div id="dialog-edit-rule" class="red-ui-editor">
<div class="form-row">
<label for="dialog-input-id">includes</label>
<input type="text" name="dialog-input-id" id="dialog-input-id" class="text ui-widget-content ui-corner-all">
</div>
<div class="form-row">
<label for="dialog-input-name">name</label>
<input type="text" name="dialog-input-name" id="dialog-input-name" class="text ui-widget-content ui-corner-all">
</div>
<div class="form-row">
<label for="dialog-input-nameAlt">name alternate</label>
<input type="text" name="dialog-input-nameAlt" id="dialog-input-nameAlt" class="text ui-widget-content ui-corner-all">
</div>
<div class="form-row">
<label for="dialog-input-character">character</label>
<select type="text" id="dialog-input-character" name="dialog-input-character" style="width:70%" >
</select>
</div>
<div class="form-row">
<label for="dialog-input-date-type">type</label>
<select type="text" id="dialog-input-date-type" name="dialog-input-date-type" style="width:70%" >
</select>
</div>

<div class="form-row dialog-input-date-row">
<label for="dialog-input-date">date</label>
<input type="text" name="dialog-input-date" id="dialog-input-date" min="1" max="31" step="1" class="text ui-widget-content ui-corner-all">
</div>
<div class="form-row dialog-input-daysRel-row">
<label for="dialog-input-daysRel">days</label>
<input type="number" name="dialog-input-daysRel" id="dialog-input-daysRel" min="-370" max="370" step="1" class="text ui-widget-content ui-corner-all">
</div>
<div class="form-row dialog-input-month-row">
<label for="dialog-input-month">month</label>
<select type="text" id="dialog-input-month" name="dialog-input-month" class="text ui-widget-content ui-corner-all" style="width:70%" >
</select>
</div>
<div class="form-row dialog-input-dowRel-row">
<label for="dialog-input-nthdow">relative</label>
<input type="number" id="dialog-input-nthdow" name="dialog-input-nthdow" min="1" max="5" step="1" class="text ui-widget-content ui-corner-all" style="width:30%">
<select type="text" id="dialog-input-dayofweek" name="dialog-input-dayofweek" style="width:40%" >
</select>
</div>
<div>
<label id="dialog-label-date-out"></label>
</div>
</div>

<div id="dialog-select-context" title="Select Channel and Datapoint">
<div id="config-lookup-tree"></div>
</div>
Expand Down
Loading