K02 WIFI USB with NetHome app

Dear Yiannis,

no update jet, didn’t had the time to debug the issue :frowning:
thanks
Thomas

I could install the script and setup my OH items and Sitemap.
The script reads the values from the cloud as soon as i start the script.
But when I try to start or change the temperature from Openhab, nothing happens.
The app and the Alexa skill works.
Or is there any general issue with the script?

In the script log, it looks like this when I try to change a value in OpenHab:

2020-04-19 15:00:40,328 API call appliance/transparent/send: {'src': 17, 'stamp': '20200419150040', 'format': 2, 'language': 'en_US', 'funId': '0000', 'order': '200e769ae9611998b9e3b06e2994538bd3786ba800c82937802f2abebdb4981650adc4c596dd265ec5ed3583e2cccecb0125f7d59317cc99a103228bacd9e50a67b3afb83ca3540d6f380af99cff77f8eab3e459aadfc36762a4cecac6918c48c8e304e37d0a0fba2203689e48d972efe2fedfb00b879225009fb5392d44990329a1617d0df338747912b0b83774722781165423bce1c8ff58cf012441768fac42ba58ed01ceec6681e2a6e500c66f0b61036c7ac1f40a9fbcd9cd5a5dbc75633d00abd872516b8d25566802aefea3a9', 'clientType': 1, 'sign': 'ed3eab77cfaadf80aef37a8712dad5632740ae022844d919fa0622576191f270', 'appId': 1017, 'applianceId': '13791209311979', 'sessionId': 'b863f3a9c8784fb8a41843580b6974ad20200419125905629'}
2020-04-19 15:00:40,857 Received from 13791209311979: 5a5a01005b002080000000000000000000000000eb2e000000120000000000000000000000000000aa22ac00000000000302c000a1660000003000000063ff000000000000000000031ab700000000000000000000000000000000
2020-04-19 15:00:40,858 Appliance response data: c000a1660000003000000063ff000000000000000000031ab700000000000000000000000000000000
2020-04-19 15:00:40,859 Push to Midea KlimaSchlafzimmer: power_state = ON
2020-04-19 15:00:40,861 Sending to 13791209311979: 5a5a01115700200000000000000000000e031214c679000000050a00000000000000000002000000aa1eac000000000003024081b16603ff00300000000000000000000003bb6900000000000000000000000000000000
2020-04-19 15:00:40,866 API call appliance/transparent/send: {'src': 17, 'stamp': '20200419150040', 'format': 2, 'language': 'en_US', 'funId': '0000', 'order': '200e769ae9611998b9e3b06e2994538bd3786ba800c82937802f2abebdb4981650adc4c596dd265ec5ed3583e2cccecb0125f7d59317cc99a103228bacd9e50a67b3afb83ca3540d6f380af99cff77f8eab3e459aadfc36762a4cecac6918c48c8e304e37d0a0fba2203689e48d972ef89bb52337c8fbf4d91b7cd51d4717517284b09f3cf866ca11ae5eed7d5282e3f61036c7ac1f40a9fbcd9cd5a5dbc756360e9e326736e0ba6876c8c125c5e77fe61036c7ac1f40a9fbcd9cd5a5dbc756374fadadf49f9d105fec0a1f0556b54b1', 'clientType': 1, 'sign': '6af7a9addae8701c7f59851e8ab627612e5fa3ac68a2152a5c1fcfb697c48adb', 'appId': 1017, 'applianceId': '13791209311979', 'sessionId': 'b863f3a9c8784fb8a41843580b6974ad20200419125905629'}
2020-04-19 15:00:42,093 Received from 13791209311979: 5a5a01005b002080000000000000000000000000eb2e000000120000000000000000000000000000aa22ac00000000000302c000a1660000003000000063ff000000000000000000031ab700000000000000000000000000000000
2020-04-19 15:00:42,094 Appliance response data: c000a1660000003000000063ff000000000000000000031ab700000000000000000000000000000000

Be sure to have all your indoor units online!

I had a simular error below.
Reason? 1 of 4 indoor units was offline. After re-plugging the USB stick in the indoor unit, and verifying this in the midea app, everything was back OK…

2020-04-20 17:09:42,136 Error ignored: '3176' - 'The asyn reply does not exist '
2020-04-20 17:09:42,136 Retrying API call: 'appliance/transparent/send' Exception: RecursionError()
2020-04-20 17:09:42,136 Failure in main loop 
Traceback (most recent call last):
  File "/etc/openhab2/scripts/midea/main.py", line 335, in main_loop midea_to_openhab()
  File "/etc/openhab2/scripts/midea/main.py", line 280, in midea_to_openhab device.refresh()
  File "/etc/openhab2/scripts/midea/midea/device.py", line 145, in refresh data = self._cloud_service.appliance_transparent_send(self.id, data)
  File "/etc/openhab2/scripts/midea/midea/cloud.py", line 179, in appliance_transparent_send 'applianceId': id
  File "/etc/openhab2/scripts/midea/midea/cloud.py", line 93, in api_request return self.api_request(endpoint, args)
  File "/etc/openhab2/scripts/midea/midea/cloud.py", line 93, in api_request return self.api_request(endpoint, args)
  File "/etc/openhab2/scripts/midea/midea/cloud.py", line 95, in api_request raise RecursionError()
RecursionError

Hi Ben, I have no errors, everything is online. The data sent from the device is correct. I can just not send any change to the device using the script in OH.
Perhaps anyone one can check the response string from the cloud. What does it say?

Sorry, was responding on an earlier remark. :blush:

You need to wait the ‘refresh’ time I think. In my case, when I send a command (fe ON), it takes some seconds.

What is your config file? Do you have the OpenHAB poll frequence (see last line)? Not sure if that was in the example file. My settings.py looks like:

APPKEY = 'KEY'
EMAIL = 'APP_LOGIN'
PASSWORD = 'APP_PWD'
AIRCONS = ('Ouderkamer','Kinderkamer','Leefruimte','Keuken')
OH_URL = 'http://YOURSERVERLINK:8080'
MIDEA_POLL_FREQ_SECS = 900
OPENHAB_POLL_FREQ_SECS = 15

Hi Ben,
I have the same settings. And in my log I see, that the change has been triggered after some seconds.
I am confused, that there is also a response from the appliance, but I cannot interpret it.

Appliance response data: c000a1660000003000000063ff000000000000000000031ab700000000000000000000000000000000

Looks normal to me.
Hereby an output of an ON and OFF command.

