AlexxIT / SonoffLAN

Control Sonoff Devices with eWeLink (original) firmware over LAN and/or Cloud from Home Assistant
https://github.com/AlexxIT/Blog
MIT License
2.74k stars 416 forks source link

Version 3 #751

Closed AlexxIT closed 2 years ago

AlexxIT commented 2 years ago

New version in new branch

Other

Check

ianfretwell commented 2 years ago

Hi...after letting HACS upgrade to the new RC version and restarting I've lost all 13 of my Sonoff (or Sonoff type devices).

Was there something else I was supposed to do first?

tomasb82 commented 2 years ago

Same for me

AlexxIT commented 2 years ago
tomasb82 commented 2 years ago

I had to reshare mising devices manualy, and it worked. Before 30 devices insted of 42 was shown.

ianfretwell commented 2 years ago

@tomasb82 was that a reshare to the same account you were using before?

2022.4.5 Integration appeared in GUI (with only 2 of 13 devices - but neither of them actually works)

tomasb82 commented 2 years ago

Yes, same account. Canceled share on ewlink app and shared again

ianfretwell commented 2 years ago

OK, removed all shares. Then went a step further and removed all devices and entities (i.e. where they were still showing as 'restored').

Restarted HA. Re shared all devices. Restarted HA again.

Some devices have re-appeared. But none of them work and are all marked as 'Unavailable'.

One that hasn't re-appeared is a KingArt KING-N1 standard light switch. I have four other N1's which have re-appeared.

My NS-Panel is also missing (it did appear and work with v2 of the integration).

Any suggestions as to why none of them work and some of them are missing please ?

Thanks.

ianfretwell commented 2 years ago

Should I be removing the old yaml config from configuration.yaml ?

ianfretwell commented 2 years ago

I've now tried removing all the config completely (e.g. devices and entities, the integration from HA and then from HACS). Restarted. Re-added through HACS. Restarted. Re-added through Integration GUI (no yaml). Same devices have re-appeared. The same two are missing. And just like before absolutely none of them work.

@tomasb82 Are yours actually working or just visible in the integration ?

ianfretwell commented 2 years ago

What about the hidden file - .sonoff.json
That's still there and showing a date modified of the 17th (i.e. before v3.rc1) - do I need to delete that too (I'm surprised it didn't go when I removed the integration though).

tomasb82 commented 2 years ago

Strange things hapening. On restart of HA deferent devices are disapering. Even those who was reaaded.

ianfretwell commented 2 years ago

OK, thanks.

I've just tried again removing everything including the hidden .json file. Still no change, same missing devices and nothing works.

GuidoKJ commented 2 years ago

I'm having the very same issues as described earlier by @ianfretwell and @tomasb82. Tried re-sharing devices, restarting the VM where my HA lives, and setting up the integration via the new UI a couple of times. Everything was working ok on version 2.

Debug logs:

2022-04-23 10:40:26 [D] SysInfo: {'installation_type': 'Home Assistant OS', 'version': '2022.4.6', 'dev': False, 'hassio': True, 'virtualenv': False, 'python_version': '3.9.9', 'docker': True, 'arch': 'x86_64', 'timezone': 'America/Argentina/Buenos_Aires', 'os_name': 'Linux', 'os_version': '5.10.108', 'user': 'root', 'supervisor': '2022.04.0', 'host_os': 'Home Assistant OS 7.6', 'docker_version': '20.10.9', 'chassis': 'vm'}
2022-04-23 10:40:31 [D] 30 devices loaded from Cache
2022-04-23 10:40:31 [D] 1000b5d2e9 UIID 0001 | {'version': 8, 'sledOnline': 'on', 'switch': 'off', 'fwVersion': '3.6.0', 'rssi': -55, 'startup': 'off', 'init': 1, 'pulse': 'off', 'pulseWidth': 500, 'swMode': 2, 'swCtrlReverse': 'off'}
2022-04-23 10:40:31 [D] 100148bd22 UIID 0133 | {'version': 8, 'pulses': [{'pulse': 'off', 'width': 1000, 'outlet': 0}, {'pulse': 'off', 'width': 1000, 'outlet': 1}], 'switches': [{'switch': 'off', 'outlet': 0}, {'switch': 'off', 'outlet': 1}], 'configure': [{'startup': 'stay', 'outlet': 0}, {'startup': 'stay', 'outlet': 1}], 'lock': 0, 'fwVersion': '1.1.1', 'temperature': 25, 'humidity': 50, 'tempUnit': 0, 'HMI_outdoorTemp': {'current': 13, 'range': '15,23'}, 'HMI_weather': 1, 'cityId': '7894', 'dst': 0, 'geo': '-34.608,-58.437', 'timeZone': -3, 'only_device': {'ota': 'success', 'ota_fail_reason': 0}, 'HMI_dimEnable': 0}
2022-04-23 10:40:32 [D] 30 devices loaded from Cloud
2022-04-23 10:40:32 [D] AUTO mode start
2022-04-23 10:40:32 [D] 1000ce27c8 !! skip setup for encrypted device
2022-04-23 10:40:32 [D] 1000b5eba0 !! skip setup for encrypted device
2022-04-23 10:40:32 [D] 1000becb6f !! skip setup for encrypted device

