delid4ve / openhab-3.x-sonoff

Openhab Binding for Sonoff Devices
26 stars 11 forks source link

Add support for Sonoff DUALR3 #17

Open alfpf opened 2 years ago

alfpf commented 2 years ago

Hi, First of all, big thx for your work with this binding. Worked as a charm and easily configured two of my devices. For the third device, I however got the following error message in the log:

2022-02-14 19:31:35.537 [INFO ] [nal.discovery.SonoffDiscoveryService] - Discovered device 1001492970 2022-02-14 19:31:35.540 [ERROR] [nal.discovery.SonoffDiscoveryService] - Unable to add 1001492970 as its not supported, please forward the cache file to the developer 2022-02-14 19:31:35.542 [INFO ] [nal.discovery.SonoffDiscoveryService] - Discovered device 1001417ed8 2022-02-14 19:31:35.549 [INFO ] [nal.discovery.SonoffDiscoveryService] - Discovered device 1001457e1d

So would really appreciate if you could add support for this device. Adding debug information from the binding below. Please let me know if you need anything more.

2022-02-14 19:46:52.919 [DEBUG] [nternal.handler.SonoffAccountHandler] - Running connection check task 2022-02-14 19:46:52.923 [DEBUG] [l.connection.SonoffConnectionManager] - Connection Check Running for mixed mode 2022-02-14 19:46:55.497 [DEBUG] [nal.discovery.SonoffDiscoveryService] - Stop Scan 2022-02-14 19:46:55.506 [DEBUG] [nal.discovery.SonoffDiscoveryService] - Start Scan 2022-02-14 19:46:55.507 [DEBUG] [nal.discovery.SonoffDiscoveryService] - Sonoff - Start Discovery 2022-02-14 19:46:55.509 [DEBUG] [ernal.connection.SonoffApiConnection] - Api Cache Request:{"appid":"****","nonce":"2fe6WL4b","ts":1644864415509,"version":8} 2022-02-14 19:46:56.075 [DEBUG] [ernal.connection.SonoffApiConnection] - Api Cache response:{"error":0,"msg":"","data":{"thingList":[{"itemType":1,"itemData":{"name":"DUALR3 Lite - Japansk trädgård Damm & Lykta","deviceid":"1001492970","apikey":"4d29cf0d-737e-4de7-b616-9f59772823ee","extra":{"uiid":165,"description":"20210830019","brandId":"5c4c1aee3a7d24c7100be054","apmac":"d0:27:02:92:50:31","mac":"d0:27:02:92:50:30","ui":"多功能双通道开关_支持电机模式","modelInfo":"60ed2f366745108b0f44d627","model":"E32-2SW-P0","manufacturer":"深圳松诺技术有限公司","staMac":"C4DD57D998CC"},"brandName":"SONOFF","brandLogo":"https://eu-ota.coolkit.cc/logo/q62PevoglDNmwUJ9oPE7kRrpt1nL1CoA.png","showBrand":true,"productModel":"DUALR3 Lite","tags":{"m_23eealf":"on","ck_channel_name":{"0":"Dammpump (Channel 1)","1":"Stenlykta (Channel 2)"}},"devConfig":{"timerCount":"16/28"},"settings":{"opsNotify":0,"opsHistory":1,"alarmNotify":1,"wxAlarmNotify":0,"wxOpsNotify":0,"wxDoorbellNotify":0,"appDoorbellNotify":1},"devGroups":[],"family":{"familyid":"61f5ce7fe8269900091307bc","index":-2},"shareTo":[],"devicekey":"25a3040d-45ca-4ee8-bf95-6282a2235d70","online":true,"params":{"bindInfos":null,"version":7,"workMode":1,"motorSwMode":2,"motorSwReverse":0,"outputReverse":0,"motorTurn":0,"calibState":0,"currLocation":0,"location":0,"sledBright":100,"staMac":"C4DD57D998CC","rssi":-52,"overload_00":{"minActPow":{"enabled":0,"value":10},"maxVoltage":{"enabled":0,"value":24000},"minVoltage":{"enabled":0,"value":10},"maxCurrent":{"enabled":0,"value":1500},"maxActPow":{"enabled":0,"value":360000}},"overload_01":{"minActPow":{"enabled":0,"value":10},"maxVoltage":{"enabled":0,"value":24000},"minVoltage":{"enabled":0,"value":10},"maxCurrent":{"enabled":0,"value":1500},"maxActPow":{"enabled":0,"value":360000}},"oneKwhState_00":0,"startTime_00":"","endTime_00":"","oneKwhState_01":0,"startTime_01":"","endTime_01":"","oneKwhData_00":0,"oneKwhData_01":0,"current_00":0,"voltage_00":0,"actPow_00":0,"reactPow_00":0,"apparentPow_00":0,"current_01":0,"voltage_01":0,"actPow_01":0,"reactPow_01":0,"apparentPow_01":0,"fwVersion":"1.4.0","timeZone":1,"swMode_00":2,"swMode_01":2,"swReverse_00":0,"swReverse_01":0,"zyx_clear_timers":true,"initSetting":1,"switches":[{"switch":"off","outlet":0},{"switch":"off","outlet":1}],"configure":[{"startup":"off","outlet":0},{"startup":"off","outlet":1}],"pulses":[{"pulse":"off","width":1000,"outlet":0},{"pulse":"off","width":1000,"outlet":1}],"only_device":{"ota":"success","ota_fail_reason":0},"timers":[{"mId":"af4a744b-a62b-9b3a-3853-0b0a60e0ce1d","type":"repeat","at":"0 23 6,0,1,2,3,4,5","coolkit_timer_type":"repeat","enabled":1,"do":{"switch":"off","outlet":1}},{"mId":"dc3032dd-e006-7af8-c885-3a7019399439","type":"repeat","at":"0 19 0,1,2,3,4,5,6","coolkit_timer_type":"repeat","enabled":1,"do":{"switch":"on","outlet":1}}]},"isSupportGroup":false},"index":-2},{"itemType":1,"itemData":{"name":"BASICR2","deviceid":"1001417ed8","apikey":"4d29cf0d-737e-4de7-b616-9f59772823ee","extra":{"uiid":1,"description":"20210715002","brandId":"5c4c1aee3a7d24c7100be054","apmac":"d0:27:02:82:fb:01","mac":"d0:27:02:82:fb:00","ui":"单通道插座","modelInfo":"5c700f76cc248c47441fd234","model":"PSF-B01-GL","manufacturer":"深圳松诺技术有限公司","chipid":"00922A2A","staMac":"3C:61:05:92:2A:2A"},"brandName":"SONOFF","brandLogo":"https://eu-ota.coolkit.cc/logo/q62PevoglDNmwUJ9oPE7kRrpt1nL1CoA.png","showBrand":true,"productModel":"BASICR2","tags":{"m_23ee_alf_":"on"},"devConfig":null,"settings":{"opsNotify":0,"opsHistory":1,"alarmNotify":1,"wxAlarmNotify":0,"wxOpsNotify":0,"wxDoorbellNotify":0,"appDoorbellNotify":1},"devGroups":[],"family":{"familyid":"61f5ce7fe8269900091307bc","index":-1},"shareTo":[],"devicekey":"97c757b0-4c3c-4d66-8d69-cb6935bdce8e","online":true,"params":{"bindInfos":{},"version":8,"only_device":{"ota":"success"},"sledOnline":"on","ssid":"ASUS","bssid":"00:00:00:00:00:00","switch":"on","fwVersion":"3.5.1","rssi":-60,"staMac":"3C:61:05:92:2A:2A","startup":"off","init":1,"pulse":"off","pulseWidth":500},"denyFeatures":["extSwitchMode"],"isSupportGroup":true},"index":-1},{"itemType":1,"itemData":{"name":"MINI","deviceid":"1001457e1d","apikey":"4d29cf0d-737e-4de7-b616-9f59772823ee","extra":{"uiid":1,"description":"20210811001","brandId":"5c4c1aee3a7d24c7100be054","apmac":"d0:27:02:8a:f9:8b","mac":"d0:27:02:8a:f9:8a","ui":"单通道插座","modelInfo":"5c700fdfcc248c47441fd24d","model":"PSF-BD1-GL","manufacturer":"深圳松诺技术有限公司","chipid":"004505B4","staMac":"E8:DB:84:45:05:B4"},"brandName":"SONOFF","brandLogo":"https://eu-ota.coolkit.cc/logo/q62PevoglDNmwUJ9oPE7kRrpt1nL1CoA.png","showBrand":true,"productModel":"MINI","tags":{"m_23ee_alf_":"on"},"devConfig":{},"settings":{"opsNotify":0,"opsHistory":1,"alarmNotify":1,"wxAlarmNotify":0,"wxOpsNotify":0,"wxDoorbellNotify":0,"appDoorbellNotify":1},"devGroups":[],"family":{"familyid":"61f5ce7fe8269900091307bc","index":0},"shareTo":[],"devicekey":"61ccae57-1060-4765-9f88-685d6269844d","online":true,"params":{"bindInfos":{},"version":8,"sledOnline":"on","switch":"on","fwVersion":"3.6.0","rssi":-58,"staMac":"E8:DB:84:45:05:B4","startup":"off","init":1,"pulse":"off","pulseWidth":500,"swMode":2,"swCtrlReverse":"off"},"isSupportGroup":true},"index":0}],"total":3}} 2022-02-14 19:46:56.082 [DEBUG] [nal.discovery.SonoffDiscoveryService] - Processing device 1001492970 2022-02-14 19:46:56.085 [DEBUG] [nal.discovery.SonoffDiscoveryService] - Processing device 1001417ed8 2022-02-14 19:46:56.086 [DEBUG] [nal.discovery.SonoffDiscoveryService] - Processing device 1001457e1d 2022-02-14 19:46:56.088 [INFO ] [nal.discovery.SonoffDiscoveryService] - Discovered device 1001492970 2022-02-14 19:46:56.090 [ERROR] [nal.discovery.SonoffDiscoveryService] - Unable to add 1001492970 as its not supported, please forward the cache file to the developer 2022-02-14 19:46:56.091 [INFO ] [nal.discovery.SonoffDiscoveryService] - Discovered device 1001417ed8 2022-02-14 19:46:56.098 [INFO ] [nal.discovery.SonoffDiscoveryService] - Discovered device 1001457e1d 2022-02-14 19:47:03.669 [DEBUG] [nternal.handler.SonoffAccountHandler] - Running Activation task 2022-02-14 19:47:03.671 [DEBUG] [connection.SonoffWebSocketConnection] - Websocket Sending Message:ping 2022-02-14 19:47:03.697 [DEBUG] [connection.SonoffWebSocketConnection] - Pong Response received 2022-02-14 19:47:05.505 [DEBUG] [nal.discovery.SonoffDiscoveryService] - Stop Scan

PS. Sent a small donation as a token of appreciation on your work