simple script to send notification on your phone on open door and more
This commit is contained in:
parent
e82d84d323
commit
bd3a476683
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
HCPBridge/.vscode
|
HCPBridge/.vscode
|
||||||
Investigation/bussniffer/tools/opendooralert/opendooralert.py.bak
|
Investigation/bussniffer/tools/opendooralert/opendooralert.py.bak
|
||||||
|
tools/opendooralert/opendooralert.py.bak
|
||||||
|
BIN
Hardware/ RS485 Converter/UART TTL to RS485.pdf
Normal file
BIN
Hardware/ RS485 Converter/UART TTL to RS485.pdf
Normal file
Binary file not shown.
BIN
Hardware/Relay Board/Board Connectors.PNG
Normal file
BIN
Hardware/Relay Board/Board Connectors.PNG
Normal file
Binary file not shown.
After Width: | Height: | Size: 142 KiB |
BIN
Hardware/Relay Board/komponenten.PNG
Normal file
BIN
Hardware/Relay Board/komponenten.PNG
Normal file
Binary file not shown.
After Width: | Height: | Size: 155 KiB |
BIN
Hardware/Relay Board/wifi_relay_sch.jpg
Normal file
BIN
Hardware/Relay Board/wifi_relay_sch.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 110 KiB |
BIN
Investigation/records/dump.zip
Normal file
BIN
Investigation/records/dump.zip
Normal file
Binary file not shown.
23
Investigation/tools/checkcrc.py
Normal file
23
Investigation/tools/checkcrc.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
def calc_crc(data):
|
||||||
|
crc = 0xFFFF
|
||||||
|
for pos in data:
|
||||||
|
crc ^= pos
|
||||||
|
for i in range(8):
|
||||||
|
if ((crc & 1) != 0):
|
||||||
|
crc >>= 1
|
||||||
|
crc ^= 0xA001
|
||||||
|
else:
|
||||||
|
crc >>= 1
|
||||||
|
return crc
|
||||||
|
|
||||||
|
def checkLine(l):
|
||||||
|
data = bytearray.fromhex(l)
|
||||||
|
crc = calc_crc(data[:len(data)-2])
|
||||||
|
return str(crc == int.from_bytes(data[-2:],byteorder='little', signed=False))
|
||||||
|
#return "%04X %04X"%(crc,int.from_bytes(data[-2:],byteorder='little', signed=False))
|
||||||
|
|
||||||
|
|
||||||
|
with open("scan.txt") as f:
|
||||||
|
for line in f:
|
||||||
|
if len(line.strip()) > 0:
|
||||||
|
print(line.strip() + "\t" + checkLine(line.strip()))
|
15
Investigation/tools/print.py
Normal file
15
Investigation/tools/print.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
f=open("dump2.bin","rb")
|
||||||
|
def DataToHex(data):
|
||||||
|
res = ""
|
||||||
|
for c in data:
|
||||||
|
res+=("%02X " % c)
|
||||||
|
return res
|
||||||
|
|
||||||
|
while True:
|
||||||
|
len = ord(f.read(1))
|
||||||
|
timestamp1 = f.read(2)
|
||||||
|
timestamp2 = f.read(2)
|
||||||
|
data = f.read(len)
|
||||||
|
print("%d:%d:%04X: %s" % (timestamp1[0]<<8|timestamp1[1],timestamp2[0]<<8|timestamp2[1], len,DataToHex(data)))
|
||||||
|
|
||||||
|
f.close()
|
Loading…
Reference in New Issue
Block a user