Bluetooth auf Wlan Umsetzung (für Xiaomi Pflanzsensor)

Begonnen von andi11, 27 Januar 2017, 06:58:27

Vorheriges Thema - Nächstes Thema

andi11

interessant, da gibts ja mittlerweile einiges :)
Ich hab das hier gefunden http://www.friendlyarm.com/index.php?route=product/product&product_id=151 Vorteil es hat gleich Bluetooth und eMMC on Board.
Und eine Low Cost Version http://www.friendlyarm.com/index.php?route=product/product&product_id=132 mit Ethernet aber die grob abgeschätzt dem Orange Pi Zero entspricht.

andi11

#46
Alternativ wäre für mich auch eine Variante mit interessant, mit der ich irgendwie mit Arduino arbeiten kann (habe Eigenbau KNX Aktoren + Taster) daher evl ein ESP32?

Mit dem Arduino Core geht wohl noch kein Wlan.
Beim Original SDK gibt es GATT Beispiele, aber da kapier ich mal so garnix.... https://github.com/espressif/esp-idf...ples/bluetooth
bei der DOKU findet man das hier http://esp-idf-fork.readthedocs.io/e...esp_gattc.html
Damit scheint es aber zu gehen, siehe https://www.youtube.com/watch?v=brD3dYTK6Fg&feature=youtu.be
Und die Pycom Module mit ESP32 können es auch.

Und klar es ist nicht so flexibel wie ein "dezentrales Linux" dafür hat man aber nicht soviele Linux Systeme die veralten können. Und ich könnte solche Bluetooth Geräte an meine Taster anstecken, die ich eh in jedem Raum haben will.
Ist da jemand fitt beim ESP32?

Ansonsten gibts noch das hier. Wäre ja cool, ist aber nicht verfügbar https://www.seeedstudio.com/BTstack-LE-Arduino-Shield-p-2464.html

PeMue

Warum nehmt ihr nicht direkt den Raspberry Pi 3, der hat doch schon Bluetooth an Bord?

Gruß PeMue
RPi3Bv1.2 rpiaddon 1.66 6.0 1xHM-CC-RT-DN 1.4 1xHM-TC-IT-WM 1.1 2xHB-UW-Sen-THPL-O 0.15 1x-I 0.14OTAU  1xCUNO2 1.67 2xEM1000WZ 2xUniroll 1xASH2200 3xHMS100T(F) 1xRFXtrx 90 1xWT440H 3xTFA30.3150 5xFA21
RPi1Bv2 LCDCSM 1.63 5.8 2xMAX HKT 1xMAX RT V200KW1 Heizung Wasser

andi11

in meinem Fall: Ich will die eigentlich in Hohlwand Dosen verbauen. Und ich benötige mehrere => Kosten.

sash.sc

Wäre das nicht mit Kanonen auf Spatzen schießen?

Gesendet von meinem E6653 mit Tapatalk

Raspi 4B+ Bullseye ;LaCrosse; HomeMatic; MapleCUL; ZigBee; Signalduino ESP32 ; Shellys; MQTT2; Grafana mit Influxdb


sash.sc

Scheint ein guter Ansatz zu sein. Preis ist auf jedenfall mehr als gut.

Gesendet von meinem E6653 mit Tapatalk

Raspi 4B+ Bullseye ;LaCrosse; HomeMatic; MapleCUL; ZigBee; Signalduino ESP32 ; Shellys; MQTT2; Grafana mit Influxdb

PeMue

RPi3Bv1.2 rpiaddon 1.66 6.0 1xHM-CC-RT-DN 1.4 1xHM-TC-IT-WM 1.1 2xHB-UW-Sen-THPL-O 0.15 1x-I 0.14OTAU  1xCUNO2 1.67 2xEM1000WZ 2xUniroll 1xASH2200 3xHMS100T(F) 1xRFXtrx 90 1xWT440H 3xTFA30.3150 5xFA21
RPi1Bv2 LCDCSM 1.63 5.8 2xMAX HKT 1xMAX RT V200KW1 Heizung Wasser

juergs

#53
https://shop.pimoroni.com/products/raspberry-pi-zero-w
Wow, die 48 Stück waren in 3h wech ...
Gruß,
Jürgen

Waldmensch

Zitat von: PeMue am 28 Februar 2017, 19:30:18
Ist nur die Frage, wo man den bekommt ... Hast Du eine Bezugsquelle?

Gruß PeMue
Ne, die Heise news wurde mir nur im Newsfeed eingespült.

MadMax-FHEM

Zitat von: juergs am 28 Februar 2017, 21:22:38
https://shop.pimoroni.com/products/raspberry-pi-zero-w
Wow, die 48 Stück waren in 3h wech ...
Gruß,
Jürgen

Oh, out of stock...
...hoffentlich erst (weit) NACH meiner Bestellung ;)

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)

sash.sc

Sind wieder lieferbar. Gerade mal einen bestellt [emoji41]

Gesendet von meinem E6653 mit Tapatalk

Raspi 4B+ Bullseye ;LaCrosse; HomeMatic; MapleCUL; ZigBee; Signalduino ESP32 ; Shellys; MQTT2; Grafana mit Influxdb

mele

Zitat von: Christian.Kühnel am 30 Januar 2017, 23:34:37
Liebe Freunde der Pflanzenautomatisierung,

ich habe in den letzten Tagen etwas Software zusammengebaut und hier ist meine Lösung für die zu kurze Bluetooth LE Reichweite:
https://github.com/ChristianKuehnel/plantgateway

Kurzfassung:
Ich lasse auf einem kleinen Linuxrechner (z.B. C.H.I.P oder Raspberry Pi 3) mit Bluetooth und WiFi das "plantgateway" laufen. Das holt regelmäßig (z.B. 1x pro Stunde) die Messwerten von den Xiaomi Mi Sensoren und schickt sie per WiFi und MQTT zum fhem Server. Damit lassen sich dann beliebige Entfernungen überbrücken.

Vorteile:
* Funktioniert mit Standard Hardware.
* Ist mit dem C.H.I.P (9$) auch recht günstig.
* Funktioniert überall, wo eine IP-Verbindung besteht (WiFi, LAN, Mobilfunk, ...).
* Funktioniert mit jeder Heimautomatisierung, die MQTT unterstützt, also nicht nur fhem.

Nachteil:
* Ein weiterer Linuxrechner der Strom braucht und administriert werden will.


Schönen Abend,
Christian

Hallo Christian,

ich verzweifle gerade leider an Deiner GITHUB-Anleitung zum plantgateway.

Ich hoffe, von Dir einen Rat zu bekommen, wie ich weitermachen kann. Ich habe einen Raspberry Pi 2 B als "Satellit" und einen cubietruck als Hauptinstanz.

Folgendes habe ich auf dem Satellit probiert:

Der Flowersens wird schon per hcitoolscan lescan erkannt.

In der Anleitung steht der Schritt
sudo apt-get install python3 pip3

welcher bei mir folgende Meldung ausgibt:
Paket pip3 kann nicht gefunden werden.

Die Installation funktionierte dann mit:
sudo apt-get install python3-pip

Wenn ich allerdings
sudo pip3 install https://github.com/ChristianKuehnel/plantgateway/archive/master.zip

ausführe (pip geht nicht), dann bekomme ich folgende Fehlermeldung:

sudo pip3 install https://github.com/ChristianKuehnel/plantgateway/archive/master.zip
Downloading/unpacking https://github.com/ChristianKuehnel/plantgateway/archive/master.zip
  Downloading master.zip (96kB): 96kB downloaded
  Running setup.py (path:/tmp/pip-cqkvk2re-build/setup.py) egg_info for package from https://github.com/ChristianKuehnel/plantgateway/archive/master.zip

Downloading/unpacking bluepy (from plantgateway==0.3.3)
  Downloading bluepy-1.0.5.tar.gz (210kB): 210kB downloaded
  Running setup.py (path:/tmp/pip-build-4f_5hkrb/bluepy/setup.py) egg_info for package bluepy

Downloading/unpacking paho-mqtt (from plantgateway==0.3.3)
  Downloading paho-mqtt-1.2.tar.gz (49kB): 49kB downloaded
  Running setup.py (path:/tmp/pip-build-4f_5hkrb/paho-mqtt/setup.py) egg_info for package paho-mqtt

Downloading/unpacking pyyaml (from plantgateway==0.3.3)
  Downloading PyYAML-3.12.tar.gz (253kB): 253kB downloaded
  Running setup.py (path:/tmp/pip-build-4f_5hkrb/pyyaml/setup.py) egg_info for package pyyaml

Installing collected packages: bluepy, paho-mqtt, pyyaml, plantgateway
  Running setup.py install for bluepy
    Working dir is /tmp/pip-build-4f_5hkrb/bluepy
    execute make -C ./bluepy clean
    execute make -C bluepy
    Failed to compile bluepy-helper. Exiting install.
    Command was 'make -C bluepy' in /tmp/pip-build-4f_5hkrb/bluepy
    Return code was 2
    Output was:
    b"make: Entering directory '/tmp/pip-build-4f_5hkrb/bluepy/bluepy'\ntar xzf bluez-src.tgz\ntouch ./bluez-5.29/lib/bluetooth.c ./bluez-5.29/lib/hci.c ./bluez-5.29/lib/sdp.c ./bluez-5.29/lib/uuid.c ./bluez-5.29/attrib/att.c ./bluez-5.29/attrib/gatt.c ./bluez-5.29/attrib/gattrib.c ./bluez-5.29/attrib/utils.c ./bluez-5.29/btio/btio.c ./bluez-5.29/src/log.c ./bluez-5.29/src/shared/mgmt.c ./bluez-5.29/src/shared/crypto.c ./bluez-5.29/src/shared/att.c ./bluez-5.29/src/shared/queue.c ./bluez-5.29/src/shared/util.c ./bluez-5.29/src/shared/io-glib.c ./bluez-5.29/src/shared/timeout-glib.c\nPackage glib-2.0 was not found in the pkg-config search path.\nPerhaps you should add the directory containing `glib-2.0.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'glib-2.0' found\nPackage glib-2.0 was not found in the pkg-config search path.\nPerhaps you should add the directory containing `glib-2.0.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'glib-2.0' found\ngcc -L. -Os -g -Wall -Werror -DHAVE_CONFIG_H -I./bluez-5.29/attrib -I./bluez-5.29 -I./bluez-5.29/lib -I./bluez-5.29/src -I./bluez-5.29/gdbus -I./bluez-5.29/btio  -o bluepy-helper bluepy-helper.c ./bluez-5.29/lib/bluetooth.c ./bluez-5.29/lib/hci.c ./bluez-5.29/lib/sdp.c ./bluez-5.29/lib/uuid.c ./bluez-5.29/attrib/att.c ./bluez-5.29/attrib/gatt.c ./bluez-5.29/attrib/gattrib.c ./bluez-5.29/attrib/utils.c ./bluez-5.29/btio/btio.c ./bluez-5.29/src/log.c ./bluez-5.29/src/shared/mgmt.c ./bluez-5.29/src/shared/crypto.c ./bluez-5.29/src/shared/att.c ./bluez-5.29/src/shared/queue.c ./bluez-5.29/src/shared/util.c ./bluez-5.29/src/shared/io-glib.c ./bluez-5.29/src/shared/timeout-glib.c \nbluepy-helper.c:33:18: fatal error: glib.h: Datei oder Verzeichnis nicht gefunden\n #include <glib.h>\n                  ^\ncompilation terminated.\n./bluez-5.29/attrib/att.c:33:18: fatal error: glib.h: Datei oder Verzeichnis nicht gefunden\n #include <glib.h>\n                  ^\ncompilation terminated.\n./bluez-5.29/attrib/gatt.c:32:18: fatal error: glib.h: Datei oder Verzeichnis nicht gefunden\n #include <glib.h>\n                  ^\ncompilation terminated.\n./bluez-5.29/attrib/gattrib.c:34:18: fatal error: glib.h: Datei oder Verzeichnis nicht gefunden\n #include <glib.h>\n                  ^\ncompilation terminated.\n./bluez-5.29/attrib/utils.c:30:18: fatal error: glib.h: Datei oder Verzeichnis nicht gefunden\n #include <glib.h>\n                  ^\ncompilation terminated.\n./bluez-5.29/btio/btio.c:37:18: fatal error: glib.h: Datei oder Verzeichnis nicht gefunden\n #include <glib.h>\n                  ^\ncompilation terminated.\n./bluez-5.29/src/log.c:32:18: fatal error: glib.h: Datei oder Verzeichnis nicht gefunden\n #include <glib.h>\n                  ^\ncompilation terminated.\n./bluez-5.29/src/shared/io-glib.c:30:18: fatal error: glib.h: Datei oder Verzeichnis nicht gefunden\n #include <glib.h>\n                  ^\ncompilation terminated.\n./bluez-5.29/src/shared/timeout-glib.c:22:18: fatal error: glib.h: Datei oder Verzeichnis nicht gefunden\n #include <glib.h>\n                  ^\ncompilation terminated.\nMakefile:28: recipe for target 'bluepy-helper' failed\nmake: *** [bluepy-helper] Error 1\nmake: Leaving directory '/tmp/pip-build-4f_5hkrb/bluepy/bluepy'\n"
    Complete output from command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-4f_5hkrb/bluepy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-htgkhp0o-record/install-record.txt --single-version-externally-managed --compile:
    running install

Working dir is /tmp/pip-build-4f_5hkrb/bluepy

execute make -C ./bluepy clean

execute make -C bluepy

Failed to compile bluepy-helper. Exiting install.

Command was 'make -C bluepy' in /tmp/pip-build-4f_5hkrb/bluepy

Return code was 2

Output was:

b"make: Entering directory '/tmp/pip-build-4f_5hkrb/bluepy/bluepy'\ntar xzf bluez-src.tgz\ntouch ./bluez-5.29/lib/bluetooth.c ./bluez-5.29/lib/hci.c ./bluez-5.29/lib/sdp.c ./bluez-5.29/lib/uuid.c ./bluez-5.29/attrib/att.c ./bluez-5.29/attrib/gatt.c ./bluez-5.29/attrib/gattrib.c ./bluez-5.29/attrib/utils.c ./bluez-5.29/btio/btio.c ./bluez-5.29/src/log.c ./bluez-5.29/src/shared/mgmt.c ./bluez-5.29/src/shared/crypto.c ./bluez-5.29/src/shared/att.c ./bluez-5.29/src/shared/queue.c ./bluez-5.29/src/shared/util.c ./bluez-5.29/src/shared/io-glib.c ./bluez-5.29/src/shared/timeout-glib.c\nPackage glib-2.0 was not found in the pkg-config search path.\nPerhaps you should add the directory containing `glib-2.0.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'glib-2.0' found\nPackage glib-2.0 was not found in the pkg-config search path.\nPerhaps you should add the directory containing `glib-2.0.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'glib-2.0' found\ngcc -L. -Os -g -Wall -Werror -DHAVE_CONFIG_H -I./bluez-5.29/attrib -I./bluez-5.29 -I./bluez-5.29/lib -I./bluez-5.29/src -I./bluez-5.29/gdbus -I./bluez-5.29/btio  -o bluepy-helper bluepy-helper.c ./bluez-5.29/lib/bluetooth.c ./bluez-5.29/lib/hci.c ./bluez-5.29/lib/sdp.c ./bluez-5.29/lib/uuid.c ./bluez-5.29/attrib/att.c ./bluez-5.29/attrib/gatt.c ./bluez-5.29/attrib/gattrib.c ./bluez-5.29/attrib/utils.c ./bluez-5.29/btio/btio.c ./bluez-5.29/src/log.c ./bluez-5.29/src/shared/mgmt.c ./bluez-5.29/src/shared/crypto.c ./bluez-5.29/src/shared/att.c ./bluez-5.29/src/shared/queue.c ./bluez-5.29/src/shared/util.c ./bluez-5.29/src/shared/io-glib.c ./bluez-5.29/src/shared/timeout-glib.c \nbluepy-helper.c:33:18: fatal error: glib.h: Datei oder Verzeichnis nicht gefunden\n #include <glib.h>\n                  ^\ncompilation terminated.\n./bluez-5.29/attrib/att.c:33:18: fatal error: glib.h: Datei oder Verzeichnis nicht gefunden\n #include <glib.h>\n                  ^\ncompilation terminated.\n./bluez-5.29/attrib/gatt.c:32:18: fatal error: glib.h: Datei oder Verzeichnis nicht gefunden\n #include <glib.h>\n                  ^\ncompilation terminated.\n./bluez-5.29/attrib/gattrib.c:34:18: fatal error: glib.h: Datei oder Verzeichnis nicht gefunden\n #include <glib.h>\n                  ^\ncompilation terminated.\n./bluez-5.29/attrib/utils.c:30:18: fatal error: glib.h: Datei oder Verzeichnis nicht gefunden\n #include <glib.h>\n                  ^\ncompilation terminated.\n./bluez-5.29/btio/btio.c:37:18: fatal error: glib.h: Datei oder Verzeichnis nicht gefunden\n #include <glib.h>\n                  ^\ncompilation terminated.\n./bluez-5.29/src/log.c:32:18: fatal error: glib.h: Datei oder Verzeichnis nicht gefunden\n #include <glib.h>\n                  ^\ncompilation terminated.\n./bluez-5.29/src/shared/io-glib.c:30:18: fatal error: glib.h: Datei oder Verzeichnis nicht gefunden\n #include <glib.h>\n                  ^\ncompilation terminated.\n./bluez-5.29/src/shared/timeout-glib.c:22:18: fatal error: glib.h: Datei oder Verzeichnis nicht gefunden\n #include <glib.h>\n                  ^\ncompilation terminated.\nMakefile:28: recipe for target 'bluepy-helper' failed\nmake: *** [bluepy-helper] Error 1\nmake: Leaving directory '/tmp/pip-build-4f_5hkrb/bluepy/bluepy'\n"

