This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

BLE profiles
#1
Hi

I thought that I will share with you all the BLE profiles I collected up to know. If you have some other feel free to add them here. 
Have fun Smile


Attached Files
.lua   awox-aromalightcolor.lua (Size: 1.16 KB / Downloads: 25)
.lua   beewi-smartledcolorbulb.lua (Size: 7.11 KB / Downloads: 10)
.lua   mio-alpha-watch-pulse.lua (Size: 1.16 KB / Downloads: 9)
.lua   raiing-temperature.lua (Size: 937 bytes / Downloads: 11)
.lua   ti-sensortag.lua (Size: 3.01 KB / Downloads: 11)
.lua   universal.v1.lua (Size: 1.21 KB / Downloads: 14)
.lua   xiaomi-miband.lua (Size: 1.71 KB / Downloads: 11)
.lua   xiaomi-miband.v3.lua (Size: 1.93 KB / Downloads: 15)
.lua   xiaomi-miband2.v1.lua (Size: 2.47 KB / Downloads: 16)
Reply
#2
why these are not LUA
Reply
#3
(13.03.2019, 07:53)1114752670@qq.com Wrote: why these are not LUA

yes, they are
Reply
#4
Is there also a profile for: MIPOW Playbulb
https://www.mipow.com/collections/playbu...bulb-solar

Or how to make a profile?
Reply
#5
Creating profiles can range from very easy to virtually impossible Smile

BLE does not specify data exchange formats so each manufacturer can do whatever they like including custom authentication/encryption. There are mobile apps that can connect to BLE devices and show available services. Best case scenario that you can find color/brightness control service number and there's no special pairing procedure required. Have a look at awox-aromalightcolor.lua which is an RGB LED lamp with BLE.
Reply
#6
Im working on a BLE profile for the xiaome Mi Flora Flower care sensor, this is as far as i have got, i can read the data but not sure how to extract the data i want from the bytes, 
there is available,  light level, soil moisture level and temperature, the location of the data is as per the link below. 
https://www.open-homeautomation.com/2016...nt-sensor/


require('ble')
ble.up()
sock = ble.sock()
ble.settimeout(sock, 30)
res = ble.connect(sock, "80:EA:CA:88:E5:63")
log(res)

if res then

  cmd = 0xA0, 0x1F
  --0x03 -- name
  re, er =  ble.sockwritecmd(sock, 0x33, cmd) -- send the magic to allow us to read the data
  log(re, er)
 
  os.sleep(0.1)
 
  x = ble.sockreadhnd(sock,0x35) or '' 
a = x:byte(1)
b = x:byte(2)
c = x:byte(3)
d = x:byte(4)
e = x:byte(5)
f = x:byte(6)
g = x:byte(7)
h = x:byte(8)
 
log(x,a,b,c,d,e,f,g,h)
  
end
Reply
#7
Try this:
Code:
fertility = x:byte(9) * 0x100 + x:byte(10)
sunlight = x:byte(4) * 0x100 + x:byte(5)
temperature = (x:byte(1) * 0x100 + x:byte(2)) / 10

log(fertility, sunlight, temperature)
Reply


Forum Jump: