[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer

Begonnen von CoolTux, 11 Januar 2018, 15:42:45

Vorheriges Thema - Nächstes Thema

CoolTux

Bitte einmal als root ausführen

su -s /bin/bash -c "ssh pi@192.168.178.137 'ls /etc/'" fhem
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Steffen

Zitat von: CoolTux am 31 Mai 2018, 20:58:35
Bitte einmal als root ausführen

su -s /bin/bash -c "ssh pi@192.168.178.137 'ls /etc/'" fhem

erstmal zwischen durch viel dank für deine Geduld...


root@happyfamilyserver:~# su -s /bin/bash -c "ssh pi@192.168.178.137 'ls /etc/'" fhem
X11
adduser.conf
alternatives
apt
avahi
bash.bashrc
bash_completion
bash_completion.d
bindresvport.blacklist
binfmt.d
bluetooth
ca-certificates
ca-certificates.conf
calendar
cifs-utils
console-setup
cron.d
cron.daily
cron.hourly
cron.monthly
cron.weekly
crontab
dbus-1
debconf.conf
debian_version
default
deluser.conf
dhcp
dhcpcd.conf
dhcpcd.duid
dhcpcd.secret
dphys-swapfile
dpkg
environment
fake-hwclock.data
fb.modes
fstab
gai.conf
gdb
groff
group
gshadow
gss
host.conf
hostname
hosts
hosts.allow
hosts.deny
idmapd.conf
ifplugd
init
init.d
initramfs-tools
inputrc
insserv.conf.d
iproute2
issue
issue.net
kernel
ld.so.cache
ld.so.conf
ld.so.conf.d
ld.so.preload
ldap
libaudit.conf
libnl-3
locale.alias
locale.gen
localtime
logcheck
login.defs
logrotate.conf
logrotate.d
machine-id
magic
magic.mime
mailcap
mailcap.order
manpath.config
mime.types
mke2fs.conf
modprobe.d
modules
modules-load.d
motd
mtab
nanorc
netconfig
network
networks
newt
nsswitch.conf
opt
os-release
pam.conf
pam.d
passwd
paxctld.conf
perl
plymouth
polkit-1
ppp
profile
profile.d
protocols
python
python2.7
python3
python3.5
rc.local
rc0.d
rc1.d
rc2.d
rc3.d
rc4.d
rc5.d
rc6.d
rcS.d
request-key.conf
request-key.d
resolv.conf
resolv.conf.bak
resolvconf
resolvconf.conf
rmt
rpc
rpi-issue
rsyslog.conf
rsyslog.d
samba
securetty
security
selinux
services
sgml
shadow
shells
skel
ssh
ssl
staff-group-for-usr-local
subgid
subgid-
subuid
subuid-
sudoers
sudoers.d
sysctl.conf
sysctl.d
systemd
terminfo
timezone
tmpfiles.d
triggerhappy
ucf.conf
udev
ufw
update-motd.d
usb_modeswitch.conf
usb_modeswitch.d
vim
wgetrc
wpa_supplicant
xdg
xml
root@happyfamilyserver:~#

Steffen

das habe ich jetzt auch mal versucht:

root@happyfamilyserver:~# ssh pi@192.168.178.137 gatttool -i hci0 -b C4:7C:8D:66:17:03 --char-read -a 0x38
Characteristic value/descriptor: 64 27 33 2e 31 2e 38
root@happyfamilyserver:~#

CoolTux

Sieht doch gut aus.

Lokal ist gatttool installiert? Remote ist gatttool installiert?

su -s /bin/bash -c "ssh pi@192.168.178.137 'gatttool -i hci0 -b C4:7C:8D:66:17:03 --char-read -a 0x38'" fhem
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Steffen

Zitat von: Steffen am 31 Mai 2018, 21:43:10
das habe ich jetzt auch mal versucht:

root@happyfamilyserver:~# ssh pi@192.168.178.137 gatttool -i hci0 -b C4:7C:8D:66:17:03 --char-read -a 0x38
Characteristic value/descriptor: 64 27 33 2e 31 2e 38
root@happyfamilyserver:~#


Ok jetzt habe ich es wohl, habe dann nochmal bei sshHost "pi@192.168.178.137" eingegeben statt nur "192.168.178.137" und schon kommen die Werte rein.

Vielen Vielen Dank für deine Geduld und Hilfe...

Mfg Steffen


CoolTux

Zitat von: Steffen am 31 Mai 2018, 21:47:13
Ok jetzt habe ich es wohl, habe dann nochmal bei sshHost "pi@192.168.178.137" eingegeben statt nur "192.168.178.137" und schon kommen die Werte rein.

Vielen Vielen Dank für deine Geduld und Hilfe...

Mfg Steffen

Na dann kann es auch nicht gehen. Es sei denn du hast eine config Datei in .ssh liegen  ;D

Gerne doch. Viel Spaß damit.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

CoolTux

Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Tobias

Ey Leute, warum macht ihr das sooo kompliziert.
Auf dem pi zero w mit aktuellem Image funktioniert das gatttool perfekt. Soll der raspi zero sich doch selbst darum kümmern und die fertigen sensorwerte dem Haupt fhem bereitstellen.
Dieses SSH gewurschtel ist echt nicht mehr nötig.

Bereitstellung der Werte Funktionen mit fhem2fhem oder mein Favorit per mqtt

Gesendet von meinem Leap mit Tapatalk

Maintainer: Text2Speech, TrashCal, MediaList

Meine Projekte: https://github.com/tobiasfaust
* PumpControl v2: allround Bewässerungssteuerung mit ESP und FHEM
* Ein Modbus RS485 zu MQTT Gateway für SolarWechselrichter

MadMax-FHEM

Zitat von: Tobias am 02 Juni 2018, 17:32:06
Ey Leute, warum macht ihr das sooo kompliziert.
Auf dem pi zero w mit aktuellem Image funktioniert das gatttool perfekt. Soll der raspi zero sich doch selbst darum kümmern und die fertigen sensorwerte dem Haupt fhem bereitstellen.
Dieses SSH gewurschtel ist echt nicht mehr nötig.

Bereitstellung der Werte Funktionen mit fhem2fhem oder mein Favorit per mqtt

Gesendet von meinem Leap mit Tapatalk

FHEM2FHEM heißt fhem auf dem ZeroW (brauch ich nicht) und MQTT ist (für mich) komplizierter als einmal Schlüssel erzeugen, simpler Aufruf von openssl und dann per passendem Copy-Befehl die Schlüssel auf das Zielsystem fettich...
(was ich eh mache, da ich gerne schnell auf meine headless Systeme kommen will)

Aber: jeder wie er will bei einem System wie fhem! ;)

Gruß, Joachim
FHEM PI3B+ Bullseye: HM-CFG-USB, 40x HM, ZWave-USB, 13x ZWave, EnOcean-PI, 15x EnOcean, HUE/deCONZ, CO2, ESP-Multisensor, Shelly, alexa-fhem, ...
FHEM PI2 Buster: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, Shelly, ha-bridge, ...
FHEM PI3 Buster (Test)

MadMax-FHEM

Hi Leon,

so habe heute (begonnen) meine FlowerSense wieder in Betrieb zu nehmen...

Und gleich umgeschwenkt auf das neue Modul...
...läuft.
Inkl. ssh...

Allerdings (habe ja die "Vereinheitlichung" der Batteriewerte nachverfolgt) sollte es bei den FlowerSense nicht eher BatteryPercentage heißen (müssen)!?
Da ja hier Prozente und nicht Spannungswerte angegeben werden...
...zumindest bei mir...
(oder ist bei mir da was falsch, z.B. "alte" FW [ja ich weiß aber bislang sah ich keinen Grund upzudaten oder wären da gute!?])

Hier ein list:


Internals:
   BTMAC      C4:7C:8D:61:51:BE
   CFGFN     
   DEF        C4:7C:8D:61:51:BE
   INTERVAL   300
   NAME       Feuchtigkeit_Balkon_11
   NOTIFYDEV  global,Feuchtigkeit_Balkon_11
   NR         147226
   NTFY_ORDER 50-Feuchtigkeit_Balkon_11
   STATE      active
   TYPE       XiaomiBTLESens
   VERSION    2.0.12
   loglevel   4
   READINGS:
     2018-06-03 15:15:08   battery         ok
     2018-06-03 15:15:08   batteryLevel    100
     2018-06-03 15:15:14   fertility       0
     2018-06-03 15:15:08   firmware        2.6.2
     2018-06-03 15:14:34   lastGattError   No route to host (113)
     2018-06-03 15:15:14   lux             0
     2018-06-03 15:15:14   moisture        0
     2018-06-03 15:15:14   state           active
     2018-06-03 15:15:14   temperature     0
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1528031708.35676
     updateTimestampCallBattery 2018-06-03 15:15:08
Attributes:
   model      flowerSens
   room       XiaomiBTLESens
   sshHost    jemand@192.168.1.94


Gruß, Joachim
FHEM PI3B+ Bullseye: HM-CFG-USB, 40x HM, ZWave-USB, 13x ZWave, EnOcean-PI, 15x EnOcean, HUE/deCONZ, CO2, ESP-Multisensor, Shelly, alexa-fhem, ...
FHEM PI2 Buster: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, Shelly, ha-bridge, ...
FHEM PI3 Buster (Test)

CoolTux

Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

MadMax-FHEM

Ups, sorry!

Hab's eben genau deswegen noch nicht gemacht, da auch ZWave geändert wurde...
...und ich wollte erst mal den Code meiner Batterieberechnung nachziehen...

Eieieieiei!

Danke, Joachim
FHEM PI3B+ Bullseye: HM-CFG-USB, 40x HM, ZWave-USB, 13x ZWave, EnOcean-PI, 15x EnOcean, HUE/deCONZ, CO2, ESP-Multisensor, Shelly, alexa-fhem, ...
FHEM PI2 Buster: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, Shelly, ha-bridge, ...
FHEM PI3 Buster (Test)

Invers

Hi, mir ist aufgefallen, dass alle Thermo/Hygrometer in STATE und state
   
T: 29.2 H: 37.0

eingetragen haben. Das betrifft Homematic und Andere.
Bei den Xiaomis, die ich seit gestern habe, steht hingegen;

active

Ich weiss nicht, wie es bei Geräten anderer Hersteller ist, wollte aber fragen, ob es sinnvoll wäre, das zu vereinheitlichen.
Meine Thermometerliste sieht nun eigenartig aus.

Pi3B+ mit SSD/ Bullseye | FB7590 AX | 12 x Dect200 | CUL433+868 | SDuino | HM-LAN | 3 x Heizung FHT + FKontakte | KeyMatic + 4 FB | HM Wandtaster 2-fach m. LED | 6 x Türkont. TFK-TI | HM-Bew.-Melder innen | 3 x Smoked. HM-SEC-SD-2

CoolTux

Kann ich die Tage einbauen. Bisschen Geduld aber bitte  :)


Grüße
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Invers

Pi3B+ mit SSD/ Bullseye | FB7590 AX | 12 x Dect200 | CUL433+868 | SDuino | HM-LAN | 3 x Heizung FHT + FKontakte | KeyMatic + 4 FB | HM Wandtaster 2-fach m. LED | 6 x Türkont. TFK-TI | HM-Bew.-Melder innen | 3 x Smoked. HM-SEC-SD-2