Connair über FHEM steuern

Begonnen von rippi46, 06 November 2013, 20:04:17

Vorheriges Thema - Nächstes Thema

rippi46

Danke.

genau so musst du die anderen Schalter mit den entsprechenden Master und Slave  anlegen.

Gruß rippi
FHEM, LMS, VDR ,Dell 9010 Ubuntu 20.04,Raspimatic, HM/HMIP, Max, Elro, Brennenstuhl u. Intertechno mit Connair.
Picoreplayer, Raspi IR-Lanadapter, Firmata(wifi), LaCrosse,
nanocul433, nanocul868, Signalduino, Connexoon,
MySensor-GW+Sensoren, RGBWW, Zigbee2mqtt,Xiaomi,Nextion,LEDMatrix,Alexa

Chridd

Läuft noch nicht so ganz...

Ok, zwei Fragen.

1. Muss ich in der fhem.cfg irgendwie eine Trennung zwischen die Schalter packen?
2. Was ist hieran falsch? Gateway macht nichts...

define Beamer dummy
attr Beamer alias BENQ
attr Beamer eventMap BI:on B0:off
attr Beamer room Wohnzimmer
attr Beamer setList state:on,off

define Beamer_ntfyN notify Beamer:.* {\
     my $master = ,,00100";;\
     my $slave = "10000";;\
     my $v=Value("Beamer");;\
     if ($v eq "on") {connair("on",bin2dec("$master"),bin2dec("$slave"))};;\
     if ($v eq "off") {connair("off",bin2dec("$master"),bin2dec("$slave"))};;\
     }

Vielen Dank

rippi46

#77
Hallo Chridd,

wenn du Codetabs verwendest ist es übersichtlicher.

dein Code

define Beamer_ntfyN notify Beamer:.* {\
     my $master =,,00100";;\
     my $slave = "10000";;\
     my $v=Value("Beamer");;\
     if ($v eq "on") {connair("on",bin2dec("$master"),bin2dec("$slave"))};;\
     if ($v eq "off") {connair("off",bin2dec("$master"),bin2dec("$slave"))};;\
     }


mus so aussehen

define Beamer_ntfyN notify Beamer:.* {\
     my $master = "00100";;\
     my $slave = "10000";;\
     my $v=Value("Beamer");;\
     if ($v eq "on") {connair("on",bin2dec("$master"),bin2dec("$slave"))};;\
     if ($v eq "off") {connair("off",bin2dec("$master"),bin2dec("$slave"))};;\
     }


Gruß rippi
FHEM, LMS, VDR ,Dell 9010 Ubuntu 20.04,Raspimatic, HM/HMIP, Max, Elro, Brennenstuhl u. Intertechno mit Connair.
Picoreplayer, Raspi IR-Lanadapter, Firmata(wifi), LaCrosse,
nanocul433, nanocul868, Signalduino, Connexoon,
MySensor-GW+Sensoren, RGBWW, Zigbee2mqtt,Xiaomi,Nextion,LEDMatrix,Alexa

Chridd

Funktioniert! Natürlich!

Vielen Dank!

Chridd

Alle Geräte drin und ich kann sie mit FHEM schalten.

rippi, hast Du auch Erfahrung mit Homebridge?

rippi46

FHEM, LMS, VDR ,Dell 9010 Ubuntu 20.04,Raspimatic, HM/HMIP, Max, Elro, Brennenstuhl u. Intertechno mit Connair.
Picoreplayer, Raspi IR-Lanadapter, Firmata(wifi), LaCrosse,
nanocul433, nanocul868, Signalduino, Connexoon,
MySensor-GW+Sensoren, RGBWW, Zigbee2mqtt,Xiaomi,Nextion,LEDMatrix,Alexa

Chridd

Trotzdem nochmal vielen vielen Dank!

Chridd

Hilfe rippi!!!

Ich war schon so weit, dass ich mit Siri steuern konnte. Dann habe ich noch weitere Geräte in fhem.cfg geschrieben. Wollte fhem dann neu starten und seitdem geht nix mehr. Es startet nicht mehr und es kommt diese Meldung:

Can't locate RTypes.pm in @INC (you may need to install the RTypes module) (@INC contains: /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/arm-linux-gnueabihf/perl5/5.20 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at fhem.pl line 492.

Hast Du eine Idee?

rippi46

nie direkt in die fhem.cfg schreiben.
Bei einem Fehler startet fhem nicht mehr.
Am besten  alte Version  einspielen  dann sollte es wieder
funktionieren.  Ist mir auch schon passiert.
FHEM, LMS, VDR ,Dell 9010 Ubuntu 20.04,Raspimatic, HM/HMIP, Max, Elro, Brennenstuhl u. Intertechno mit Connair.
Picoreplayer, Raspi IR-Lanadapter, Firmata(wifi), LaCrosse,
nanocul433, nanocul868, Signalduino, Connexoon,
MySensor-GW+Sensoren, RGBWW, Zigbee2mqtt,Xiaomi,Nextion,LEDMatrix,Alexa

Chridd

was heißt alte Version einspielen? Wie? Und wo kriege ich sie her?
ich weiß leider gar nicht genau, was ich falsch gemacht habe. kannst du mir das bitte erläutern.
Bin gerade wirklich verzweifelt.
Vielen Dank.

rippi46

#85
Irgendwo im fhem-Verzeichnis gibt es einen Restore oder Backupordner. Dort sollte noch eine alte fhem.cfg existieren. Sichere  deine momentane fhem.cfg und kopiere  die aus dem restore oder backup-Verzeichnis ins  fhem-Verzeichnis. Dann sollte fhem wieder starten. Anschließend kannst du deine Schalter wieder eintragen.
FHEM, LMS, VDR ,Dell 9010 Ubuntu 20.04,Raspimatic, HM/HMIP, Max, Elro, Brennenstuhl u. Intertechno mit Connair.
Picoreplayer, Raspi IR-Lanadapter, Firmata(wifi), LaCrosse,
nanocul433, nanocul868, Signalduino, Connexoon,
MySensor-GW+Sensoren, RGBWW, Zigbee2mqtt,Xiaomi,Nextion,LEDMatrix,Alexa

Chridd

In dem root@raspberrypi:/opt/fhem# oder in dem root@raspberrypi:/opt/fhem/FHEM#?
Kann ich irgendwie danach suchen? Weißt Du wie dieser Restore/Backup Ordner heißt? Und wie heißt diese Datei dann? Muss ich diese dann mit nano öffnen und den Inhalt kopieren?

Kannst Du mir bitte nochmal erläutern, was ich falsch gemacht habe?
Damit ich den Fehler nicht wiederhole. Wenn ich es denn überhaupt gefixt bekomme...

Vielen, vielen Dank

Chridd

Meine jetzige fhem.cfg sieht so aus


attr global userattr cmdIcon devStateIcon devStateStyle

genericDeviceType:ignore,switch,outlet,light,blind,thermometer,thermostat,garage,window,lock

homebridgeMapping:textField-long icon sortby webCmd widgetOverride attr

global autoload_undefined_devices 1 attr global logfile

./log/fhem-%Y-%m.log attr global modpath . attr global motd

SecurityCheck:\ \ WEB,WEBphone,WEBtablet has no basicAuth attribute.\

telnetPort has no password/globalpassword attribute.\ \ Restart FHEM for

a new check if the problem is fixed,\ or set the global attribute motd

to none to supress this message.\



attr global statefile ./log/fhem.save

attr global updateInBackground 1

attr global verbose 3



define telnetPort telnet 7072 global



define WEB FHEMWEB 8083 global



define WEBphone FHEMWEB 8084 global

attr WEBphone stylesheetPrefix smallscreen



define WEBtablet FHEMWEB 8085 global

attr WEBtablet stylesheetPrefix touchpad



# Fake FileLog entry, to access the fhem log from FHEMWEB

define Logfile FileLog ./log/fhem-%Y-%m.log fakelog



define autocreate autocreate

attr autocreate filelog ./log/%NAME-%Y.log



define eventTypes eventTypes ./log/eventTypes.txt



# Disable this to avoid looking for new USB devices on startup

define initialUsbCheck notify global:INITIALIZED usb create

define Beamer dummy

attr Beamer alias BENQ

attr Beamer eventMap BI:on B0:off

attr Beamer room Homekit,Wohnzimmer

attr Beamer setList state:on,off



define Beamer_ntfyN notify Beamer:.* {\

     my $master = "00100";;\

     my $slave = "10000";;\

     my $v=Value("Beamer");;\

     if ($v eq "on") {connair("on",bin2dec("$master"),bin2dec("$slave"))};;\

     if ($v eq "off") {connair("off",bin2dec("$master"),bin2dec("$slave"))};;\

     }





define LampeRe dummy

attr LampeRe alias RechteLampe

attr LampeRe eventMap BI:on B0:off

attr LampeRe genericDeviceType switch

attr LampeRe room Homekit,Schlafzimmer

attr LampeRe setList state:on,off



define LampeRe_ntfyN notify LampeRe:.* {\

     my $master = "10000";;\

     my $slave = "10000";;\

     my $v=Value("LampeRe");;\

     if ($v eq "on") {connair("on",bin2dec("$master"),bin2dec("$slave"))};;\

     if ($v eq "off") {connair("off",bin2dec("$master"),bin2dec("$slave"))};;\

     }





define LampeLi dummy

attr LampeLi alias LinkeLampe

attr LampeLi eventMap BI:on B0:off

attr LampeLi room Homekit,Schlafzimmer

attr LampeLi setList state:on,off



define LampeLi_ntfyN notify LampeLi:.* {\

my $master = "00100";;\

     my $slave = "11000";;\

     my $v=Value("LampeLi");;\

     if ($v eq "on") {connair("on",bin2dec("$master"),bin2dec("$slave"))};;\

     if ($v eq "off") {connair("off",bin2dec("$master"),bin2dec("$slave"))};;\

     }



define Stehlampe dummy

attr Stehlampe alias WohnzimmerLampe

attr Stehlampe eventMap BI:on B0:off

attr Stehlampe genericDeviceType switch

attr Stehlampe room Homekit,Wohnzimmer

attr Stehlampe setList state:on,off



define Stehlampe_ntfyN notify Stehlampe:.* {\

     my $master = "11111";;\

     my $slave = "10000";;\

     my $v=Value("Stehlampe");;\

     if ($v eq "on") {connair("on",bin2dec("$master"),bin2dec("$slave"))};;\

     if ($v eq "off") {connair("off",bin2dec("$master"),bin2dec("$slave"))};;\

     }





define FHEM.Homebridge.Status dummy

attr FHEM.Homebridge.Status room 9.03_Tech
[code]

Chridd

In root@raspberrypi:/opt/fhem# habe ich nur diese Ordner:
configDB.pm
demolog
FHEM
fhem.cfg.demo
www
contrib
docs
fhem.cfg
fhem.pl
README_DEMO.txt

Ich verzweifle...  :'(

Chridd

FHEM läuft wieder. Allerdings sagt das Gateway nix mehr. Ich nutze 1zu1 die 99_connairUtils.pm aus Deinem letzten Post, wo es noch funktioniert hat.