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. Development
  3. CLIENT_GW_MQTT / Setup and automatisation of Presentation and set/req

CLIENT_GW_MQTT / Setup and automatisation of Presentation and set/req

Scheduled Pinned Locked Moved Development
1 Posts 1 Posters 567 Views 1 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.
  • maxtoxM Offline
    maxtoxM Offline
    maxtox
    wrote on last edited by maxtox
    #1

    Hi,

    just writing a sketch, which i want to share later on wit ALL who wants to have an MEGA as client, sensor node and GW ...

    AT first i want to have a overview over all my pins at MEGA 2560 and see what they "are".

    So i started with setting a String Array for 80 PINS:

    String iomodus[80][3] = { 
    //"presentation", "set/req", "description"
    {„0“,                       “0“,              “free“},
    {„0“,“0“,“free“}, 
    {"S_BINARY","V_STATUS","test switch"}, //D3
    {„0“,“0“,“free“}, //D4
    ...
    {„0“,“0“,“free“}, //D80
    };
    
    1. i want to present sensors ...and here is my problem...

    I want to convert String rows to uint8_t to make a procedure to let the sketch present all my sensors. where
    i= CHILD_ID
    iomodus[i][1st COLUMN] = presentation ID
    iomodus[i][3rd COLUMN] = description as Text
    ACK= true

    void presentation()  
    {   
      // Send the sketch version information to the gateway and Controller
      sendSketchInfo("Relay+Max31855", "1.0");
    
    for (int i = 0; i<70; i++) //all Ports D0 bis D69
    
    //present(uint8_t childSensorId, uint8_t sensorType, const char *description, bool enableAck)
    present(i, iomodus[i][1], iomodus[i][3], true);
    }
    

    does no work!!!

    and says :

    **cannot convert 'String' to 'uint8_t {aka unsigned char}' for argument '2' to 'void present(uint8_t, uint8_t, const char*, bool)'**
    
    1. Want to set Variables/Topics to my controller with...
      iomodus[i][2nd column]
      Could you please help me to solv this...

    tried 6h everything i knew (pointers etc..) but no luck...

    Thank you in Advance!

    Arduino Mega 2560 with iobroker.net (MQTT, node-red, etc..)

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    9

    Online

    11.7k

    Users

    11.2k

    Topics

    113.0k

    Posts


    Copyright 2019 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