MQTT2 Shelly 2.5 Rolladensteuerung mit ALEXA

Begonnen von SimonHipp, 16 Juni 2020, 23:54:16

Vorheriges Thema - Nächstes Thema

SimonHipp

Hi Leute,

ich habe das Problem das mein neu verbauter Shelly 2.5 per MQTT2 zwar im Fhem ohne Stress läuft, jedoch per Alexa-Plugin immer als Thermostat gefunden wird und ich somit nix steuern kann.
hier mal ein List vom Gerät:
--
Internals:
   CID        shellyswitch25_68C63AFA413B
   DEF        shellyswitch25_68C63AFA413B
   DEVICETOPIC EG.Wohnzimmer
   FUUID      5ee5e017-f33f-265b-10f7-6dfc70ad3bef1c6f
   IODev      myBroker
   LASTInputDev myBroker
   MSGCNT     245
   NAME       EG.Wohnzimmer
   NR         660
   STATE      101
   TYPE       MQTT2_DEVICE
   myBroker_MSGCNT 245
   myBroker_TIME 2020-06-16 23:52:29
   Helper:
     DBLOG:
       temperature:
         logdb:
           TIME       1592344349.23488
           VALUE      62.94
       temperature_f:
         logdb:
           TIME       1592344349.24028
           VALUE      145.30
   READINGS:
     2020-06-14 21:30:23   attrTemplateVersion 20200522 or prior
     2020-06-16 06:58:08   current         stop
     2020-06-16 23:52:29   energy          182
     2020-06-16 23:40:59   fw_ver          20200601-122849/v1.7.0@d7961837
     2020-06-16 23:40:59   id              shellyswitch25-68C63AFA413B
     2020-06-16 23:52:29   input0          0
     2020-06-16 23:52:29   input1          0
     2020-06-16 23:40:59   ip              192.168.151.234
     2020-06-16 23:40:59   mac             68C63AFA413B
     2020-06-16 23:40:59   new_fw          false
     2020-06-16 23:40:59   online          true
     2020-06-16 23:52:29   overtemperature 0
     2020-06-16 23:52:29   pct             101
     2020-06-16 23:52:29   power           0.00
     2020-06-16 23:52:29   roller_0_energy 182
     2020-06-16 23:52:29   roller_0_power  0.00
     2020-06-16 23:52:29   state           101
     2020-06-16 23:52:29   temperature     62.94
     2020-06-16 23:52:29   temperature_f   145.30
     2020-06-14 21:30:23   x_mqttcom       set announce
Attributes:
   IODev      myBroker
   alexaName  Rolladen Wohnzimmer
   cmdIcon    open:fts_shutter_up close:fts_shutter_down stop:fts_shutter_manual half:fts_shutter_50
   comment    Shelly 2.5 in Roller-Mode. 0=opened / 100=closed
   devStateIcon { my $amp = ReadingsVal($name,"online","false") eq "false" ? "rot" : ReadingsVal($name,"new_fw","false") eq "true" ? "gelb" : "gruen";; my $con = ReadingsVal($name,"state","unknown");; my $pic = $con eq "opening" ? 'fts_shutter_up@red' : $con eq "closing" ? 'fts_shutter_down@red' : $con eq "100" ? 'fts_shutter_100' : $con =~ /(\d)\d/ ? 'fts_shutter_'.$1.'0' : $con =~ /\b\d\b/ ? 'fts_shutter_10' : 'fts_shutter_updown';; my $show = "$amp" eq "gelb" ? "<a href=\"/fhem?cmd.dummy=set $name x_update&XHR=1\">".FW_makeImage("10px-kreis-".$amp)."</a>" : "<a href=\"http://".ReadingsVal($name,"ip","none")." \"target=\"_blank\">".FW_makeImage("10px-kreis-".$amp)."</a>";; "<div> $show <a href=\"/fhem?cmd.dummy=set $name toggle&XHR=1\"></a>".FW_makeImage($pic)." </div>"}
   genericDeviceType blind
   model      shelly25_roller_invert_1
   readingList shellies/shellyswitch25-68C63AFA413B/roller/0/pos:.* {'pct' => 100-$EVENT}
  shellies/shellyswitch25-68C63AFA413B/status/0/rollers:.* power
  shellies/shellyswitch25-68C63AFA413B/online:.* online
  shellies/shellyswitch25-68C63AFA413B/announce:.* { json2nameValue($EVENT) }
  shellies/announce:.* { $EVENT =~ m,..id...shellyswitch25-68C63AFA413B...mac.*, ? json2nameValue($EVENT) : return }
  shellies/shellyswitch25-68C63AFA413B/roller/0:.* current
  shellies/shellyswitch25-68C63AFA413B/roller/0:open {{'state' => 'opening'}}
  shellies/shellyswitch25-68C63AFA413B/roller/0:close {{'state' => 'closing'}}
  shellies/shellyswitch25-68C63AFA413B/roller/0/pos:.* {'state' => 100-$EVENT}
  shellies/shellyswitch25-68C63AFA413B/input/1:.* input1
  shellies/shellyswitch25-68C63AFA413B/input/0:.* input0
  shellies/shellyswitch25-68C63AFA413B/relay/power:.* power
  shellies/shellyswitch25-68C63AFA413B/relay/energy:.* energy
  shellies/shellyswitch25-68C63AFA413B/temperature:.* temperature
  shellies/shellyswitch25-68C63AFA413B/overtemperature:.* overtemperature
shellyswitch25_68C63AFA413B:shellies/shellyswitch25-68C63AFA413B/roller/0/power:.* roller_0_power
shellyswitch25_68C63AFA413B:shellies/shellyswitch25-68C63AFA413B/roller/0/energy:.* roller_0_energy
shellyswitch25_68C63AFA413B:shellies/shellyswitch25-68C63AFA413B/temperature_f:.* temperature_f
   room       10_Rolladen
   setList    open:noArg shellies/shellyswitch25-68C63AFA413B/roller/0/command open
  close:noArg shellies/shellyswitch25-68C63AFA413B/roller/0/command close
  half:noArg shellies/shellyswitch25-68C63AFA413B/roller/0/command/pos 50
  stop:noArg shellies/shellyswitch25-68C63AFA413B/roller/0/command stop
  pct:slider,0,1,100 {"shellies/shellyswitch25-68C63AFA413B/roller/0/command/pos ".(100-$EVTPART1)}
  x_recalibration:noArg shellies/shellyswitch25-68C63AFA413B/roller/0/command rc
  x_update:noArg shellies/shellyswitch25-68C63AFA413B/command update_fw
  x_mqttcom shellies/shellyswitch25-68C63AFA413B/command $EVTPART1
   setStateList open close half stop pct
   webCmd     :open:close:half:stop:pct


ich finde einfach keine Lösung hierfür, bin ich echt zu do.....
FHEM 6.0 auf AMD Ryzen 5 MICRO PC (NUC) mit VDSL 100/40Mbit/s

amenomade

Wahrscheinlich, weil dein "pct" Reading irgendwie nicht stimmt. 101? Mit einem Wert, der so kalkuliert wird: 100-$EVENT?

Das standard homeBridgeMapping für ein blind ist irgendwie so:
CurrentPosition=pct TargetPosition=pct::pct

Was sagt die alexa Log beim reload?
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

SimonHipp

Beim Reload wird das hier ausgegeben, leider keine Verbesserung:
[17.6.2020, 08:15:23] [FHEM] MQTT2_shellyswitch25_68C63AFA413B is blind
[17.6.2020, 08:15:23] [FHEM] MQTT2_shellyswitch25_68C63AFA413B has
[17.6.2020, 08:15:23] [FHEM]   Custom Power [power]
[17.6.2020, 08:15:23] [FHEM]   Custom Energy [energy]
[17.6.2020, 08:15:23] [FHEM]   CurrentPosition [pct]
[17.6.2020, 08:15:23] [FHEM]   TargetPosition [pct]
[17.6.2020, 08:15:23] [FHEM]   CurrentTemperature [temperature]
  2020-06-17 08:15:23 caching: MQTT2_shellyswitch25_68C63AFA413B-power: 0.00
[17.6.2020, 08:15:23] [FHEM]     caching: Custom Power: 0 (as number; from '0.00')
  2020-06-17 08:15:23 caching: MQTT2_shellyswitch25_68C63AFA413B-energy: 184
[17.6.2020, 08:15:23] [FHEM]     caching: Custom Energy: 184 (as number; from '184')
  2020-06-17 08:15:23 caching: MQTT2_shellyswitch25_68C63AFA413B-pct: 101
  2020-06-17 08:15:23 caching: MQTT2_shellyswitch25_68C63AFA413B-temperature: 62.54
FHEM 6.0 auf AMD Ryzen 5 MICRO PC (NUC) mit VDSL 100/40Mbit/s

SimonHipp

Zitat von: amenomade am 17 Juni 2020, 00:16:30
Wahrscheinlich, weil dein "pct" Reading irgendwie nicht stimmt. 101? Mit einem Wert, der so kalkuliert wird: 100-$EVENT?

Das standard homeBridgeMapping für ein blind ist irgendwie so:
CurrentPosition=pct TargetPosition=pct::pct

Was sagt die alexa Log beim reload?

das  "pct" Reading kommt so aus dem attrTemplade -> shelly25_roller_invert_1
FHEM 6.0 auf AMD Ryzen 5 MICRO PC (NUC) mit VDSL 100/40Mbit/s

Beta-User

Aus der API:
Zitat
shellies/shellyswitch25-<deviceid>/roller/0/pos reports the current position in percent, -1 if invalid

Nehme mal an, das Ding ist nicht kalibriert o.ä.?
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: ZigBee2mqtt, MiLight@ESP-GW, BT@OpenMQTTGw | ZWave | SIGNALduino | MapleCUN | RHASSPY
svn: u.a Weekday-&RandomTimer, Twilight,  div. attrTemplate-files, MySensors

SimonHipp

Zitat von: Beta-User am 17 Juni 2020, 08:27:34
Aus der API:
Nehme mal an, das Ding ist nicht kalibriert o.ä.?
Da hast du Recht, ausgepackt eingebaut und die zeit von 20 auf 27 Sekunden geändert.
Wie wird das Teil kalibriert, kannst du mir hier kurz Hilfestellung geben?

DANKEEEEE
FHEM 6.0 auf AMD Ryzen 5 MICRO PC (NUC) mit VDSL 100/40Mbit/s

SimonHipp

So sieht das im Browser aus beim Aufruf von <IP>/roller/0

state "stop"
power 0
is_valid true
safety_switch false
overtemperature false
stop_reason "normal"
last_direction "close"
current_pos 101
calibrating false
positioning true
FHEM 6.0 auf AMD Ryzen 5 MICRO PC (NUC) mit VDSL 100/40Mbit/s

SimonHipp

Zitat von: SimonHipp am 17 Juni 2020, 08:29:33
Da hast du Recht, ausgepackt eingebaut und die zeit von 20 auf 27 Sekunden geändert.
Wie wird das Teil kalibriert, kannst du mir hier kurz Hilfestellung geben?

DANKEEEEE

ok, ist nun kalibriert per Webinterface.
FHEM 6.0 auf AMD Ryzen 5 MICRO PC (NUC) mit VDSL 100/40Mbit/s

amenomade

Und geht es mit Alexa Erkennung jetzt besser?
Wenn nicht, die alexa Log (zumindest die Erkennung des Devices) beim reload bitte zeigen.
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus