I could be wrong, but I think BLE isn’t working on Pi Zero W with Hassio, yet. The documentation says that the BT add-on is for Pi 3. When I add BT device tracker to config it works perfect on Pi Zero. When I switch to BLE device tracker the Pi Zero won’t even load Hassio on reboot. Adding logger entries for Miflora to configuration.yaml shows that it’s just never connecting. I hooked it up to a phone and even small moisture adjustments sync super fast, so the device is working great but BLE on Pi Zero W just isn’t connecting with it.
But, yeah, SSH is locked down too much for most current users and I’m guessing someone will write a fully functional SSH plugin in a month or two for Hassio and full BLE support for Pi Zero W pretty soon, too. It’s crazy how many highly skilled people are donating so many hours to this great project It’s the best product out there and it’s free!!! [FWIW forum won’t let me put a dot in Hassio]
Thank you all for the great work you did in making this sensor work for Home assistant!
I came along a few weeks ago and installed the Miflora sensor, scanned and found the MAC addresses of the sensors and installed them all in HA. I even activated an automation that waters plants in my greenhouse based on the moisture sensor data.
I few day ago I also activated Homebridge to get HA values into my iOS and Siri routines. I even got data from these sensors into the Home app and Siri reports them. But it’s only temperature and lux values, not moisture nor conductivity.
Good evening! I just did a fresh installation of hassbian on my Pi3 and ran into some issues with pairing with my Flower sensor. In my previous installation things worked fine and I got data from the sensor. The difference with my fresh installation is that i installed Flic smart bluetooth buttons (with this installation process: Install Flic - #4 by Schmidij_ch). The buttons are working perfectly, so the Bluetooth is obviously working. However, then when I try to find and pair with the sensor I can’t find anything.
When I run “hcitool scan” in the terminal i get this:
Scanning …
Inquiry failed: Device or resource busy
I then tried:
bluetoothctl
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# scan on
No default controller available
I saved the mac-address from my precious installation, but it does not help to just add it with the regular config-lines
Of course, this is why. But how to add that functionality?
There is a list of supported types from HA that goes into Homebridge settings. The standard HA settings include: climate and sensor (which one would imagine would suffice).
I tried adding the value type of moisture into the Homebridge settings and restarted, but nothing changes. Automatically Homebridge includes temperature and light intensity from the Mi Flora.
I found a working wrapper for BLE in macOS, can scan my devices and found the Mi Flora. One problem, can program python, so don’t know how to begin and use it for the poller of the mi flora.
Well, it is paired with my phone. So I shut down the bluetooth on my phone, but I still have the “No default controller available” when I try to pair it (or use scan on) in bluetoothctl.
I’m using plantgateway on a Pi Zero W to publish the value of six Xiaomi Mi sensors on a MQTT topic without issue and I have configured the Plant Monitor component to monitor the plants.
The only issue I’m facing is the display of the status of the plant. I’m only manage to get “ok” or “problem” and have to click to see what the problem is (e.g. conductivity low).
Would be great if someone with a BLE Sniffer to also Reverse Eng this one: Aqualin Bluetooth Water Irrigation System
Could just create a really cheap automatic irrigation system…
Mi Flora reporting if water was needed and Aqualin watering automatically…
Today I use a solenoid valve that opens when gets power and closes when power is removed. For that I just use a normal Z-wave switch for the outlet. So when I get a low threshold value from the Miflora HA turns that switch on.
But the Aqualin is cheaper than the switch and valve was.
I’m trying to set up the plantgw on my rpi z w but I keep getting this:
[Errno 104] Connection reset by peer
could not read data from C4:7C:8D:65:B8:FF (Rihanna) with reason: Helper exited
[Errno 104] Connection reset by peer
Exception IOError: (32, 'Broken pipe') in <bound method Peripheral.__del__ of <bluepy.btle.Peripheral instance at 0xb654b788>> ignored
could not read data from C4:7C:8D:65:B8:FF (Rihanna) with reason: Helper exited
[Errno 104] Connection reset by peer
Exception IOError: (32, 'Broken pipe') in <bound method Peripheral.__del__ of <bluepy.btle.Peripheral instance at 0xb654bcd8>> ignored
could not read data from C4:7C:8D:65:B8:FF (Rihanna) with reason: Helper exited
When I try to do a ble scan i get the following:
root@raspberrypi:~/bluepy/bluepy# python3 blescan.py
Scanning for devices...
Traceback (most recent call last):
File "blescan.py", line 140, in <module>
main()
File "blescan.py", line 122, in main
devices = scanner.scan(arg.timeout)
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 679, in scan
self.start(passive=passive)
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 617, in start
self._mgmtCmd("le on")
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 272, in _mgmtCmd
rsp = self._waitResp('mgmt')
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 304, in _waitResp
raise BTLEException(BTLEException.INTERNAL_ERROR, "Helper exited")
bluepy.btle.BTLEException: Helper exited
I can however do a lescan:
pi@raspberrypi:~ $ sudo hcitool lescan
LE Scan ...
C4:7C:8D:65:B8:FF (unknown)
38:01:95:D4:07:93 (unknown)
C4:7C:8D:65:B8:FF Flower care
04:52:C7:B0:EB:23 (unknown)
What gives?
EDIT:
Reinstalled raspbian again and hciconfig -a actually works now.
Now I just get this:
root@plantgateway:~# plantgateway
[Errno 104] Connection reset by peer
[Errno 104] Connection reset by peer
could not read data from C4:7C:8D:65:B8:FF (Rihanna) with reason: Error from Bluetooth stack (comerr)
[Errno 104] Connection reset by peer
could not read data from C4:7C:8D:65:B8:FF (Rihanna) with reason: Error from Bluetooth stack (comerr)
[Errno 104] Connection reset by peer
could not read data from C4:7C:8D:65:B8:FF (Rihanna) with reason: Error from Bluetooth stack (comerr)
[Errno 104] Connection reset by peer
could not read data from C4:7C:8D:65:B8:FF (Rihanna) with reason: Error from Bluetooth stack (comerr)
could not read data from C4:7C:8D:65:B8:FF (Rihanna) with reason: Error from Bluetooth stack (comerr)
[Errno 104] Connection reset by peer
could not read data from C4:7C:8D:65:B8:FF (Rihanna) with reason: Error from Bluetooth stack (comerr)
Could not get data from 2sensor(s): Rihanna, otherplant.