etc.

No device is showing up.

AlexxIT commented 2 years ago

Have you all checked the Hass error log?

@GuidoKJ how many Sonoff integrations do you have on Hass Integrations page?

@ianfretwell can you show debug logs for problem devices?

ianfretwell commented 2 years ago

@AlexxIT Sure, but where do I actually find them? There's nothing at all in the main logs view...

AlexxIT commented 2 years ago

.sonoff.json moved to .storage/sonoff folder

AlexxIT commented 2 years ago

Component debug:

GuidoKJ commented 2 years ago

Have you all checked the Hass error log?

@GuidoKJ how many Sonoff integrations do you have on Hass Integrations page?

@ianfretwell can you show debug logs for problem devices?

Only one, my main one with username and password (Same account which worked on version 2). I've tried later adding one only for local devices, but the result was the same.

AlexxIT commented 2 years ago

@GuidoKJ show debug log in auto mode just after restart Hass

GuidoKJ commented 2 years ago

@GuidoKJ show debug log in auto mode just after restart Hass

Sure, here you go:

2022-04-23 11:24:54 [D] SysInfo: {'installation_type': 'Home Assistant OS', 'version': '2022.4.6', 'dev': False, 'hassio': True, 'virtualenv': False, 'python_version': '3.9.9', 'docker': True, 'arch': 'x86_64', 'timezone': 'America/Argentina/Buenos_Aires', 'os_name': 'Linux', 'os_version': '5.10.108', 'user': 'root', 'supervisor': '2022.04.0', 'host_os': 'Home Assistant OS 7.6', 'docker_version': '20.10.9', 'chassis': 'vm'}
2022-04-23 11:24:59 [D] 30 devices loaded from Cloud
2022-04-23 11:24:59 [D] 1000b5d2e9 UIID 0001 | {'version': 8, 'sledOnline': 'on', 'switch': 'off', 'fwVersion': '3.6.0', 'rssi': -55, 'startup': 'off', 'init': 1, 'pulse': 'off', 'pulseWidth': 500, 'swMode': 2, 'swCtrlReverse': 'off'}
2022-04-23 11:24:59 [D] 100148bd22 UIID 0133 | {'version': 8, 'pulses': [{'pulse': 'off', 'width': 1000, 'outlet': 0}, {'pulse': 'off', 'width': 1000, 'outlet': 1}], 'switches': [{'switch': 'off', 'outlet': 0}, {'switch': 'off', 'outlet': 1}], 'configure': [{'startup': 'stay', 'outlet': 0}, {'startup': 'stay', 'outlet': 1}], 'lock': 0, 'fwVersion': '1.1.1', 'temperature': 24, 'humidity': 50, 'tempUnit': 0, 'HMI_outdoorTemp': {'current': 15, 'range': '15,23'}, 'HMI_weather': 1, 'cityId': '7894', 'dst': 0, 'geo': '-34.608,-58.437', 'timeZone': -3, 'only_device': {'ota': 'success', 'ota_fail_reason': 0}, 'HMI_dimEnable': 0}

It stops there and only one device whows up wich appears as an offline device

image image image

ianfretwell commented 2 years ago

@AlexxIT

Interestingly it says there are 10 devices (which is correct) - however the integration pages says there are only 8 devices.

A little like @GuidoKJ 's detail above it shows:- Cloud devices online 0/8 Local devices online 0/0

2022-04-23 15:23:29 [D] SysInfo: {'installation_type': 'Home Assistant Container', 'version': '2022.4.5', 'dev': False, 'hassio': False, 'virtualenv': False, 'python_version': '3.9.9', 'docker': True, 'arch': 'x86_64', 'timezone': 'Europe/London', 'os_name': 'Linux', 'os_version': '5.10.60-qnap', 'user': 'root'}
2022-04-23 15:23:33 [D] 10 devices loaded from Cloud
2022-04-23 15:23:34 [D] 10013ce8f9 UIID 0015 | {'version': 8, 'only_device': {'ota': 'success'}, 'sledOnline': 'on', 'init': 1, 'switch': 'off', 'fwVersion': '3.5.0', 'rssi': -44, 'startup': 'off', 'pulse': 'off', 'pulseWidth': 500, 'sensorType': 'AM2301', 'currentHumidity': '73', 'currentTemperature': '15.8', 'mainSwitch': '', 'deviceType': 'normal', 'switches': [{'switch': 'on', 'outlet': 0}]}
2022-04-23 15:23:34 [D] 10003adba3 UIID 0006 | {'rssi': -70, 'timers': [], 'startup': 'stay', 'fwVersion': '3.5.1', 'switch': 'on', 'sledOnline': 'on', 'init': 1, 'pulse': 'off', 'pulseWidth': 500, 'version': 8, 'only_device': {'ota': 'success'}}
2022-04-23 15:23:34 [D] 1000dfa3b2 UIID 0001 | {'version': 8, 'sledOnline': 'on', 'switch': 'off', 'fwVersion': '3.5.1', 'rssi': -73, 'startup': 'off', 'init': 1, 'pulse': 'off', 'pulseWidth': 500, 'only_device': {'ota': 'success'}, 'switches': [{'switch': 'off', 'outlet': 0}]}
2022-04-23 15:23:34 [D] 1000b36745 UIID 0036 | {'version': 8, 'sledOnline': 'on', 'rssi': -52, 'fwVersion': '3.4.3', 'switch': 'off', 'bright': 100, 'only_device': {'ota': 'success'}, 'timers': [{'mId': '3f96bd90-45c7-d49b-3a8b-2ac8b1c22a36', 'type': 'repeat', 'at': '30 0 * * 0,1,2,3,4,5,6', 'coolkit_timer_type': 'repeat', 'enabled': 1, 'do': {'switch': 'off'}}]}
2022-04-23 15:23:34 [D] 10003aeb64 UIID 0008 | {'rssi': -57, 'switches': [{'switch': 'on', 'outlet': 0}, {'switch': 'on', 'outlet': 1}, {'switch': 'on', 'outlet': 2}, {'switch': 'off', 'outlet': 3}], 'fwVersion': '3.5.1', 'configure': [{'startup': 'stay', 'outlet': 0}, {'startup': 'stay', 'outlet': 1}, {'startup': 'stay', 'outlet': 2}, {'startup': 'off', 'outlet': 3}], 'init': 1, 'pulse': 'off', 'pulseWidth': 0, 'timers': [], 'version': 8, 'sledOnline': 'on', 'lock': 0, 'pulses': [{'pulse': 'off', 'width': 1000, 'outlet': 0}, {'pulse': 'off', 'width': 1000, 'outlet': 1}, {'pulse': 'off', 'width': 1000, 'outlet': 2}, {'pulse': 'off', 'width': 1000, 'outlet': 3}], 'only_device': {'ota': 'success'}}
2022-04-23 15:23:34 [D] 10003ade61 UIID 0006 | {'rssi': -72, 'timers': [], 'startup': 'stay', 'fwVersion': '3.5.1', 'switch': 'on', 'sledOnline': 'on', 'init': 1, 'pulse': 'off', 'pulseWidth': 500, 'version': 8, 'only_device': {'ota': 'success'}}
2022-04-23 15:23:34 [D] 10003adb2f UIID 0006 | {'version': 8, 'sledOnline': 'on', 'switch': 'on', 'fwVersion': '3.5.1', 'rssi': -61, 'startup': 'stay', 'init': 1, 'pulse': 'off', 'pulseWidth': 500}
2022-04-23 15:23:34 [D] 10003ae154 UIID 0006 | {'rssi': -59, 'timers': [], 'startup': 'stay', 'fwVersion': '3.5.1', 'switch': 'on', 'sledOnline': 'on', 'init': 1, 'pulse': 'off', 'pulseWidth': 10000, 'version': 8, 'only_device': {'ota': 'success'}}
2022-04-23 15:23:34 [D] 100148a8d6 UIID 0133 | {'version': 8, 'pulses': [{'pulse': 'off', 'width': 1000, 'outlet': 0}, {'pulse': 'off', 'width': 1000, 'outlet': 1}], 'switches': [{'switch': 'on', 'outlet': 0}, {'switch': 'on', 'outlet': 1}], 'configure': [{'startup': 'stay', 'outlet': 0}, {'startup': 'stay', 'outlet': 1}], 'lock': 0, 'fwVersion': '1.2.0', 'temperature': 20, 'humidity': 50, 'tempUnit': 0, 'HMI_outdoorTemp': {'current': 7, 'range': '6,17'}, 'HMI_weather': 33, 'cityId': '326914', 'dst': 1, 'dstChange': '2022-10-30T01:00:00.000Z', 'geo': '53.3825,-1.47194', 'timeZone': 0, 'HMI_ATCDevice': {'ctype': 'device', 'id': '10013ce8f9', 'outlet': 0, 'etype': 'cold'}, 'ctype': 'device', 'id': '10013ce8f9', 'resourcetype': 'ATC', 'ATCEnable': 0, 'ATCMode': 0, 'ATCExpect0': 26, 'HMI_dimEnable': 1, 'HMI_resources': [{'ctype': 'device', 'id': '10003ae150', 'uiid': 6}, {'ctype': 'idle'}, {'ctype': 'device', 'id': '1000dfa3b2', 'uiid': 1}, {'ctype': 'scene', 'id': '61dd5af0b615852f758669d6'}, {'ctype': 'idle'}, {'ctype': 'idle'}, {'ctype': 'idle'}, {'ctype': 'scene', 'id': '61dd5b0ab615852f758669d8'}], 'ATCExpect1': -999, 'HMI_dimOpen': 0, 'only_device': {'ota': 'success', 'ota_fail_reason': 0}, 'tempCorrection': -2, 'cityStr': 'Sheffield'}
ianfretwell commented 2 years ago

