jtburgess / indigo-TP-LInk

Indigo Plugin for TP-Link SmartPlugs, powerStrips, dimmer switches, and dimmable bulbs; (coming someday color bulbs)
The Unlicense
2 stars 4 forks source link

Problem with logs showing not defined for: curEnergyLevel & accumEnergyTotal #16

Open sumocomputers opened 1 year ago

sumocomputers commented 1 year ago

All my HS-110 devices on 1.0.0 now get flooded with error messages (see below).

I actually don't use the energy data from the TP-Link devices, so it doesn't matter, but I have Energy Monitoring turned on for all the devices, yet we still have issues.

What is weird is now my devices aren't showing in Indigo the way they used to (see screenshot). Notice how all the energy stats are missing? I think they used to be under device details.

Screenshot 2023-05-25 at 8 15 42 AM

What is more problematic is all the red in the logs every minute...

Error device "TP-Link 04 Plugin - Washer" state key curEnergyLevel not defined (ignoring update request)
Error device "TP-Link 04 Plugin - Washer" state key curEnergyLevel not defined (ignoring update request)
Error device "TP-Link 04 Plugin - Washer" state key accumEnergyTotal not defined (ignoring update request)
Error device "TP-Link 04 Plugin - Washer" state key accumEnergyTotal not defined (ignoring update request)
Error device "TP-Link 07 Plugin - MB AC" state key curEnergyLevel not defined (ignoring update request)
Error device "TP-Link 07 Plugin - MB AC" state key curEnergyLevel not defined (ignoring update request)
Error device "TP-Link 07 Plugin - MB AC" state key accumEnergyTotal not defined (ignoring update request)
Error device "TP-Link 07 Plugin - MB AC" state key accumEnergyTotal not defined (ignoring update request)
Error device "TP-Link 06 Plugin - LR AC" state key curEnergyLevel not defined (ignoring update request)
Error device "TP-Link 06 Plugin - LR AC" state key curEnergyLevel not defined (ignoring update request)
Error device "TP-Link 06 Plugin - LR AC" state key accumEnergyTotal not defined (ignoring update request)
Error device "TP-Link 06 Plugin - LR AC" state key accumEnergyTotal not defined (ignoring update request)
Error device "TP-Link 08 Plugin - Kitchen Water Heater" state key curEnergyLevel not defined (ignoring update request)
Error device "TP-Link 08 Plugin - Kitchen Water Heater" state key curEnergyLevel not defined (ignoring update request)
Error device "TP-Link 08 Plugin - Kitchen Water Heater" state key accumEnergyTotal not defined (ignoring update request)
Error device "TP-Link 08 Plugin - Kitchen Water Heater" state key accumEnergyTotal not defined (ignoring update request)
Error device "TP-Link 05 Plugin - Dryer" state key curEnergyLevel not defined (ignoring update request)
Error device "TP-Link 05 Plugin - Dryer" state key curEnergyLevel not defined (ignoring update request)
Error device "TP-Link 05 Plugin - Dryer" state key accumEnergyTotal not defined (ignoring update request)
Error device "TP-Link 05 Plugin - Dryer" state key accumEnergyTotal not defined (ignoring update request)
jtburgess commented 1 year ago

I thought I fixed that. Maybe I never pushed a version 1.0.1. Stay tuned.-- JohnOn May 25, 2023, at 11:25 AM, sumocomputers @.***> wrote: All my HS-110 devices on 1.0.0 now get flooded with error messages (see below). I actually don't use the energy data from the TP-Link devices, so it doesn't matter, but I have Energy Monitoring turned on for all the devices, yet we still have issues. What is weird is now my devices aren't showing in Indigo the way they used to (see screenshot). Notice how all the energy stats are missing? I think they used to be under device details.

What is more problematic is all the red in the logs every minute... Error device "TP-Link 04 Plugin - Washer" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 04 Plugin - Washer" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 04 Plugin - Washer" state key accumEnergyTotal not defined (ignoring update request) Error device "TP-Link 04 Plugin - Washer" state key accumEnergyTotal not defined (ignoring update request) Error device "TP-Link 07 Plugin - MB AC" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 07 Plugin - MB AC" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 07 Plugin - MB AC" state key accumEnergyTotal not defined (ignoring update request) Error device "TP-Link 07 Plugin - MB AC" state key accumEnergyTotal not defined (ignoring update request) Error device "TP-Link 06 Plugin - LR AC" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 06 Plugin - LR AC" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 06 Plugin - LR AC" state key accumEnergyTotal not defined (ignoring update request) Error device "TP-Link 06 Plugin - LR AC" state key accumEnergyTotal not defined (ignoring update request) Error device "TP-Link 08 Plugin - Kitchen Water Heater" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 08 Plugin - Kitchen Water Heater" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 08 Plugin - Kitchen Water Heater" state key accumEnergyTotal not defined (ignoring update request) Error device "TP-Link 08 Plugin - Kitchen Water Heater" state key accumEnergyTotal not defined (ignoring update request) Error device "TP-Link 05 Plugin - Dryer" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 05 Plugin - Dryer" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 05 Plugin - Dryer" state key accumEnergyTotal not defined (ignoring update request) Error device "TP-Link 05 Plugin - Dryer" state key accumEnergyTotal not defined (ignoring update request)

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

jtburgess commented 1 year ago

Between 0.9.8 and 1.0.0, git diff shows that none of this logic was changed. I did find one place where curEnergyLevel wasn’t properly initialized, and another where accumEnergyTotal wasn’t initialized.

However, SOMETHING changed and broke it. SO I hope those fixes do the trick.

I have updated GitHub with version 1.0.0.1 to include these and other minor changes for another user. I’m not at home so I have no way to test, I.e., I can’t check for stupid typos, etc. But if you want to try that, feel free. Keep a copy of what you’re currently running, so you can revert.

and let me know if this helps.

-- John

On May 25, 2023, at 11:25 AM, sumocomputers @.***> wrote:

All my HS-110 devices on 1.0.0 now get flooded with error messages (see below).

I actually don't use the energy data from the TP-Link devices, so it doesn't matter, but I have Energy Monitoring turned on for all the devices, yet we still have issues.

What is weird is now my devices aren't showing in Indigo the way they used to (see screenshot). Notice how all the energy stats are missing? I think they used to be under device details.

https://user-images.githubusercontent.com/656453/240959929-0d599760-1d7b-4fff-8934-9c84e8e66b71.png What is more problematic is all the red in the logs every minute...

Error device "TP-Link 04 Plugin - Washer" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 04 Plugin - Washer" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 04 Plugin - Washer" state key accumEnergyTotal not defined (ignoring update request) Error device "TP-Link 04 Plugin - Washer" state key accumEnergyTotal not defined (ignoring update request) Error device "TP-Link 07 Plugin - MB AC" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 07 Plugin - MB AC" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 07 Plugin - MB AC" state key accumEnergyTotal not defined (ignoring update request) Error device "TP-Link 07 Plugin - MB AC" state key accumEnergyTotal not defined (ignoring update request) Error device "TP-Link 06 Plugin - LR AC" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 06 Plugin - LR AC" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 06 Plugin - LR AC" state key accumEnergyTotal not defined (ignoring update request) Error device "TP-Link 06 Plugin - LR AC" state key accumEnergyTotal not defined (ignoring update request) Error device "TP-Link 08 Plugin - Kitchen Water Heater" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 08 Plugin - Kitchen Water Heater" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 08 Plugin - Kitchen Water Heater" state key accumEnergyTotal not defined (ignoring update request) Error device "TP-Link 08 Plugin - Kitchen Water Heater" state key accumEnergyTotal not defined (ignoring update request) Error device "TP-Link 05 Plugin - Dryer" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 05 Plugin - Dryer" state key curEnergyLevel not defined (ignoring update request) Error device "TP-Link 05 Plugin - Dryer" state key accumEnergyTotal not defined (ignoring update request) Error device "TP-Link 05 Plugin - Dryer" state key accumEnergyTotal not defined (ignoring update request) — Reply to this email directly, view it on GitHub https://github.com/jtburgess/indigo-TP-LInk/issues/16, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHAHALPNSJGLZEZG6QA7WCLXH52U7ANCNFSM6AAAAAAYPAHYPQ. You are receiving this because you are subscribed to this thread.

sumocomputers commented 1 year ago

With version 1.0.0.1, the log errors seemed to have gone away. Time will tell if everything else is working correctly.

I did have to add every device from scratch, disable the old ones, and find all dependencies and change devices in my Schedules and Triggers. This is because the errors were still happening with the old devices but new plugin, and as you can see in the screenshots, the Device Details area was not correct, which I think was causing the errors.

Screenshot 2023-06-08 at 12 19 20 PM Screenshot 2023-06-08 at 12 19 30 PM

FYI - the plugin version is now showing as 1.0.0.0 in Indigo, not 1.0.0.1

Screenshot 2023-06-08 at 12 19 56 PM
jtburgess commented 1 year ago

Thanks. I’ll have to figure out what’s different about “old” devices and fix them so you don’t have to. --John On Jun 8, 2023, at 3:25 PM, sumocomputers @.***> wrote: With version 1.0.0.1, the log errors seemed to have gone away. Time will tell if everything else is working correctly. I did have to add every device from scratch, disable the old ones, and find all dependencies and change devices in my Schedules and Triggers. This is because the errors were still happening with the old devices but new plugin, and as you can see in the screenshots, the Device Details area was not correct, which I think was causing the errors.

FYI - the plugin version is now showing as 1.0.0.0 in Indigo, not 1.0.0.1

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>