39_gassistant.pm (Google Assistant, Google Home)

Begonnen von dominik, 29 Januar 2019, 21:59:53

Vorheriges Thema - Nächstes Thema

friedleif

Hallo Dominik,

Standard ist bei FHEM so ne Sache, und das Zeug läuft bei mir auch schon eine gefühlte Ewigkeit (seit 2016)...
Dann gibts bei Homematic ja noch CUL_HM und HMCCU

Und mir ist nicht ganz klar was du genau auswertest, denke mal die readings?

Aber ich versuch es mal:

Fensterkontakt: Der sollte lt. https://wiki.fhem.de/wiki/HM-Sec-SCo_T%C3%BCr-Fensterkontakt,_optisch immer closed bzw. open liefern, bei mir in 1.STATE.
Das devstateicon in meiner Konfig ist nicht Standard.

Wandthermostat: Da spricht https://wiki.fhem.de/wiki/HM-TC-IT-WM-W-EU_Funk-Wandthermostat_AP von CUL_HM, ich hab den über HMCCUDEV eingebunden.
Die Readings 1.HUMIDITY und 1.TEMPERATURE sollten in dem Fall Standard sein, Temperaturänderung über 2.SET_TEMPERATURE.
Ich hab da sonst noch eine Taupunktberechnung und ein stateFormat drin.

1 Kanal Aktor: Ja, das ist ein einfacher Schalter. https://wiki.fhem.de/wiki/HM-LC-Sw1-Ba-PCB_1-Kanal-Funk-Schaltaktor_f%C3%BCr_Batteriebetrieb beschreibt auch da CUL_HM, ist bei mir über HMCCUCHN eingebunden.
Da ist der Standard dann true/1 oder false/0
2019-05-12_00:56:35 HM_4C34B6 1.STATE: true
2019-05-12_00:56:35 HM_4C34B6 control: true
2019-05-12_00:56:35 HM_4C34B6 true
2019-05-12_00:56:35 HM_4C34B6 hmstate: true
2019-05-12_00:57:01 HM_4C34B6 1.STATE: 1
2019-05-12_00:57:01 HM_4C34B6 control: 1
2019-05-12_00:57:01 HM_4C34B6 1
2019-05-12_00:57:01 HM_4C34B6 hmstate: 1
2019-05-12_00:57:01 HM_4C34B6 1.WORKING: 0
2019-05-12_00:57:01 HM_4C34B6 hmstate: 1
2019-05-12_00:58:34 HM_4C34B6 1.STATE: true
2019-05-12_00:58:34 HM_4C34B6 control: true
2019-05-12_00:58:34 HM_4C34B6 true
2019-05-12_00:58:34 HM_4C34B6 hmstate: true


Sensor: Da spricht das Wiki https://wiki.fhem.de/wiki/HM-WDS40-TH-I_Funk-Temperatur-/Feuchtesensor_innen_(IT) auch wieder nur von CUL_HM, ist bei mir über HMCCUDEV eingebunden.
Womit die Readings in 1.HUMIDITY und 1.TEMPERATURE stehen.


Scheinbar kommt es bei Homematic drauf an wie es eingebunden wurde. HM_CUL (direkt) bzw. HMCCUDEV/HMCCUCHN (über CCU)



Zitat von: dominik am 11 Mai 2019, 22:22:52
@friedleif
Homematic Fensterkontakt: Ist das die Standardkonfiguration oder hast du da manuell noch was hinzugefuegt? Wenn es Standard ist, dann kann ich das implementieren.
Wandthermostat: Bitte auch da um Info ob das die Standardconfig ist.
1 Kanal Aktor: Verstehe ich das richtig, dass das ein normaler ein/aus Schalter ist? Wenn ja, dann sollte der on/off als Command haben, dann klappts.
Sensor: Bitte auch da um Info ob das Standardconfig ist.

Wieso ich immer wegen Standardconfig frage: Ich moechte verhindern, dass andere User bei der Verbindung der gleichen Geraete zu Google Assistant irgendwas extra konfigurieren muessen.

amenomade

Da Du über die HMCCU gehst, sind die Readings keine normale von HM (non IP). Dann brauchst Du homebridgeMapping zu setzen (und vielleicht auch genericDeviceType
Siehe Beispiele in diesem Thread: https://forum.fhem.de/index.php/topic,51339.0.html S.1, S.6, S.9, S.13 usw.
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus


dominik

Zitat von: SouzA am 11 Mai 2019, 23:59:58
Hat Garage ein anderes Icon als die der Blinds?
Hab meine Garagenansteuerung (Dummy) auf GenericDeviceType von nix auf GARAGE geändert.
In der App ist der Dummy jetzt verschwunden.
Wurde zuvor als Blind dargestellt und ich konnte somit auch das Garagentor per Sprache bedienen.

Was muss der Dummy für Attribute haben, um als Garagentor erkannt zu werden?

Bis denn
SouzA

Bitte 'reload' machen, war noch alter Code fuer 'garage' drin.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Sommerfeld

Hallo Dominik,
seit zwei Tagen habe ich die Meldung in den Readings:
gassistantFHEM.loginURL       Waiting for login url from gassistant-fhem

Das Log
[12.5.2019, 10:14:16] Google Assistant FHEM Connect 1.3.9 started
[12.5.2019, 10:14:16] Fetching FHEM connections...
[12.5.2019, 10:14:16] [FHEM] starting longpoll: http://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1557648856466
[12.5.2019, 10:14:47] [FHEM] longpoll error: Error: read ECONNRESET, retry in: 5000msec
[12.5.2019, 10:14:52] [FHEM] starting longpoll: http://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1557648892506
[12.5.2019, 10:14:54] [FHEM] longpoll error: Error: read ECONNRESET, retry in: 10000msec
[12.5.2019, 10:15:04] [FHEM] starting longpoll: http://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1557648904241
[12.5.2019, 10:15:04] [FHEM] longpoll error: Error: read ECONNRESET, retry in: 15000msec
[12.5.2019, 10:15:19] [FHEM] starting longpoll: http://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1557648919266
[12.5.2019, 10:15:19] [FHEM] longpoll error: Error: read ECONNRESET, retry in: 20000msec
[12.5.2019, 10:15:39] [FHEM] starting longpoll: http://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1557648939868
[12.5.2019, 10:15:39] [FHEM] longpoll error: Error: read ECONNRESET, retry in: 25000msec
[12.5.2019, 10:16:04] [FHEM] starting longpoll: http://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1557648964890
[12.5.2019, 10:16:04] [FHEM] longpoll error: Error: read ECONNRESET, retry in: 30000msec
[12.5.2019, 10:16:34] [FHEM] starting longpoll: http://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1557648994931
[12.5.2019, 10:16:34] [FHEM] longpoll error: Error: read ECONNRESET, retry in: 30000msec
[12.5.2019, 10:17:04] [FHEM] starting longpoll: http://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1557649024981
[12.5.2019, 10:17:04] [FHEM] longpoll error: Error: read ECONNRESET, retry in: 30000msec
[12.5.2019, 10:17:35] [FHEM] starting longpoll: http://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1557649055001
[12.5.2019, 10:17:35] [FHEM] longpoll error: Error: read ECONNRESET, retry in: 30000msec
[12.5.2019, 10:18:05] [FHEM] starting longpoll: http://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1557649085039
[12.5.2019, 10:18:05] [FHEM] longpoll error: Error: read ECONNRESET, retry in: 30000msec

Versuche mit erneuern der Verknüpfung sind auch gescheitert.
Habe ich etwas übersehen und hat sich was verändert?

dominik

Hast du vielleicht https statt http und in der config noch ssl:false stehen?
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Sommerfeld

Hallo Dominik,
Ja, ich hatte in der config noch ssl:false zu stehen.
Änderung auf true und es läuft wieder, vielen Dank
und schönen Sonntag

friedleif

Hallo,

die Thermostate HM-TC-IT-WM-W-EU funktionieren bei mir über HMCCU jetzt mit folgenden Attributen:

gassistantName Thermostat im Bad
genericDeviceType thermostat
homebridgeMapping CurrentTemperature=1.TEMPERATURE,subtype=Temperature TargetTemperature=2.SET_TEMPERATURE::2.SET_TEMPERATURE,,minValue=8,maxValue=30,minStep=0.5,cmd=control,nocache=true CurrentRelativeHumidity=1.HUMIDITY StatusLowBattery=:0.LOWBAT,values=no:BATTERY_LEVEL_NORMAL;;/.*/:BATTERY_LEVEL_LOW


Der Außensensor HM-WDS10-TH-O als abgeschaltetes Thermostat mit folgenden Attributen:

gassistantName Sensor Balkon
genericDeviceType thermostat
homebridgeMapping CurrentTemperature=1.TEMPERATURE,subtype=Temperature CurrentRelativeHumidity=1.HUMIDITY StatusLowBattery=:0.LOWBAT,values=false:BATTERY_LEVEL_NORMAL;;/.*/:BATTERY_LEVEL_LOW


Die Feuchtigkeit wird immer als 0% zurückgemeldet, lt. diesem Thread ist das aber wohl ein allgemeines Problem.



Die Tür/Fenstersensoren HM-Sec-SCo hab ich noch nicht hinbekommen. Hab versucht per userreading auf 0 bzw. 100 umzusetzen.

Im Log taucht auch kein Fehler auf.

update reading: HM_4E7903:position = 0
reportstate: HM_4E7903

update reading: HM_4E7903:position = 100
reportstate: HM_4E7903


In der App taucht der Sensor allerdings nicht auf.

Listing:

{
  "Arg":"HM_4E7903",
  "Results": [
  {
    "Name":"HM_4E7903",
    "PossibleSets":"clear config defaults:noArg",
    "PossibleAttrs":"alias comment:textField-long eventMap:textField-long group room suppressReading userReadings:textField-long verbose:0,1,2,3,4,5 IODev ccucalculate ccuflags:multiple-strict,ackState,nochn0,trace ccureadingfilter ccureadingformat:name,namelc,address,addresslc,datapoint,datapointlc ccureadingname:textField-long ccuSetOnChange ccureadings:0,1 ccuscaleval ccuverify:0,1,2 ccuget:State,Value controldatapoint disable:0,1 hmstatevals:textField-long statedatapoint statevals substitute:textField-long substexcl stripnumber peer:textField-long event-aggregator event-min-interval event-on-change-reading event-on-update-reading oldreadings stateFormat:textField-long timestamp-on-change-reading EventMap assistantName:textField cmdIcon devStateIcon devStateIcon:textField-long devStateStyle gassistantName:textField genericDeviceType:aircondition,airfreshener,airpurifier,awning,blinds,boiler,camera,coffeemaker,curtain,dishwasher,door,dryer,fan,fireplace,garage,gate,heater,hood,kettle,light,lock,microwave,outlet,oven,pregola,refrigerator,scene,securitysystem,shutter,shower,sprinkler,switch,thermostat,vacuum,valve,washer,waterheater,window homebridgeMapping:textField-long icon realRoom:textField sortby webCmd webCmdLabel:textField-long widgetOverride userattr",
    "Internals": {
      "DEF": "NEQ0944473:1 readonly",
      "FUUID": "5c536726-f33f-46d9-c7c4-504c10300b816d80",
      "NAME": "HM_4E7903",
      "NR": "295",
      "STATE": "closed",
      "TYPE": "HMCCUCHN",
      "ccuaddr": "NEQ0944473:1",
      "ccudevstate": "active",
      "ccuif": "BidCos-RF",
      "ccuname": "FensterBad:1",
      "ccutype": "HM-Sec-SCo",
      "channels": "1",
      "chntype": "SHUTTER_CONTACT",
      "firmware": "1.0",
      "statevals": "readonly"
    },
    "Readings": {
      "0.LOWBAT": { "Value":"no", "Time":"2019-05-12 14:38:17" },
      "1.ERROR": { "Value":"0", "Time":"2019-05-12 20:15:22" },
      "1.LOWBAT": { "Value":"no", "Time":"2019-05-12 20:49:38" },
      "1.STATE": { "Value":"closed", "Time":"2019-05-12 20:49:39" },
      "R-1.AES_ACTIVE": { "Value":"1", "Time":"2019-05-11 02:45:41" },
      "R-1.EVENT_DELAYTIME": { "Value":"0.000000", "Time":"2019-05-11 02:45:41" },
      "R-1.MSG_FOR_POS_A": { "Value":"1", "Time":"2019-05-11 02:45:41" },
      "R-1.MSG_FOR_POS_B": { "Value":"2", "Time":"2019-05-11 02:45:41" },
      "R-1.TRANSMIT_TRY_MAX": { "Value":"6", "Time":"2019-05-11 02:45:41" },
      "control": { "Value":"closed", "Time":"2019-05-12 20:49:39" },
      "hmstate": { "Value":"closed", "Time":"2019-05-12 20:49:39" },
      "position": { "Value":"0", "Time":"2019-05-12 20:49:39" },
      "state": { "Value":"closed", "Time":"2019-05-12 20:49:39" }
    },
    "Attributes": {
      "IODev": "d_ccu",
      "alias": "FensterBad",
      "ccureadingfilter": "(ERROR|LOWBAT|STATE)",
      "devStateIcon": "{if (ReadingsVal($name,\"0.LOWBAT\",0) eq \"yes\") {return '<span style=\"color:#FF0000\">Batterie leer!</span>'};if (ReadingsVal($name,\"1.STATE\",0) eq \"closed\") {return '<div><img src=\"/fhem/www/images/default/signal_Fenster_Offen.off.png\"></div>'} else {return '<div><img src=\"/fhem/www/images/default/signal_Fenster_Offen.on.png\"></div>'}}",
      "event-on-change-reading": ".*",
      "gassistantName": "Fenster im Bad",
      "genericDeviceType": "window",
      "group": "Fenster",
      "homebridgeMapping": "CurrentPosition=position::position,,minValue=0,maxValue=100,minStep=100 StatusLowBattery=:0.LOWBAT,values=no:BATTERY_LEVEL_NORMAL;;/.*/:BATTERY_LEVEL_LOW",
      "icon": "fts_window_1w",
      "room": "Bad,GoogleAssistant",
      "substitute": "STATE!(0|false):closed,(1|true):open;LOWBAT!(0|false):no,(1|true):yes",
      "userReadings": "position {(ReadingsVal($NAME,\"state\",\"open\") eq \"open\")?100:0}"
    }
  }  ],
  "totalResultsReturned":1
}


Da scheint noch was in homebridgeMapping falsch zu sein?

DerRecke

Da irgendwie nichts half, habe ich einfach mal meinen RaspPi komplett of the scratch neu aufgesetzt.
Dabei alles protkolliert und siehe da....

Es funktioniert immer noch nicht. :-\

Hier das [gekürzte] Protokoll. Vielleicht sieht ja jemand was ich falsch mache....
als Anlage die vollständige Version mit allen Ausgaben.


Hardware
# ========

Raspberry Pi Model B Plus Rev 1.2


# Image vorbereiten:
# ==================

oliver-notebook:/home/oliver # dd bs=4M if=/home/oliver/Downloads/2019-04-08-raspbian-stretch-lite.img of=/dev/mmcblk0 conv=fsync
430+0 Datensätze ein
430+0 Datensätze aus
1803550720 bytes (1,8 GB, 1,7 GiB) copied, 168,217 s, 10,7 MB/s

oliver-notebook:/home/oliver # touch /run/media/oliver/boot/ssh


# Start und Config des Raspberry
# ==============================

oliver-notebook:/home/oliver # ssh pi@raspberrypi
pi@raspberrypi's password:
Linux raspberrypi 4.14.98+ #1200 Tue Feb 12 20:11:02 GMT 2019 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.


# Rasbperry konfigurieren
# =======================

pi@raspberrypi:~ $ sudo raspi-config
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Generating locales (this might take a while)...
  de_DE.UTF-8... done
  en_GB.UTF-8... done
Generation complete.

Current default time zone: 'Europe/Berlin'
Local time is now:      Sun May 12 18:35:33 CEST 2019.
Universal Time is now:  Sun May 12 16:35:33 UTC 2019.


Welcome to fdisk (util-linux 2.29.2).                                                                                                                         
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): Disk /dev/mmcblk0: 14.8 GiB, 15819866112 bytes, 30898176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf61d7771

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk0p1       8192    96042    87851 42.9M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      98304 30898175 30799872 14.7G 83 Linux

Command (m for help): Partition number (1,2, default 2):
Partition 2 has been deleted.

Command (m for help): Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): Partition number (2-4, default 2): First sector (2048-30898175, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (98304-30898175, default 30898175):
Created a new partition 2 of type 'Linux' and of size 14.7 GiB.
Partition #2 contains a ext4 signature.

Command (m for help):
Disk /dev/mmcblk0: 14.8 GiB, 15819866112 bytes, 30898176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf61d7771

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk0p1       8192    96042    87851 42.9M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      98304 30898175 30799872 14.7G 83 Linux

Command (m for help): The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

Get:1 http://archive.raspberrypi.org/debian stretch InRelease [25.4 kB]
Get:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease [15.0 kB]
Get:3 http://archive.raspberrypi.org/debian stretch/main armhf Packages [221 kB]                 
Get:4 http://archive.raspberrypi.org/debian stretch/ui armhf Packages [45.0 kB]                                         
Get:5 http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages [11.7 MB]                                     
Get:6 http://raspbian.raspberrypi.org/raspbian stretch/non-free armhf Packages [95.5 kB]                                                                     
Fetched 12.1 MB in 30s (393 kB/s)                                                                                                                             
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  raspi-config
1 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
Need to get 20.4 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.raspberrypi.org/debian stretch/ui armhf raspi-config all 20190423 [20.4 kB]
Fetched 20.4 kB in 0s (199 kB/s) 
Reading changelogs... Done
(Reading database ... 34734 files and directories currently installed.)
Preparing to unpack .../raspi-config_20190423_all.deb ...
Unpacking raspi-config (20190423) over (20190219) ...
Setting up raspi-config (20190423) ...
Processing triggers for systemd (232-25+deb9u9) ...
Sleeping 5 seconds before reloading raspi-config


# Nodejs installieren
# ===================

pi@raspberrypi:~/Downloads $ wget https://nodejs.org/dist/v10.15.3/node-v10.15.3-linux-armv6l.tar.gz                                                           --2019-05-12 18:45:21--  https://nodejs.org/dist/v10.15.3/node-v10.15.3-linux-armv6l.tar.gz
Resolving nodejs.org (nodejs.org)... 2606:4700:10::6814:162e, 2606:4700:10::6814:172e, 104.20.23.46, ...
Connecting to nodejs.org (nodejs.org)|2606:4700:10::6814:162e|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 17548409 (17M) [application/gzip]
Saving to: 'node-v10.15.3-linux-armv6l.tar.gz'

node-v10.15.3-linux-armv6l.tar.gz       100%[==============================================================================>]  16.74M  3.49MB/s    in 5.4s   

2019-05-12 18:45:28 (3.09 MB/s) - 'node-v10.15.3-linux-armv6l.tar.gz' saved [17548409/17548409]

pi@raspberrypi:~/Downloads $ sudo tar -xzf node-v10.15.3-linux-armv6l.tar.gz

pi@raspberrypi:~/Downloads $ cd node-v10.15.3-linux-armv6l
pi@raspberrypi:~/Downloads/node-v10.15.3-linux-armv6l $ sudo cp -R * /usr/local/

pi@raspberrypi:~/Downloads/node-v10.15.3-linux-armv6l $ node -v
v10.15.3

pi@raspberrypi:~/Downloads/node-v10.15.3-linux-armv6l $ npm -v
6.4.1


# FHEM installieren (zusammen mit Upgrade)
# ========================================

pi@raspberrypi:~/Downloads/node-v10.15.3-linux-armv6l $ sudo su

root@raspberrypi:/home/pi/Downloads/node-v10.15.3-linux-armv6l# wget -qO - http://debian.fhem.de/archive.key | apt-key add -
OK

root@raspberrypi:/home/pi/Downloads/node-v10.15.3-linux-armv6l# echo "deb http://debian.fhem.de/nightly/ /" >> /etc/apt/sources.list

root@raspberrypi:/home/pi/Downloads/node-v10.15.3-linux-armv6l# apt update
OK:1 http://raspbian.raspberrypi.org/raspbian stretch InRelease
[...]

root@raspberrypi:/home/pi/Downloads/node-v10.15.3-linux-armv6l# apt install fhem
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
The following additional packages will be installed:
  libauthen-sasl-perl libcgi-fast-perl libcgi-pm-perl libcommon-sense-perl libdbd-sqlite3-perl libdbi-perl libdevice-serialport-perl libencode-locale-perl
  libfcgi-perl libfile-listing-perl libfont-afm-perl libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl
  libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libio-html-perl libio-socket-ssl-perl libjson-perl
  libjson-xs-perl liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl libnet-http-perl libnet-smtp-ssl-perl libnet-ssleay-perl
  libtext-diff-perl libtimedate-perl libtypes-serialiser-perl liburi-perl libwww-perl libwww-robotrules-perl perl-openssl-defaults sqlite3
Vorgeschlagene Pakete:
  libmail-imapclient-perl libgd-graph-perl libtext-csv-perl libxml-simple-perl liblist-moreutils-perl ttf-liberation libimage-librsvg-perl libgd-text-perl
  libsocket6-perl libio-socket-inet6-perl libimage-info-perl libusb-1.0-0-dev libarchive-extract-perl libarchive-zip-perl libdigest-hmac-perl libgssapi-perl
  libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl libdata-dump-perl libcrypt-ssleay-perl libauthen-ntlm-perl sqlite3-doc
Die folgenden NEUEN Pakete werden installiert:
  fhem libauthen-sasl-perl libcgi-fast-perl libcgi-pm-perl libcommon-sense-perl libdbd-sqlite3-perl libdbi-perl libdevice-serialport-perl
  libencode-locale-perl libfcgi-perl libfile-listing-perl libfont-afm-perl libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl
  libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libio-html-perl
  libio-socket-ssl-perl libjson-perl libjson-xs-perl liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl libnet-http-perl
  libnet-smtp-ssl-perl libnet-ssleay-perl libtext-diff-perl libtimedate-perl libtypes-serialiser-perl liburi-perl libwww-perl libwww-robotrules-perl
  perl-openssl-defaults sqlite3
0 aktualisiert, 40 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Es müssen 23,9 MB an Archiven heruntergeladen werden.
Nach dieser Operation werden 10,7 MB Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [J/n] j
[...]

root@raspberrypi:/home/pi/Downloads/node-v10.15.3-linux-armv6l# reboot


# FHEM Updaten (via http://raspberrypi:8083/fhem)
# ============

update all



# gassistant installieren
# =======================

pi@raspberrypi:~ $ sudo npm install -g gassistant-fhem --unsafe-perm
/usr/local/bin/gassistant-fhem -> /usr/local/lib/node_modules/gassistant-fhem/bin/gassistant-fhem

> grpc@1.20.0 install /usr/local/lib/node_modules/gassistant-fhem/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp WARN Using request for node-pre-gyp https download
[grpc] Success: "/usr/local/lib/node_modules/gassistant-fhem/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc/grpc_node.node" is installed via remote
+ gassistant-fhem@1.3.9
added 208 packages from 126 contributors in 339.527s


# gassistant in FHEM anlegen
# ==========================

define gassistant gassistant

# => Es wird keine Login URL generiert....
# => Logfile ist leer


# Analyse wie im Forum angefragt
# ==============================

pi@raspberrypi:/usr/local/lib/node_modules/gassistant-fhem/bin $ ./gassistant-fhem
Ungültiger Maschinenbefehl

pi@raspberrypi:/usr/local/lib/node_modules/gassistant-fhem/bin $ sudo ./gassistant-fhem
Ungültiger Maschinenbefehl

pi@raspberrypi:/usr/local/lib/node_modules/gassistant-fhem/bin $ node -v
v10.15.3

pi@raspberrypi:/usr/local/lib/node_modules/gassistant-fhem/bin $ npm -v
6.4.1

pi@raspberrypi:/usr/local/lib/node_modules/gassistant-fhem/bin $ ls -la /usr/local/lib/node_modules/gassistant-fhem/bin/gassistant-fhem
-rwxr-xr-x 1 pi pi 352 Okt 26  1985 /usr/local/lib/node_modules/gassistant-fhem/bin/gassistant-fhem

pi@raspberrypi:/usr/local/lib/node_modules/gassistant-fhem/bin $ /usr/bin/env node
> console.log("Test");
Test
undefined
>



# Installierte Pakete
# ===================

pi@raspberrypi:/usr/local/lib/node_modules/gassistant-fhem/bin $ apt list --installed
Auflistung... Fertig
[...]

dominik

@friedleif
Die Kontaktsensoren benoetigen ein OpenClose Mapping. Probier mal - sofern state closed bzw. open beinhaltet:
OpenClose=state,values=/^closed/:CLOSED';;/.*/:OPEN
(ungetestet!)

@DerRecke
Ich glaube es liegt an der installation von nodejs, probier mal mit diesen Script die Installation:
https://github.com/audstanley/NodeJs-Raspberry-Pi
Ich habe das Script selbst nicht getestet, aber zumindest sollte dir das die richtige Version installieren. Eventuell musst du noch die zuvor installierte Version manuell entfernen.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

dominik

Hier die Info wie ihr die Zeit zum Verlassen des Hauses beim ArmDisarm Trait konfigurieren koennt:
https://wiki.fhem.de/wiki/Google_Assistant_FHEM_Connect#Konfiguration

Einfach im homebridgeMapping
ArmDisarm=exitAllowance=10
damit wird die Zeit auf 10s gesetzt.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

friedleif

#881
Der Fenstersensor HM-Sec-SCo taucht mit folgenden Attributen in der App auf:


gassistantName Fenster im Bad
genericDeviceType window
homebridgeMapping OpenClose=state,values='/^closed/:CLOSED';;/.*/:OPEN


Allerdings ist es immer offen, auch wenn es "closed" sein sollte.

update reading: HM_4E7903:state = closed
reportstate: HM_4E7903


Antwort: Das Gerät Fenster im Bad ist offen

DerRecke

#882
Zitat von: dominik am 12 Mai 2019, 22:08:56
@DerRecke
Ich glaube es liegt an der installation von nodejs, probier mal mit diesen Script die Installation:
https://github.com/audstanley/NodeJs-Raspberry-Pi
Ich habe das Script selbst nicht getestet, aber zumindest sollte dir das die richtige Version installieren. Eventuell musst du noch die zuvor installierte Version manuell entfernen.

Das endet in einem ähnlichen Ergebnis.
Jetzt zeigt FHEM aber an, dass das gassistant modul nicht installiert sei.
Auf der Konsole wieder die Ausgabe es sei ein ungültiger Maschinenbefehl.

Hier die schonmal gefragten Diagnosedingen:


pi@raspberrypi:/opt/nodejs/lib/node_modules/gassistant-fhem/bin $ ./gassistant-fhem
Ungültiger Maschinenbefehl

pi@raspberrypi:/opt/nodejs/lib/node_modules/gassistant-fhem/bin $ sudo ./gassistant-fhem
Ungültiger Maschinenbefehl

pi@raspberrypi:/opt/nodejs/lib/node_modules/gassistant-fhem/bin $ node -v
v11.15.0

pi@raspberrypi:/opt/nodejs/lib/node_modules/gassistant-fhem/bin $ npm -v
6.7.0

pi@raspberrypi:/opt/nodejs/lib/node_modules/gassistant-fhem/bin $ ls -la gassistant-fhem
-rwxr-xr-x 1 pi pi 352 Okt 26  1985 gassistant-fhem

pi@raspberrypi:/opt/nodejs/lib/node_modules/gassistant-fhem/bin $ /usr/bin/env node
> console.log("Test");
Test
undefined
>


Habe gerade nochmal in dem Wiki Artikel reingeschaut
Dabei fällt mir auf. dass als Voraussetzung "Raspbian stretch" steht. Ich setze aber auf Raspbian stretch.lite auf. Kann es daran liegen?
Ich werde das die Tage mal probieren und das System "mit ohne lite" aufsetzen.

SouzA

Zitat von: dominik am 10 Mai 2019, 23:25:10
//EDIT
Bitte testet auch Abläufe/Routinen, ich glaub ich habe den Bug dazu gefunden. Bitte um Feedback!

Meintest du die normalen Ambiente-Steuerungen?
Funktioniert, mit der Ansage, dass die nicht erreichbar sind....

Bis denn
SouzA
Raspi 4, EnOcean TCM310 USB, HM-MOD-UART-USB, Jeelink, hue, AMAD, fully, FRITZBOX, Signalbot, VIERA, Presence BT/Mac, TPLink, Gassistant, Shelly, fhempy, ZigBee

dominik

@friedleif, teste bitte mal mit folgendem homebridgeMapping
OpenClose=state,values=/^closed/:CLOSED;;/.*/:OPEN
vorher war noch ein einfaches Hochkomma drin.

@DerRecke, stretch oder lite sollte egal sein, wobei vielleicht fehlen aus irgendeinem Grund bei lite ein paar Libraries. Kann ich mir zwar nicht vorstellen, aber einen Test waere es wert.

@SouzA, ich meinte die Ablaeufe in der Home App wie z.B. "Guten Morgen" mit Kaffeemaschine einschalten ueber FHEM Connect, erhaeltst du da auch noch die Fehlermeldung ("nicht erreichbar") obwohl es funktioniert?
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik