Autor Thema: 5. Usertreffen im Kreis Gütersloh  (Gelesen 2157 mal)

Offline igami

  • Developer
  • Hero Member
  • ****
  • Beiträge: 2531
  • RTFM
    • commandref
Antw:5. Usertreffen im Kreis Gütersloh
« Antwort #30 am: 28 September 2018, 09:06:00 »
Gibt es noch Nachzügler? Ich habe zwei Absagen für Samstag erhalten.
Pi3 mit fhem.cfg + DbLog/logProxy
Komm vorbei zum FHEM Treffen im Kreis Gütersloh! Das nächste Mal im Januar 2019.

MAINTAINER: archetype, Heating_Control, LuftdatenInfo, monitoring, msgDialog, Nmap, powerMap, RandomTimer, Twilight, WeekdayTimer
ToDo: adb, FluxLED

Online Christoph Morrison

  • Developer
  • Full Member
  • ****
  • Beiträge: 393
    • Private Website
Antw:5. Usertreffen im Kreis Gütersloh
« Antwort #31 am: 29 September 2018, 16:47:56 »
JFTR:
192.168.0.224
matze

192.168.0.226
hollo

192.168.0.228
pusemukel

192.168.0.229
afloria

192.168.0.230
riquelme

192.168.0.231
stefan

192.168.0.232
igami


Offline Florian_GT

  • Developer
  • Full Member
  • ****
  • Beiträge: 239
    • Florian-Asche
Antw:5. Usertreffen im Kreis Gütersloh
« Antwort #32 am: 29 September 2018, 21:29:22 »
Hallo,

ich hatte über das Technische Gerät für Türklingel und öffner gesprochen, hier dazu der Link: https://www.mikrocontroller.net/topic/454118

Gruß Florian (afloria)
FHEM: Proxmox Server, FHEM in VM, pgSQL DB
Hardware: Ethersex (Pollin NETIO Boards), SONOFF, SONOFF POW, Raspberry Pi Zero W Kameras, (Github RaspberryPiStreamingCamera)

Development: Luftdaten - 60_airquality.pm (non-commit)

Online Christoph Morrison

  • Developer
  • Full Member
  • ****
  • Beiträge: 393
    • Private Website
Antw:5. Usertreffen im Kreis Gütersloh
« Antwort #33 am: 29 September 2018, 22:35:22 »
Beispiel msgDialog:
defmod g.test.msgdialog.0 msgDialog {\
  "dialog_start": {\
    "message": [\
      "(dialog_stop) ",\
      "dialog gestartet"\
    ],\
    "dialog_stop": {\
      "message": [\
        "(dialog_start) ",\
        "Starte neuen Dialog"\
      ]\
    }\
  },\
  "lampe": {\
    "message": [\
      "(wz|flur) (abbrechen) ",\
      "Welche Lampe?"\
    ],\
    "wz": {\
      "message": [\
        "(sofa|konsole) (abbrechen) ",\
        "Welche Lampe?"\
      ],\
      "sofa": {\
        "commands": [\
          "set gf.lr.lights.living.switch toggle",\
          "set $SELF say @$recipient lampe|wz"\
        ]\
      },\
      "konsole": {\
        "commands": [\
          "set gf.lr.lights.console.switch.dimmer toggle",\
          "set $SELF say @$recipient lampe|wz"\
        ]\
      }\
    },\
    "flur": {\
      "commands": [\
        "set gf.f.lights.main toggle",\
        "set $SELF say @$recipient lampe"\
      ]\
    }\
  },\
  "beenden": {\
    "match": "\/?beenden",\
    "commands": "deletereading TYPE=msgDialog $recipient_history",\
    "message": [\
      "TelegramBot_MTYPE=queryInline (%me%) ",\
      "Dialog beendet."\
    ]\
  }\
}
attr g.test.msgdialog.0 allowed g.people.morrison.christoph.status

setstate g.test.msgdialog.0 g.people.morrison.christoph.status: wz
setstate g.test.msgdialog.0 2018-09-29 22:32:19 g.people.morrison.christoph.status_history lampe|wz
setstate g.test.msgdialog.0 2018-09-29 22:32:19 state g.people.morrison.christoph.status: wz

Online Christoph Morrison

  • Developer
  • Full Member
  • ****
  • Beiträge: 393
    • Private Website
Antw:5. Usertreffen im Kreis Gütersloh
« Antwort #34 am: 29 September 2018, 22:56:54 »
Blitzer OWL:

efine g.car.speed_cameras.bi HTTPMOD http://www.radiobielefeld.de/service/blitzer-und-verkehr.html 180
attr g.car.speed_cameras.bi userattr getDecode reading01Name reading01XPath reading02Name reading02OExpr reading02XPath reading030Expr reading03Name reading03OExpr reading03XPath reading04Name reading04XPath readingMaxAge readingMaxAgeReplacementMode readingMaxAgeReplacementMode:text,reading,internal,expression,delete readingOExpr
attr g.car.speed_cameras.bi alias Blitzer Bielefeld
attr g.car.speed_cameras.bi enableControlSet 1
attr g.car.speed_cameras.bi eventMap reread:Aktualisieren
attr g.car.speed_cameras.bi getDecode UTF-8
attr g.car.speed_cameras.bi group Blitzer - Websites
attr g.car.speed_cameras.bi reading01Name Ort
attr g.car.speed_cameras.bi reading01XPath //*[@id="c1203"]/div/div[3]/div/div[2]
attr g.car.speed_cameras.bi reading02Name Richtung
attr g.car.speed_cameras.bi reading02XPath //*[@id="c1203"]/div/div[3]/div/div[4]
attr g.car.speed_cameras.bi reading03Name Sonstiges
attr g.car.speed_cameras.bi reading03XPath //*[@id="c1203"]/div/div[3]/div/div[6]
attr g.car.speed_cameras.bi reading04Name Letzte Meldung
attr g.car.speed_cameras.bi reading04XPath //*[@id="c1203"]/div/div[3]/div/div[8]
attr g.car.speed_cameras.bi readingMaxAge 60
attr g.car.speed_cameras.bi readingMaxAgeReplacementMode delete
attr g.car.speed_cameras.bi room Admin - HTTPMOD
attr g.car.speed_cameras.bi showBody 1
attr g.car.speed_cameras.bi showError 1
attr g.car.speed_cameras.bi stateFormat { \
        return sprintf("Letzte Abfrage %s", \
            (InternalVal("$name", "code", "error") eq "200")\
                ? "war erfolgreich"\
                : "ist fehlgeschlagen"\
        );;\
    }
attr g.car.speed_cameras.bi webCmd Aktualisieren

define g.car.speed_cameras.gt HTTPMOD https://www.radioguetersloh.de/service/blitzer-und-verkehr.html 180
attr g.car.speed_cameras.gt userattr getDecode reading01Name reading01XPath reading02Name reading02OExpr reading02XPath reading030Expr reading03Name reading03OExpr reading03XPath reading04Name reading04XPath readingMaxAge readingMaxAgeReplacementMode readingMaxAgeReplacementMode:text,reading,internal,expression,delete readingOExpr
attr g.car.speed_cameras.gt alias Blitzer Gütersloh
attr g.car.speed_cameras.gt enableControlSet 1
attr g.car.speed_cameras.gt eventMap reread:Aktualisieren
attr g.car.speed_cameras.gt getDecode UTF-8
attr g.car.speed_cameras.gt group Blitzer - Websites
attr g.car.speed_cameras.gt reading01Name Ort
attr g.car.speed_cameras.gt reading01XPath //*[@id="c1203"]/div/div[3]/div/div[2]
attr g.car.speed_cameras.gt reading02Name Richtung
attr g.car.speed_cameras.gt reading02XPath //*[@id="c1203"]/div/div[3]/div/div[4]
attr g.car.speed_cameras.gt reading03Name Sonstiges
attr g.car.speed_cameras.gt reading03XPath //*[@id="c1203"]/div/div[3]/div/div[6]
attr g.car.speed_cameras.gt reading04Name Letzte Meldung
attr g.car.speed_cameras.gt reading04XPath //*[@id="c1203"]/div/div[3]/div/div[8]
attr g.car.speed_cameras.gt readingMaxAge 60
attr g.car.speed_cameras.gt readingMaxAgeReplacementMode delete
attr g.car.speed_cameras.gt readingOExpr ($val) =~ s/\x{00A0}/ /g;; return $val
attr g.car.speed_cameras.gt room Admin - HTTPMOD
attr g.car.speed_cameras.gt showError 1
attr g.car.speed_cameras.gt stateFormat { \
        return sprintf("Letzte Abfrage %s", \
            (InternalVal("$name", "code", "error") eq "200")\
                ? "war erfolgreich"\
                : "ist fehlgeschlagen"\
        );;\
    }
attr g.car.speed_cameras.gt webCmd Aktualisieren

define g.car.speed_cameras.lip HTTPMOD https://www.radiolippe.de/service/blitzer-und-verkehr.html 180
attr g.car.speed_cameras.lip userattr getDecode reading01Name reading01XPath reading02Name reading02OExpr reading02XPath reading030Expr reading03Name reading03OExpr reading03XPath reading04Name reading04XPath readingMaxAge readingMaxAgeReplacementMode readingMaxAgeReplacementMode:text,reading,internal,expression,delete readingOExpr
attr g.car.speed_cameras.lip alias Blitzer Lippe
attr g.car.speed_cameras.lip enableControlSet 1
attr g.car.speed_cameras.lip eventMap reread:Aktualisieren
attr g.car.speed_cameras.lip getDecode UTF-8
attr g.car.speed_cameras.lip group Blitzer - Websites
attr g.car.speed_cameras.lip reading01Name Ort
attr g.car.speed_cameras.lip reading01XPath //*[@id="c1203"]/div/div[3]/div/div[2]
attr g.car.speed_cameras.lip reading02Name Richtung
attr g.car.speed_cameras.lip reading02XPath //*[@id="c1203"]/div/div[3]/div/div[4]
attr g.car.speed_cameras.lip reading03Name Sonstiges
attr g.car.speed_cameras.lip reading03XPath //*[@id="c1203"]/div/div[3]/div/div[6]
attr g.car.speed_cameras.lip reading04Name Letzte Meldung
attr g.car.speed_cameras.lip reading04XPath //*[@id="c1203"]/div/div[3]/div/div[8]
attr g.car.speed_cameras.lip readingMaxAge 60
attr g.car.speed_cameras.lip readingMaxAgeReplacementMode delete
attr g.car.speed_cameras.lip readingOExpr ($val) =~ s/\x{00A0}/ /g;; return $val
attr g.car.speed_cameras.lip room Admin - HTTPMOD
attr g.car.speed_cameras.lip showError 1
attr g.car.speed_cameras.lip stateFormat { \
        return sprintf("Letzte Abfrage %s", \
            (InternalVal("$name", "code", "error") eq "200")\
                ? "war erfolgreich"\
                : "ist fehlgeschlagen"\
        );;\
    }
attr g.car.speed_cameras.lip webCmd Aktualisieren

define g.car.speed_cameras.owl HTTPMOD https://cdn2.atudo.net/api/1.0/vl.php?type=0,1,2,3,4,5,6,20,21,23,22,26,24,25&box=51.85529064543267,7.8057861328125,52.06684451000508,9.01496887207031 600
attr g.car.speed_cameras.owl userattr getDecode readingMaxAge readingMaxAgeReplacementMode readingMaxAgeReplacementMode:text,reading,internal,expression,delete
attr g.car.speed_cameras.owl alias Verkehrslage.de: OWL
attr g.car.speed_cameras.owl enableControlSet 1
attr g.car.speed_cameras.owl eventMap reread:Aktualisieren
attr g.car.speed_cameras.owl extractAllJSON 1
attr g.car.speed_cameras.owl getDecode UTF-8
attr g.car.speed_cameras.owl group Blitzer - Websites
attr g.car.speed_cameras.owl readingMaxAge 60
attr g.car.speed_cameras.owl readingMaxAgeReplacementMode delete
attr g.car.speed_cameras.owl room Admin - HTTPMOD
attr g.car.speed_cameras.owl showBody 1
attr g.car.speed_cameras.owl showError 1
attr g.car.speed_cameras.owl stateFormat { \
        return sprintf("Letzte Abfrage %s", \
            (InternalVal("$name", "code", "error") eq "200")\
                ? "war erfolgreich"\
                : "ist fehlgeschlagen"\
        );;\
    }
attr g.car.speed_cameras.owl webCmd Aktualisieren

define g.car.speed_cameras.pb HTTPMOD https://www.radiohochstift.de/service/verkehr.html 180
attr g.car.speed_cameras.pb userattr getDecode reading01Name reading01XPath reading02Name reading02OExpr reading02XPath reading030Expr reading03Name reading03OExpr reading03XPath reading04Name reading04XPath readingMaxAge readingMaxAgeReplacementMode readingMaxAgeReplacementMode:text,reading,internal,expression,delete readingOExpr
attr g.car.speed_cameras.pb alias Blitzer Hochstift Paderborn
attr g.car.speed_cameras.pb enableControlSet 1
attr g.car.speed_cameras.pb eventMap reread:Aktualisieren
attr g.car.speed_cameras.pb getDecode UTF-8
attr g.car.speed_cameras.pb group Blitzer - Websites
attr g.car.speed_cameras.pb reading01Name Ort
attr g.car.speed_cameras.pb reading01XPath //*[@id="c1203"]/div/div[3]/div/div[2]
attr g.car.speed_cameras.pb reading02Name Richtung
attr g.car.speed_cameras.pb reading02XPath //*[@id="c1203"]/div/div[3]/div/div[4]
attr g.car.speed_cameras.pb reading03Name Sonstiges
attr g.car.speed_cameras.pb reading03XPath //*[@id="c1203"]/div/div[3]/div/div[6]
attr g.car.speed_cameras.pb reading04Name Letzte Meldung
attr g.car.speed_cameras.pb reading04XPath //*[@id="c1203"]/div/div[3]/div/div[8]
attr g.car.speed_cameras.pb readingMaxAge 60
attr g.car.speed_cameras.pb readingMaxAgeReplacementMode delete
attr g.car.speed_cameras.pb readingOExpr ($val) =~ s/\x{00A0}/ /g;; ($val) =~ s/<br\s*\/>/,/g;; return $val
attr g.car.speed_cameras.pb room Admin - HTTPMOD
attr g.car.speed_cameras.pb showError 1
attr g.car.speed_cameras.pb stateFormat { \
        return sprintf("Letzte Abfrage %s", \
            (InternalVal("$name", "code", "error") eq "200")\
                ? "war erfolgreich"\
                : "ist fehlgeschlagen"\
        );;\
    }
attr g.car.speed_cameras.pb webCmd Aktualisieren

Apothekennotdienst:

