[Neues Modul] 70_LaMetric2.pm für LaMetric Smart Clock

Begonnen von Loredo, 01 Dezember 2018, 18:40:25

Vorheriges Thema - Nächstes Thema

Loredo

Man kann den Text jetzt auch weglassen (oder message=none explizit hinschreiben). Solange icon gesetzt bleibt und man es nicht auch explizit auf "none" setzt, geht die Nachricht dann durch.
Beides kann jedoch nicht weggelassen werden, man braucht also immer mindestens ein icon oder eine message.
Hat meine Arbeit dir geholfen? ⟹ https://paypal.me/pools/c/8gDLrIWrG9

Maintainer:
FHEM-Docker Image, https://github.com/fhem, Astro(Co-Maintainer), ENIGMA2, GEOFANCY, GUEST, HP1000, Installer, LaMetric2, MSG, msgConfig, npmjs, PET, PHTV, Pushover, RESIDENTS, ROOMMATE, search, THINKINGCLEANER

choenig


choenig

#17
message=none scheint zu funktionieren, messge ganz weglassen nicht. icon war immer dabei.

Edit: Hab' jetzt erst verstanden, dass es eine neue Version des Moduls gibt. Mit der funktioniert beides :). Danke!

Loredo

Ja, die Signalwörter "jetzt auch" sind gut versteckt ;-)
Hat meine Arbeit dir geholfen? ⟹ https://paypal.me/pools/c/8gDLrIWrG9

Maintainer:
FHEM-Docker Image, https://github.com/fhem, Astro(Co-Maintainer), ENIGMA2, GEOFANCY, GUEST, HP1000, Installer, LaMetric2, MSG, msgConfig, npmjs, PET, PHTV, Pushover, RESIDENTS, ROOMMATE, search, THINKINGCLEANER

Reinschki

#19
Hallo Loredo,

klasse Modul! Habe es bereits sehr gut für meine Ideen mit Lametric verwenden können.

Am Anfang, als ich das Modul Kennenlernen wollte, habe ich alle in der CommandRef aufgeführten "set-Befehle" mal ausprobiert.
Alle haben funktioniert! Jetzt nach den neuesten Updates schmiert mir fhem komplett, beim Befehl 
set lametric msg chart=1,2,3,4,5,7 title='Some Data'
ab!?

Hier mal ein List:
Internals:
   .API_KEY   0a?????????????????????????????????????????????????????????????
   DEF        192.168.178.43 0a?????????????????????????????????????????????????????????????
   HOST       192.168.178.43
   INTERVAL   60
   MODEL      LM 37X8
   NAME       lametric
   NR         641
   PORT       4343
   STATE      on
   TYPE       LaMetric2
   VERSION    2.2.1
   .attraggr:
   .attrminint:
   READINGS:
     2018-12-10 12:17:47   bluetooth       off
     2018-12-10 12:17:47   bluetoothAddress 88:83:5D:DF:EE:3D
     2018-12-10 12:17:47   bluetoothAvailable 1
     2018-12-10 12:17:47   bluetoothDiscoverable 1
     2018-12-10 12:17:47   bluetoothName   LM1465
     2018-12-10 12:17:47   bluetoothPairable 1
     2018-12-10 12:17:47   brightness      100
     2018-12-10 12:17:47   brightnessMode  auto
     2018-12-10 12:17:47   deviceMode      manual
     2018-12-10 12:17:47   deviceName      My LaMetric
     2018-12-10 12:17:47   deviceOsVersion 2.0.16
     2018-12-10 12:17:47   deviceSerialNumber SA???????????????????????
     2018-12-10 14:16:28   lastChart       310,200,420,200,410,20
     2018-12-12 19:36:43   lastCommand     device/notifications (POST)
     2018-12-12 19:36:43   lastCommandResult success
     2018-12-10 13:54:57   lastGoal        46 %
     2018-12-12 19:36:42   lastMessage     260 Liter
     2018-12-10 19:35:56   lastMetric      21.4
     2018-12-12 19:36:42   lastNotificationIconType info
     2018-12-12 19:36:42   lastNotificationLifetime 120
     2018-12-12 19:36:42   lastNotificationPriority info
     2018-12-12 19:36:42   lastNotificationSound off
     2018-12-12 19:36:42   lastNotificationTitle
     2018-12-12 19:36:42   lastNotificationType msg
     2018-12-10 12:17:47   mute            off
     2018-12-12 17:35:32   power           on
     2018-12-12 17:35:31   presence        present
     2018-12-12 11:35:17   screensaver     off
     2018-12-12 14:34:16   screensaverEndTime 01:00:00
     2018-12-12 14:34:16   screensaverStartTime 06:00:00
     2018-12-12 17:35:32   state           on
     2018-12-12 17:35:32   stateAV         on
     2018-12-12 08:02:37   volume          53
     2018-12-10 12:17:47   wifiActive      1
     2018-12-10 12:17:47   wifiAddress     88:83:5D:DF:C7:2D
     2018-12-10 12:17:47   wifiAvailable   1
     2018-12-10 12:17:47   wifiEncryption  WPA
     2018-12-10 12:17:47   wifiEssid       Buencasa
     2018-12-10 12:17:47   wifiIp          192.168.178.43
     2018-12-10 12:17:47   wifiMode        dhcp
     2018-12-10 12:17:47   wifiNetmask     255.255.255.0
     2018-12-12 19:36:23   wifiStrength    76
   helper:
     apps:
       com.lametric.clock:
         package    com.lametric.clock
         title      Clock
         vendor     LaMetric
         version    2.2.1
         version_code 39
         actions:
           clock.alarm:
             enabled:
               data_type  bool
               name       enabled
             time:
               data_type  string
               format     [0-9]{2}:[0-9]{2}(?::[0-9]{2})?
               name       time
             wake_with_radio:
               data_type  bool
               name       wake_with_radio
           clock.clockface:
             icon:
               data_type  string
               name       icon
         triggers:
           alarm:
             snooze:
               data_type  bool
               name       snooze
         widgets:
           08b8eac21074f8f7e5a29f2855ba8060:
             index      0
             package    com.lametric.clock
             settings:
               _title     Uhr
       com.lametric.countdown:
         package    com.lametric.countdown
         title      Таймер
         vendor     LaMetric
         version    1.0.6
         version_code 12
         actions:
           countdown.configure:
             duration:
               data_type  int
               name       duration
             start_now:
               data_type  bool
               name       start_now
           countdown.pause:
           countdown.reset:
           countdown.start:
         triggers:
           finished:
             duration:
               data_type  int
               name       duration
           paused:
             duration:
               data_type  int
               name       duration
           reset:
             duration:
               data_type  int
               name       duration
           resumed:
             duration:
               data_type  int
               name       duration
           started:
             duration:
               data_type  int
               name       duration
         widgets:
           f03ea1ae1ae5f85b390b460f55ba8061:
             index      -1
             package    com.lametric.countdown
             settings:
       com.lametric.date.ticker:
         package    com.lametric.date.ticker
         title      Date Ticker
         vendor     LaMetric
         version    1.0.9
         version_code 18
         triggers:
         widgets:
           5c139eaa55f548fd9fa1a60ec1cec6f7:
             index      -1
             package    com.lametric.date.ticker
             settings:
               _title     Date Ticker
       com.lametric.radio:
         package    com.lametric.radio
         title      Radio
         vendor     LaMetric
         version    1.0.13
         version_code 25
         actions:
           radio.next:
           radio.play:
           radio.prev:
           radio.state:
           radio.stop:
         triggers:
         widgets:
           589ed1b3fcdaa5180bf4848e55ba8061:
             index      2
             package    com.lametric.radio
             settings:
       com.lametric.stopwatch:
         package    com.lametric.stopwatch
         title      Stopwatch
         vendor     LaMetric
         version    1.0.5
         version_code 11
         actions:
           stopwatch.pause:
           stopwatch.reset:
           stopwatch.start:
         triggers:
         widgets:
           b1166a6059640bf76b9dfe0455ba8062:
             index      -1
             package    com.lametric.stopwatch
             settings:
       com.lametric.weather:
         package    com.lametric.weather
         title      Weather
         vendor     LaMetric
         version    1.0.8
         version_code 16
         actions:
           weather.forecast:
         triggers:
         widgets:
           380375c4b12c16e3adafb48355ba8061:
             index      1
             package    com.lametric.weather
             settings:
               _title     Wetter
     inputs:
       date_ticker:
         app_id     ticker
         name       Date_Ticker
         package_id com.lametric.date.ticker
         vendor_id  com.lametric.date
         widget_id  5c139eaa55f548fd9fa1a60ec1cec6f7
       radio:
         app_id     radio
         name       Radio
         package_id com.lametric.radio
         vendor_id  com.lametric
         widget_id  589ed1b3fcdaa5180bf4848e55ba8061
       stopwatch:
         app_id     stopwatch
         name       Stopwatch
         package_id com.lametric.stopwatch
         vendor_id  com.lametric
         widget_id  b1166a6059640bf76b9dfe0455ba8062
       uhr:
         app_id     clock
         name       Uhr
         package_id com.lametric.clock
         vendor_id  com.lametric
         widget_id  08b8eac21074f8f7e5a29f2855ba8060
       wetter:
         app_id     weather
         name       Wetter
         package_id com.lametric.weather
         vendor_id  com.lametric
         widget_id  380375c4b12c16e3adafb48355ba8061
       таймер:
         app_id     countdown
         name       Таймер
         package_id com.lametric.countdown
         vendor_id  com.lametric
         widget_id  f03ea1ae1ae5f85b390b460f55ba8061
