-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue Getting Data From Mini Style Bulbs #119
Comments
I'm unsure why the minis would ignore that packet. I'd suggest contacting their support team and seeing if they can ask an engineer for you. Though I will say the signal strength information is largely useless. also, a couple notes on your code sample, you likely want something more like async def getpower(target, reference):
def error_catcher(error):
print(
f"Failed to get information from a device: {type(error).__name__}: {error}"
)
async with target.session() as sender:
msgs = [DeviceMessages.GetWifiInfo(), DeviceMessages.GetLabel()]
async for pkt in sender(msgs, reference, error_catcher=error_catcher):
if pkt | DeviceMessages.StateWifiInfo:
print(f"Device {pkt.serial} has power level of {pkt.signal}")
elif pkt | DeviceMessages.StateLabel:
print(f"Device {pkt.serial} has a label of {pkt.label}") which logs something like
|
(HardCodedSerials caches the ip addresses of the serials it's aware of but if you're not using outside of one sender object and you already have a string or a list of strings, then you might as well just pass those into the sender directly as that has it's own cache anyways) |
Thanks for the tips on how to better implement the code. I'm fairly new into python so my original snippet was probably quite sloppy. The reason I am grab the wifi signal strength is so that I can log it over time with influxdb and test out some different wifi configs with my unifi setup. I have some rogue bulbs that play nice one day but then go unresponsive for days at a time. So I am moving my unifi access points around and playing with some of the settings to see if I can get a more reliable setup. I will see if the engineers at Lifx can offer any insight, but given that this is third party to them I thought I'd ask here first. |
Yeah, reasonable. I'm unsure if the data those packets return will be useful in either case, but I could be wrong |
I have a variety of LIFX devices in my home and am trying to log the wifi signal strength from them over time. I have found that all the DeviceMessages that I send to mini style bulbs (color or dd) always time out. My code has no issue getting responses from the BR30 style bulbs or the LIFX Z controllers. Is there anything special that I need to configure in order to receive messages from these devices? They are online and responding to UDP requests from my Loxone miniserver. Here is a snippet of the code that I was using to test receiving the messages back.
The text was updated successfully, but these errors were encountered: