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
jopebeJ

jopebe

@jopebe
About
Posts
22
Topics
2
Shares
0
Groups
0
Followers
1
Following
0

Posts

Recent Best Controversial

  • "interface" to my OPC-System
    jopebeJ jopebe

    Hallo to all the specialists!
    I have a well running Moeller-Eaton Easy Relay home automation wit an OPC DA server.
    I also use IOBroker as a controler for all my MySensors-nodes.
    I looked for an software interface to connect both, but I didn't find one.
    Now I decided to connect them via an Arduino Mega as an ethernet-gateaway.
    So I need only a lot of outputs and inputs with two states.
    I found the example-sketch "Relais Actuator", which is very helpful for such a lot of identical outputs.
    But I found no way to add lines for the inputs as easy as the outputs.
    I added:

    #define BIN_1  31  // Arduino Digital I/O pin number for first switch (second on pin+1 etc)
    #define NUMBER_OF_BIN 28 // Total number of attached switches
    #define BIN_HIGH 1  // GPIO value to write to turn on attached switch
    #define BIN_LOW 0 // GPIO value to write to turn off attached switch
    

    In "void before" i added

    for (int sensor=16, pin=BIN_1; sensor<=NUMBER_OF_BIN; sensor++, pin++) {
            // Then set relay pins in output mode
            pinMode(pin, INPUT);
            digitalWrite(pin, HIGH);
            // Set switch to last known state (using eeprom storage)
            digitalWrite(pin, loadState(sensor)?1 :0);
            }
    

    in void presentation I addes

    for (int sensor=16, pin=BIN_1; sensor<=NUMBER_OF_BIN; sensor++, pin++) {
            // Register all sensors to gw (they will be created as child devices)
            present(sensor, S_DOOR);
        }
    

    The childs appear in "objects" without any state.
    I have no idea, how to send the states to the controler for further use in IOBroker.
    I don`t know how to create a message-container and send the states.
    If anybody could help me to finish my projekt, I were very happy!
    JOPBE

    My Project

  • Why don't you write mysensors library for ESP8266 similar to the nRF one ?
    jopebeJ jopebe

    Oh, im very sorry Cant find, give me a hint please.
    By the way: Very great work all about MySensors!
    Thank you.

    General Discussion
  • Login

  • Don't have an account? Register

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