[RELEASE] TP-Link Plug, Switch, and Bulb integration


#228

Hello Dave,
This is the new error message.
[error]java.lang.NullPointerException: Cannot get property 'energy' on null object on line 214 (energyThisMonthResponse)


#229

@KVHubitat,

Indulge me for a while. I do not have a HS110. Updated driver on GitHub. It will now log a return data I need to see. It will be preambled with "SPECIAL LOG MESSAGE LINE 185:".

PS - where are you located? I assume US (I need to know this since the Australian version uses a different data structure).


#230

US
[dev:170]2019-03-19 11:18:07.197 am [error]java.lang.NullPointerException: Cannot get property 'energy' on null object on line 211 (energyThisMonthResponse)

[dev:170]2019-03-19 11:18:06.978 am [info]Living 4.2.02 Living: Power is 63.825737 Watts.

[dev:170]2019-03-19 11:18:06.957 am [error]SPECIAL LOG MESSAGE LINE 185: cmdResponse = [emeter:[get_realtime:[current:0.905803, total:3.741000, err_code:0, power:63.825737, voltage:125.458749]]]

[dev:170]2019-03-19 11:18:06.830 am [info]Living 4.2.02 Living: Power: off


#231

Quick try:

Try doing an Save Preferences from the device's GitHub page (where you can also set refresh rate).


#232

Dave,
I’m in Australia. Lol

I’ll update, test and report. :+1:t2:


#233

Dave after updating JUST the driver and hitting Save Preferences, I get this in the logs now.

Also when plug is ON Power is not displayed BUT when plug is OFF power is shown.


#234

There was a newer test driver on GitHub. Could you

Load the new driver.
SAVE PREFERENCES
Run the device and capture log.

Thanks.

I love Australia. Spent 1 year in Melbourne working with BAE.


#235

Thx Dave,
I grabbed this driver..

and logs now show ..


#236

turn on traceLog in preferences. I need to see what is happening before the error.


#237

Is this the best format to post logs ??

dev:3542019-03-20 08:16:59.036 am debugcondition: 1240 | condition text: Light rain shower | condition factor: 0.8 | lux: 1730

dev:3542019-03-20 08:16:59.032 am debugbetween sunrise and noon

dev:9302019-03-20 08:16:51.984 am errorjava.lang.NullPointerException: Cannot get property 'energy_wh' on null object on line 208 (energyThisMonthResponse)

dev:9302019-03-20 08:16:51.955 am traceTP-Link Outlet #1 4.2.02 energyThisMonthResponse: cmdResponse = [emeter:[get_monthstat:[month_list:[], err_code:0]]]

dev:9302019-03-20 08:16:51.951 am traceTP-Link Outlet #1 4.2.02 parseInput: response = [emeter:[get_monthstat:[month_list:[], err_code:0]]]

dev:9302019-03-20 08:16:51.948 am traceTP-Link Outlet #1 4.2.02 inputXOR: cmdResponse = {"emeter":{"get_monthstat":{"month_list":[],"err_code":0}}}

dev:9302019-03-20 08:16:51.847 am traceTP-Link Outlet #1 4.2.02 sendCmd: command = {"emeter":{"get_monthstat":{"year": null}}} // device IP = 192.168.1.6

dev:9302019-03-20 08:16:51.846 am traceTP-Link Outlet #1 4.2.02 getEnergyThisMonth: month = 3 / year = 2019

dev:9302019-03-20 08:16:51.844 am infoTP-Link Outlet #1 4.2.02 TP-Link Outlet #1: Power is 5.626 Watts.

dev:9302019-03-20 08:16:51.830 am errorSPECIAL LOG MESSAGE LINE 185: cmdResponse = [emeter:[get_realtime:[voltage_mv:242424, power_mw:5626, err_code:0, total_wh:142, current_ma:49]]]

dev:9302019-03-20 08:16:51.828 am traceTP-Link Outlet #1 4.2.02 powerResponse: cmdResponse = [emeter:[get_realtime:[voltage_mv:242424, power_mw:5626, err_code:0, total_wh:142, current_ma:49]]]

