Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Has anybody done anything with Sensibo Sky?
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Has anybody done anything with Sensibo Sky?
ok cool next test
- Attachments
-
- test.py
- (13.44 KiB) Downloaded 60 times
Re: Has anybody done anything with Sensibo Sky?
Code: Select all
False
23
None
None
None
None
Varmepumpe ovenpÔö£├æ
Traceback (most recent call last):
File "py.py", line 29, in <module>
File "D:\test.py", line 413, in <module>
dev = getattr(client, device_name)
File "D:\test.py", line 367, in __getattr__
devices = self.devices
File "D:\test.py", line 355, in devices
device_name = device['room']['name'].decode('utf-8')
File "encodings\utf_8.pyc", line 16, in decode
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5' in position 16:
ordinal not in range(128)- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Has anybody done anything with Sensibo Sky?
told ya this is a process dealing with unicode.
here is another.
here is another.
- Attachments
-
- test.py
- (13.44 KiB) Downloaded 67 times
Re: Has anybody done anything with Sensibo Sky?
I'm not complaining! I'm only afraid you'll get tired of messing with this!
Code: Select all
False
23
None
None
None
None
Traceback (most recent call last):
File "py.py", line 29, in <module>
File "D:\test.py", line 407, in <module>
device_name = args.device_name.decode('utf-8')
File "encodings\utf_8.pyc", line 16, in decode
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe5 in position 16: unexpected end of dataRe: Has anybody done anything with Sensibo Sky?
And maybe you did get tired?
Or will there be a plug-in from this at some point? Please?
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Has anybody done anything with Sensibo Sky?
I haven't had the chance to try and get past the utf8 issue. Give me a few hours and I will poke about it a bit more to see what i can come up with.
Re: Has anybody done anything with Sensibo Sky?
Sure! Thanks!
If it's impossible, I may have to rename. I would really like to avoid it, but if I have to, I have to.
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Has anybody done anything with Sensibo Sky?
Sorry I was more then a couple of hours. But give this one a shot and see what happens.
- Attachments
-
- test.py
- (13.24 KiB) Downloaded 61 times
Re: Has anybody done anything with Sensibo Sky?
List devices still works:
but unfortunately there are two wrong ways, with and without quotes:
I think the easiest way is to let you have the API Key, don't you? I will plug out the unit itself, and then you can experiment all you want without messing with the heat in the house (it's empty this week because it's a school holiday for the high school girls who lives there). The API keys can be revoked, so it shouldn't be a problem.
Later today I'll go up and rip out the plug, and then I'll PM you the key.
Code: Select all
D:\>"c:\program files (x86)\eventghost\py" test.py API KEY --list-devices
API KEY
True
None
None
None
None
None
---------- devices ----------
Varmepumpe ovenpå
-----------------------------Code: Select all
D:\>"c:\program files (x86)\eventghost\py" test.py API KEY --device-name Varmepumpe ovenpå --set-power off
usage: test.py [-h] [--list-devices] [--device-name DEVICE_NAME]
[--set-temp SET_TEMP] [--set-swing SET_SWING]
[--set-power SET_POWER] [--set-mode SET_MODE]
[--set-fan SET_FAN]
api_key
test.py: error: unrecognized arguments: ovenpÕCode: Select all
D:\>"c:\program files (x86)\eventghost\py" test.py API KEY --device-name "Varmepumpe ovenpå" --set-power off
API KEY
False
None
None
off
None
None
Traceback (most recent call last):
File "py.py", line 29, in <module>
File "D:\test.py", line 402, in <module>
device_name = args.device_name.decode('utf-8')
File "encodings\utf_8.pyc", line 16, in decode
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe5 in position 16: unexpected end of data
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Has anybody done anything with Sensibo Sky?
OK good sir...
Here goes once again... I am almost 100% sure I have the issue sorted with the unicode names.
If you supply the api key and the device name only it will give you a nice tidy printout of the device. be sure to surround the device name in double quotes
if you supply the api key, device name and any other parameter it will not give the printout it will just carry out the command.
This is almost done as a plugin I simply need to know if changing the settings works.
Here goes once again... I am almost 100% sure I have the issue sorted with the unicode names.
If you supply the api key and the device name only it will give you a nice tidy printout of the device. be sure to surround the device name in double quotes
if you supply the api key, device name and any other parameter it will not give the printout it will just carry out the command.
This is almost done as a plugin I simply need to know if changing the settings works.
- Attachments
-
- test.py
- (17.05 KiB) Downloaded 63 times
Re: Has anybody done anything with Sensibo Sky?
Code: Select all
"c:\program files (x86)\eventghost\py" test.py API KEY --device-name "Varmepumpe ovenpå"
Traceback (most recent call last):
File "py.py", line 29, in <module>
File "D:\test.py", line 484, in <module>
device_name = args.device_name.decode('utf-8')
File "encodings\utf_8.pyc", line 16, in decode
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe5 in position 16: unexpected end of data- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Has anybody done anything with Sensibo Sky?
it's not with the version of EG..
It has to do with how the device name gets passed into my program and how it is getting handled by the BOM/encoding line on the file when i set it as a literal.
Unicode crap is always a pain
Try this one.
It has to do with how the device name gets passed into my program and how it is getting handled by the BOM/encoding line on the file when i set it as a literal.
Unicode crap is always a pain
Try this one.
- Attachments
-
- test.py
- (17.21 KiB) Downloaded 62 times
Re: Has anybody done anything with Sensibo Sky?
You, sir, have just won the Olympic medal in Unicode!
At least for the info part!
Setting the temp gave me errors, bvut I'm assuming that's something I did wrong. Or is it?
Code: Select all
D:\>"c:\program files (x86)\eventghost\py" test.py MY API KEY --device-name "Varmepumpe ovenpå"
Device Model: skyv2
Device Name: Varmepumpe ovenpå
Device UID:
Device Firmware Version: IN010051
Device Battery Voltage: None
Device Power: False
Device Temp: 22.8
Device Humidity: 30.1
Set Mode: heat
Set Temp: 22 C
Set Fan Level: auto
Set Swing Mode: rangeFull
Supported Modes:
dry
Supported Swing Modes:
stopped
rangeFull
Supported Temp Units:
C
F
Supported Temps:
C:
isNative: True
values: [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
F:
isNative: False
values: [63, 64, 66, 68, 70, 72, 73, 75, 77, 79, 81, 82, 84, 86
Supported Fan Levels: None
auto
Supported Swing Modes:
stopped
rangeFull
Supported Temp Units:
C
F
Supported Temps:
C:
isNative: True
values: [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
F:
isNative: False
values: [63, 64, 66, 68, 70, 72, 73, 75, 77, 79, 81, 82, 84, 86
Supported Fan Levels:
low
medium_low
medium
medium_high
high
auto
heat
Supported Swing Modes:
stopped
rangeFull
Supported Temp Units:
C
F
Supported Temps:
C:
isNative: True
values: [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
F:
isNative: False
values: [63, 64, 66, 68, 70, 72, 73, 75, 77, 79, 81, 82, 84, 86
Supported Fan Levels:
low
medium_low
medium
medium_high
high
auto
fan
Supported Swing Modes:
stopped
rangeFull
Supported Temp Units:
Supported Temps:
Supported Fan Levels:
low
medium_low
medium
medium_high
high
auto
cool
Supported Swing Modes:
stopped
rangeFull
Supported Temp Units:
C
F
Supported Temps:
C:
isNative: True
values: [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
F:
isNative: False
values: [63, 64, 66, 68, 70, 72, 73, 75, 77, 79, 81, 82, 84, 86
Supported Fan Levels:
low
medium_low
medium
medium_high
high
auto
Code: Select all
D:\>"c:\program files (x86)\eventghost\py" test.py MY API KEY --device-name "Varmepumpe ovenpå" --set-temp 23
Traceback (most recent call last):
File "py.py", line 29, in <module>
File "D:\test.py", line 577, in <module>
dev.mode.temp = args.set_temp
File "D:\test.py", line 107, in temp
self._pod.set_state(targetTemperature=value)
File "D:\test.py", line 377, in set_state
self._post('acStates', json.dumps(state), fields="acState")
File "D:\test.py", line 325, in _post
response.raise_for_status()
File "c:\program files (x86)\eventghost\lib27\site-packages\requests\models.py
", line 844, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://home.sensibo.com/api/v2/pods/MY DEVICE ID/acStates?fields=acState&apiKey=MY API KEY- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Has anybody done anything with Sensibo Sky?
Ok sweet deal. First hurdle done. I will add some additional debugging for the set temp. But try setting the mode and see if that works. The setting of the temp could be something really dumb and if the mode works then I know the temp is that dumb thing.
Re: Has anybody done anything with Sensibo Sky?
Actually I tried with set power too. Same result. 
