Why is my TI CC2652 smart lighting control system unable to read light sensor data?
hey guys am creating a smart lighting control system using a
TI CC2652
with Embedded Linux. The system should read data from a Thread light sensor, I am using the NCP Thread Border Router Software (Model: OpenThread Border Router, Version: 0.3.0).
But am getting the error
Error reading light level: Device not found
i have verified the Thread network configuration and device commissioning, checked the light sensor status and connection, made sure the OpenThread library is correctly installed and configured
here is my code
@Middleware & OSSolution:Jump to solution
Thanks @Dark AI it's already been resolved, I updated the code to scan for the correct node and added some initialization checks. Here's the updated version:
```python
import openzwave.option
import openzwave.network...
6 Replies
Hi I think your problem is with the device name you're using in your code, make sure the device name 'LightSensor' matches exactly what the Thread network recognizes.
it looks like the code assumes the door sensor is always node 1, have you confirmed the node ID of the door sensor? Nodes might not always be in a sequential order. You might need to scan the network for the correct node ID. Also, openzwave.network.ZWaveNetwork and openzwave.options.ZWaveOption might require proper initialization parameters. Make sure to configure the Z-Wave options correctly. Here’s a bit more detailed setup:
@Boss lady it’s good practice to ensure the network is fully initialized before trying to access nodes. Sometimes the initialization might take a bit longer. You might want to increase the waiting time or add additional checks.
Hey @Boss lady , it seems like the code assumes the device name is always
LightSensor
. Have you confirmed the device name and address? Devices might not always have straightforward names. You might need to discover the device first and make sure the Thread network is fully initialized and the devices are properly discovered before accessing them.
For instance:
Okay @Camila_99$$ should I scan for device name
Solution
Thanks @Dark AI it's already been resolved, I updated the code to scan for the correct node and added some initialization checks. Here's the updated version: