thebazeman / a-ok-am43-blinds-drive Goto Github PK
View Code? Open in Web Editor NEWPython A-OK AM43 Blinds Drive BTLE control
Python A-OK AM43 Blinds Drive BTLE control
This is amazing! I managed to hack a nodejs script together last year to open and close, but I could never get status working...the stuff I got back from the device bluetooth sniffing just looked like gibberish to me for status values. Great work here, thank you!
I hope one day it can be integrated into HomeAssistant.
What’s the best way to get the MAC address of the devices?
Hi,
Thanks for your work. I'm trying to get this up and running but I keep getting the following error:
sudo python /home/pi/domoticz/scripts/python/AOK-AM43.py
File "/home/pi/domoticz/scripts/python/AOK-AM43.py", line 57
print("ERROR: Cannot find ini file: " + inifilepath + "! Correct the path in this script or put the ini file in the correct directory. Exiting", flush=True)
^
SyntaxError: invalid syntax
The ini file it there for sure so probably there is something else wrong but can't figure out what.
Hi, up to now the script has always worked correctly, until I decided to update my rasperry and since then the status check does not work anymore and I get this error
Oct 28 17:34:13 raspberrypi python3[2242]: File "/home/pi/A-OK_AM43_Blind_Drive/AOK-AM43.py", line 103, in write_message Oct 28 17:34:13 raspberrypi python3[2242]: if (dev.waitForNotifications(10): Oct 28 17:34:13 raspberrypi python3[2242]: File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 560, in waitForNotifications Oct 28 17:34:13 raspberrypi python3[2242]: resp = self._getResp(['ntfy','ind'], timeout) Oct 28 17:34:13 raspberrypi python3[2242]: File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 407, in _getResp Oct 28 17:34:13 raspberrypi python3[2242]: resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout) Oct 28 17:34:13 raspberrypi python3[2242]: File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 362, in _waitResp Oct 28 17:34:13 raspberrypi python3[2242]: raise BTLEDisconnectError("Device disconnected", resp) Oct 28 17:34:13 raspberrypi python3[2242]: bluepy.btle.BTLEDisconnectError: Device disconnected Oct 28 17:34:13 raspberrypi python3[2242]: 192.168.1.5 - - [28/Oct/2020 17:34:13] "GET /AM43BlindsAction/CheckStatus HTTP/1.1" 500 -
It looks like an error generated by bluepy maybe it has updated to the latest version? Strange why the other open and close functions all work perfectly thanks for the help in advance
Hello so following your work and to say the least is fantastic, added with the addition of the percentage and the state.
I wanted to know if there is the possibility to integrate it in Domoticz, I am trying to create a lua script in the meantime but I am waiting for the release with the MQTT version.
Every time I run the script it refuses to find the ini - whether or not I specify the whole path in the script or change it to the path that is originally in the script. Any ideas?
File "AOK-AM43.py", line 55
print("ERROR: Cannot find ini file: " + inifilepath + "! Correct the path in this script or put the ini file in the correct directory. Exiting", flush=True)
SyntaxError: invalid syntax
^
EDIT:
You need ot be using python3
I am not conversant with Python 3 ins and outs and have followed the submissions related to the error attributed to using Python 2 instead of Python 3.
I am using Python 3.7.3 (default, Jul 25 2020, 13:03:44) on a raspberry Pi 3.
My files are located as follows," pi@raspberrypi:~ $ ls
A-OK_AM43_Blind_Drive Desktop Downloads Pictures Templates
Bookshelf Documents Music Public Videos"
The files are, pi@raspberrypi:~/A-OK_AM43_Blind_Drive $ ls
AOK-AM43.ini AOK-AM43.py README.md
I am getting the error message from Python exactly as listed in the Read.Me file, "ERROR: Cannot find ini file: A-OK_AM43_Blind_Drive/AOK-AM43.ini! Correct the path in this script or put the ini file in the correct directory. Exiting."
I do not see help in the discussions in the previous issues.
Can someone help, I hope I have provided enough information.
Hi I ran the guide as written in the readme file, I created the service and the web service but it cannot connect via Bluetooth! Where I am wrong I also entered the mac address in the ini file! can you help me thanks
fix:
change
LightPct = data[3]
to
LightPct = data[4]
in AOK-AM43.py
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.