FHEM Forum

FHEM - Hausautomations-Systeme => Sonstige Systeme => Thema gestartet von: rippi46 am 05 Juni 2017, 18:58:47

Titel: [Gelöst]YAM-804(Multifunction digital remote switch) in fhem einbinden
Beitrag von: rippi46 am 05 Juni 2017, 18:58:47
Hallo

wollte folgenden Switch in fhem einbinden:
https://de.aliexpress.com/store/product/Retail-4-Channels-5-Sections-Smart-Digital-Wireless-Remote-Control-Switch-AC220V-for-Ceiling-Light-1/1190547_2024513233.html (https://de.aliexpress.com/store/product/Retail-4-Channels-5-Sections-Smart-Digital-Wireless-Remote-Control-Switch-AC220V-for-Ceiling-Light-1/1190547_2024513233.html)

Leider funktioniert er nur mit 415MHz
Habe mir einen  Sduino mit CC1101 aufgebaut um die Frequenz umzuschalten. Leider funktioniert es nicht den Switch zu steuern. Habe das Signal mit SDR aufgezeichnet und mit dem Sduino nachgebaut. Habe schon alle möglichen Frequenzen ausprobiert. Trotz dass ich auf der gleichen Frequenz wie die Fernbedienung sende, reagiert der Switch nicht.

Wenn ich ein 433MHz-Modul einbaue funktioniert der Switch sofort, aber die Fernbedienung dafür nicht mehr.

Habe beide Signale aufgezeichnet.
Was könnte ich noch testen?



Titel: Antw:YAM-804(Multifunction digital remote switch) in fhem einbinden
Beitrag von: rippi46 am 06 Juni 2017, 20:19:48
Hallo

habe herausgefunden, dass die Fernbedienung nicht auf 415MHz sondern auf 315MHz sendet.
Wenn ich jetzt den Sduino auf 315MHz umstelle kann ich den Switch bedienen. :)

Gruß rippi
Titel: Antw:[Gelöst]YAM-804(Multifunction digital remote switch) in fhem einbinden
Beitrag von: rippi46 am 08 Juni 2017, 12:35:50
Hallo

falls jemand auch solch einen Switch in fhem einbinden will, kann er sich an folgendem Code orientieren.
für die Einzellampen ist der On/Off-code der gleiche Code (toggle).

define Yam dummy
attr Yam devStateIcon on:li_wht_on off:li_wht_off
attr Yam eventMap BI:on B0:off
attr Yam room Fluroben
attr Yam setList state:on,off

define Yam_ntfy notify Yam:.* {\
    my $v=Value("Yam");;\
    if ($v eq "on") {fhem "set sduino raw SR;;;;R=5;;;;P0=8252;;;;P1=-368;;;;P2=688;;;;P3=-860;;;;P4=228;;;;D=01212343412123434343412341234121212121212343434341;;;;"};;\
    if ($v eq "off") {fhem "set sduino raw SR;;;;R=5;;;;P0=8252;;;;P1=-368;;;;P2=688;;;;P3=-860;;;;P4=228;;;;D=01212343412123434343412341234121234341212121234341;;;;"};;\
    }
attr Yam_ntfy room Fluroben


define Yam_A dummy
attr Yam_A devStateIcon on:li_wht_on off:li_wht_off
attr Yam_A eventMap BI:on B0:off
attr Yam_A room Fluroben,alexa
attr Yam_A setList state:on,off

define Yam_A_ntfy notify Yam_A:.* {\
    my $v=Value("Yam_A");;\
    if ($v eq "on") {fhem "set sduino raw SR;;;;R=5;;;;P0=-8677;;;;P1=281;;;;P2=-840;;;;P3=840;;;;P4=-281;;;;D=01212343412123434343412341234121234341212121212121;;;;"};;\
    if ($v eq "off") {fhem "set sduino raw SR;;;;R=5;;;;P0=-8677;;;;P1=281;;;;P2=-840;;;;P3=840;;;;P4=-281;;;;D=01212343412123434343412341234121234341212121212121;;;;"};;\
    }
attr Yam_A_ntfy room Fluroben

define Yam_B dummy
attr Yam_B devStateIcon on:li_wht_on off:li_wht_off
attr Yam_B eventMap BI:on B0:off
attr Yam_B room Fluroben,alexa
attr Yam_B setList state:on,off

define Yam_B_ntfy notify Yam_B:.* {\
    my $v=Value("Yam_B");;\
    if ($v eq "on") {fhem "set sduino raw SR;;;;R=5;;;;P0=-8677;;;;P1=281;;;;P2=-840;;;;P3=840;;;;P4=-281;;;;D=01212343412123434343412341234121212123434121212121;;;;"};;\
    if ($v eq "off") {fhem "set sduino raw SR;;;;R=5;;;;P0=-8677;;;;P1=281;;;;P2=-840;;;;P3=840;;;;P4=-281;;;;D=01212343412123434343412341234121212123434121212121;;;;"};;\
    }
attr Yam_B_ntfy room Fluroben

define Yam_C dummy
attr Yam_C devStateIcon on:li_wht_on off:li_wht_off
attr Yam_C eventMap BI:on B0:off
attr Yam_C room Fluroben,alexa
attr Yam_C setList state:on,off

define Yam_C_ntfy notify Yam_C:.* {\
    my $v=Value("Yam_C");;\
    if ($v eq "on") {fhem "set sduino raw SR;;;;R=5;;;;P0=-8677;;;;P1=281;;;;P2=-840;;;;P3=840;;;;P4=-281;;;;D=01212343412123434343412341234121212121212343412121;;;;"};;\
    if ($v eq "off") {fhem "set sduino raw SR;;;;R=5;;;;P0=-8677;;;;P1=281;;;;P2=-840;;;;P3=840;;;;P4=-281;;;;D=01212343412123434343412341234121212121212343412121;;;;"};;\
    }
attr Yam_C_ntfy room Fluroben

define Yam_D dummy
attr Yam_D devStateIcon on:li_wht_on off:li_wht_off
attr Yam_D eventMap BI:on B0:off
attr Yam_D room Fluroben,alexa
attr Yam_D setList state:on,off

define Yam_D_ntfy notify Yam_D:.* {\
    my $v=Value("Yam_D");;\
    if ($v eq "on") {fhem "set sduino raw SR;;;;R=5;;;;P0=-8677;;;;P1=281;;;;P2=-840;;;;P3=840;;;;P4=-281;;;;D=01212343412123434343412341234121212121212121234341;;;;"};;\
    if ($v eq "off") {fhem "set sduino raw SR;;;;R=5;;;;P0=-8677;;;;P1=281;;;;P2=-840;;;;P3=840;;;;P4=-281;;;;D=01212343412123434343412341234121212121212121234341;;;;"};;\
    }
attr Yam_D_ntfy room Fluroben

define Yam_ALL dummy
attr Yam_ALL devStateIcon on:li_wht_on off:li_wht_off
attr Yam_ALL eventMap BI:on B0:off
attr Yam_ALL room Fluroben,alexa
attr Yam_ALL setList state:on,off

define Yam_ALL_ntfy notify Yam_ALL:.* {\
    my $v=Value("Yam_ALL");;\
    if ($v eq "on") {fhem "set sduino raw SR;;;;R=20;;;;P0=-8677;;;;P1=281;;;;P2=-840;;;;P3=840;;;;P4=-281;;;;D=01212343412123434343412341234121212121212343434341;;;;"};;\
    if ($v eq "off") {fhem "set sduino raw SR;;;;R=20;;;;P0=-8677;;;;P1=281;;;;P2=-840;;;;P3=840;;;;P4=-281;;;;D=01212343412123434343412341234121234341212121234341;;;;"};;\
    }
attr Yam_ALL_ntfy room Fluroben



Damit das Ganze funktioniert muß der Sduino zum Schalten auf 315MHz umgeschaltet werden.

Gruß Pippi
Titel: Antw:[Gelöst]YAM-804(Multifunction digital remote switch) in fhem einbinden
Beitrag von: mala am 05 September 2017, 12:25:06
So, hoffe es funktioniert....

Ich benötige die DEF der 4 Kanäle?

Gruß und besten Dank,
mala