2020-04-23 14:33:57,099 Sending to 16492674453761: 5a01511700200000000000000000000e031412c679000000050a00000000000000000002000000aa1eac00000000000302408100ff03ff00300000000000000000000003bb8100000000000000000000000000000000
2020-04-23 14:33:57,100 API call appliance/transparent/send: {'appId': 1017, 'format': 2, 'clientType': 1, 'language': 'en_US', 'src': 17, 'stamp': '20200423143357', 'order': 'a6488e4f7e05b5df9fa3d447068212c7090665a8ee895f9a8858de760f0ea16a3a26f36883d39d2f50b504ff8ca61801c0658e78b4db656e021c9602ee331549717711675894fc041c64f618343908283d30e690119e7edfde85f0860b12487930faed46bcff840fe36bd40fae597db3c3cf6036a5e3b1b86ede092b6eee3c9c701f50bda60354785cfaaf2e9c5f2b152c5a978af5de2afb7f4cd51af1689bfa7eac34a388a21d690227a21aad45f77dc6650141f3ea8a024ee3b509e64cc5d12a6e1f5b5735afdaa77a685c408703', 'funId': '0000', 'applianceId': '16492674453761', 'sessionId': '30026f9718e84c9d9172c39d9abb94d220200423123336322', 'sign': '60321e2d36d0534572ae9571c7881bd52e2f2df614e3074f7c6cc0dcaa515300'}
2020-04-23 14:33:58,203 Received from 16492674453761: 5a01005b002080000000000000000000000000b14a0000000f0000000000000000000001000000aa22ac00000000000302c00027667f0f703c000000628400000000000000000098fc2c00000000000000000000000000000000
2020-04-23 14:33:58,204 Appliance response data: c00027667f0f703c000000628400000000000000000098fc2c00000000000000000000000000000000
2020-04-23 14:33:58,204 Push to Midea Ouderkamer: power_state = ON
2020-04-23 14:33:58,204 Sending to 16492674453761: 5a01511700200000000000000000000e031412c679000000050a00000000000000000002000000aa1eac000000000003024081376603ff003c0000000000000000000003504200000000000000000000000000000000
2020-04-23 14:33:58,205 API call appliance/transparent/send: {'appId': 1017, 'format': 2, 'clientType': 1, 'language': 'en_US', 'src': 17, 'stamp': '20200423143358', 'order': 'a6488e4f7e05b5df9fa3d447068212c7090665a8ee895f9a8858de760f0ea16a3a26f36883d39d2f50b504ff8ca61801c0658e78b4db656e021c9602ee331549717711675894fc041c64f618343908283d30e690119e7edfde85f0860b12487930faed46bcff840fe36bd40fae597d6d3a3cc3a7b4ec5c7d55248b8f2a74a8cc362a28ab15eaf02096d96c3e146bd815c25a978af5de2afb7f4cd51af1689bd965a188ce2b455eace47ca20d390fe511c25a978af5de2afb7f4cd51af1689bd0a2c437c7da4cede42dd3442bb78a2c', 'funId': '0000', 'applianceId': '16492674453761', 'sessionId': '30026f9718e84c9d9172c39d9abb94d220200423123336322', 'sign': '8dfe6ca4954d2947ed90b78d97b1fa006f988b5f9322b03d3c0394700ff44f54'}
2020-04-23 14:33:59,324 Received from 16492674453761: 5a01005b002080000000000000000000000000b14a0000000f0000000000000000000001000000aa22ac00000000000302c00137667f0f703c00000062840000000000000000009855c200000000000000000000000000000000
2020-04-23 14:33:59,324 Appliance response data: c00137667f0f703c00000062840000000000000000009855c200000000000000000000000000000000