Attributes:
   DbLogExclude .*
   cmdIcon    play:rc_PLAY channelDown:rc_PREVIOUS channelUp:rc_NEXT stop:rc_STOP muteT:rc_MUTE inputUp:rc_RIGHT inputDown:rc_LEFT
   defaultOnStatus always
   defaultScreensaverEndTime 06:00
   defaultScreensaverStartTime 00:00
   defaultVolume 50
   devStateIcon on:rc_GREEN@green:off off:rc_STOP:on absent:rc_RED playing:rc_PLAY@green:pause paused:rc_PAUSE@green:play muted:rc_MUTE@green:muteT fast-rewind:rc_REW@green:play fast-forward:rc_FF@green:play interrupted:rc_PAUSE@yellow:play
   https      1
   icon       time_statistic
   model      LM 37X8
   notificationGoalEnd 100
   notificationGoalIcon a11460
   notificationGoalIconType info
   notificationGoalLifetime 120
   notificationGoalPriority info
   notificationGoalStart 0
   notificationGoalUnit %
   notificationIcon i8919
   notificationIconType info
   notificationLifetime 120
   notificationMetricIcon i9559
   notificationMetricIconType info
   notificationMetricLang de
   notificationMetricLifetime 120
   notificationMetricPriority info
   notificationPriority info
   room       Messaging
   stateFormat stateAV
   webCmd     volume:muteT:channelDown:play:stop:channelUp:inputDown:input:inputUp


Was könnte das sein? Geht das Chart bei dir noch? Alles andere funktioniert einwandfrei!

Das habe ich dann im Log stehen:
Perl exited with active threads:
4 running and unjoined
0 finished and unjoined
4 running and detached


Beste Grüße
Reinschki

Loredo

Danke, ich habe gerade einen Bugfix dafür eingecheckt.
Hat meine Arbeit dir geholfen? ⟹ https://paypal.me/pools/c/8gDLrIWrG9

Maintainer:
FHEM-Docker Image, https://github.com/fhem, Astro(Co-Maintainer), ENIGMA2, GEOFANCY, GUEST, HP1000, Installer, LaMetric2, MSG, msgConfig, npmjs, PET, PHTV, Pushover, RESIDENTS, ROOMMATE, search, THINKINGCLEANER

fabschub

Hallo Loredo,

zunächst danke für die offizielle Unterstützung von Lametric in FHEM. Ich habe in Fhemweb in der Detailansicht meines Lametric-Gerätes ein Darstellungsproblem mit Umlauten. Im Hauptmenü und auch im Menü für die Raumzuweisung wird aus "Räume" "Räume". Das Verhalten habe ich bei keinem anderen Device. Kann das am Modul liegen?

Gruß
Fabian


Loredo