How do I post the logs 'cleanly' please ?

AlexxIT commented 2 years ago

@ianfretwell @GuidoKJ you both have UIID 133. Some problem with it. Will fix it.

ianfretwell commented 2 years ago

Pretty sure that's the NSPanel.

GuidoKJ commented 2 years ago

@ianfretwell I have a couple of those installed.

@AlexxIT I did change appid and appsecret without success.

AlexxIT commented 2 years ago

@ianfretwell @GuidoKJ check latest master-version

AlexxIT commented 2 years ago

You may share this panel with my account sonofflan@gmail.com Maybe I can add more interesting support to it as thermostat. But I will need to play with its settings.

felipebraz commented 2 years ago

I having some trouble with this version too...

DualR3 in measure mode still with no data (I know you are working on it, just reporting):

image

And now I have some new ones, other sensors wich usually works fine now has problems too (Sonoff POWR2):

image

And my switches are unresponsive (Sonoff TX2):

image

I fully removed the Integration (removed the configuration, removed all entities, removed Hacs files and folders and removed the integration from Hacs) and then reinstalled again doing the configuration from zero. Keeps the same issue.

Also I have this error on HA log:

Traceback (most recent call last):
  File "/config/custom_components/sonoff/__init__.py", line 191, in internal_normal_setup
    await internal_cache_setup(hass, entry, devices)
