Example of V_CUSTOM



  • I want to make a device in Vera UI7 that shows up with arbitrary text. I can't find a pre-defined data type that seems to let me do an arbitrary string, but I see this "Custom" type, but I can't find any way to use it or examples on people using it like I'm talking about..

    I thought maybe it would be as easy as some code like this:

    //define and present
    MyMessage msgCustom(0,V_CUSTOM);
    present (0, S_CUSTOM, "Custom String Sensor");
    
    //and then use it like this:
    send(msgCustom.setSensor(0).set("Hello World"));
    

    BUT.. This doesn't seem to work. I'm only beginning to learn this stuff, so maybe there's a total newbie error in here..

    Can someone point me to an example sketch that perhaps gives the ability to return arbitrary string values to the Vera dashboard?

    Thanks!!
    Steve


  • Admin

    You have to use dev branch on Arduino and install the following device on Vera (created by @BartE):

    https://github.com/mysensors/Vera/tree/development/LcdText

    It sends V_TEXT message to the node (S_INFO device).



  • AWESOME!

    Thanks a lot! I'm already using Dev branch, so this should be easy to test!

    I guess I know what I'm doing tonight!

    -Steve



  • Out of curiosity....what is your use case for this? [just thinking new ways to expand my system]



  • Well.. My initial use is for a pool temperature / level sensor.. The temp is easy - It's registering as a V_TEMP and working great, but what I want is for the level to say "1.5 inches low" or "2 inches high", etc.. I currently have the value implemented as another V_TEMP, and have my arduino code calibrating the code to show 0 degrees if it's "perfect" and then plus/minus one degree for each inch the pool is high or low, but to have a sensor that is named "Pool level" and the data being "1.5 degrees F" isn't intuitive. I thought about using a distance sensor, but I couldn't get the distance code to work in the first place, and then I'd have to just remember what "distance" is normal (ie: is 0 the "top" of the pool, the the distance represents how far down the water is?) It just seems simpler in many cases to have a few english words displayed in the Vera website.

    Another idea I have is to replace all my "expensive" z-wave door sensors with MySensors on Pro Mini because I hate that the output of the door sensor is just a picture of the door sensor with the "rainbow" on top either colored red, or not, and I have to remember which color is "open". I'd rather have a Vera output that just says "OPEN" or "CLOSED" and I can't figure out any way to do that with the regular sensors so I was just going to build my own..

    I'm sure I'll think of more, but that's enough to keep me busy for a while!
    .. didn't get to try any of this last night as I had hoped.. we ended up going to the town carnival instead... Will try again tonight!
    -Steve


Log in to reply
 

Suggested Topics

  • 3
  • 5
  • 1
  • 1
  • 6
  • 2

57
Online

11.4k
Users

11.1k
Topics

112.7k
Posts