Open vavuum opened 11 months ago
Thanks for reporting a new issue @vavuum!
Otherwise this issue will be closed.
Vermutlich wir der vom Shelly während der Fahrt kontinuierlich aktualierte Wert als neue Eingabe gewertet.
Das ist technisch nicht möglich. Aber ohne Debug-Log werden wir das wohl nie erfahren.
Dasselbe Problem hier. Auch bei Lichtschaltern als Taster konfiguriert tritt das auf. Wenn ich „ Enable RPC over MQTT“ deaktiviere und die Befehle per HTTP sende, funktioniert es, da ich den Datenpunkt nicht mehr nutze bzw. Nur noch auslese. Bin derselben Meinung, dass ein Update des Datenpunktes ein neues Update triggert.
Still no debug log
Give me some days. I will attach a log then. But in my opinion it‘s easy to reproduce the issue.
The problem is: time. I'm not using any Shelly in my installation. I just have a bunch of test devices which are not connected to anything. To prepare such a setup takes a lot of time.
Perhaps change cover Position Topic in gen2-helper.js to: This would also solve the issue by using YAHKA to get the proper Status by using current and target position.
deviceObj[`Cover${coverId}.TargetPosition`] = {
device_mode: 'cover',
mqtt: {
mqtt_publish: `<mqttprefix>/status/cover:${coverId}`,
mqtt_cmd: '<mqttprefix>/rpc',
mqtt_cmd_funct: (value, self) => {
return JSON.stringify({
id: self.getNextMsgId(),
src: 'iobroker',
method: 'Cover.GoToPosition',
params: { id: coverId, pos: value },
});
},
common: {
name: 'Position',
type: 'number',
role: 'level.blind',
read: true,
write: true,
def: 0,
unit: '%',
min: 0,
max: 100,
},
};
deviceObj[`Cover${coverId}.CurrentPosition`] = {
device_mode: 'cover',
mqtt: {
mqtt_publish: `<mqttprefix>/status/cover:${coverId}`,
mqtt_publish_funct: value => JSON.parse(value).current_pos
},
common: {
name: 'Position',
type: 'number',
role: 'level.blind',
read: true,
write: true,
def: 0,
unit: '%',
min: 0,
max: 100,
},
};
It seems that an update of current_pos is triggering a new Cover.GoToPosition:
deviceObj[`Cover${coverId}.Position`] = {
device_mode: 'cover',
mqtt: {
mqtt_publish: `<mqttprefix>/status/cover:${coverId}`,
mqtt_publish_funct: value => JSON.parse(value).current_pos, <-- HERE
mqtt_cmd: '<mqttprefix>/rpc',
mqtt_cmd_funct: (value, self) => {
return JSON.stringify({
id: self.getNextMsgId(),
src: 'iobroker',
method: 'Cover.GoToPosition', <-- HERE
params: { id: coverId, pos: value },
});
},
},
common: {
name: 'Position',
type: 'number',
role: 'level.blind',
read: true,
write: true,
def: 0,
unit: '%',
min: 0,
max: 100,
},
};
`
Hatte das gleiche Problem. Hab QoS auf 0 gesetzt. danach war Ruhe
I'm sure that
Shelly device
ShellyPlus2PM firmware 1.03
Protocol
MQTT
The problem
Wenn ich den Wert von Cover0.Position (unbestätigt) ändere, beginnt der Rollladen abwechselnd hoch und runter zu fahren. Vermutlich wir der vom Shelly während der Fahrt kontinuierlich aktualierte Wert als neue Eingabe gewertet.
iobroker.current.log (in debug mode!)
No response
Version of nodejs
v18.17.1
Version of ioBroker js-controller
7.1.4
Version of adapter
latest