RuntimeError: coroutine raised StopIteration
GuidoKJ commented 2 years ago

You may share this panel with my account sonofflan@gmail.com Maybe I can add more interesting support to it as thermostat. But I will need to play with its settings.

Will share the two I have now with you. Let me know when they display up.

Everything is working now on the master branch.

image

AlexxIT commented 2 years ago

@felipebraz the error is the same as in the NS panels. Fixed in the latest master version.

felipebraz commented 2 years ago

@felipebraz the error is the same as in the NS panels. Fixed in the latest master version.

Sorry for asking, but when did you updated the master? I installed and had this issues 15 minutes ago...

AlexxIT commented 2 years ago

@felipebraz 12 minutes ago :) Now fix in release v3.0rc2

GuidoKJ commented 2 years ago

@felipebraz the error is the same as in the NS panels. Fixed in the latest master version.

It does not allow me to share to this email address. Let me know if Im missing anything else I can do.

image

AlexxIT commented 2 years ago

@GuidoKJ you may collect device logs and describe what they meaning :)

I think this params related to thermostat:

            'HMI_outdoorTemp': {'current': 7, 'range': '6,17'},
            'HMI_weather': 33,
            'ATCEnable': 0,
            'ATCMode': 0,
            'ATCExpect0': 26,
            'ATCExpect1': -999, 
felipebraz commented 2 years ago

@felipebraz 12 minutes ago :) Now fix in release v3.0rc2

Yes! It seems to be working really good, even DualR3 is working now! Thanks!!!!

ianfretwell commented 2 years ago

@AlexxIT All good here too - many thanks.

