You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.
I'm trying to work with this repository. Using Ubuntu on my laptop. I have all the lights right around. I'm able to log in with my username and password and see my devices, then I'm even sometimes able to "connect" to the network calling devices.devices[0].network.connect() (it claims it works occasionally). But then when I go to interact with the devices, nothing ever happens. Sometimes it runs through the script, sometimes it just hangs at one of the "set" parts. Anyone have any suggestions?
The brightness and temperature components of "devices" are just the class defaults (i.e. 0). Nothing is being called to update those.
import laurel
with open('../login.txt') as f:
login_data = f.read()
username = login_data.split(',')[0]
password = login_data.split(', ')[1]
print('Logging in...')
devices = laurel.laurel(username, password)
print('Successfully logged in!')
devices = devices.devices
idx = 5
print('Name: {}\nMAC: {}\nType: {}\nBrightness: {}\nTemperature: {}\n'.format(
devices[idx].name,
devices[idx].mac,
devices[idx].type,
devices[idx].brightness,
devices[idx].temperature))
print('Connecting...')
devices[idx].network.connect(idx_start = idx)
print('Setting brightness')
devices[idx].set_brightness(10) # THIS DOES NOTHING OR HANGS SOMETIMES
print('Setting power')
devices[idx].set_power(False) # THIS DOES NOTHING OR HANGS SOMETIMES
The text was updated successfully, but these errors were encountered:
@williamkennyAK I tried your code (from a separate issue) as well, and it partially ran through but never did anything to the lights and then would eventually hang
@williamkennyAK I tried your code (from a separate issue) as well, and it partially ran through but never did anything to the lights and then would eventually hang
Unfortunately, I have no lights to test out. I only have the smart plug. I added a bunch of printf statements to find where exactly the code was hanging for me.
There's a bug in bluepy that means it'll tend to wedge when commands are sent. I have a workaround in a local branch until upstream merge it - can you please try upgrading to python-dimond 0.3 (you'll probably want to upgrade to python-laurel 0.5 as well) and see if that works any better?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to work with this repository. Using Ubuntu on my laptop. I have all the lights right around. I'm able to log in with my username and password and see my devices, then I'm even sometimes able to "connect" to the network calling devices.devices[0].network.connect() (it claims it works occasionally). But then when I go to interact with the devices, nothing ever happens. Sometimes it runs through the script, sometimes it just hangs at one of the "set" parts. Anyone have any suggestions?
The brightness and temperature components of "devices" are just the class defaults (i.e. 0). Nothing is being called to update those.
The text was updated successfully, but these errors were encountered: