Skip to content

Standby #10

@Zeus110577

Description

@Zeus110577

Hallo

nur ne kurze Info. Leider hatte ich das Problem das beim ändern vom Standby, egal ob true oder false gesendet wurde, der Receiver eingeschaltet hat. Sprich ich hab das Script angepasst das es den Standby selbst prüft auf Änderung:

ganz oben Variable angelegt:

var old_STANDBY_value = false;

code geändert:
...
if (id === adapter.namespace + '.VuPlus.STANDBY') {
if (old_STANDBY_value !== state.val) {
getResponse('NONE', deviceId, PATH_POWERSTATE + '?newstate=' + (state.val ? 1 : 0), function (error, command, deviceId, xml) {
if (!error) {
adapter.setState('VuPlus.STANDBY', state.val, true);
} else {
adapter.setState('VuPlus.STANDBY', {val: state.val, ack: true, q: 0x42});
}
});
}
...

und bei abfrage locale variable gesetzt:

...
case 'GETSTANDBY':
if (!xml.e2powerstate) {
adapter.log.error('No e2powerstate found');
return;
}
bool = parseBool(xml.e2powerstate.e2instandby);
adapter.log.debug('Box Standy: ' + bool);
old_STANDBY_value = bool;
adapter.setState('VuPlus.STANDBY', bool, true);
adapter.setState('VuPlus.ON', !bool, true)
//setState(boxId + 1, parseBool(xml.e2powerstate.e2instandby));<---><------>// true|false
break;
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions