patricke94 / pycalima Goto Github PK
View Code? Open in Web Editor NEWPython interface for Pax Calima Fan via Bluetooth LE
License: Apache License 2.0
Python interface for Pax Calima Fan via Bluetooth LE
License: Apache License 2.0
Have any one tested if the UK brand vent-axia is working?
https://www.vent-axia.com/range/lo-carbon-svara
Planning on buying one assuming that they have the same API as it is the "same" fan...
Hello,
I was hoping somebody had done this. Thank you for the work you've put in it!
I am trying to be able to start the boost through this but I am unsuccessful.
This is the error I am getting.
>>> fan.setBoostMode(1, 100, 60)
[Calima] [W] 0x30 = 0164003c00
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/pi/repo/pycalima/pycalima/Calima.py", line 169, in setBoostMode
self._writeHandle(0x30, pack('<BHH', on, speed, seconds))
File "/home/pi/repo/pycalima/pycalima/Calima.py", line 72, in _writeHandle
self.conn.writeCharacteristic(handle, val, withResponse=True)
File "/usr/local/lib/python3.4/dist-packages/bluepy/btle.py", line 502, in writeCharacteristic
return self._getResp('wr')
File "/usr/local/lib/python3.4/dist-packages/bluepy/btle.py", line 369, in _getResp
resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout)
File "/usr/local/lib/python3.4/dist-packages/bluepy/btle.py", line 332, in _waitResp
raise BTLEException(BTLEException.COMM_ERROR, "Error from Bluetooth stack (%s)" % errcode)
bluepy.btle.BTLEException: Error from Bluetooth stack (comerr)
Great work!, but I had to modify it to get it to work with my Calima fan:
ModelNumber: 10
HardwareRevision: 01.00
FirmwareRevision: 01.02
SoftwareRevision: 01.05
It has a different set of handles:
[0x18] 4cad343a-209a-40b7-b911-4d9b3df569b2 (WRITE )
[0x1a] d1ae6b70-ee12-4f6d-b166-d2063dcaffe1 (READ ) = (1) 01
[0x1c] b85fa07a-9382-4838-871c-81d045dcc2ff (READ WRITE ) = (20) 56696674652070c3a52062616465740000000000
[0x1e] 638ff62c-3823-4e0f-8179-1695c46ee8af (READ ) = (6) 582bdb0111dd
[0x21] 25a824ad-3021-4de9-9f2f-60cf8d17bded (READ ) = (1) 00
[0x23] 528b80e8-c47a-4c0a-bdf1-916a7748f412 (READ ) = (12) 02006e002f00000000000000
[0x26] 63b04af9-24c0-4e5d-a69c-94eb9c5707b4 (READ ) = (1) 01
[0x28] 90cabcd1-bcda-4167-85d8-16dcd8ab6a6b (READ WRITE ) = (1) 01
[0x2a] 1488a757-35bc-4ec8-9a6b-9ecf1502778e (READ WRITE ) = (6) 68088b060000
[0x2c] e782e131-6ce1-4191-a8db-f4304d7610f1 (READ WRITE ) = (4) 01030103
[0x2e] 49c616de-02b1-4b67-b237-90f66793a6f2 (READ WRITE ) = (2) 0a0a
[0x30] a22eae12-dba8-49f3-9c69-1721dcff1d96 (READ WRITE ) = (5) 19ca081400
[0x32] 118c949c-28c8-4139-b0b3-36657fd055a9 (READ WRITE ) = (5) 0000000000
[0x34] 8b850c04-dc18-44d2-9501-7662d65ba36e (READ WRITE ) = (2) 0000
[0x36] f508408a-508b-41c6-aa57-61d1fd0d5c39 (READ WRITE ) = (1) 01
[0x38] 6dec478e-ae0b-4186-9d82-13dda03c0682 (READ WRITE ) = (4) 06160c2a
[0x3a] b5836b55-57bd-433e-8480-46e4993c5ac0 (READ WRITE ) = (5) 0017000600
[0x3c] faa49e09-a79c-4725-b197-bdc57c67dc32 (READ WRITE ) = (2) 0101
[0x3e] ff5f7c4f-2606-4c69-b360-15aaea58ad5f (READ WRITE ) = (1) 00
When changing some handles in the code everything works fine.
Hello,
I have 3 Pax fans and I always get 0 humidity on all of those fans. Is humidity not supported by all fans or why do I get that?
Hi,
I have 2 pcs Calima via 2 pcs Raspberry Zero due to that they are too far to handle Bluetooth length.
If I run one, it will work perfectly, but if both are running then one will stop after a while with Device disconnected.
Do you know what it may be?
Just saw this in the local store: https://intelliventsky.com/
It even has an "air quality sensor that is able to detect strong odours" 😅
I tried downloading teir app and it looks almost identical to the Pax Calima app except for the brand, colors and version number. So I assume pycalima would work with very little adjustments.
Not that I'm going to replace the Calima for now but just thought it was an interesting find.
Hi,
Probably not an issue in the script, but do you have any experience of this?
root@raspberrypi:/home/pi/pycalima# python3 cmdline.py -m 58:2b:db:02:37:64 -p 7926XXXX
Traceback (most recent call last):
File "cmdline.py", line 134, in <module>
main()
File "cmdline.py", line 80, in main
fan = Calima(mac_address, pincode)
File "/home/pi/pycalima/pycalima/Calima.py", line 79, in __init__
self.conn = ble.Peripheral(deviceAddr=addr)
File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 391, in __init__
self._connect(deviceAddr, addrType, iface)
File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 439, in _connect
raise BTLEDisconnectError("Failed to connect to peripheral %s, addr type: %s" % (addr, addrType), rsp)
bluepy.btle.BTLEDisconnectError: Failed to connect to peripheral 58:2b:db:02:37:64, addr type: public
Exception ignored in: <function Calima.__del__ at 0x7650fae0>
Traceback (most recent call last):
File "/home/pi/pycalima/pycalima/Calima.py", line 83, in __del__
self.conn.disconnect()
AttributeError: 'Calima' object has no attribute 'conn'
Hi,
I have several users complaining about the temp and humidity readings in my code which was built on your Calima-driver.
Could you say something about how you figured out the conversion of these two values (the v[0] and v[1] values from the sensor data).
I have a feeling that the sensors in the fan aren't the best, so it might be that they will never give a very good reading though...
Please see the issues on my page:
eriknn/ha-pax_ble#5
Thanks for any help :)
Hello
I get the error unpack requires a bytes object of length 10
import sys, time, datetime
from pycalima.Calima import Calima
fan = Calima("my mac", "mypin")
currentState = fan.getState()
Any ideas?
Has anyone managed to run this in a container (e.g. custom baked Homeassitant / Node-red)?
I have been trying to get Bluetooth and pycalima working however I'm getting permission errors (probably not a pycalima issue) but thought if someone are already running this in a container it would save me many hours of troubleshooting.
I can't wait to get my fan into Home Assistant!
Thanks!
Need to comment those two lines in cmdline.py to get it to work with my fans:
`root@e-linux01:/opt/src/pycalima# python3 cmdline.py -m 58:2b:db:01:b0:3b -p 12234107 -s
[0x3] Device Name (READ ) = (10) 5041582043616c696d61
[0x5] Appearance (READ ) = (2) 0000
[0x7] Peripheral Preferred Connection Parameters (READ ) = (8) 900190010400e803
[0xb] Serial Number String (READ ) = (8) 3030303030303000
[0xd] Model Number String (READ ) = (2) 3130
[0xf] Hardware Revision String (READ ) = (6) 30312e303000
[0x11] Firmware Revision String (READ ) = (6) 30312e303200
[0x13] Software Revision String (READ ) = (5) 30312e3035
[0x15] Manufacturer Name String (READ ) = (3) 504158
[0x18] 4cad343a-209a-40b7-b911-4d9b3df569b2 (WRITE )
[0x1a] d1ae6b70-ee12-4f6d-b166-d2063dcaffe1 (READ ) = (1) 01
[0x1c] b85fa07a-9382-4838-871c-81d045dcc2ff (READ WRITE ) = (20) 53686f7765720000000000000000000000000000
[0x1e] 638ff62c-3823-4e0f-8179-1695c46ee8af (READ ) = (6) 582bdb01b03b
[0x21] 25a824ad-3021-4de9-9f2f-60cf8d17bded (READ ) = (1) 00
[0x23] 528b80e8-c47a-4c0a-bdf1-916a7748f412 (READ ) = (12) 250052000a00000001000000
[0x26] 63b04af9-24c0-4e5d-a69c-94eb9c5707b4 (READ ) = (1) 01
[0x28] 90cabcd1-bcda-4167-85d8-16dcd8ab6a6b (READ WRITE ) = (1) 00
[0x2a] 1488a757-35bc-4ec8-9a6b-9ecf1502778e (READ WRITE ) = (6) 9808e8030000
[0x2c] e782e131-6ce1-4191-a8db-f4304d7610f1 (READ WRITE ) = (4) 01030101
[0x2e] 49c616de-02b1-4b67-b237-90f66793a6f2 (READ WRITE ) = (2) 001e
[0x30] a22eae12-dba8-49f3-9c69-1721dcff1d96 (READ WRITE ) = (5) 1900003408
[0x32] 118c949c-28c8-4139-b0b3-36657fd055a9 (READ WRITE ) = (5) 0084030000
[0x34] 8b850c04-dc18-44d2-9501-7662d65ba36e (READ WRITE ) = (2) 0000
[0x36] f508408a-508b-41c6-aa57-61d1fd0d5c39 (READ WRITE ) = (1) 00
[0x38] 6dec478e-ae0b-4186-9d82-13dda03c0682 (READ WRITE ) = (4) 070e0c02
[0x3a] b5836b55-57bd-433e-8480-46e4993c5ac0 (READ WRITE ) = (5) 0016000600
[0x3c] faa49e09-a79c-4725-b197-bdc57c67dc32 (READ WRITE ) = (2) 0101
[0x3e] ff5f7c4f-2606-4c69-b360-15aaea58ad5f (READ WRITE ) = (1) 00
root@e-linux01:/opt/src/pycalima# python3 cmdline.py -m 58:2b:db:01:b0:3b -p 12234107
Device Name: PAX Calima
Model Number: 10
Serial Number: 0000000
Hardware Revision: 01.00
Firmware Revision: 01.02
Software Revision: 01.05
Manufacturer: PAX
Alias: Shower
Traceback (most recent call last):
File "cmdline.py", line 135, in
main()
File "cmdline.py", line 111, in main
print("Factory Settings Changed: ", fan.getFactorySettingsChanged())
File "/opt/src/pycalima/pycalima/Calima.py", line 174, in getFactorySettingsChanged
return bool(unpack('<I', self._readUUID(CHARACTERISTIC_FACTORY_SETTINGS_CHANGED)))
struct.error: unpack requires a bytes object of length 4
root@e-linux01:/opt/src/pycalima# python3 cmdline.py -m 58:2b:db:01:b0:3b -p 12234107
Device Name: PAX Calima
Model Number: 10
Serial Number: 0000000
Hardware Revision: 01.00
Firmware Revision: 01.02
Software Revision: 01.05
Manufacturer: PAX
Alias: Shower
Traceback (most recent call last):
File "cmdline.py", line 135, in
main()
File "cmdline.py", line 112, in main
print("Mode: ", fan.getMode())
File "/opt/src/pycalima/pycalima/Calima.py", line 177, in getMode
v = unpack('<H', self._readUUID(CHARACTERISTIC_MODE))
struct.error: unpack requires a bytes object of length 2
root@e-linux01:/opt/src/pycalima# python3 cmdline.py -m 58:2b:db:01:b0:3b -p 12234107
Device Name: PAX Calima
Model Number: 10
Serial Number: 0000000
Hardware Revision: 01.00
Firmware Revision: 01.02
Software Revision: 01.05
Manufacturer: PAX
Alias: Shower
Fan Speed Settings: Fanspeeds(Humidity=2200, Light=1000, Trickle=0)
Sensors Sensitivity: Sensitivity(HumidityOn=1, Humidity=3, LightOn=1, Light=1)
Light Sensor Settings: LightSensorSettings(DelayedStart=0, RunningTime=30)
Heat Distributor: HeatDistributorSettings(TemperatureLimit=25, FanSpeedBelow=0, FanSpeedAbove=2100)
Boost Mode: BoostMode(OnOff=0, Speed=900, Seconds=0)
Led: 0000
Automatic Cycles: 0
Time: Time(DayOfWeek=7, Hour=14, Minute=27, Second=33)
Silent Hours: SilentHours(On=0, StartingHour=22, StartingMinute=0, EndingHour=6, EndingMinute=0)
Trickle Days: TrickleDays(Weekdays=1, Weekends=1)
FanState(Humidity=31, Temp=21.0, Light=11, RPM=0, Mode='Trickle ventilation')
FanState(Humidity=31, Temp=21.0, Light=11, RPM=0, Mode='Trickle ventilation')`
It would be really cool if ESPHome could support this so we could use a <80SEK ESP32 to make the Calima really smart (and of course integrate directly to HomeAssistant).
I don't know if the recent patch changed how humidity was read or if I just hadn't noticed before but I get this from fan.getState() :
FanState(Humidity=216, Temp=26.5, Light=8, RPM=0, Mode='Trickle ventilation')
Obviously it cannot be the relative humidity. So wonder what it is ?
pi@raspberrypi:~ $ ./pax
[Calima] [W] 0x18 = 2ff7f600
[Calima] [R] 0x3 = 50617820426f7261
Device Name: Pax Bora
[Calima] [R] 0xd = 3130
Model Number: 10
[Calima] [R] 0xb = 3030303030303000
Serial Number: 0000000
[Calima] [R] 0xf = 30312e303000
Hardware Revision: 01.00
[Calima] [R] 0x11 = 30312e303200
Firmware Revision: 01.02
[Calima] [R] 0x13 = 30312e3035
Software Revision: 01.05
[Calima] [R] 0x15 = 504158
Manufacturer: PAX
[Calima] [R] 0x1c = 5476c3a474747374756761000000000000000000
Traceback (most recent call last):
File "/usr/local/bin/calima", line 10, in
load_entry_point('Calima==1.0', 'console_scripts', 'calima')()
File "/usr/local/lib/python3.4/dist-packages/pycalima/cmdline.py", line 67, in main
print("Alias: ", fan.getAlias())
File "/usr/local/lib/python3.4/dist-packages/pycalima/Calima.py", line 106, in getAlias
return self._readHandle(0x1c).decode('ascii')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2: ordinal not in range(128)
Hi, just bought two Pax Calima and found this. Gonna test it in a few hours.
However, reading the protocol manifest so far, I think the missing pieces might be related to the heat transfer feature. If you take the app, (on ios atleat) and reset the fan. Connect again, you get a series of questions to determine what ”mode” or ”profile” the fan is in. One is ”heat transfer”. Where you set a temperature where is starts. Manual says defailt is 25C (and off at 22C).
Bad part is that if it is in this mode, every other feature is disabled (sensors).
I bought them to ventilate a combined pool area and outdoor room, all completely glassed in. I want both the humidity sensor and heat transfer (cooling during summer).
I hope these scripts can solve my issues. Any ideas on this?
Edit: I forgot. I powered my fan using 12V after I couldnt find the heat transfer settings. Also switched from Android to IOS in an attempt to get what I wanted. Not until I hit ”reset device” and reconnected did I get the questions which switched to heat transfer mode. I dont know if 12V powering is a must. Ill test it :-)
/pycalima/Calima.py", line 172, in getState
return FanState(round(math.log2(v[0])*10, 2), v[1]/4, v[2], v[3], trigger)
ValueError: math domain error
Looks like a problem when v[0] = 0
Clone this repo and then user run.py script to set the basic settings for your Calima. They will be applied if Calima was power cycled. Afterwards it will just poll Calima and output the data. You can pipe it to your home autmation scripts or or cronjob it to a file.
I don't understand what this is referring to?
I managed to build my own invocation but what you are describing sounds like something useful... but where is it?
Temp sensor readings seem way off from actual?
The other sensor is about 1 meter away and is a cheap 433mhz sensor that is very consistent along with another Zwave sensor on the main floor.
The humidity sensor seems to be just a few procent off from other sensor and does not have a large impact.
Did you ever open up and check what exact sensor chip is in this fan?
Making a new post even though it is related to my "latency" issue #11
I reinstalled my Pi and then I simply could not get bluepy to work reliably again. I then found pygatt https://github.com/peplin/pygatt and decided to try it out. And the response time for retrieving the fan state is so much better, and so far rock solid:
Script used for the graph:
import pygatt
from struct import unpack, pack
import time
start_time = time.time()
adapter = pygatt.GATTToolBackend()
try:
adapter.start()
device = adapter.connect('58:2B:DB:01:D5:33', timeout=15)
value = device.char_read("528b80e8-c47a-4c0a-bdf1-916a7748f412")
finally:
adapter.stop()
v = unpack('<4HBHB', value)
print(v)
print(" %s seconds" % round((time.time() - start_time),3))
Edit: Took me a while to get the data types wrangled for the write function. If you know a shorter route from the human language inputs to the bytearray gatttool uses feel free to enlighten me.
import pygatt
from struct import pack
import time
import binascii
start_time = time.time()
adapter = pygatt.GATTToolBackend()
try:
adapter.start()
device = adapter.connect('58:2B:DB:01:D5:33', timeout=30)
# write pin
hex_string = "73C04000"
device.char_write_handle(0x18, bytearray.fromhex(hex_string), wait_for_response=True)
# and read pin confirmation uuid before control is possible.
device.char_read('d1ae6b70-ee12-4f6d-b166-d2063dcaffe1')
# set boost mode
hex_string = binascii.b2a_hex(pack('<BHH', 1, 2000, 30)).decode('utf-8')
device.char_write_handle(0x32, bytearray.fromhex(hex_string), wait_for_response=True)
finally:
adapter.stop()
print(" %s seconds" % round((time.time() - start_time),3))
Is anyone using this? Would like som guidance of how to make it work.
It looks like bluepy is outdated and isn't going anywhere. I guess that many users have Home assistant and bluepy wont work any longer since Home assistant uses Python 3.10. Can you change to bleak instead for better compatibility?
I was thinking, if anyone have not made it to create a simple integration / component towards your api using home assistant.
Since you are the code owner to the api and home assistant require to pull a github release, could you please just tag a release of the current api in https://github.com/PatrickE94/pycalima/releases that I could use (I can fork it yes, but better if the official api owner does it).
Hi it's me again.
So my setup right now is a RPI Zero W in the bathroom to control the PAX Calima. Then I have created three python scripts. One to just get the fan status values, one to turn on boostmode and one to turn off boostmode. So I have totally disabled the automatic programming of the fan. (I actually don't think it works very well either)
I have then installed Home Assistant on the PI Zero W and set up command_line sensor and switch to execute the python scripts and fetch the sensor values etc. (I then have a NUC running Debian and my main Home Assistant setup but thats not important here)
This is actually working pretty well. I can read the sensor value and control the fan by any intricate rules I set up using node-red flows.
I only have one thing I really wish could be improved and that is the latency when connecting to the fan. It takes around 10-15 seconds for the script to connect, execute a function and print the return value. Then I have to wait a few more seconds to be sure the connection has been terminated before I can attempt a new connection. I have tried running a script continuously to keep the connection active. But it was neither reliable nor practical. At least with my limited python skills.
So my question is. Is there any way to improve or otherwise get around this ?
Anyone knows or tried to reverse the direction of a spin of a motor either programmatically or electrically of pax calima?
Preferably programmatically since i don't think it is possible to easily rewire the electronics.
I tried to open the motor itself but could not do it.
Looking through the plastic casing I can see it is a brushless motor. If it is an AC motor then it should be possible to swith one of three power wires, but this is just a guess. The windings could be wired to the pcb and that makes the whole thing difficult.
Hi, this is not an issue with pycalima so feel free to ignore. I'm trying to create a similar interface for my Vent Axia Multivent extractor. The Pax Calima shares the same android app and from the app source code looks very similar.
My problem is that I'm trying to understand how the app pairs with the software. I can connect various tools to the fan and I can see some characteristics but I can't see a complete list. I believe that this is because I'm not correctly pairing these applications to the fan or there's another step required to retrieve all of the fan statistics.
So if anyone knows then I'd be really interested in how to find the pairing key for the fan, presuming it's similar to this, as it appears to be hard coded into the ventaxia app or something similar.
So far I've tried hcisnoop logs from an android but most packets seem to be truncated. I've tried bluez and some other tools on a raspberry pi and I've also tried nRF connect all of which return the same characteristics.
Any pointers would be fantastic.
Thanks
im getting an error trying to run your code.
sudo python3 cmdline.py -l
Running /usr/local/lib/python3.4/dist-packages/bluepy/bluepy-helper
Sent: le on
Got: 'rsp=$mgmt code=$success\n'
Sent: scan
Got: 'rsp=$mgmt code=$success\n'
Got: "rsp=$stat state=$scan dst='(null) mtu=h0 sec='low\n"
Got: 'rsp=$scan addr=b3F406149E717 type=h2 rssi=h20 flag=hFFFFFFFC d=b02011B0BFF4C000906030BC0A80146\n'
Discovered device 3f:40:61:49:e7:17
Got: 'rsp=$scan addr=bB8E8563E70E1 type=h1 rssi=h52 flag=h0 d=b02010607FF4C0010020B00\n'
Discovered device b8:e8:56:3e:70:e1
Got: 'rsp=$scan addr=b4AFFBD7C0B18 type=h2 rssi=h50 flag=h0 d=b02010613FF4C000C0E083BAB32603FB1F6A2B84993DF11\n'
Discovered device 4a:ff:bd:7c:0b:18
Got: 'rsp=$scan addr=b5032379AA68F type=h1 rssi=h20 flag=h0 d=b02011A07FF4C0010020104\n'
Discovered device 50:32:37:9a:a6:8f
Got: 'rsp=$scan addr=b531190DF6888 type=h2 rssi=h51 flag=hFFFFFFFC d=b03039FFE17169FFE02655A517072667876736E6300000166EB1C6BC109FFE000016CCA9F3A72\n'
Discovered device 53:11:90:df:68:88
Got: 'rsp=$scan addr=b5DDAEADA6F9B type=h2 rssi=h33 flag=h0 d=b02011A0AFF4C001005019815D1A8\n'
Discovered device 5d:da:ea:da:6f:9b
Got: 'rsp=$scan addr=b6EE8D41EC571 type=h2 rssi=h3D flag=h0 d=b02011A0AFF4C0010050A1C18D742\n'
Discovered device 6e:e8:d4:1e:c5:71
Got: 'rsp=$scan addr=b5032379AA68F type=h1 rssi=h2D flag=hFFFFFFFC\n'
Discovered device 50:32:37:9a:a6:8f
Got: 'rsp=$scan addr=bC47C8D6443BF type=h1 rssi=h3D flag=h0 d=b020106030295FE0F1695FE310298000EBF43648D7CC40D\n'
Discovered device c4:7c:8d:64:43:bf
Got: 'rsp=$scan addr=b0007801F41FF type=h1 rssi=h3B flag=h0 d=b020106110721314E93B59BC889564906E52F89C3FE\n'
Discovered device 00:07:80:1f:41:ff
Got: 'rsp=$scan addr=b4AFFBD7C0B18 type=h2 rssi=h3C flag=hFFFFFFFC\n'
Discovered device 4a:ff:bd:7c:0b:18
Got: 'rsp=$scan addr=bC47C8D6443BF type=h1 rssi=h4A flag=hFFFFFFFC d=b0C09466C6F7765722063617265\n'
Discovered device c4:7c:8d:64:43:bf
Got: 'rsp=$scan addr=b5DDAEADA6F9B type=h2 rssi=h40 flag=hFFFFFFFC\n'
Discovered device 5d:da:ea:da:6f:9b
Got: 'rsp=$scan addr=b0007801F41FF type=h1 rssi=h4B flag=hFFFFFFFC d=b0D09474C31353139303030343331\n'
Discovered device 00:07:80:1f:41:ff
Got: 'rsp=$scan addr=bC47C8D644387 type=h1 rssi=h51 flag=h0 d=b020106030295FE0F1695FE31029800CF8743648D7CC40D\n'
Discovered device c4:7c:8d:64:43:87
Got: 'rsp=$scan addr=b582BDB00AC42 type=h1 rssi=h50 flag=h0 d=b02010603030A1803190000020AFE0B095041582043616C696D61\n'
Discovered device 58:2b:db:00:ac:42
Got: 'rsp=$scan addr=bC47C8D6443D5 type=h1 rssi=h5B flag=h0 d=b020106030295FE0F1695FE31029800D6D543648D7CC40D0C09466C6F7765722063617265\n'
Discovered device c4:7c:8d:64:43:d5
Got: 'rsp=$scan addr=bC47C8D644387 type=h1 rssi=h60 flag=hFFFFFFFC d=b0C09466C6F7765722063617265\n'
Discovered device c4:7c:8d:64:43:87
Select timeout
Sent: scanend
Got: 'rsp=$mgmt code=$success\n'
Stopping /usr/local/lib/python3.4/dist-packages/bluepy/bluepy-helper
('58:2b:db:00:ac:42',)
sudo python3 run.py
Running /usr/local/lib/python3.4/dist-packages/bluepy/bluepy-helper
Sent: conn 58:2b:db:00:ac:42 public
Got: "rsp=$stat state=$tryconn dst='58:2b:db:00:ac:42 mtu=h0 sec='low\n"
Got: "rsp=$stat state=$disc mtu=h0 sec='low\n"
Stopping /usr/local/lib/python3.4/dist-packages/bluepy/bluepy-helper
Traceback (most recent call last):
File "run.py", line 27, in <module>
fan = Calima("58:2b:db:00:ac:42", "14130655")
File "/home/homeassistant/pycalima/pycalima/Calima.py", line 51, in __init__
self.conn = ble.Peripheral(deviceAddr=addr)
File "/usr/local/lib/python3.4/dist-packages/bluepy/btle.py", line 361, in __init__
self._connect(deviceAddr, addrType, iface)
File "/usr/local/lib/python3.4/dist-packages/bluepy/btle.py", line 411, in _connect
"Failed to connect to peripheral %s, addr type: %s" % (addr, addrType))
bluepy.btle.BTLEException: Failed to connect to peripheral 58:2b:db:00:ac:42, addr type: public
Exception ignored in: <bound method Calima.__del__ of <pycalima.Calima.Calima object at 0xb6aa5130>>
Traceback (most recent call last):
File "/home/homeassistant/pycalima/pycalima/Calima.py", line 55, in __del__
self.conn.disconnect()
AttributeError: 'Calima' object has no attribute 'conn'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.