How to get BH1749 Light sensor RGB values data from mesh sensor along with BME680

Hello

I was trying to add BH1749 I2C Sensor for existing Mesh_Sensor example to get RGB values like shown in this Light_Sensor example. Couldn't decide how to do it and which Sensor_Types (FYI: I used bt_mesh_sensor_present_amb_light_level) and which Sensor_Channels    (FYI: I used SENSOR_CHAN_RED, SENSOR_CHAN_GREEN, SENSOR_CHAN_BLUE) or it really possible? The Things i used so far is unfortunatley not success need a help in this.

Thank You

Regards

  • Hello Marte

    That's so sweet of you to upload along with examples and Yeah i get value on mobile as i attached in the picture below.

    But I cannot see the values on PuTTY no idea what is the problem attached the picture below. So after i have done the provisioning process it stops and show nothing.

    I have another doubt in Sensors in this link we have sensor channels which we can use to get values according to the sensor we use there we have seperate channels for RED,GREEN and BLUE like SENSOR_CHAN_RED, SENSOR_CHAN_GREEN, SENSOR_CHAN_BLUE but we don't have such type of seperate thing for sensor types as we have in Sensor_Types this link. So how to have some kind of Red value:230 , Green Value:190. Blue value: 150, values these in output?

    Example: We have seperate sensor types for temperature, humidity, air pressure as same as names to identfy easily. So, how do it in similar for RGB Values?

    Thank You for your effort

    Best Regards

  • Hi,

    SaSu said:
    But I cannot see the values on PuTTY no idea what is the problem attached the picture below. So after i have done the provisioning process it stops and show nothing.

    Is this from the sensor client? Are you using the sensor client from the SDK or the one I uploaded here? Also, make sure that you have configured the models in addition to provisioning. You must bind application key 1 to the sensor server and sensor client models, and you must also configure publishing and subscribing on the server as well as subscribing on the client. This is explained under Configuring models in the documentation.

    SaSu said:
    So how to have some kind of Red value:230 , Green Value:190. Blue value: 150, values these in output?

    You will need to treat each channel as a different sensor. However, I realized that doing it as in my example will cause issues on the client side, as the client does not have a way of differentiating between the three sensors, since it only checks the device property ID, which is identical in all three cases.

    For this to work on the client side you need to create an element for each color instead, both on the server and client side. I wanted to test this myself, so I have already made examples for this as well. Be aware that with this method you will have to make sure to select different publish/subscribe address for the different elements, for example unicode or group address, in the nRF Mesh app. You need to do this on both the server and client, and the publish address for the red light on the server needs to be the same as the subscribe address for red light on the client.

    mesh_rgb_light_sensor_server.zip

    mesh_rgb_light_sensor_client.zip

    Best regards,

    Marte

  • Hello Marte

    Is this from the sensor client? Are you using the sensor client from the SDK or the one I uploaded here? Also, make sure that you have configured the models in addition to provisioning. You must bind application key 1 to the sensor server and sensor client models, and you must also configure publishing and subscribing on the server as well as subscribing on the client. This is explained under Configuring models in the documentation.

    The PuTTY Ouput is from Sensor_client i used the client which you have uploaded. Yes I used the configuring models as per the Documentation.

    For this to work on the client side you need to create an element for each color instead, both on the server and client side. I wanted to test this myself, so I have already made examples for this as well. Be aware that with this method you will have to make sure to select different publish/subscribe address for the different elements, for example unicode or group address, in the nRF Mesh app. You need to do this on both the server and client, and the publish address for the red light on the server needs to be the same as the subscribe address for red light on the client.

    Thank You so much for this example i will try and let you know:)

    Best Regards

Related