----------------------------------------
Cleaning up...
Command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-4f_5hkrb/bluepy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-htgkhp0o-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-4f_5hkrb/bluepy
Storing debug log for failure in /root/.pip/pip.log


Hast Du einen Rat, wie ich weiter vorgehen kann?

Vielen herzlichen Dank vorab,

Manuel
FHEM auf NUC/Proxmox (Rpi 2 / Rpi Zero W mit FHEM2FHEM, RFHEM)
Homematic/LaCrosse/PCA301/Shelly, Rollladen, Batterieaktor + Relais zur Schaltung Garagentor (Promatic 2), Xiaomi FlowerSens, Bewässerungssteuerung Garten und Gewächshaus, Weatherman und Landroid

CoolTux

Hallo Manuel,

Die aktuelle Develversion vom FlowerSens Modul kann SSH. Vielleicht hilft Dir das ja.



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

mahowi

Wie die Fehlermeldung schon aussagt, Dir fehlt die Header-Datei glib.h:
fatal error: glib.h: Datei oder Verzeichnis nicht gefunden
             ^^^^^^


Die bekommst Du, wenn Du das Paket libglib2.0-dev installierst.
pi@raspberrypi:~ $ dpkg -S /usr/include/glib-2.0/glib.h
libglib2.0-dev: /usr/include/glib-2.0/glib.h
CUBe (MAX): HT, FK | CUBe (SlowRF): ESA2000WZ
JeeLink: LaCrosse | nanoCUL433: Smartwares SHS-51001-EU, EM1000GZ
ZME_UZB1: GreenWave PowerNode, Popp Thermostat | SIGNALDuino: HE877, X10 MS14A, Revolt NC-5462,  IT Steckdosen + PIR
tado° | Milight | HUE, Lightify | SmarterCoffee