Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Call back form Mesh device (node) to iOS app

Hello All,

We are developing app which uses NRF iOS mesh SDK for configuring , provisioning and controlling mesh devices . We have mesh air purifier which are able to configure and   connect successfully . I would like to know how app can receive events when some state changed on device manually . I..e. we would like to receive events in app when ever  we change speed of air purifier manually , on/off manually .   Please do reply  

Parents
  • Hello,

    I would like to know how app can receive events when some state changed on device manually

    Do you want to receive such events from any device in the network, or just the 1 air purifier? And do you want to able to recieve this from anywhere in the network or just eg. in proximity to your proxy node.

    Regards,

    Elfving

  • Do you want to receive such events from any device in the network, or just the 1 air purifier?

    --> Only air purifiers 

    Do you want to able to receive this from anywhere in the network or just eg. in proximity to your proxy node .

    --> In proximity to my nodes for now .

    Thanks Elfving for the reply  .

    Regard's

    Santosh

     

  • So I assume there might be several air purifiers in one network.

    One potential solution is to let all air purifiers have a vendor model that sends their updated state to a group address, which is received at a server model which stores the states of all air purifiers. This server/servers could be on your proxy node for instance, or at another node/nodes.

    Only having one such server might be the easiest, though can run into issues eg. with it being offline for a second, rendering to functionality completely offline/unsynced. If you do go for several servers (proxy s), you may consider have a periodically publish of the status of all node between all servers to synchronize.

    The phone could then get these by prompting the proxy node to do so. The proxy node can simply send a get-message to the server(s) in question, which would be fed into the phone getting the mesh messages addressed to the proxy.

    Regards,

    Elfving

  • So I assume there might be several air purifiers in one network.

    Thats right .

    One potential solution is to let all air purifiers have a vendor model that sends their updated state to a group address, which is received at a server model which stores the states of all air purifiers. This server/servers could be on your proxy node for instance, or at another node/nodes.

    So, This means from app whenever we change the state we need to send latest state to server model . OR The air purifier itself would publish its state for which server model is subscribed to ?

    It would be great  if you could share some reference code or documentation link .

    Thanks,

    Santosh 

  • Santosh3685 said:

    So, This means from app whenever we change the state we need to send latest state to server model . OR The air purifier itself would publish its state for which server model is subscribed to ?

    The latter, as I assume you wanted to change the state of the device manually; the air purifiers send a notice about their state being updated to a server model, from the air purifier. Here is an illustration that I made of it, if it helps: 

    Note that you could also develop this without vendor models, by using eg. the heartbeat messages (for more, read 3.6.7 in Mesh Profile spec). This could give you an added benefit of being supported better by other nodes that are not produced by you. Though you would be able to customize it better for your needs and performance requirements by using a vendor-model. 

    There is a lot of documentation available for Mesh, as well as lots of samples. If you want to start of developing what I've outlined here, you might want to have a look at making a new model. As well as the samples demonstrating how that is done, for instance this one.  

    Regards,

    Elfving

Reply Children
No Data
Related