Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. tiana
    3. Topics
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Topics created by tiana

    • tiana

      Arduino Code for RAW sensor value.
      Development • • tiana  

      2
      0
      Votes
      2
      Posts
      1014
      Views

      LastSamurai

      What kind of data? If you want to send light levels the Serial Protocol support V_LIGHT_LEVEL for raw values. Otherwise... well you can send any number you want via a V_LEVEL as long as you know what to do with it on the controller side. Arduino code on how to send data is part of most examples on this page.
    • tiana

      MQTT Gateway
      OpenHAB • • tiana  

      2
      0
      Votes
      2
      Posts
      1795
      Views

      tiana

      I successful tested my gateway, the gateway receives commands from nodes, but something missing the OpenHAB not receive commands from the gateway i install mosquitto but missing a lot of information: How to configure openhab to connect to the mosquitto ? in openhab.cfg i put this mqtt:mysensor.url=tcp://localhost:1883 mqtt:mysensor.clientId=MyMQTT and other option is commented my binding is {mqtt="<[mysensor:MyMQTT/21/1/V_TEMP:state:default]"} What this "MyMQTT means is this related to some setting in mosquitto?
    • tiana

      Gas Sensor Problem
      Troubleshooting • • tiana  

      4
      0
      Votes
      4
      Posts
      1630
      Views

      Mihai

      I was using a different approach for smoke sensor read, if you are interested please take a look here: http://forum.mysensors.org/topic/2747/home-automation-multi-sensor-nodes There are examples includes of single sensor node and multi-sensor node that include also MQ2 sensor and example how to read the associated MQTT message into HomeAssistant.
    • tiana

      Help with req id
      Troubleshooting • • tiana  

      10
      0
      Votes
      10
      Posts
      3063
      Views

      sundberg84

      Hi! Yes, in node sketch Example Binary Sketch: (1.5.X and below) #include <MySensor.h> #include <SPI.h> #include <Bounce2.h> #define CHILD_ID 3 #define BUTTON_PIN 3 // Arduino Digital I/O pin for button/reed switch MySensor gw; Bounce debouncer = Bounce(); int oldValue=-1; // Change to V_LIGHT if you use S_LIGHT in presentation below MyMessage msg(CHILD_ID,V_TRIPPED); void setup() { gw.begin(NULL, 5); // Setup the button pinMode(BUTTON_PIN,INPUT); // Activate internal pull-up digitalWrite(BUTTON_PIN,HIGH); // After setting up the button, setup debouncer debouncer.attach(BUTTON_PIN); debouncer.interval(5); // Register binary input sensor to gw (they will be created as child devices) // You can use S_DOOR, S_MOTION or S_LIGHT here depending on your usage. // If S_LIGHT is used, remember to update variable type you send in. See "msg" above. gw.present(CHILD_ID, S_DOOR); } // Check if digital input has changed and send in new value void loop() { debouncer.update(); // Get the update value int value = debouncer.read(); if (value != oldValue) { // Send in the new value gw.send(msg.set(value==HIGH ? 1 : 0)); oldValue = value; } }