dev:9302019-03-20 08:16:51.825 am traceTP-Link Outlet #1 4.2.02 parseInput: response = [emeter:[get_realtime:[voltage_mv:242424, power_mw:5626, err_code:0, total_wh:142, current_ma:49]]]

dev:9302019-03-20 08:16:51.822 am traceTP-Link Outlet #1 4.2.02 inputXOR: cmdResponse = {"emeter":{"get_realtime":{"voltage_mv":242424,"current_ma":49,"power_mw":5626,"total_wh":142,"err_code":0}}}

dev:9302019-03-20 08:16:51.729 am infoTP-Link Outlet #1 4.2.02 TP-Link Outlet #1: Power: off

dev:9302019-03-20 08:16:51.703 am traceTP-Link Outlet #1 4.2.02 sendCmd: command = {"emeter":{"get_realtime":{}}} // device IP = 192.168.1.6

dev:9302019-03-20 08:16:51.701 am traceTP-Link Outlet #1 4.2.02 getPower

dev:9302019-03-20 08:16:51.700 am traceTP-Link Outlet #1 4.2.02 parseInput: response = [system:[get_sysinfo:[dev_name:Smart Wi-Fi Plug With Energy Monitoring, hw_ver:2.0, rssi:-41, latitude_i:-339337, err_code:0, type:IOT.SMARTPLUGSWITCH, longitude_i:1512426, deviceId:8006B44052AC733A105F7D33B1DA13FB1A04618A, mac:AC:84:C6:54:A3:B9, active_mode:none, icon_hash:, updating:0, led_off:0, on_time:0, feature:TIM:ENE, relay_state:0, alias:TP-Link Outlet #1, oemId:6480C2101948463DC65D7009CAECDECC, model:HS110(AU), hwId:A28C8BB92AFCB6CAFB83A8C00145F7E2, fwId:00000000000000000000000000000000, sw_ver:1.5.2 Build 171201 Rel.084625]]]

dev:9302019-03-20 08:16:51.694 am traceTP-Link Outlet #1 4.2.02 inputXOR: cmdResponse = {"system":{"get_sysinfo":{"sw_ver":"1.5.2 Build 171201 Rel.084625","hw_ver":"2.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(AU)","mac":"AC:84:C6:54:A3:B9","dev_name":"Smart Wi-Fi Plug With Energy Monitoring","alias":"TP-Link Outlet #1","relay_state":0,"on_time":0,"active_mode":"none","feature":"TIM:ENE","updating":0,"icon_hash":"","rssi":-41,"led_off":0,"longitude_i":1512426,"latitude_i":-339337,"hwId":"A28C8BB92AFCB6CAFB83A8C00145F7E2","fwId":"00000000000000000000000000000000","deviceId":"8006B44052AC733A105F7D33B1DA13FB1A04618A","oemId":"6480C2101948463DC65D7009CAECDECC","err_code":0}}}

