-
Notifications
You must be signed in to change notification settings - Fork 6
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
working in Germany? #14
Comments
Seems to be that in the European region, they are not offering the ability to login to Schluter's website so we may not be able to use this.. |
@rajp1503. Is there another URL they offer in Europe? I am in the US and might not be able to test agains it but I would be interested in giving it a try |
Well, question: How I can change the login url in [ha-schluter] thx edit: ahh I see, it is based on py-schluter. this does not work |
@IngoS11 Do you have an idea what we can do to solve this and intigrate our Ditra Heat divices at HomeAssistant? |
@SpaceTeddy : I base ha-schlueter on a async library aioschluter that I wrote. The URL is hardcoded at. Here in the US you can log into that website and see your thermostats and also control the thermostat via more or less REST based calls. There is no official API documentation but basically only what I reverse engineered from the original Schluter Integration. |
@ottosax: Thank you so much for the information. Here in the US you find an app called "Schluter-DIETRA-HEAT-E-Wifi" in the iOS App Store as well as the Google Play Store. Looks like Schluter has implemented different systems (Apps as well as Backends) for the US and the European market. Looking through the Google Play Store I also see here in the US Google Play Store this app https://play.google.com/store/apps/details?id=com.ojelectronics.owd5.sl003&hl=en_US&gl=US. Is that the app you use in Europe? I downloaded it onto an Android Device and I can not log on with my credentials. |
Hello Ingo, Thank you for your commitment. I couldn't find another URL either :\ |
Hi, |
Okay, sorry I missed that. But there is still no way to integrate it into Home Assistant in Europe with what is available? |
@faPU1909. There is no way to integrate that on my end. It would require somebody with a European Schluter heating unit and access to 240V power to run it and the ability to create a user that can access that URL to basically reverse engineer the API and add the integration. If we find somebody that is able to do that and he opens a pull request to my repo I am more than happy to accept that. When I followed that URLs domain I found a controller on Amazon from that company OJ Microline Programmable Dual Voltage Touch Screen that looks exactly like the one I have from Shluter. |
Its possible - Iam from germany and use for my Schluter bath heater this app with Home Assistant: OJ Microline Thermostat as integration. Works well, because, the Schluter system controler is the same as the one from OJ Microelektronics. |
I can confirm that the OJ Microline integration works fine with the German Schlüter App. |
Does any schluter integration have energy messurement? The app - yes, but the app is a grap. |
well, ###----------get energy week data
def get_energy_data(viewtype, history):
#ViewType: 1= day 2= week 3= week 4= month
#History: How many of Viewtype in the past
#read session_id from cache file
session_id = get_session_id_from_file()
#get current date and time
dt_thermostat_string = now.strftime("%Y-%m-%dT%H:%M:%S")
#get number of weekday
weekday = datetime.today().weekday()
url = "https://owd5-sl003-app.ojelectronics.com/api/EnergyUsage/GetEnergyUsage?sessionid=%s" %(session_id)
headers = CaseInsensitiveDict()
headers["Content-Type"] = "application/json; charset=utf-8"
data = {
"APIKEY": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"DateTime": dt_thermostat_string,
"History": history,
"ThermostatID": "xxxxxx",
"ViewType": viewtype
}
resp = requests.post(url, headers=headers, json=data)
resp_code = resp.status_code
if resp_code == 200:
#print("%s 3: %s HTTP POST Success - Response Code: %s" %(dt_string, application_name, resp.status_code))
response_dict = json.loads(resp.text)
else:
if resp_code == 401:
print("%s 3: %s HTTP POST Unauthorized - Log in first" %(dt_string, application_name))
resp_code, session_id = get_session_id()
url = "https://owd5-sl003-app.ojelectronics.com/api/EnergyUsage/GetEnergyUsage?sessionid=%s" %(session_id)
resp = requests.post(url, headers=headers, json=data)
resp_code = resp.status_code
if resp_code != 200:
print("%s 3: %s HTTP POST Error - Response Code: %s" %(dt_string, application_name, resp.status_code))
response_dict = 0
elif resp_code == 200:
response_dict = json.loads(resp.text)
if args.verbose:
print("%s 3: %s HTTP POST Success - Response Code: %s" %(dt_string, application_name, resp.status_code))
print("%s 3: %s : %s" %(dt_string, application_name, json.dumps(response_dict, indent=4, sort_keys=True)))
if viewtype == '2' and history == '0':
print(response_dict['EnergyUsage'][0]['Usage'][weekday]['EnergyKWattHour'])
return resp_code, response_dict |
The problem is the session-id, how do yout get it from german Schlüter integration or Android app eg? |
well, really easy. ###---- Log in to OJ Electronics cloud server ------
def get_session_id():
url = "https://owd5-sl003-app.ojelectronics.com/api/UserProfile/SignIn"
headers = CaseInsensitiveDict()
headers["Content-Type"] = "application/json; charset=utf-8"
data = {
"APIKEY": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
"ClientSWVersion": 1,
"CustomerId": 3,
"Password": "xxxxxxxxxxx",
"UserName": "xxxxxxxxxxx"
}
resp = requests.post(url, headers=headers, json=data)
resp_code = resp.status_code
#print(resp.status_code)
if resp_code == 200:
pass #dummy
#print("%s 3: %s Success - Response Code: %s" %(dt_string, application_name, resp.status_code))
else:
pass #dummy
#print("%s 3: %s Error - Response Code: %s" %(dt_string, application_name, resp.status_code))
response_dict = json.loads(resp.text)
session_id = response_dict.get('SessionId')
#print("%s 3: %s Session_ID: %s" %(dt_string, application_name, session_id))
with open('./session_id.txt', 'w') as f:
f.write(session_id)
return resp_code, session_id` |
Sorry for being ignorant but how do I find my APIKEY? |
Well, guess I traced the key with a tool like mitmproxy. But probably also this key works |
I have a Ditra Heat E running at home.
In the installation process, an account was also created. However, I cannot log in to the website (https://ditra-heat-e-wifi.schluter.com/) with it. User does not exist. I cannot create an account there either.
What am I doing wrong? Or does it not work for customers from Germany? I would very much like to integrate it into Home Assistant.
The text was updated successfully, but these errors were encountered: