[SOLVED] Help needed - how to access node data in gateway code for usage in SMS alerts over GPRS?



  • Hi everyone!

    I am making a monitoring system with several sensor nodes that will be setup in two versions,

    • a full system with nodes, gateway and controller with openHAB
    • a light version without a controller where the gateway has a GPRS shield. Additional code will send out SMS alert messages when certain node data conditions are met

    I have set up a node sending battery level and temperature to the gateway. Then I have tried to figure out how to get the values marked with red rectangles into variables for usage in the GPRS/SMS alert message code but so far I have not succeeded.

    Gateway.jpg
    Can anyone give me a hint in the right direction?



  • @ruxu

    As an occasional coder I finally managed to figure it out myself after about five hours of trying and Googling....

    Created some additional global extern variables in the MyGateway.cpp that takes their values from msg.sender, msg.sensor and msg.getString. Now I just have to start to code the conditional alert functions for triggering the SMS message sending...



  • hello,
    are novice with mysensor and Arduino, I am interested in your solution to recover data from the nodes transmissible. you can see some examples. thank you very much.


Log in to reply
 

Suggested Topics

  • 1
  • 5
  • 1
  • 1
  • 6
  • 10

17
Online

11.4k
Users

11.1k
Topics

112.7k
Posts