dev:9302019-03-20 08:16:51.658 am traceTP-Link Outlet #1 4.2.02 refreshResponse: response = index:00, mac:AC84C654A3B9, ip:c0a80106, port:270f, type:LAN_TYPE_UDPCLIENT, payload:D0F281F88BFF9AF7D5EF94B6D1B4C09FEC95E68FE187E8CAF08BA9DAADF284E193B18BA998B683AD9FBFFD88E18DE9C9F8CFFECCFCCDEDBFDAB698A890A492A095B79BB9D1A6F98FEA98BA80A290BE8EAC80A2D6AFDFBA98A280C986D2FCAFE2A3F1A5F5B9ECABF8AFE6B2F1B99BB795F897F396FAD8E2C088DBEADBEBC382D7FEDCF0D2BFDEBD9FA587C685BF87B389CAFCC6F3C7FDBC8FB5F7CEECC0E286E395CAA4C5A8CDEFD5F7A4C9A8DAAE8ED9B09DDBB292C2AEDBBC9CCBA2D6BE9EDBB5D0A2C5BC9CD1BED0B9CDA2D0B9D7B092BE9CFD91F899EAC8F2D084D4F9B5DCB2D9F9B6C3B7DBBECAEAC9F8DAF6D4A6C3AFCEB7E89BEF8EFA9FBD87B79BB9D6B8E793FA97F2D0EADAF6D4B5D6A2CBBDD887EA85E184A69CBED0BFD1B496BA98FE9BFA8EFB89ECCEF4D682CB86BCF9B7F2D0FCDEABDBBFDEAAC3ADCAE8D2E2CEEC85E689E7B8D0B1C2AA88B290B29EBCCEBDCEA785BF92A697BB99F590F4ABC4A2C4E6DCECC0E28EE18FE881F580E481DEB795AF9EAB9AA89CAE98B496FA9BEF86F287E386D9B092A885B685BC8FBC8BA785ED9AD3B795AF8DCCFEC685BDFFBD84B6F7B1F2B086C584C280B88BCAF2B181B180B481C7F0B587A589ABCDBAF397B58FAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD8FA381E580F69FFC99D0B496AC8EB686B680C2F6C2F2C7F5B4F7C0F3C081B080B5F3C480B380C2F3B7F6C7F4B2F0C180B084B283BBFAD8F4D6B9DCB1F89CBE84A690A49CACEFDDECDCEDD4E0D8ECDAE9ADEED8EDA99EAE9EA7E4A5E0A3E7A2E1A280AC8EEB99EBB4D7B8DCB99BA191EC91EC

dev:9302019-03-20 08:16:51.609 am traceTP-Link Outlet #1 4.2.02 sendCmd: command = {"system" :{"get_sysinfo" :{}}} // device IP = 192.168.1.6

dev:9302019-03-20 08:16:51.588 am traceTP-Link Outlet #1 4.2.02 commandResponse: response = index:00, mac:AC84C654A3B9, ip:c0a80106, port:270f, type:LAN_TYPE_UDPCLIENT, payload:D0F281F88BFF9AF7D5EF94B6C5A0D48BF99CF091E8B7C4B0D1A5C0E2D8A381E496E4BBD8B7D3B694AE9EE39EE3

dev:9302019-03-20 08:16:51.555 am traceTP-Link Outlet #1 4.2.02 sendCmd: command = {"system" :{"set_relay_state" :{"state" : 0}}} // device IP = 192.168.1.6

dev:9302019-03-20 08:16:51.549 am traceTP-Link Outlet #1 4.2.02 off

dev:9302019-03-20 08:16:29.920 am errorjava.lang.NullPointerException: Cannot get property 'energy_wh' on null object on line 208 (energyThisMonthResponse)

dev:9302019-03-20 08:16:29.888 am traceTP-Link Outlet #1 4.2.02 energyThisMonthResponse: cmdResponse = [emeter:[get_monthstat:[month_list:[], err_code:0]]]

dev:9302019-03-20 08:16:29.885 am traceTP-Link Outlet #1 4.2.02 parseInput: response = [emeter:[get_monthstat:[month_list:[], err_code:0]]]

dev:9302019-03-20 08:16:29.878 am traceTP-Link Outlet #1 4.2.02 inputXOR: cmdResponse = {"emeter":{"get_monthstat":{"month_list":[],"err_code":0}}}

dev:9302019-03-20 08:16:29.804 am traceTP-Link Outlet #1 4.2.02 sendCmd: command = {"emeter":{"get_monthstat":{"year": null}}} // device IP = 192.168.1.6

dev:9302019-03-20 08:16:29.801 am traceTP-Link Outlet #1 4.2.02 getEnergyThisMonth: month = 3 / year = 2019

dev:9302019-03-20 08:16:29.799 am infoTP-Link Outlet #1 4.2.02 TP-Link Outlet #1: Power is 0 Watts.

dev:9302019-03-20 08:16:29.787 am errorSPECIAL LOG MESSAGE LINE 185: cmdResponse = [emeter:[get_realtime:[voltage_mv:242049, power_mw:0, err_code:0, total_wh:142, current_ma:26]]]

dev:9302019-03-20 08:16:29.786 am traceTP-Link Outlet #1 4.2.02 powerResponse: cmdResponse = [emeter:[get_realtime:[voltage_mv:242049, power_mw:0, err_code:0, total_wh:142, current_ma:26]]]

dev:9302019-03-20 08:16:29.785 am traceTP-Link Outlet #1 4.2.02 parseInput: response = [emeter:[get_realtime:[voltage_mv:242049, power_mw:0, err_code:0, total_wh:142, current_ma:26]]]

dev:9302019-03-20 08:16:29.784 am traceTP-Link Outlet #1 4.2.02 inputXOR: cmdResponse = {"emeter":{"get_realtime":{"voltage_mv":242049,"current_ma":26,"power_mw":0,"total_wh":142,"err_code":0}}}

dev:9302019-03-20 08:16:29.684 am infoTP-Link Outlet #1 4.2.02 TP-Link Outlet #1: Power: on

dev:9302019-03-20 08:16:29.657 am traceTP-Link Outlet #1 4.2.02 sendCmd: command = {"emeter":{"get_realtime":{}}} // device IP = 192.168.1.6

dev:9302019-03-20 08:16:29.654 am traceTP-Link Outlet #1 4.2.02 getPower

dev:9302019-03-20 08:16:29.652 am traceTP-Link Outlet #1 4.2.02 parseInput: response = [system:[get_sysinfo:[dev_name:Smart Wi-Fi Plug With Energy Monitoring, hw_ver:2.0, rssi:-41, latitude_i:-339337, err_code:0, type:IOT.SMARTPLUGSWITCH, longitude_i:1512426, deviceId:8006B44052AC733A105F7D33B1DA13FB1A04618A, mac:AC:84:C6:54:A3:B9, active_mode:none, icon_hash:, updating:0, led_off:0, on_time:0, feature:TIM:ENE, relay_state:1, alias:TP-Link Outlet #1, oemId:6480C2101948463DC65D7009CAECDECC, model:HS110(AU), hwId:A28C8BB92AFCB6CAFB83A8C00145F7E2, fwId:00000000000000000000000000000000, sw_ver:1.5.2 Build 171201 Rel.084625]]]

dev:9302019-03-20 08:16:29.646 am traceTP-Link Outlet #1 4.2.02 inputXOR: cmdResponse = {"system":{"get_sysinfo":{"sw_ver":"1.5.2 Build 171201 Rel.084625","hw_ver":"2.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(AU)","mac":"AC:84:C6:54:A3:B9","dev_name":"Smart Wi-Fi Plug With Energy Monitoring","alias":"TP-Link Outlet #1","relay_state":1,"on_time":0,"active_mode":"none","feature":"TIM:ENE","updating":0,"icon_hash":"","rssi":-41,"led_off":0,"longitude_i":1512426,"latitude_i":-339337,"hwId":"A28C8BB92AFCB6CAFB83A8C00145F7E2","fwId":"00000000000000000000000000000000","deviceId":"8006B44052AC733A105F7D33B1DA13FB1A04618A","oemId":"6480C2101948463DC65D7009CAECDECC","err_code":0}}}

dev:9302019-03-20 08:16:29.574 am traceTP-Link Outlet #1 4.2.02 refreshResponse: response = index:00, mac:AC84C654A3B9, ip:c0a80106, port:270f, type:LAN_TYPE_UDPCLIENT, payload:D0F281F88BFF9AF7D5EF94B6D1B4C09FEC95E68FE187E8CAF08BA9DAADF284E193B18BA998B683AD9FBFFD88E18DE9C9F8CFFECCFCCDEDBFDAB698A890A492A095B79BB9D1A6F98FEA98BA80A290BE8EAC80A2D6AFDFBA98A280C986D2FCAFE2A3F1A5F5B9ECABF8AFE6B2F1B99BB795F897F396FAD8E2C088DBEADBEBC382D7FEDCF0D2BFDEBD9FA587C685BF87B389CAFCC6F3C7FDBC8FB5F7CEECC0E286E395CAA4C5A8CDEFD5F7A4C9A8DAAE8ED9B09DDBB292C2AEDBBC9CCBA2D6BE9EDBB5D0A2C5BC9CD1BED0B9CDA2D0B9D7B092BE9CFD91F899EAC8F2D084D4F9B5DCB2D9F9B6C3B7DBBECAEAC9F8DAF6D4A6C3AFCEB7E89BEF8EFA9FBD87B69AB8D7B9E692FB96F3D1EBDBF7D5B4D7A3CABCD986EB84E085A79DBFD1BED0B597BB99FF9AFB8FFA88EDCFF5D783CA87BDF8B6F3D1FDDFAADABEDFABC2ACCBE9D3E3CFED84E788E6B9D1B0C3AB89B391B39FBDCFBCCFA684BE93A796BA98F491F5AAC5A3C5E7DDEDC1E38FE08EE980F481E580DFB694AE9FAA9BA99DAF99B597FB9AEE87F386E287D8B193A984B784BD8EBD8AA684EC9BD2B694AE8CCDFFC784BCFEBC85B7F6B0F3B187C485C381B98ACBF3B080B081B580C6F1B486A488AACCBBF296B48EAC9CAC9CAC9CAC9CAC9CAC9CAC9CAC9CAC9CAC9CAC9CAC9CAC9CAC9CAC9CAC9CAC8EA280E481F79EFD98D1B597AD8FB787B781C3F7C3F3C6F4B5F6C1F2C180B181B4F2C581B281C3F2B6F7C6F5B3F1C081B185B382BAFBD9F5D7B8DDB0F99DBF85A791A59DADEEDCEDDDECD5E1D9EDDBE8ACEFD9ECA89FAF9FA6E5A4E1A2E6A3E0A381AD8FEA98EAB5D6B9DDB89AA090ED90ED

dev:9302019-03-20 08:16:29.510 am traceTP-Link Outlet #1 4.2.02 sendCmd: command = {"system" :{"get_sysinfo" :{}}} // device IP = 192.168.1.6

dev:9302019-03-20 08:16:29.466 am traceTP-Link Outlet #1 4.2.02 commandResponse: response = index:00, mac:AC84C654A3B9, ip:c0a80106, port:270f, type:LAN_TYPE_UDPCLIENT, payload:D0F281F88BFF9AF7D5EF94B6C5A0D48BF99CF091E8B7C4B0D1A5C0E2D8A381E496E4BBD8B7D3B694AE9EE39EE3

dev:9302019-03-20 08:16:29.431 am traceTP-Link Outlet #1 4.2.02 sendCmd: command = {"system" :{"set_relay_state" :{"state" : 1}}} // device IP = 192.168.1.6

dev:9302019-03-20 08:16:29.425 am traceTP-Link Outlet #1 4.2.02 on

dev:9302019-03-20 08:16:25.020 am errorjava.lang.NullPointerException: Cannot get property 'year' on null object on line 234 (energyStatResponse)

dev:9302019-03-20 08:16:25.007 am traceTP-Link Outlet #1 4.2.02 energyStatResponse: cmdResponse = [emeter:[get_monthstat:[month_list:[], err_code:0]]]

dev:9302019-03-20 08:16:25.006 am traceTP-Link Outlet #1 4.2.02 parseInput: response = [emeter:[get_monthstat:[month_list:[], err_code:0]]]

dev:9302019-03-20 08:16:25.003 am traceTP-Link Outlet #1 4.2.02 inputXOR: cmdResponse = {"emeter":{"get_monthstat":{"month_list":[],"err_code":0}}}

dev:9302019-03-20 08:16:24.964 am traceTP-Link Outlet #1 4.2.02 sendCmd: command = {"emeter":{"get_monthstat":{"year": 2018}}} // device IP = 192.168.1.6

dev:9302019-03-20 08:16:24.963 am traceTP-Link Outlet #1 4.2.02 getPrevYear: year = 2018

dev:9302019-03-20 08:16:24.961 am traceTP-Link Outlet #1 4.2.02 energyStatResponse: cmdResponse = [emeter:[get_monthstat:[month_list:[[month:1, year:2019, energy_wh:3737], [month:2, year:2019, energy_wh:1910], [month:3, year:2019, energy_wh:142]], err_code:0]]]

dev:9302019-03-20 08:16:24.960 am traceTP-Link Outlet #1 4.2.02 parseInput: response = [emeter:[get_monthstat:[month_list:[[month:1, year:2019, energy_wh:3737], [month:2, year:2019, energy_wh:1910], [month:3, year:2019, energy_wh:142]], err_code:0]]]

dev:9302019-03-20 08:16:24.954 am traceTP-Link Outlet #1 4.2.02 inputXOR: cmdResponse = {"emeter":{"get_monthstat":{"month_list":[{"year":2019,"month":1,"energy_wh":3737},{"year":2019,"month":2,"energy_wh":1910},{"year":2019,"month":3,"energy_wh":142}],"err_code":0}}}

dev:9302019-03-20 08:16:24.896 am traceTP-Link Outlet #1 4.2.02 sendCmd: command = {"emeter":{"get_monthstat":{"year": 2019}}} // device IP = 192.168.1.6

dev:9302019-03-20 08:16:24.884 am traceTP-Link Outlet #1 4.2.02 getEnergyStats: year = 2019

dev:9302019-03-20 08:16:22.144 am errorjava.lang.NullPointerException: Cannot get property 'energy_wh' on null object on line 208 (energyThisMonthResponse)

dev:9302019-03-20 08:16:22.134 am traceTP-Link Outlet #1 4.2.02 energyThisMonthResponse: cmdResponse = [emeter:[get_monthstat:[month_list:[], err_code:0]]]

dev:9302019-03-20 08:16:22.133 am traceTP-Link Outlet #1 4.2.02 parseInput: response = [emeter:[get_monthstat:[month_list:[], err_code:0]]]

dev:9302019-03-20 08:16:22.132 am traceTP-Link Outlet #1 4.2.02 inputXOR: cmdResponse = {"emeter":{"get_monthstat":{"month_list":[],"err_code":0}}}

dev:9302019-03-20 08:16:22.103 am traceTP-Link Outlet #1 4.2.02 sendCmd: command = {"emeter":{"get_monthstat":{"year": null}}} // device IP = 192.168.1.6

dev:9302019-03-20 08:16:22.101 am traceTP-Link Outlet #1 4.2.02 getEnergyThisMonth: month = 3 / year = 2019

dev:9302019-03-20 08:16:22.092 am infoTP-Link Outlet #1 4.2.02 TP-Link Outlet #1: Power is 0 Watts.

dev:9302019-03-20 08:16:22.088 am errorSPECIAL LOG MESSAGE LINE 185: cmdResponse = [emeter:[get_realtime:[voltage_mv:241680, power_mw:0, err_code:0, total_wh:142, current_ma:26]]]

dev:9302019-03-20 08:16:22.087 am traceTP-Link Outlet #1 4.2.02 powerResponse: cmdResponse = [emeter:[get_realtime:[voltage_mv:241680, power_mw:0, err_code:0, total_wh:142, current_ma:26]]]

dev:9302019-03-20 08:16:22.085 am traceTP-Link Outlet #1 4.2.02 parseInput: response = [emeter:[get_realtime:[voltage_mv:241680, power_mw:0, err_code:0, total_wh:142, current_ma:26]]]

dev:9302019-03-20 08:16:22.083 am traceTP-Link Outlet #1 4.2.02 inputXOR: cmdResponse = {"emeter":{"get_realtime":{"voltage_mv":241680,"current_ma":26,"power_mw":0,"total_wh":142,"err_code":0}}}

dev:9302019-03-20 08:16:22.012 am infoTP-Link Outlet #1 4.2.02 TP-Link Outlet #1: Power: off

dev:9302019-03-20 08:16:22.005 am traceTP-Link Outlet #1 4.2.02 sendCmd: command = {"emeter":{"get_realtime":{}}} // device IP = 192.168.1.6

dev:9302019-03-20 08:16:22.004 am traceTP-Link Outlet #1 4.2.02 getPower

dev:9302019-03-20 08:16:22.002 am traceTP-Link Outlet #1 4.2.02 parseInput: response = [system:[get_sysinfo:[dev_name:Smart Wi-Fi Plug With Energy Monitoring, hw_ver:2.0, rssi:-41, latitude_i:-339337, err_code:0, type:IOT.SMARTPLUGSWITCH, longitude_i:1512426, deviceId:8006B44052AC733A105F7D33B1DA13FB1A04618A, mac:AC:84:C6:54:A3:B9, active_mode:none, icon_hash:, updating:0, led_off:0, on_time:0, feature:TIM:ENE, relay_state:0, alias:TP-Link Outlet #1, oemId:6480C2101948463DC65D7009CAECDECC, model:HS110(AU), hwId:A28C8BB92AFCB6CAFB83A8C00145F7E2, fwId:00000000000000000000000000000000, sw_ver:1.5.2 Build 171201 Rel.084625]]]

dev:9302019-03-20 08:16:21.998 am traceTP-Link Outlet #1 4.2.02 inputXOR: cmdResponse = {"system":{"get_sysinfo":{"sw_ver":"1.5.2 Build 171201 Rel.084625","hw_ver":"2.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(AU)","mac":"AC:84:C6:54:A3:B9","dev_name":"Smart Wi-Fi Plug With Energy Monitoring","alias":"TP-Link Outlet #1","relay_state":0,"on_time":0,"active_mode":"none","feature":"TIM:ENE","updating":0,"icon_hash":"","rssi":-41,"led_off":0,"longitude_i":1512426,"latitude_i":-339337,"hwId":"A28C8BB92AFCB6CAFB83A8C00145F7E2","fwId":"00000000000000000000000000000000","deviceId":"8006B44052AC733A105F7D33B1DA13FB1A04618A","oemId":"6480C2101948463DC65D7009CAECDECC","err_code":0}}}

dev:9302019-03-20 08:16:21.915 am traceTP-Link Outlet #1 4.2.02 refreshResponse: response = index:00, mac:AC84C654A3B9, ip:c0a80106, port:270f, type:LAN_TYPE_UDPCLIENT, payload:D0F281F88BFF9AF7D5EF94B6D1B4C09FEC95E68FE187E8CAF08BA9DAADF284E193B18BA998B683AD9FBFFD88E18DE9C9F8CFFECCFCCDEDBFDAB698A890A492A095B79BB9D1A6F98FEA98BA80A290BE8EAC80A2D6AFDFBA98A280C986D2FCAFE2A3F1A5F5B9ECABF8AFE6B2F1B99BB795F897F396FAD8E2C088DBEADBEBC382D7FEDCF0D2BFDEBD9FA587C685BF87B389CAFCC6F3C7FDBC8FB5F7CEECC0E286E395CAA4C5A8CDEFD5F7A4C9A8DAAE8ED9B09DDBB292C2AEDBBC9CCBA2D6BE9EDBB5D0A2C5BC9CD1BED0B9CDA2D0B9D7B092BE9CFD91F899EAC8F2D084D4F9B5DCB2D9F9B6C3B7DBBECAEAC9F8DAF6D4A6C3AFCEB7E89BEF8EFA9FBD87B79BB9D6B8E793FA97F2D0EADAF6D4B5D6A2CBBDD887EA85E184A69CBED0BFD1B496BA98FE9BFA8EFB89ECCEF4D682CB86BCF9B7F2D0FCDEABDBBFDEAAC3ADCAE8D2E2CEEC85E689E7B8D0B1C2AA88B290B29EBCCEBDCEA785BF92A697BB99F590F4ABC4A2C4E6DCECC0E28EE18FE881F580E481DEB795AF9EAB9AA89CAE98B496FA9BEF86F287E386D9B092A885B685BC8FBC8BA785ED9AD3B795AF8DCCFEC685BDFFBD84B6F7B1F2B086C584C280B88BCAF2B181B180B481C7F0B587A589ABCDBAF397B58FAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD9DAD8FA381E580F69FFC99D0B496AC8EB686B680C2F6C2F2C7F5B4F7C0F3C081B080B5F3C480B380C2F3B7F6C7F4B2F0C180B084B283BBFAD8F4D6B9DCB1F89CBE84A690A49CACEFDDECDCEDD4E0D8ECDAE9ADEED8EDA99EAE9EA7E4A5E0A3E7A2E1A280AC8EEB99EBB4D7B8DCB99BA191EC91EC

dev:9302019-03-20 08:16:21.877 am traceTP-Link Outlet #1 4.2.02 sendCmd: command = {"system" :{"get_sysinfo" :{}}} // device IP = 192.168.1.6

dev:9302019-03-20 08:16:19.901 am traceTP-Link Outlet #1 4.2.02 currentDateResponse: cmdResponse = [time:[get_time:[sec:19, min:16, month:3, hour:8, year:2019, err_code:0, mday:20]]]

dev:9302019-03-20 08:16:19.900 am traceTP-Link Outlet #1 4.2.02 parseInput: response = [time:[get_time:[sec:19, min:16, month:3, hour:8, year:2019, err_code:0, mday:20]]]

dev:9302019-03-20 08:16:19.899 am traceTP-Link Outlet #1 4.2.02 inputXOR: cmdResponse = {"time":{"get_time":{"year":2019,"month":3,"mday":20,"hour":8,"min":16,"sec":19,"err_code":0}}}

dev:9302019-03-20 08:16:19.848 am traceTP-Link Outlet #1 4.2.02 sendCmd: command = {"time":{"get_time":null}} // device IP = 192.168.1.6

dev:9302019-03-20 08:16:19.771 am infoUpdating .............

Blockquote


#238

There is no good way. This works fine.


#239

Just updated again. Do not use trace logging. I found the error from the last log.

Dave


#240

Yep, that looks like you squashed it.
image

Thanks very much, Nic

FYI: Is it just me or is it weird that when the plug is ON the Current States shows no power but when it's OFF it shows Power ?
like...
image

image


#241

Thanks, Dave. It is showing the energy now. @njanda my HS110 is showing the same.


#242

Glad most are fixed. Run a Refresh and then go to the devices page. Select Events at upper right. I need the latest two events (including date/time) named

switch
power


#243

First on and then off. I turned on and off two times each.


#244

Just added a 3 second delay in the power request. It may be polling before the plug has stabilized to the new power setting.

Again, please. Thanks for the assistance.


#245

The current state is accurate now. :+1: :clap:


#246

Still seeing "get_monthstat" error on HS110.

[dev:218](http://10.0.6.4/logs#dev218)2019-03-27 08:39:16.455 pm [error](http://10.0.6.4/device/edit/218)java.lang.NullPointerException: Cannot get property 'get_monthstat' on null object on line 207 (energyThisMonthResponse)


#247

Not enough information. Need then following:

  1. Open the device in the Hubitat device page. Select "events" and look through the events for an event: "commsError", "Device NAme too long".

  2. Complete the follwoing:

  • Open logging in Hubitat
  • Go to preferences and enable Trace Logging. Save.
  • Find the above error in the log. Copy that error and the previous (lower on page) 10 error log entries.
  • Paste here.
    {Note that this log message should be very close to the error you are reporting.)

Go back to preferences and turn off Trace Logging.