Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. V_FORECAST

V_FORECAST

Scheduled Pinned Locked Moved Troubleshooting
4 Posts 2 Posters 987 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • skywatchS Offline
    skywatchS Offline
    skywatch
    wrote on last edited by
    #1

    Where can I find out the format of the data sent by V_FORECAST?

    I assumed it was an int or byte containing a pointer to the index of an array with the various weather states in - but seems not to work for me....Any ideas or info please?

    mfalkviddM 1 Reply Last reply
    0
    • skywatchS skywatch

      Where can I find out the format of the data sent by V_FORECAST?

      I assumed it was an int or byte containing a pointer to the index of an array with the various weather states in - but seems not to work for me....Any ideas or info please?

      mfalkviddM Online
      mfalkviddM Online
      mfalkvidd
      Mod
      wrote on last edited by mfalkvidd
      #2

      @skywatch I've never used V_FORECAST, but the documentation at https://www.mysensors.org/download/serial_api_20#set,-req might be useful.

      EDIT: https://github.com/mysensors/MySensors/blob/6ffe29cb5fcfa33fa83133044c2d16ee45c66697/core/MyMessage.h#L108 suggests it is a string.

      skywatchS 1 Reply Last reply
      0
      • mfalkviddM mfalkvidd

        @skywatch I've never used V_FORECAST, but the documentation at https://www.mysensors.org/download/serial_api_20#set,-req might be useful.

        EDIT: https://github.com/mysensors/MySensors/blob/6ffe29cb5fcfa33fa83133044c2d16ee45c66697/core/MyMessage.h#L108 suggests it is a string.

        skywatchS Offline
        skywatchS Offline
        skywatch
        wrote on last edited by
        #3

        @mfalkvidd Thank you! - That explains why I have had trouble getting it to work......

        Time to re-write that bit of code I think ;)

        skywatchS 1 Reply Last reply
        0
        • skywatchS skywatch

          @mfalkvidd Thank you! - That explains why I have had trouble getting it to work......

          Time to re-write that bit of code I think ;)

          skywatchS Offline
          skywatchS Offline
          skywatch
          wrote on last edited by
          #4

          This seems to work for anyone who needs it.......

          void receive(const MyMessage &message) {
             if (message.sensor == CHILD_ID_GETFORECAST && message.type == V_FORECAST) {
              forecast = (message.getString());
              if (forecast == "stable"){
              Index = 0;}
              else if (forecast == "sunny"){
              Index = 1;}
              else if (forecast == "cloudy"){
              Index = 2;}
              else if (forecast == "unstable"){
              Index = 3;}
              else if (forecast == "thunderstorm"){
              Index = 4;}
              else if (forecast == "unknown"){
              Index = 5;}
           
            }
          
          1 Reply Last reply
          1

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          14

          Online

          12.1k

          Users

          11.2k

          Topics

          113.4k

          Posts


          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • MySensors
          • OpenHardware.io
          • Categories
          • Recent
          • Tags
          • Popular