Ich konnte zwei UTF8 Encoding Dinge im Code verbessern, aber generell ist das mit den Umlauten immer ein schwieriges Thema.
Vielleicht ist es damit jetzt besser ab morgen.
Hat meine Arbeit dir geholfen? ⟹ https://paypal.me/pools/c/8gDLrIWrG9

Maintainer:
FHEM-Docker Image, https://github.com/fhem, Astro(Co-Maintainer), ENIGMA2, GEOFANCY, GUEST, HP1000, Installer, LaMetric2, MSG, msgConfig, npmjs, PET, PHTV, Pushover, RESIDENTS, ROOMMATE, search, THINKINGCLEANER

fabschub

Problem tritt nach Update nicht mehr auf. Besten Dank.

Ave09

Hey,
die "cycles"-Option scheint nicht zu funktionieren.
Ein simples
   set lametric msg Hello cycles=0
führt leider nicht dazu, dass die Msg an der Uhr bestätigt werden muss. Auch Werte >1 zeigen keine Wirkung.

Mache ich was falsch ?

Ansonsten funktioniert alles Bestens. Abfallanzeige, Anrufe vom FB_CallMonitor, Temparaturanzeige über meine myFHEM-App, ... ich bin begeistert!!!  :)

Beste Grüße,
Thomas

OppiM

Hi,

bei mir schmiert FHEM komplett ab, sobald ich mein LaMetric-Device definiere (define LaMetric LaMetric2 192.168.178.120 xxxxxxxxxxxxxxxxxxxxxxx). Der letzte Eintrag im Log ist:
Undefined subroutine &main::timegm called at ./FHEM/70_LaMetric2.pm line 2108

Zum Testen hab ich eine komplett nackte FHEM-Installation benutzt, die auf dem Stand von heute ist.

Gruß,
Michael


Loredo

Ich habe sowohl die Sticky Message (cycles=0) als auch den Absturz durch das fehlende Perl Modul behoben. Kommt ab morgen über die Update Funktion.
Hat meine Arbeit dir geholfen? ⟹ https://paypal.me/pools/c/8gDLrIWrG9

Maintainer:
FHEM-Docker Image, https://github.com/fhem, Astro(Co-Maintainer), ENIGMA2, GEOFANCY, GUEST, HP1000, Installer, LaMetric2, MSG, msgConfig, npmjs, PET, PHTV, Pushover, RESIDENTS, ROOMMATE, search, THINKINGCLEANER

Loredo

... außerdem wurden die Bugs, die ich an LaMetric gemeldet hatte, in der aktuellen Firmware 2.0.17 gefixt.


Die Workarounds habe ich deshalb aus dem Code entfernt. Lautstärke und Mute lassen sich jetzt damit verlässlich setzen, außerdem bleiben die Screensaver Zeiten erhalten, wenn man zwischen "off" und "on" wechselt. Außerdem ist defaultOnStatus jetzt für neue Geräte per Default auf "illumination" gesetzt (kann wie bisher über das gleichnamige Attribut gesteuert werden).
Hat meine Arbeit dir geholfen? ⟹ https://paypal.me/pools/c/8gDLrIWrG9

Maintainer:
FHEM-Docker Image, https://github.com/fhem, Astro(Co-Maintainer), ENIGMA2, GEOFANCY, GUEST, HP1000, Installer, LaMetric2, MSG, msgConfig, npmjs, PET, PHTV, Pushover, RESIDENTS, ROOMMATE, search, THINKINGCLEANER

Thyraz

Hab meine Lametric gerade auch auf dein Modul umgestellt. :)
Läuft einwandfrei. Danke dir.
Fhem und MariaDB auf NUC6i5SYH in Proxmox Container (Ubuntu)
Zwave, Conbee II, Hue, Harmony, Solo4k, LaMetric, Echo, Sonos, Roborock S5, Nuki, Prusa Mini, Doorbird, ...

OppiM

Zitat von: Loredo am 23 Januar 2019, 16:50:08
Ich habe sowohl die Sticky Message (cycles=0) als auch den Absturz durch das fehlende Perl Modul behoben. Kommt ab morgen über die Update Funktion.

Hi,

funktioniert!

Danke,
Michael