I can explain this line (and it isn't related to the thermostat as such):- 'HMI_outdoorTemp': {'current': 7, 'range': '6,17'},

The NSPanel uses a specified location setting to query Accuweather for the current outdoor temperature and the expected range of temperatures for the day.

I then suspect 'HMI_weather': 33, is changing the icon used to show the outdoor weather.

tomasb82 commented 2 years ago

Still have "Unavailable" devices mainly tx ant led strip

chemelli74 commented 2 years ago

Hi, just installed 3.0rc2 and cannot operate iFan03 locally:

2022-04-23 18:21:08 WARNING (MainThread) [custom_components.sonoff.core.ewelink.local] 1000e8d614 => Local4 | {'switches': [{'outlet': 0, 'switch': 'on'}]} <= {'seq': 175, 'sequence': '1650730868278', 'error': 422}

Let me know what I can do to help debugging the issue.

Simone

chemelli74 commented 2 years ago

Hi, just installed 3.0rc2 and cannot operate iFan03 locally:

2022-04-23 18:21:08 WARNING (MainThread) [custom_components.sonoff.core.ewelink.local] 1000e8d614 => Local4 | {'switches': [{'outlet': 0, 'switch': 'on'}]} <= {'seq': 175, 'sequence': '1650730868278', 'error': 422}

Let me know what I can do to help debugging the issue.

Simone

Full log:

2022-04-23 18:26:41 [D] LOCAL mode start
2022-04-23 18:26:53 [D] 1000e8d614 <= Local3 | {'light': 'off', 'fan': 'off', 'speed': 1, 'startup_light': 'off', 'startup_fan': 'off', 'sledOnline': 'on', 'ssid': '**REDACTED**', 'bssid': '**REDACTED**'} | 177
2022-04-23 18:31:30 [W] 1000e8d614 => Local4 | {'switches': [{'outlet': 0, 'switch': 'on'}]} <= {'seq': 178, 'sequence': '1650731490951', 'error': 422}
2022-04-23 18:31:30 [D] 1000e8d614 => Local4 | Check offline with timeout 20s
2022-04-23 18:31:31 [D] 1000e8d614 => Local4 | {'sledonline': 'on'} <= {'seq': 178, 'sequence': '1650731490990', 'error': 0}
2022-04-23 18:31:31 [D] 1000e8d614 => Local4 | Welcome back!
2022-04-23 18:31:31 [D] 1000e8d614 <= Local3 | {'light': 'off', 'fan': 'off', 'speed': 1, 'startup_light': 'off', 'startup_fan': 'off', 'sledOnline': 'on', 'ssid': '**REDACTED**', 'bssid': '**REDACTED**'} | 178
2022-04-23 18:31:38 [W] 1000e8d614 => Local4 | {'switches': [{'outlet': 1, 'switch': 'on'}]} <= {'seq': 179, 'sequence': '1650731498825', 'error': 422}
2022-04-23 18:31:38 [D] 1000e8d614 => Local4 | Check offline with timeout 20s
2022-04-23 18:31:39 [D] 1000e8d614 => Local4 | {'sledonline': 'on'} <= {'seq': 179, 'sequence': '1650731498957', 'error': 0}
2022-04-23 18:31:39 [D] 1000e8d614 => Local4 | Welcome back!
2022-04-23 18:31:39 [D] 1000e8d614 <= Local3 | {'light': 'off', 'fan': 'off', 'speed': 1, 'startup_light': 'off', 'startup_fan': 'off', 'sledOnline': 'on', 'ssid': '**REDACTED**', 'bssid': '**REDACTED**'} | 179

Simone

TTLucian commented 2 years ago

Same here. Debug page shows 28 devices loaded from Cloud but only 8 are listed HA log error:

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/sonoff/core/devices.py:49
Integration: Sonoff (documentation, issues)
First occurred: 22:10:59 (1 occurrences)
Last logged: 22:10:59

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/sonoff/__init__.py", line 191, in internal_normal_setup
    await internal_cache_setup(hass, entry, devices)
  File "/config/custom_components/sonoff/__init__.py", line 212, in internal_cache_setup
    registry.setup_devices(devices)
  File "/config/custom_components/sonoff/core/ewelink/__init__.py", line 51, in setup_devices
    spec = get_spec(device)
  File "/config/custom_components/sonoff/core/devices.py", line 197, in get_spec
    classes = get_custom_spec(classes, device["device_class"])
  File "/config/custom_components/sonoff/core/devices.py", line 216, in get_custom_spec
    classes[0] = spec(classes[0], base=device_class)
  File "/config/custom_components/sonoff/core/devices.py", line 49, in spec
    return type(cls.__name__, DEVICE_CLASS[base], {**bases, **kwargs})
KeyError: 'door'

Reverted to v2.4.7 and all's back to normal.

mcv93us commented 2 years ago

On the other hand, I have a problem with the POWR2 for the consumption update automation, the details of the error are: Consumption update: Error executing script. Service not found for call_service at pos 1: Unable to find service sonoff.update_consumption In practice, the consumption update service has disappeared. The installed version is 3.0rc2.

ajdiazv commented 2 years ago

Hi @AlexxIT.

The device (NSPanel, Officially: HMI Wall Switch) can be shared (fw 1.2.0) I recently shared to a test account. Do you want to send to you the user/password for the ewelink account with the NSPanel shared? I'll send it to your email address... the "from:" account will be nsp.dev.2022 (SOnOff NSPanel)

ajdiazv commented 2 years ago

Hi @AlexxIT and @ianfretwell the meaning of codes of NSPanel (fw: 1.2.0)

under: "params" : [..]
   "HMI_outdoorTemp":{   -- Attribute Name
   "current":7,                    -- Actual outdoor temp., respect to location identified by "cityId" attribute.
   "range":"7,19"               --  Min outdoor temp, Max outdoor temp forecast for the day at location identified by "cityId"
   },
   "temperature":15,         -- Actual indoor Temperature, where the NSPanel is located inside the house.
   "humidity":50,               -- Actual indoor Humidity. ALWAYS 50... NSPanel DOESN'T HAVE HUMIDITY SENSOR. 
   "tempUnit":0,                -- 0: Celsius / 1: Fahrenheit
   "tempCorrection":1      -- IMPORTANT: From fw 1.2.0 the temperature calibration is possible.
                                            HOW IT'S WORKS: The temperature informed by temp sensor on device, always indicate the
                                                                           temperature without correction. So the Cloud always inform this temperature
                                                                           without correction too... it must to be corrected (temperature+tempCorrection),
                                                                           this is what NSPanel do before inform this data on NSPanel Display.
   "HMI_weather":4,         -- Is the weather icon to be displayed on NSPanel for Outdoor Weather Condition, relative to the
                                            location identified by "cityId"
   "geo": "-00.000, -00.000" -- Latitude / Longitude of location identified by "cityId"
   "HMI_resources":[        -- Widget declaration. (it's done in ewelink app)
   {
       "ctype":"device",      -- The scene affect a device.... (i dont know what other value could it have)
       "id":"0000000000",  -- id of the device. (if "ctype" is a device)
       "uiid":0                    -- UIID from the device affected identified by "id"
   },                                  -- This is repeated 8 times, one from each of the widget that NSPanel accept.

Thermostat Relative Attributes.

   "HMI_ATCDevice":{                -- Identify the Sonoff device that NSPanel has to activate when conditions meets.
      "ctype":"device",                 -- The affected device. (i dont know what other value could it have)
      "id":"0000000000",             -- id of the device been affected.     
      "outlet":1,                           -- Depends of device affected.
      "etype":"cold",                    -- Identify if the configured device is for cold or heat. (Only one can be configured.)
      "precision":1                       -- Inform the precision to use... after this difference will activate the configured device.
   },
   "ctype":"device",                   -- Same as [HMI_ATCDevice][ctype]
   "id":"0000000000",               -- Same as [HMI_ATCDevice][id]   
   "resourcetype":"ATC",            -- Resource Type: Always "ATC"
   "ATCEnable":0,                       -- Thermostat Status: 0: Off / 1: On
   "ATCMode":0,                        -- Operation Mode: 0: Manual Mode / 1:Auto Mode
   "ATCExpect0":28,                   -- Programmed Temperature (COLD or HEAT, depends on "etype")

   "params":{                             -- This is params inside params   *** [params][params] ***
                                                    In my test case... if temperature arise 26 degrees, it will activate a switch (light in my case)
                                                    I configure to active a TX Switch button 2 if temperature > 26, and this is what is identified 
                                                    here. This is relative to [HMI_ATCDevice][id], that is the configured device.
        "switch":"on",                   -- Action
        "switches":[              
         {
           "switch":"on",                -- Action
           "outlet":1                      -- What outlet to activate.
         }
       ]
    },

Well, this is all that I have been able to investigate about the NSPanel... I haven't investigated yet, on the thermostat side, when it is in Auto mode it allows you to create the day's temperature calendar. It only allows you to configure a single device, you cannot configure a device for cold and another for heat.

I hope all this information helps you.


IMPORTANT: YOU CAN'T CONTROL TEMPERATURE SETTINGS, DEVICE, CALENDARS, MODE, ETC... FROM THE SHARED ACCOUNT. JUST THE MAIN ACCOUNT CAN SET THIS PARAMETERS.

AlexxIT commented 2 years ago

@chemelli74 iFan local mode fixed in latest master-version

AlexxIT commented 2 years ago

@TTLucian device_class for binary devices fixed in latest master-version

AlexxIT commented 2 years ago

@mcv93us update_consumption service deprecated. Pow device now have energy sensor with auto update consumption. Data loaded from cloud every hour.

AlexxIT commented 2 years ago

@ajdiazv can you show payload when tempUnit=1? Also can you play with thermostat settings (on/off, mode, temp) and show integration debug logs?

PS. Thanks for other info. It's helpful.

Masterz69 commented 2 years ago

Would be nice to add RSSI for 4CHPRO3 & L1. Thanx.

AlexxIT commented 2 years ago

@Masterz69 in latest master

mcv93us commented 2 years ago

@mcv93us update_consumption service deprecated. Pow device now have energy sensor with auto update consumption. Data loaded from cloud every hour.

@AlexxIT Ok, I understand but the sensors "sensor.today_consumption" and "sensor.ten_days_consumption" now show 0 kWh, how can I fix them?