hllhll / pyekonlib Goto Github PK
View Code? Open in Web Editor NEWPython library that implements Ekon HVAC Controllers server
License: MIT License
Python library that implements Ekon HVAC Controllers server
License: MIT License
com.airconet.plus.info.activity.AddDeviceActivity.lambda$search$1$AddDeviceActivity
Sends b'cast to 255.255.255.255:1025
with "Are You AirM2M IOT Smart Device?"
lambda$search$2$AddDeviceActivity
Listens on the same socket and recives back some data that is later parsed as AirConDevice
public static final Pattern SEARCH_PATTERN = Pattern.compile("^I'm\\s*(\\w+)\\.\\s*((\\p{XDigit}{2}:?){5}\\p{XDigit}{2})\\s*((\\d{1,3}\\.){3}\\d{1,3})")
...
private AirConDevice parse(String str) {
Matcher matcher = SEARCH_PATTERN.matcher(str);
if (!matcher.find()) {
return null;
}
String group = matcher.group(1); // Type?
String group2 = matcher.group(2); // Mac address
String group3 = matcher.group(4); // Private ip
if (group2 != null) {
return AirConDevice.create(group, group2.replaceAll(":", "").toUpperCase(), group3);
}
return null;
}
So, I've been playing around with these devices for some time.
As far as I understand,
Do let me know if I've skipped as step or missed something.
Thanks
(See topic)
Why: Unknown, yet,
Optional(bad) solution: To change it to cool and low with the turn off request,
But - what will happen when we would turn it on manually? would it go back the previous state or the cool+low?
Using the library or even curl request sometimes, doesn't work, from windows the library seem to work, but from my rpi, it doesn't. Curl doesn't at all...
However the request does work reliability from 'burpsuite' repeater.
One idea is that the device is using one recv() call for the entire request, so platforms that performs 2 send()s for the request may not work... Need to verify this theory.
Since automatic configuration is still TBD, maybe the author can add single line curl command to config device to new local server
Should the configuration example look like this:
POST /config?command=client HTTP/1.1
User-Agent: LuaSocket 2.0.2
Content-Length:
Content-Type: application/json; charset=utf-8
Host: <HVAC_unit_addr>
{"client_set":[{"ip":"<server_addr>","port":<server_udp_port>,"protocol":"UDP","local_port":80},{"protocol":"","ip":""},{"protocol":"","ip":""},{"protocol":"","ip":""}]}
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.