Blinds Drive AM 43

Begonnen von ChrisA4, 15 April 2020, 20:51:02

Vorheriges Thema - Nächstes Thema

ChrisA4

Hallo erstmal, bin neu hier und werde mein glück versuchen
Benutz Fhem jetzt schon eine ganze weile und bin sehr überzeugt
Habe sehr viele meiner fragen über dieses Forum lösen konnen ( Dank eurer Lösungen)
Aber nun stehe ich vor einer herrausforderung dazu kann ich im forum leider nichts finden
folgendes ich habe einen AM43 Blinds Driver der über bluetooth und der app blind engine gesteuert wird
über google habe ich herraus gefunden das man über openhab diesen motor mit am43.crtl steuern kann
gibt es über fhem auch eine möglichkeit, möchte eigentlich nicht umsteigen, da ich in fhem schon einige zeit investiert habe
bedanke mich schon mal und hoffe auf möglichkeiten

Darkmann

Kurz Google gefragt und das hier auf github gefunden.

https://github.com/delphir-com/am43-ctrl

Hoffe das hilft Dir weiter.

Gruß

ChrisA4

Ok Danke für die Info
Dies hatte ich auch schon gesehen , aber mir fehlt irgendwie die Verbindung zu fhem

Darkmann

FHEM und MQTT läuft zusammen.

Gruß

ChrisA4

Danke nochmals
Hatte letzter zeit etwas stress
werds mal probieren

ChrisA4

#5
ich checks nicht
beim installieren kommen immer die gleichen errors

pi@raspberrypi:~ $ sudo npm install -g https://github.com/binsentsu/am43-ctrl
/usr/local/bin/am43ctrl -> /usr/local/lib/node_modules/am43-ctrl/index.js

> usb@1.6.3 install /usr/local/lib/node_modules/am43-ctrl/node_modules/usb
> prebuild-install --verbose || node-gyp rebuild

prebuild-install info begin Prebuild-install version 5.3.3
prebuild-install WARN install EACCES: permission denied, access '/root/.npm'
gyp WARN EACCES current user ("nobody") does not have permission to access the d                                                                                                                                                             ev dir "/root/.cache/node-gyp/10.15.2"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/                                                                                                                                                             node_modules/am43-ctrl/node_modules/usb/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modu                                                                                                                                                             les/am43-ctrl/node_modules/usb/.node-gyp'
gyp ERR! System Linux 4.19.97-v7l+
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/n                                                                                                                                                             ode-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/am43-ctrl/node_modules/usb
gyp ERR! node -v v10.15.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok

> @abandonware/bluetooth-hci-socket@0.5.3-5 install /usr/local/lib/node_modules/                                                                                                                                                             am43-ctrl/node_modules/@abandonware/bluetooth-hci-socket
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for @abandonware/bluetooth-                                                                                                                                                             hci-socket@0.5.3-5 and node@10.15.2 (node-v64 ABI, glibc) (falling back to sourc                                                                                                                                                             e compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/nod                                                                                                                                                             e_modules/am43-ctrl/node_modules/@abandonware/bluetooth-hci-socket/lib/binding'
gyp WARN EACCES current user ("nobody") does not have permission to access the d                                                                                                                                                             ev dir "/root/.cache/node-gyp/10.15.2"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/                                                                                                                                                             node_modules/am43-ctrl/node_modules/@abandonware/bluetooth-hci-socket/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modu                                                                                                                                                             les/am43-ctrl/node_modules/@abandonware/bluetooth-hci-socket/.node-gyp'
gyp ERR! System Linux 4.19.97-v7l+
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/n                                                                                                                                                             ode-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/                                                                                                                                                             lib/node_modules/am43-ctrl/node_modules/@abandonware/bluetooth-hci-socket/lib/bi                                                                                                                                                             nding/binding.node" "--module_name=binding" "--module_path=/usr/local/lib/node_m                                                                                                                                                             odules/am43-ctrl/node_modules/@abandonware/bluetooth-hci-socket/lib/binding" "--                                                                                                                                                             napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_lab                                                                                                                                                             el=node-v64"
gyp ERR! cwd /usr/local/lib/node_modules/am43-ctrl/node_modules/@abandonware/blu                                                                                                                                                             etooth-hci-socket
gyp ERR! node -v v10.15.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/local/lib/n                                                                                                                                                             ode_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-bu                                                                                                                                                             ild --module=/usr/local/lib/node_modules/am43-ctrl/node_modules/@abandonware/blu                                                                                                                                                             etooth-hci-socket/lib/binding/binding.node --module_name=binding --module_path=/                                                                                                                                                             usr/local/lib/node_modules/am43-ctrl/node_modules/@abandonware/bluetooth-hci-soc                                                                                                                                                             ket/lib/binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --n                                                                                                                                                             ode_napi_label=node-v64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/local/lib/node_mod                                                                                                                                                             ules/am43-ctrl/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/chi                                                                                                                                                             ld_process.js:259:5)
node-pre-gyp ERR! System Linux 4.19.97-v7l+
node-pre-gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/am43-ctrl                                                                                                                                                             /node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/am43-ctrl/node_modules/@abando                                                                                                                                                             nware/bluetooth-hci-socket
node-pre-gyp ERR! node -v v10.15.2
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/local/lib/node_modules/npm/node_modules/no                                                                                                                                                             de-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/nod                                                                                                                                                             e_modules/am43-ctrl/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/b                                                                                                                                                             inding.node --module_name=binding --module_path=/usr/local/lib/node_modules/am43                                                                                                                                                             -ctrl/node_modules/@abandonware/bluetooth-hci-socket/lib/binding --napi_version=                                                                                                                                                             3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)

> @abandonware/noble@1.9.2-8 install /usr/local/lib/node_modules/am43-ctrl/node_                                                                                                                                                             modules/@abandonware/noble
> node-gyp rebuild

gyp WARN EACCES current user ("nobody") does not have permission to access the d                                                                                                                                                             ev dir "/root/.cache/node-gyp/10.15.2"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/                                                                                                                                                             node_modules/am43-ctrl/node_modules/@abandonware/noble/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modu                                                                                                                                                             les/am43-ctrl/node_modules/@abandonware/noble/.node-gyp'
gyp ERR! System Linux 4.19.97-v7l+
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/n                                                                                                                                                             ode-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/am43-ctrl/node_modules/@abandonware/nob                                                                                                                                                             le
gyp ERR! node -v v10.15.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN notsup Unsupported engine for am43-ctrl@0.2.0: wanted: {"node":">=10.16                                                                                                                                                             .0 <13.0"} (current: {"node":"10.15.2","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: am43-ctrl@0.2.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.6.3 (node_modules/am43-ctr                                                                                                                                                             l/node_modules/usb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.6.3 install: `prebuild-ins                                                                                                                                                             tall --verbose || node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/bluetooth-hci-socke                                                                                                                                                             t@0.5.3-5 (node_modules/am43-ctrl/node_modules/@abandonware/bluetooth-hci-socket                                                                                                                                                             ):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/bluetooth-hci-socke                                                                                                                                                             t@0.5.3-5 install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @abandonware/noble@1.9.2-8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @abandonware/noble@1.9.2-8 install script.
npm ERR! This is probably not a problem with npm. There is likely additional log                                                                                                                                                             ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-04-18T08_15_12_690Z-debug.log
pi@raspberrypi:~ $ /root/.npm/_logs/2020-04-18T08_15_12_690Z-debug.log
-bash: /root/.npm/_logs/2020-04-18T08_15_12_690Z-debug.log: Keine Berechtigung
pi@raspberrypi:~ $ sudo /root/.npm/_logs/2020-04-18T08_15_12_690Z-debug.log
sudo: /root/.npm/_logs/2020-04-18T08_15_12_690Z-debug.log: Befehl nicht gefunden
pi@raspberrypi:~ $ /root/.npm/_logs/2020-04-18T08_15_12_690Z-debug.log

was mach ich da falsch


und bluetooth bekomm ich nur mit einem usb zu laufen , die im rpi 4 interne bluetooth bekomm ich nicht zu laufen

ChrisA4

Hallo
Ich habs zum laufen gebracht
mit am43ctrl, pm2 läuft alles und ich kann meine Jalousie steuern
Dafür wir ein MQTT2Device angelegt. Solange die verbindung steht alles io

Nun zu einer neuen herrausvordenrung:
Solbald das system oder pm2 neu gestartet (also am43ctrl) wird, bekomm ich eine neue MQTT2device.
Kann zwar am alten steuern bekomme aber keine readings mehr, dies ist dann im neuen device zu lesen.
Muss aber wieder alle befehle,zeiten und Name ändern, damit es auch wieder in meiner steuerung (wie zB ob das Fenster gekippt ist oder nicht, denn bei gekippten Fenster sollter der Motor nicht laufen) passt.

Hätte da jemand eine Idee

Beta-User

Zitat von: ChrisA4 am 29 April 2020, 14:24:40
Hätte da jemand eine Idee
Ja. Vermute mal wieder "paho" als Ursache, Abhilfe steht hier:

https://wiki.fhem.de/wiki/MQTT2-Module_-_Praxisbeispiele#St.C3.A4ndig_neue_Devices.3F

[OT]
Wenn du RAW-Definitionen von einem Device lieferst, können wir gerne versuchen, ein attrTemplate daraus zu basteln (bzw. mehrere, falls das eine Art "Multi-IO" für mehrere Blinds ist).
[/OT]
(Bitte allen Code in "Tags" einpacken (#-Button oberhalb der smilies))
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: ZigBee2mqtt, MiLight@ESP-GW, BT@OpenMQTTGw | ZWave | SIGNALduino | MapleCUN | RHASSPY
svn: u.a Weekday-&RandomTimer, Twilight,  div. attrTemplate-files, MySensors

ChrisA4

(Bitte allen Code in "Tags" einpacken (#-Button oberhalb der smilies))

?Was ist damit gemeint??

Hier die RAW

defmod Jalousie_Buero MQTT2_DEVICE mqttjs_d08d2c27
attr Jalousie_Buero IODev MQTT2_FHEM_Server
attr Jalousie_Buero readingList mqttjs_d08d2c27:homeassistant/cover/02575b8c5eae/config:.* { json2nameValue($EVENT) }\
mqttjs_d08d2c27:homeassistant/sensor/02575b8c5eae_battery/config:.* { json2nameValue($EVENT) }\
mqttjs_d08d2c27:homeassistant/sensor/02575b8c5eae_light/config:.* { json2nameValue($EVENT) }\
mqttjs_d08d2c27:homeassistant/cover/02575b8c5eae/connection:.* connection\
mqttjs_d08d2c27:homeassistant/cover/02575b8c5eae/state:.* { json2nameValue($EVENT) }
attr Jalousie_Buero room MQTT2_DEVICE
attr Jalousie_Buero setList Auf:noArg homeassistant/cover/02575b8c5eae/set open\
Zu:noArg homeassistant/cover/02575b8c5eae/set close\
Stop:noArg homeassistant/cover/02575b8c5eae/set stop\
Licht:noArg homeassistant/cover/02575b8c5eae/setposition 97

setstate Jalousie_Buero Auf
setstate Jalousie_Buero 2020-04-28 22:22:54 availability_topic homeassistant/cover/02575b8c5eae/connection
setstate Jalousie_Buero 2020-05-01 00:13:14 battery 69
setstate Jalousie_Buero 2020-04-28 22:22:54 command_topic homeassistant/cover/02575b8c5eae/set
setstate Jalousie_Buero 2020-04-28 22:22:54 connection Online
setstate Jalousie_Buero 2020-04-28 22:22:54 device_class battery
setstate Jalousie_Buero 2020-04-28 22:22:54 device_identifiers am43_02575b8c5eae
setstate Jalousie_Buero 2020-04-28 22:22:54 device_manufacturer Generic AM43
setstate Jalousie_Buero 2020-04-28 22:22:54 device_name 02575b8c5eae
setstate Jalousie_Buero 2020-05-01 00:13:14 id 02575b8c5eae
setstate Jalousie_Buero 2020-05-01 00:13:14 lastaction CLOSE
setstate Jalousie_Buero 2020-05-01 00:13:14 lastconnect 2020-04-30T22:13:06.562Z
setstate Jalousie_Buero 2020-05-01 00:13:14 light 0
setstate Jalousie_Buero 2020-04-28 22:22:54 name 02575b8c5eae Light
setstate Jalousie_Buero 2020-04-28 22:22:54 payload_available Online
setstate Jalousie_Buero 2020-04-28 22:22:54 payload_close CLOSE
setstate Jalousie_Buero 2020-04-28 22:22:54 payload_not_available Offline
setstate Jalousie_Buero 2020-04-28 22:22:54 payload_open OPEN
setstate Jalousie_Buero 2020-04-28 22:22:54 payload_stop STOP
setstate Jalousie_Buero 2020-05-01 00:13:14 position 100
setstate Jalousie_Buero 2020-04-28 22:22:54 position_closed 100
setstate Jalousie_Buero 2020-04-28 22:22:54 position_open 0
setstate Jalousie_Buero 2020-04-28 22:22:54 position_topic homeassistant/cover/02575b8c5eae/state
setstate Jalousie_Buero 2020-04-28 22:22:54 set_position_topic homeassistant/cover/02575b8c5eae/setposition
setstate Jalousie_Buero 2020-05-01 08:31:55 state Auf
setstate Jalousie_Buero 2020-04-28 22:22:54 state_topic homeassistant/cover/02575b8c5eae/state
setstate Jalousie_Buero 2020-04-28 22:22:54 subscriptions homeassistant/cover/02575b8c5eae/set homeassistant/cover/02575b8c5eae/setposition
setstate Jalousie_Buero 2020-04-28 22:22:54 unique_id am43_02575b8c5eae_light_sensor
setstate Jalousie_Buero 2020-04-28 22:22:54 unit_of_measurement %
setstate Jalousie_Buero 2020-04-28 22:22:54 value_template {{value_json['light']}}


Beta-User

Zitat von: ChrisA4 am 01 Mai 2020, 08:57:40
(Bitte allen Code in "Tags" einpacken (#-Button oberhalb der smilies))

?Was ist damit gemeint??
Damit ist gemeint: Achte auf die Formatierung und nutze die Möglichkeit, die dir die Forums-Webseite eröffnet. Dazu gibt es einen Button oberhalb der Zeile mit den  :) usw....

Als erste Aktion werfen wir mal die dusseligen homeassistant-Config-Infos weg und entfernen die CID-Präfixes (fyi: in Code-Tags):

defmod Jalousie_Buero MQTT2_DEVICE mqttjs_d08d2c27
attr Jalousie_Buero IODev MQTT2_FHEM_Server
attr Jalousie_Buero readingList homeassistant/cover/02575b8c5eae/connection:.* connection\
  homeassistant/cover/02575b8c5eae/state:.* { json2nameValue($EVENT) }
attr Jalousie_Buero setList Auf:noArg homeassistant/cover/02575b8c5eae/set open\
  Zu:noArg homeassistant/cover/02575b8c5eae/set close\
  Stop:noArg homeassistant/cover/02575b8c5eae/set stop\
  Licht:noArg homeassistant/cover/02575b8c5eae/setposition 97

Damit die homeassistant-config-Meldungen auch nicht wiederkommen, gibt es ein attrTemplate zur Konfiguration einer "ignoreRegexp" am IO. Wie das mit attrTemplate allgemein geht, bitte im Wiki bei "Praxisbeispielen" nachsehen (und nein, ich will hier keinen Link hinsetzen, nutze die Suchfunktion und denke ggf. nach, was gemeint sein könnte...), zu der ignoreRegexp kannst du in meinen letzten paar Beiträgen etwas mehr Info finden.

Ansonsten sollte man das ggf. "dem allgemeinen Standard" anpassen. Es gibt in den attrTemplates für shelly und Tasmota schon zwei "Roller" bzw. "Shutter" templates. Bitte da mal nachsehen, ob es "setter" gibt, die hier auch passen würden.
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: ZigBee2mqtt, MiLight@ESP-GW, BT@OpenMQTTGw | ZWave | SIGNALduino | MapleCUN | RHASSPY
svn: u.a Weekday-&RandomTimer, Twilight,  div. attrTemplate-files, MySensors

ChrisA4

Danke für die Info
Werd mich durcharbeiten (wenn Zeit) und Meld mich bei neuen Erkenntissen :)