Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smart switch integration #33

Open
jodewee opened this issue Apr 5, 2022 · 2 comments
Open

Smart switch integration #33

jodewee opened this issue Apr 5, 2022 · 2 comments

Comments

@jodewee
Copy link

jodewee commented Apr 5, 2022

Hi, i have a device SF40PLF from elro, but it can't see the commands & state in the app.
{
"name": "schakelaar lamp",
"device_name": "schakelaar lamp",
"id": 8,
"type": "1200",
"state": "Unknown",
"battery": 255
}

Is there any way to integrate this one?
i've decompiled my elro app on my phone and attached it, maybe it can help?

Kind regards

ELRO_Connects_base_source_from_JADX.zip

@Skons
Copy link
Collaborator

Skons commented Apr 5, 2022

The current implementation only beholds in short a WindowSensor and AlarmSensor

CO_ALARM = "0000","1000","2000","0008","1008","2008","000E","100E","200E"

Your device is a socket:
https://github.com/Siterwell/familywell-lidl-android/blob/40cc44ce13d479af6e774365fde58ae72440b385/branch/lidl/app/src/main/java/me/hekr/sthome/tools/NameSolve.java#L39

The actions belonging to a socket are here
https://github.com/Siterwell/familywell-lidl-android/blob/6218fdd314a031c4745e71f101061065cc27bbfc/branch/lidl/app/src/main/res/values-it/arrays.xml#L29

And here is the implementation for handling a socket in the app
https://github.com/Siterwell/familywell-lidl-android/blob/6218fdd314a031c4745e71f101061065cc27bbfc/branch/lidl/app/src/main/java/me/hekr/sthome/equipment/detail/SocketDetailActivity.java

All that needs to be implemented as a class in the device.py file

@depuits
Copy link
Collaborator

depuits commented Apr 5, 2022

The HistoryDataHandler is also a good place to see the different states. There all device states are summed up in one file (or at least a whole bunch).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants