magico13 / PyEmVue

Python Library for the Emporia Vue Energy Monitor
MIT License
185 stars 36 forks source link

How can I get an outlet's name? #49

Open dswhelan opened 1 year ago

dswhelan commented 1 year ago

I'm experimenting with your Emporia API. I currently only have an Emporia Smart Plug (aka an outlet device) and can see that device using your API, but I don't see any way to see the name associated with that outlet. Is it possible to do so, and if so, how?

magico13 commented 1 year ago

Short answer without me doing any test code, it should be available on the devices call, then looking for the device with that guid. Usually I work the opposite way, if you make a call for all the devices it should populate the outlet object on the outlet device and that should give you most of the data you need

dswhelan commented 1 year ago

Mike,

Thanks for getting back to me so quickly. All I'm seeing when I look at the outlet objects returned from get_devices_status() is the device_gid and a channel name of None. That's ok for me for now but having a human consumable name would be nice.

Regards,

Daniel Whelan DS Whelan Consulting, LLC +1 949 248-1098


This communication is only for the use of the intended recipient. It may contain confidential or proprietary information. If you are not the intended recipient or have received this communication in error, please notify the sender via phone and destroy this communication immediately.

On Mon, Apr 17, 2023 at 10:13 AM Mike Marvin @.***> wrote:

Short answer without me doing any test code, it should be available on the devices call, then looking for the device with that guid. Usually I work the opposite way, if you make a call for all the devices it should populate the outlet object on the outlet device and that should give you most of the data you need

— Reply to this email directly, view it on GitHub https://github.com/magico13/PyEmVue/issues/49#issuecomment-1511767316, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEXI3YMOI4IFO66Q4I2R74LXBV22VANCNFSM6AAAAAAXBOYWOU . You are receiving this because you authored the thread.Message ID: @.***>

magico13 commented 1 year ago

This call might do it. I thought they were returning this info on the basic call now but I might be mistaken and you might still need to do this. https://github.com/magico13/pyemvue#get-additional-device-properties

Call vue.populate_device_properties(device) with the device object from get_devices and it should fill in the remaining properties that are set in the app, like name.

dswhelan commented 1 year ago

Perfect! Thanks Mike.

Regards,

Daniel Whelan DS Whelan Consulting, LLC +1 949 248-1098


This communication is only for the use of the intended recipient. It may contain confidential or proprietary information. If you are not the intended recipient or have received this communication in error, please notify the sender via phone and destroy this communication immediately.

On Mon, Apr 17, 2023 at 1:48 PM Mike Marvin @.***> wrote:

This call might do it. I thought they were returning this info on the basic call now but I might be mistaken and you might still need to do this. https://github.com/magico13/pyemvue#get-additional-device-properties

Call vue.populate_device_properties(device) with the device object from get_devices and it should fill in the remaining properties that are set in the app, like name.

— Reply to this email directly, view it on GitHub https://github.com/magico13/PyEmVue/issues/49#issuecomment-1512065145, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEXI3YLGQWBEPM4MNZUS37LXBWUBLANCNFSM6AAAAAAXBOYWOU . You are receiving this because you authored the thread.Message ID: @.***>