2020-04-23 14:35:14,870 Sending to 16492674453761: 5a01511700200000000000000000000e031412c679000000050a00000000000000000002000000aa1eac00000000000302408100ff03ff00300000000000000000000003bb8100000000000000000000000000000000
2020-04-23 14:35:14,871 API call appliance/transparent/send: {'appId': 1017, 'format': 2, 'clientType': 1, 'language': 'en_US', 'src': 17, 'stamp': '20200423143514', 'order': 'a6488e4f7e05b5df9fa3d447068212c7090665a8ee895f9a8858de760f0ea16a3a26f36883d39d2f50b504ff8ca61801c0658e78b4db656e021c9602ee331549717711675894fc041c64f618343908283d30e690119e7edfde85f0860b12487930faed46bcff840fe36bd40fae597db3c3cf6036a5e3b1b86ede092b6eee3c9c701f50bda60354785cfaaf2e9c5f2b152c5a978af5de2afb7f4cd51af1689bfa7eac34a388a21d690227a21aad45f77dc6650141f3ea8a024ee3b509e64cc5d12a6e1f5b5735afdaa77a685c408703', 'funId': '0000', 'applianceId': '16492674453761', 'sessionId': '30026f9718e84c9d9172c39d9abb94d220200423123336322', 'sign': '839d5de9835b7b4d3dd601e5f8e826558731e4f36ce97478e8441770c37268a8'}
2020-04-23 14:35:15,975 Received from 16492674453761: 5a5a01005b002080000000000000000000000000b14a0000000f0000000000000000000001000000aa22ac00000000000302c00137667f0f703c000000682800000000000000000098d43f00000000000000000000000000000000
2020-04-23 14:35:15,975 Appliance response data: c00137667f0f703c000000682800000000000000000098d43f00000000000000000000000000000000
2020-04-23 14:35:15,976 Push to Midea Ouderkamer: power_state = OFF
2020-04-23 14:35:15,976 Sending to 16492674453761: 5a5a01511700200000000000000000000e031412c679000000050a00000000000000000002000000aa1eac000000000003024080376603ff003c0000000000000000000003504300000000000000000000000000000000
2020-04-23 14:35:15,976 API call appliance/transparent/send: {'appId': 1017, 'format': 2, 'clientType': 1, 'language': 'en_US', 'src': 17, 'stamp': '20200423143515', 'order': '2aa6488e4f7e05b5df9fa3d447068212c7090665a8ee895f9a8858de760f0ea16a3a26f36883d39d2f50b504ff8ca61801c0658e78b4db656e021c9602ee331549717711675894fc041c64f618343908283d30e690119e7edfde85f0860b12487930faed46bcff840fe36bd40fae597ddfc819c8a5640a9c0798cb126841f2bdcc362a28ab15eaf02096d96c3e146bd815c25a978af5de2afb7f4cd51af1689b5807513cca77398bf1b9a1b4065a588915c25a978af5de2afb7f4cd51af1689bd0a2c437c7da4cede42dd3442bb78a2c', 'funId': '0000', 'applianceId': '16492674453761', 'sessionId': '30026f9718e84c9d9172c39d9abb94d220200423123336322', 'sign': '26d0e50396c3f2bcef0f5e8f820218f627b87de1b538fff7da970863641c93a9'}
2020-04-23 14:35:17,102 Received from 16492674453761: 5a5a01005b002080000000000000000000000000b14a0000000f0000000000000000000001000000aa22ac00000000000302c00037667f0f703c00000068280000000000000000009843d100000000000000000000000000000000
2020-04-23 14:35:17,102 Appliance response data: c00037667f0f703c00000068280000000000000000009843d100000000000000000000000000000000```

Hi Ben,
now I identified my issue:
The first byte of my send request seems to be twice. My request has one byte more.

In the log you see:
"Push to Midea Klimaanlage: power_state = ON
2020-04-26 14:00:28,538 Sending to 19791209311979: "
Then the next string seems to be important:
Mine starts with 5a5a01
Yours starts with 5a01
The 01 seems to be the byte to set the power_state to “ON”.

I tried to extract the scripts again, but I still get this wrong bytes. :frowning:

Where and how did you download the scripts?

I wouldn’t count the number of bytes. I change left and right
some number.
I wasn’t sure how confidential all these numbers are, so…

I tried everything. No chance to change settings. The command is sent, but no change.
I tried the Ruby script, which is also existing (based on the same API) and this works perfect.
Unfortunately, with the Ruby script/clientclient I cannot sync my settings with Openhab :frowning:

Now I played around the main script and built an own script.
Now I am able to switch the AC on. Fan mode can also be set.
But I am not able to set the target temperature. It‘s always 17 Celsius.
Perhaps the byte is not set correctly.
Someone is able to set the target temperature?

hmmm, Just tried, and seems I’m also not getting it to work anymore. Getting following now:

2020-05-03 14:56:21,335 Error ignored: ‘3176’ - 'The asyn reply does not exist ’

I’ll be happy to test your script, and verify my setup with it…

I took the script from here:


Then I created a python script file, e.g. midea_start.py. This file you have to create in the same folder, where main.py is.
Then you can start this script: python3 midea_start.py. If you have more than one device you should limit the script to start only one device.

This script will immediately send commands. I will create an item to start this script. Using a proxy switch I will create one script to get updates periodically, onother item will be used to start a command.

#!/usr/bin/env python3

from midea.client import client as midea_client
from midea.device import air_conditioning_device as ac

# The client takes an App_Key, an account email address and a password
client = midea_client('3742e9e5842d4ad59c2db887e12449f9', 'blabla@blabla.com', 'account_password')

# Log in right now, to check credentials (this step is optional, and will be called when listing devices)
client.setup()

# List devices. These are complex state holding objects, no other trickery needed from here. 
devices = client.devices()

for device in devices:

    # Refresh the object with the actual state by querying it
    device.refresh()
    print({
        'id': device.id,
        'name': device.name,
        'power_state': device.power_state,
        'audible_feedback': device.audible_feedback,
        'target_temperature': device.target_temperature,
        'operational_mode': device.operational_mode,
        'fan_speed': device.fan_speed,
        'swing_mode': device.swing_mode,
        'eco_mode': device.eco_mode,
        'turbo_mode': device.turbo_mode
    })

    # Set the state of the device and
    device.power_state = True
    device.audible_feedback = True
    device.target_temperature = 21
    device.operational_mode = ac.operational_mode_enum.auto
    device.fan_speed = ac.fan_speed_enum.Auto
    device.swing_mode = ac.swing_mode_enum.Off
    device.eco_mode = False
    device.turbo_mode = False
    # commit the changes with apply()
    device.apply()

Same problem here. Always 17 celsius.

Just found this one: https://github.com/mac-zhou/midea-msmart.
I like this one, since it just use your local network. No need to connect with the cloud.

ps I’ve just managed to read the data from one Unit. Next step is to send data, and of course, let OH control it…

I tried this for my ac. it seems that not all media devices support local commands… unfortunately my ac get no response :frowning:

Mine either. I can read the data, but not send.
I guess it’s linked with the proper device id. I’m still trying to figure that one out.

pfff, the hours I’ve put in these modules…
Last time I buy this model. :blush:

With the new script, I can get the info, but the unit’s won’t react.

When I start the ‘old’ way, it seems that the main.py won’t get the necessary info. He spitting out an error.

Restarting session: '3004' - 'value is illegal.'
Retrying API call: 'homegroup/list/get'
Device list: [{'masterId': '', 'des': '', 'activeStatus': '1', 'onlineStatus': '1', 'name': 'Keuken', 'modelNumber': '0', 'id': '18691697687660', 'sn': 'd7a59ed18290dcace6b84f8f85f5de839202cf350e1e0152aa942d5f06158967c68284d4d26fa14d735f4d643e29a3dc', 'type': '0xAC', 'tsn': '', 'mac': ''}, {'masterId': '', 'des': '', 'activeStatus': '1', 'onlineStatus': '1', 'name': 'Kinderkamer', 'modelNumber': '0', 'id': '18691697687663', 'sn': 'd7a59ed18290dcace6b84f8f85f5de830a14beb8a9da7a5614b680fffb69ea54c68284d4d26fa14d735f4d643e29a3dc', 'type': '0xAC', 'tsn': '', 'mac': ''}, {'masterId': '', 'des': '', 'activeStatus': '1', 'onlineStatus': '1', 'name': 'Leefruimte', 'modelNumber': '0', 'id': '16492674435760', 'sn': 'd7a59ed18290dcace6b84f8f85f5de83da7f43d3942334d33f02cb6fd60799c3c68284d4d26fa14d735f4d643e29a3dc', 'type': '0xAC', 'tsn': '', 'mac': ''}, {'masterId': '', 'des': '', 'activeStatus': '1', 'onlineStatus': '1', 'name': 'Ouderkamer', 'modelNumber': '0', 'id': '16492674435761', 'sn': 'd7a59ed18290dcace6b84f8f85f5de831c1d04413035be675cc20e754e4ee811c68284d4d26fa14d735f4d643e29a3dc', 'type': '0xAC', 'tsn': '', 'mac': ''}]
2020-05-26 19:35:11,914 Refreshing Keuken
Sending to 18691697687660: 5a5a01115700200000000000000000000e031214c679000000050a00000000000000000002000000aa1eac00000000000302408100ff03ff00300000000000000000000003bb8100000000000000000000000000000000
Recieved from 18691697687660: 5a5a01005b0020800000000000000000000000006c3c000000110000000000000000000001000000aa22ac00000000000302c00025667f7f0030000000666900000000000000000098d17c00000000000000000000000000000000
Appliance response data: c00025667f7f0030000000666900000000000000000098d17c00000000000000000000000000000000
2020-05-26 19:35:13,024 Setting OH: ac_Keuken_active (active) = ON
2020-05-26 19:35:13,031 Setting OH: ac_Keuken_online (online) = ON
2020-05-26 19:35:13,035 Setting OH: ac_Keuken_indoor_temperature (indoor_temperature) = 26.0
2020-05-26 19:35:13,039 Setting OH: ac_Keuken_outdoor_temperature (outdoor_temperature) = 27.5
2020-05-26 19:35:13,043 Setting OH: ac_Keuken_power_state (power_state) = OFF
2020-05-26 19:35:13,046 Setting OH: ac_Keuken_target_temperature (target_temperature) = 21.0
2020-05-26 19:35:13,051 Setting OH: ac_Keuken_operational_mode (operational_mode) = 1.0
2020-05-26 19:35:13,055 Setting OH: ac_Keuken_fan_speed (fan_speed) = 102.0
2020-05-26 19:35:13,058 Setting OH: ac_Keuken_swing_mode (swing_mode) = 0.0
2020-05-26 19:35:13,062 Setting OH: ac_Keuken_eco_mode (eco_mode) = OFF
2020-05-26 19:35:13,066 Setting OH: ac_Keuken_turbo_mode (turbo_mode) = OFF
2020-05-26 19:35:13,069 Refreshing Kinderkamer
Sending to 18691697687663: 5a5a01115700200000000000000000000e031214c679000000050a00000000000000000002000000aa1eac00000000000302408100ff03ff00300000000000000000000003bb8100000000000000000000000000000000
Error ignored: '3176' - 'The asyn reply does not exist '
Retrying API call: 'appliance/transparent/send'
^CException: NameError("name 'DeviceOfflineException' is not defined")
2020-05-26 19:35:25,805 Failure in main loop
Traceback (most recent call last):
  File "main.py", line 280, in midea_to_openhab
    device.refresh()
  File "/usr/local/lib/python3.8/dist-packages/midea/device.py", line 143, in refresh
    data = self._cloud_service.appliance_transparent_send(self.id, data)
  File "/usr/local/lib/python3.8/dist-packages/midea/cloud.py", line 168, in appliance_transparent_send
    response = self.api_request('appliance/transparent/send', {
  File "/usr/local/lib/python3.8/dist-packages/midea/cloud.py", line 89, in api_request
    return self.api_request(endpoint, args)
  File "/usr/local/lib/python3.8/dist-packages/midea/cloud.py", line 75, in api_request
    r = requests.post(url=url, data=data)
  File "/usr/lib/python3/dist-packages/requests/api.py", line 116, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 421, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 416, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.8/http/client.py", line 1332, in getresponse
    response.begin()
  File "/usr/lib/python3.8/http/client.py", line 303, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.8/http/client.py", line 264, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.8/socket.py", line 669, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 313, in recv_into
    return self.connection.recv_into(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1821, in recv_into
    result = _lib.SSL_read(self._ssl, buf, nbytes)
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 335, in main_loop
    midea_to_openhab()
  File "main.py", line 288, in midea_to_openhab
    except DeviceOfflineException:
NameError: name 'DeviceOfflineException' is not defined
^CTraceback (most recent call last):
  File "main.py", line 359, in <module>
    time.sleep(10.0)
KeyboardInterrupt

When I remove one unit, the old script seems to work? So at first sight, this unit has an issue with the script. The 3 others work good, it’s only that one that give the erro.
With the app from Midea, it’s woking…

SERVER# python3 main.py 

Restarting session: '3004' - 'value is illegal.'
Retrying API call: 'homegroup/list/get'
Device list: [{'masterId': '', 'des': '', 'activeStatus': '1', 'onlineStatus': '1', 'name': 'Keuken', 'modelNumber': '0', 'id': '18691697687660', 'sn': '481df8500c20116c23b6820f07b2616fe5ee015054c92abe7e9665ccabc6c7a02c9bd3c49b85afd39fd0c4af012a304c', 'type': '0xAC', 'tsn': '', 'mac': ''}, {'masterId': '', 'des': '', 'activeStatus': '1', 'onlineStatus': '1', 'name': 'Kinderkamer', 'modelNumber': '0', 'id': '18691697687663', 'sn': '481df8500c20116c23b6820f07b2616f0cc9352af6b96613679e8f6e114bdc3f2c9bd3c49b85afd39fd0c4af012a304c', 'type': '0xAC', 'tsn': '', 'mac': ''}, {'masterId': '', 'des': '', 'activeStatus': '1', 'onlineStatus': '1', 'name': 'Leefruimte', 'modelNumber': '0', 'id': '16492674435760', 'sn': '481df8500c20116c23b6820f07b2616f4424f689133db8eadc98b9856bf1ef2d2c9bd3c49b85afd39fd0c4af012a304c', 'type': '0xAC', 'tsn': '', 'mac': ''}, {'masterId': '', 'des': '', 'activeStatus': '1', 'onlineStatus': '1', 'name': 'Ouderkamer', 'modelNumber': '0', 'id': '16492674435761', 'sn': '481df8500c20116c23b6820f07b2616f3b0a43be4ea0bf9d5cfa37305a7f74392c9bd3c49b85afd39fd0c4af012a304c', 'type': '0xAC', 'tsn': '', 'mac': ''}]
2020-05-26 19:34:05,742 Refreshing Keuken
Sending to 18691697687660: 5a5a01115700200000000000000000000e031214c679000000050a00000000000000000002000000aa1eac00000000000302408100ff03ff00300000000000000000000003bb8100000000000000000000000000000000
Recieved from 18691697687660: 5a5a01005b0020800000000000000000000000006c3c000000110000000000000000000001000000aa22ac00000000000302c00025667f7f0030000000666900000000000000000098d17c00000000000000000000000000000000
Appliance response data: c00025667f7f0030000000666900000000000000000098d17c00000000000000000000000000000000
2020-05-26 19:34:06,749 Setting OH: ac_Keuken_active (active) = ON
2020-05-26 19:34:06,757 Setting OH: ac_Keuken_online (online) = ON
2020-05-26 19:34:06,768 Setting OH: ac_Keuken_indoor_temperature (indoor_temperature) = 26.0
2020-05-26 19:34:06,772 Setting OH: ac_Keuken_outdoor_temperature (outdoor_temperature) = 27.5
2020-05-26 19:34:06,777 Setting OH: ac_Keuken_power_state (power_state) = OFF
2020-05-26 19:34:06,782 Setting OH: ac_Keuken_target_temperature (target_temperature) = 21.0
2020-05-26 19:34:06,786 Setting OH: ac_Keuken_operational_mode (operational_mode) = 1.0
2020-05-26 19:34:06,791 Setting OH: ac_Keuken_fan_speed (fan_speed) = 102.0
2020-05-26 19:34:06,796 Setting OH: ac_Keuken_swing_mode (swing_mode) = 0.0
2020-05-26 19:34:06,801 Setting OH: ac_Keuken_eco_mode (eco_mode) = OFF
2020-05-26 19:34:06,805 Setting OH: ac_Keuken_turbo_mode (turbo_mode) = OFF
2020-05-26 19:34:06,809 Skipping device Kinderkamer, not one of ours
2020-05-26 19:34:06,810 Refreshing Leefruimte
Sending to 16492674435760: 5a5a01115700200000000000000000000e031214c679000000050a00000000000000000002000000aa1eac00000000000302408100ff03ff00300000000000000000000003bb8100000000000000000000000000000000
Recieved from 16492674435760: 5a5a01005b002080000000000000000000000000b04a0000000f0000000000000000000001000000aa22ac00000000000302c0004a3c7f7f0030000000656900000000000000000098bb9800000000000000000000000000000000
Appliance response data: c0004a3c7f7f0030000000656900000000000000000098bb9800000000000000000000000000000000
2020-05-26 19:34:07,918 Setting OH: ac_Leefruimte_active (active) = ON
2020-05-26 19:34:07,923 Setting OH: ac_Leefruimte_online (online) = ON
2020-05-26 19:34:07,928 Setting OH: ac_Leefruimte_indoor_temperature (indoor_temperature) = 25.5
2020-05-26 19:34:07,933 Setting OH: ac_Leefruimte_outdoor_temperature (outdoor_temperature) = 27.5
2020-05-26 19:34:07,938 Setting OH: ac_Leefruimte_power_state (power_state) = OFF
2020-05-26 19:34:07,943 Setting OH: ac_Leefruimte_target_temperature (target_temperature) = 26.0
2020-05-26 19:34:07,947 Setting OH: ac_Leefruimte_operational_mode (operational_mode) = 2.0
2020-05-26 19:34:07,950 Setting OH: ac_Leefruimte_fan_speed (fan_speed) = 60.0
2020-05-26 19:34:07,954 Setting OH: ac_Leefruimte_swing_mode (swing_mode) = 0.0
2020-05-26 19:34:07,958 Setting OH: ac_Leefruimte_eco_mode (eco_mode) = OFF
2020-05-26 19:34:07,962 Setting OH: ac_Leefruimte_turbo_mode (turbo_mode) = OFF
2020-05-26 19:34:07,967 Refreshing Ouderkamer
Sending to 16492674435761: 5a5a01115700200000000000000000000e031214c679000000050a00000000000000000002000000aa1eac00000000000302408100ff03ff00300000000000000000000003bb8100000000000000000000000000000000
Recieved from 16492674435761: 5a5a01005b002080000000000000000000000000b14a0000000f0000000000000000000001000000aa22ac00000000000302c000a1287f7f003c0000006469000000000000000000989b6a00000000000000000000000000000000
Appliance response data: c000a1287f7f003c0000006469000000000000000000989b6a00000000000000000000000000000000
2020-05-26 19:34:09,052 Setting OH: ac_Ouderkamer_active (active) = ON
2020-05-26 19:34:09,056 Setting OH: ac_Ouderkamer_online (online) = ON
2020-05-26 19:34:09,061 Setting OH: ac_Ouderkamer_indoor_temperature (indoor_temperature) = 25.0
2020-05-26 19:34:09,064 Setting OH: ac_Ouderkamer_outdoor_temperature (outdoor_temperature) = 27.5
2020-05-26 19:34:09,068 Setting OH: ac_Ouderkamer_power_state (power_state) = OFF
2020-05-26 19:34:09,072 Setting OH: ac_Ouderkamer_target_temperature (target_temperature) = 17.0
2020-05-26 19:34:09,076 Setting OH: ac_Ouderkamer_operational_mode (operational_mode) = 5.0
2020-05-26 19:34:09,079 Setting OH: ac_Ouderkamer_fan_speed (fan_speed) = 40.0
2020-05-26 19:34:09,083 Setting OH: ac_Ouderkamer_swing_mode (swing_mode) = 12.0
2020-05-26 19:34:09,086 Setting OH: ac_Ouderkamer_eco_mode (eco_mode) = OFF
2020-05-26 19:34:09,090 Setting OH: ac_Ouderkamer_turbo_mode (turbo_mode) = OFF

For the moment, my 4 internal units are all responding again to the ‘old’ script.
I can read and set the units

I can’t really say why. The only difference I can think off is that I started the script (python3 main.py), when all 4 units where ‘active blowing’. I guess that the unit goes to a kind of sleep status in the cloud when you don’t use it for while?

Hi,
I am new here so please bare with me if i ask any noob questions.

In settings.py i should enter my serverURL and porty. Doesn’t that mean i have to open up Openhab to the web for anyone to access?
Or do you have some kind of security feature in place that i have not found yet?