Navigation

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

    jopebe

    @jopebe

    2
    Reputation
    22
    Posts
    664
    Profile views
    1
    Followers
    0
    Following
    Joined Last Online

    jopebe Follow

    Best posts made by jopebe

    • "interface" to my OPC-System

      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

      posted in My Project
      jopebe
      jopebe
    • RE: Why don't you write mysensors library for ESP8266 similar to the nRF one ?

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

      posted in General Discussion
      jopebe
      jopebe

    Latest posts made by jopebe

    • RE: 💬 Building an Ethernet Gateway

      I did.
      Error comes once, than for minutes no error. And now the error disappeared out of the log.
      I don`t understand .
      Thank you for the hint.

      posted in Announcements
      jopebe
      jopebe
    • RE: 💬 Debugging Sensors and the Gateway

      The MySensors Core messages (MCO) are described here = broken!?!

      posted in Announcements
      jopebe
      jopebe
    • RE: 💬 Building an Ethernet Gateway

      Here the log from debug:
      0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.1
      0;255;3;0;9;TSM:INIT
      0;255;3;0;9;TSF:WUR:MS=0
      0;255;3;0;9;TSM:INIT:TSP OK
      0;255;3;0;9;TSM:INIT:GW MODE
      0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
      0;255;3;0;9;MCO:REG:NOT NEEDED
      IP: 192.168.178.133
      0;255;3;0;9;Eth: connect
      0;255;3;0;9;MCO:BGN:STP
      Can`t find any error.
      From here only reading nodes.

      posted in Announcements
      jopebe
      jopebe
    • RE: 💬 Building an Ethernet Gateway

      Hallo,
      I`m running this ethernet-gateway with w5100 shield on uno.
      In the log of iobroker I always see this message again and again:
      mysensors.0 2018-01-26 11:10:58.942 error Error for "192.168.178.133": Error: read ECONNRESET
      mysensors.0 2018-01-26 11:10:55.105 info Received INTERNAL message: I_GATEWAY_READY: Gateway startup complete.
      mysensors.0 2018-01-26 11:10:55.103 warn ID not found. Inclusion mode OFF: {"id":"0","childId":"255","type":"presentation","ack":false,"payload":"2.1.1","subType":"S_ARDUINO_RELAY"}
      mysensors.0 2018-01-26 11:10:55.094 info Connected 192.168.178.133:49153
      mysensors.0 2018-01-26 11:10:54.897 error Error for "192.168.178.133": Error: read ECONNRESET
      I cannot find a solution in the forum of iobroker and also nothing about it in this forum.
      By the way: In the list of objects in iobroker there is always a child id 255 without any state or value.
      Is it an issue ?
      Perhaps of iobroker?
      Any solution?

      posted in Announcements
      jopebe
      jopebe
    • RE: 💬 Relay

      Thank You for Your quick answer.
      Do I understand You correctly: I must index the BUTTOLD?
      As BUTTOLD[pin) for example or how? Where?

      posted in Announcements
      jopebe
      jopebe
    • RE: 💬 Relay

      This is a nice sketch and it is very universal for relays. Now m looking for a similar sketch for digital inputs such as buttons i.e.. I would like to join both. The problem: I want to use a mega for reading status of a lot of digital outputs (min.20) of another ISP. It is only High or Low. Only when the level changes, I want the mega send a message to the gateway. I tried this "for" loop, but it didnt help. There are too many informations sent to the gateway. I imagine a solution, where only a change at the pin will create an information, that is sent to the gateway.
      Here my test, which didnt run:
      void loop()
      {

      for (int sensor=16, pin=BIN_1; sensor<=NUMBER_OF_BIN; sensor++, pin++)
      {
      int BUTT;
      int BUTTOLD;
      BUTT =digitalRead(pin);
      if (BUTT != BUTTOLD && BUTT !=0){
      MyMessage msg(sensor, V_TRIPPED);
      send(msg.set(BUTT ? "1" : "0"));
      }
      BUTTOLD = BUTT;
      wait (900);
      }
      }
      Has anybody an idea or a hint for me?

      posted in Announcements
      jopebe
      jopebe
    • "interface" to my OPC-System

      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

      posted in My Project
      jopebe
      jopebe
    • RE: 💬 Building an Ethernet Gateway

      Thank You to all, who tried to help.
      I think, I found the solution:
      There was this line in the sketch: "const unsigned long tUpdate=60000; //update interval"
      When I changed the time to 6000, it runs as when as the radio was connected.
      So it was probably missing some kind of "interrupt", which usually comes from the radio , when it listens to the nodes or so?

      posted in Announcements
      jopebe
      jopebe
    • RE: 💬 Building an Ethernet Gateway

      I dont know, how to send my sketch as a file. Copy and past doesnt run.
      I use an ethernet-shield and as I mentioned, when I connect and switch on the radio, everything is alrigth.

      posted in Announcements
      jopebe
      jopebe
    • RE: 💬 Building an Ethernet Gateway

      Here thr output of the seriel monitor:
      0;255;3;0;9;MCO:BGN:INIT GW,CP=R-NGA--,VER=2.1.1
      IP: 192.168.178.134
      0;255;3;0;9;Eth: connect
      0;255;3;0;9;MCO:BGN:STP
      0;255;3;0;9;MCO:REG:NOT NEEDED
      0;255;3;0;9;MCO:BGN:INIT OK,TSP=NA
      0;255;3;0;9;Eth: 0;101;1;0;2;1
      0;255;3;0;9;Eth: 0;101;1;0;2;0
      0;255;3;0;9;Eth: 0;101;1;0;2;1
      0;255;3;0;9;Eth: 0;101;1;0;2;0
      0;255;3;0;9;Eth: 0;101;1;0;2;1
      0;255;3;0;9;Eth: 0;101;1;0;2;0
      0;255;3;0;9;Eth: 0;101;1;0;2;1
      0;255;3;0;9;Eth: 0;101;1;0;2;0
      0;255;3;0;9;Eth: 0;101;1;0;2;0
      0;255;3;0;9;Eth: 0;101;1;0;2;1
      When I push the button in IoBroker-Vis, it takes often a lot of time until the LED is on; sometimes I have to push the button twice or more times; sometimes nothing happens at all.
      When I define and connect the radio with the same sketch, it runs as expected.

      posted in Announcements
      jopebe
      jopebe