defmod g.utilities.ems.pharmacy HTTPMOD https://apothekenfinder.mobi/interface/json.php?device=web&source=not&search=33330 3600
attr g.utilities.ems.pharmacy userattr reading01Encode reading01JSON reading01Name reading02JSON reading02Name reading03JSON reading03Name reading04JSON reading04Name reading05JSON reading05Name reading06JSON reading06Name reading07JSON reading07Name reading07OExpr reading08JSON reading08Name reading08OExpr reading09JSON reading09Name reading10JSON reading10Name reading11JSON reading11Name readingEncode requestHeader2 requestHeader3 requestHeader4 requestHeader5 requestHeader6 requestHeader7
attr g.utilities.ems.pharmacy alias Apothekennotdienst
attr g.utilities.ems.pharmacy enableControlSet 1
attr g.utilities.ems.pharmacy group Notdienste
attr g.utilities.ems.pharmacy icon pharmacy@black
attr g.utilities.ems.pharmacy reading01Encode UTF-8
attr g.utilities.ems.pharmacy reading01JSON result_01_name
attr g.utilities.ems.pharmacy reading01Name Name
attr g.utilities.ems.pharmacy reading02JSON result_01_street
attr g.utilities.ems.pharmacy reading02Name Strasse
attr g.utilities.ems.pharmacy reading03JSON result_01_plz
attr g.utilities.ems.pharmacy reading03Name Plz
attr g.utilities.ems.pharmacy reading04JSON result_01_place
attr g.utilities.ems.pharmacy reading04Name Ort
attr g.utilities.ems.pharmacy reading05JSON result_01_number
attr g.utilities.ems.pharmacy reading05Name Telefon
attr g.utilities.ems.pharmacy reading06JSON result_01_fax
attr g.utilities.ems.pharmacy reading06Name Telefax
attr g.utilities.ems.pharmacy reading07JSON result_01_start
attr g.utilities.ems.pharmacy reading07Name Beginn
attr g.utilities.ems.pharmacy reading07OExpr strftime "%a %e.%m.%Y %H:%M", localtime($val)
attr g.utilities.ems.pharmacy reading08JSON result_01_end
attr g.utilities.ems.pharmacy reading08Name Ende
attr g.utilities.ems.pharmacy reading08OExpr strftime "%a %e.%m.%Y %H:%M", localtime($val)
attr g.utilities.ems.pharmacy reading09JSON result_01_lng
attr g.utilities.ems.pharmacy reading09Name Laengengrad
attr g.utilities.ems.pharmacy reading10JSON result_01_lat
attr g.utilities.ems.pharmacy reading10Name Breitengrad
attr g.utilities.ems.pharmacy reading11JSON result_01_distance
attr g.utilities.ems.pharmacy reading11Name Entfernung
attr g.utilities.ems.pharmacy readingEncode UTF-8
attr g.utilities.ems.pharmacy requestHeader2 Accept-Encoding: gzip, deflate, br
attr g.utilities.ems.pharmacy requestHeader3 Accept-Language: de-DE,de;;q=0.9,en-US;;q=0.8,en;;q=0.7,fr;;q=0.6
attr g.utilities.ems.pharmacy requestHeader4 User-Agent: Mozilla/5.0 (Macintosh;; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
attr g.utilities.ems.pharmacy requestHeader5 Referer: http://apothekenfinder.mobi/
attr g.utilities.ems.pharmacy requestHeader6 X-Requested-With: XMLHttpRequest
attr g.utilities.ems.pharmacy requestHeader7 DNT: 1
attr g.utilities.ems.pharmacy room Allgemein
attr g.utilities.ems.pharmacy showBody 1
attr g.utilities.ems.pharmacy showError 1
attr g.utilities.ems.pharmacy stateFormat Name, Telefon, Strasse in Plz Ort
attr g.utilities.ems.pharmacy timeout 60

Online Christoph Morrison

  • Developer
  • Full Member
  • ****
  • Beiträge: 393
    • Private Website
Antw:5. Usertreffen im Kreis Gütersloh
« Antwort #35 am: 30 September 2018, 00:29:53 »
Formatierung ABFALL

my @german_days = qw( Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag );
my @german_months = qw( Januar Februar März April Mai Juni Juli August September Oktober November Dezember );

sub formatRubbishCollectionState($)
{
    my ($name) = shift;

    my $next_days = ReadingsVal($name, "next_days", 0);
    my $next_days_formatted = "$next_days Tagen";

    if ($next_days eq "1") {
        $next_days_formatted = "einem Tag";
    }

    my $next_weekday = Time::Piece->strptime(
        ReadingsVal($name,"next_date", ""),
        '%d.%m.%Y %H:%M:%S'
    );

    my $state = sprintf(
        "Abholung des %s in %s (%s, %s)",
        ReadingsVal($name,"next_text", ""),
        $next_days_formatted,
        $german_days[$next_weekday->day_of_week],
        (split(' ', ReadingsVal($name,"next_date", "")))[0]
    );

    $state =~ s/(Restmüll|Kompost|Altpapier)/$1s/g;
    $state =~ s/Gelber Sack/Gelben Sacks/g;
    $state =~ s/ und (?=.* und .*)/, /g;

    return $state;
}

Edit: @german_days vergessen
« Letzte Änderung: 30 September 2018, 16:03:32 von Christoph Morrison »

Online Christoph Morrison

  • Developer
  • Full Member
  • ****
  • Beiträge: 393
    • Private Website

Offline igami

  • Developer
  • Hero Member
  • ****
  • Beiträge: 2531
  • RTFM
    • commandref
Antw:5. Usertreffen im Kreis Gütersloh
« Antwort #37 am: 30 September 2018, 11:07:15 »
Das nächste Treffen kann schon geplant werden: https://forum.fhem.de/index.php/topic,91594.0.html
Pi3 mit fhem.cfg + DbLog/logProxy
Komm vorbei zum FHEM Treffen im Kreis Gütersloh! Das nächste Mal im Januar 2019.

MAINTAINER: archetype, Heating_Control, LuftdatenInfo, monitoring, msgDialog, Nmap, powerMap, RandomTimer, Twilight, WeekdayTimer
ToDo: adb, FluxLED

Offline igami

  • Developer
  • Hero Member
  • ****
  • Beiträge: 2531
  • RTFM
    • commandref
Antw:5. Usertreffen im Kreis Gütersloh
« Antwort #38 am: 30 September 2018, 13:20:44 »
Können wir noch die beiden Zwischenstecker hier verlinken die Florian mitgebracht hat? Da würde ich mir auch gerne welche von bestellen.
Pi3 mit fhem.cfg + DbLog/logProxy
Komm vorbei zum FHEM Treffen im Kreis Gütersloh! Das nächste Mal im Januar 2019.

MAINTAINER: archetype, Heating_Control, LuftdatenInfo, monitoring, msgDialog, Nmap, powerMap, RandomTimer, Twilight, WeekdayTimer
ToDo: adb, FluxLED

Offline Florian_GT

  • Developer
  • Full Member
  • ****
  • Beiträge: 239
    • Florian-Asche
Antw:5. Usertreffen im Kreis Gütersloh
« Antwort #39 am: 30 September 2018, 15:04:53 »
Können wir noch die beiden Zwischenstecker hier verlinken die Florian mitgebracht hat? Da würde ich mir auch gerne welche von bestellen.

https://www.amazon.de/gp/product/B07FVR7PG7/ref=oh_aui_detailpage_o05_s01?ie=UTF8&psc=1
und
https://www.amazon.de/gp/product/B0777BWS1P/ref=oh_aui_detailpage_o06_s00?ie=UTF8&psc=1

Cupon nicht vergessen!
FHEM: Proxmox Server, FHEM in VM, pgSQL DB
Hardware: Ethersex (Pollin NETIO Boards), SONOFF, SONOFF POW, Raspberry Pi Zero W Kameras, (Github RaspberryPiStreamingCamera)

Development: Luftdaten - 60_airquality.pm (non-commit)

Offline Hollo

  • Hero Member
  • *****
  • Beiträge: 1271
Antw:5. Usertreffen im Kreis Gütersloh
« Antwort #40 am: 13 Oktober 2018, 14:56:44 »
Blitzer OWL:
...
Hierzu wurden bei mir zusätzlich noch folgende Pakete benötigt...
apt-get install libxml-TreeBuilder-perl libhtml-treebuilder-xpath-perl
FHEM 5.8 auf BananaPro Jessie
Protokolle: Homematic, Z-Wave, 433Mhz-Sender
Temp/Feuchte: JeeLink-Clone mit LaCrosse/IT
sonstiges: Linux-Server, dBox2, Dreambox, "RSS-Tablet"

Offline Florian_GT

  • Developer
  • Full Member
  • ****
  • Beiträge: 239
    • Florian-Asche
Antw:5. Usertreffen im Kreis Gütersloh
« Antwort #41 am: 17 Oktober 2018, 22:26:20 »
Hierzu wurden bei mir zusätzlich noch folgende Pakete benötigt...
apt-get install libxml-TreeBuilder-perl libhtml-treebuilder-xpath-perl

Hi,

nur libhtml-treebuilder-xpath-perl.

Alles klein schreiben. Es gibt keine Pakete mit großen Buchstaben. Woauch immer du das siehst, mal dem Entwickler eine Info geben, dass es korrigiert werden muss.
FHEM: Proxmox Server, FHEM in VM, pgSQL DB
Hardware: Ethersex (Pollin NETIO Boards), SONOFF, SONOFF POW, Raspberry Pi Zero W Kameras, (Github RaspberryPiStreamingCamera)

Development: Luftdaten - 60_airquality.pm (non-commit)

 

decade-submarginal