Navigation

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

    Posts made by Soloam

    • RE: 💬 Water Meter Pulse Sensor

      That is nice! But I would have to test it out! Probably that would make the node all the time awake during a long bath! Ok, it would not use the radio all the time, but I would like to know who that would affect the battery!

      Thank you all for the feedback

      posted in Announcements
      Soloam
      Soloam
    • RE: 💬 Water Meter Pulse Sensor

      @mfalkvidd hello!

      I was referring to this statement in the site:

      "Use this mode if you power the sensor with a battery. In this mode the sensor will sleep most of the time and only report the cumulative water volume."

      Thank you

      posted in Announcements
      Soloam
      Soloam
    • RE: 💬 Water Meter Pulse Sensor

      Any one used this approach? From the text I see that the node sleeps! How does it measures the consumption if the node is sleeping?

      Thank you

      posted in Announcements
      Soloam
      Soloam
    • RE: Raspberry Pi (zero) as sensor node

      Hello, sorry to bring this topic back from the grave, but did you managed to do this! I also have a use case for a raspberry pi zero w as node! Is this possible? And will I be able to react to a mysensors income message with a scrip in the pi? I want to send some tcp packages by wifi when a specific message arrives. If this is not possible I will need to make this kind of solution but with a esp8266, but since I have some pies already doing this job I would prefer to do with them! I want to bypass the need to have the controller online to this specific message!

      Thank you

      posted in Hardware
      Soloam
      Soloam
    • RE: 💬 Sensebender Gateway

      Yes it is! I use I'm using it as a MQTT gateway for some time

      posted in OpenHardware.io
      Soloam
      Soloam
    • RE: Let's make it even bigger

      @tbowmo yeh I know that! The main purpose of this topic was to give out my thank you to all the community. I remembered the "subscription" (I didn't wanted to use this work because it sounds like obligation, and that is not what I intended... but I think that my English vocabulary is starting to fade out... ☺ ) because I had a active role one a community a long time ago and from my opinion it was always better to have a 10 users subscribing 1 dollar monthly, that 1 user donating 50 dollars randomly! Membership its always a way to bring people closer to the projects and helping out 😉

      posted in General Discussion
      Soloam
      Soloam
    • Let's make it even bigger

      I've been on MySensors for some time now, and during this time I "evolved" from a guy that normally added a new outlet to my house, to someone that now understands a "bit" more of electronics and even developed and build my own IOT devices/nodes. This has been a hell of an experience, and I only have to say thank you to all the staff, developers, and community members that help not only this project grow but also all of us (intellectually and in this hobby).

      I know that the main focus of this community is not to make a profit, but lets face it, every thing in this world needs a bit of juice ($$$) to make it flow. So I came up with an idea, why not add a way to sponsor this project? Something like Patreon or a membership? It would be totally optional, but the members would have access to for example give aways or something. And what would you guys do with a money? Easy free beer... 🍺 🙂 ...

      The money could be used to pay for hosting (damm this things can get expensive when a community grows... respect @hek) or to help guys like @tbowmo (sorry to all others just the first name that got to my mind when I was typing) to develop new prototypes and get them at low prices to all of us!

      Basically this post is only to say thank you to all of you guys that helped this community get where it is, by developing the software or by developing the hardware (too many people to name in openhardware.io.

      255;255;3;0;18 (this is nerd...)

      posted in General Discussion
      Soloam
      Soloam
    • RE: 💬 Roller Shutter Node

      I'm having difficult finding the IC4 ACS712_5A, if I search for "ACS712 5A" I only get the assembled unit. Can I get one of this and unsolder the IC and use it?

      posted in OpenHardware.io
      Soloam
      Soloam
    • RE: NodeRed TCP Gateway

      Thank you @David-Muller

      posted in Node-RED
      Soloam
      Soloam
    • NodeRed TCP Gateway

      Hello all, I'm using Nodered with a MQTT Gateway, and I'm planning on changing to a TCP Gateway, does the Mysensors node support TCP Gateway? I would like to remove MQTT from the mysensors equation to remove some complexity (on less service running and depending on), but On the Mysensors Node on NodeRed it seams that only supports MQTT!

      Thank You

      posted in Node-RED
      Soloam
      Soloam
    • RE: Move To HASS MQTT - Nodes not responding

      Thank you @martinhjelmare it was that! One last question that I don't know if it's related! The first time that HA discovered my nodes (power cycle) the created items where with a toggle switch and under a card named lighs (I think that it was that). Now I deleted the mysensors.json file and added the items again, and now they are detected as interruptor and the switch is a lightning bolt. No major problem in that, just trying to understand the reason... It's the same nodes, no code changes.

      Thank You

      posted in Home Assistant
      Soloam
      Soloam
    • RE: Move To HASS MQTT - Nodes not responding

      Ok, I made a test adding manual, and it works... the problem is in the auto added switches

      switch:
        - platform: mqtt
          name: "My Light"
          command_topic: "mygateway1-in/1/2/1/0/2"
          payload_on: "1"
          payload_off: "0"
          optimistic: false
          qos: 2
      

      All works ok! With the auto added switch I click on... the light comes on, and immediately the switch goes to off... Only 30 seconds later (my node sends a updated status message every 30 seconds) the node goes to ON (the real state)

      posted in Home Assistant
      Soloam
      Soloam
    • Move To HASS MQTT - Nodes not responding

      Hello, I was planning to move away from OpenHab to Home Assistant and I started configuring my nodes in HASS. I have the MQTT up and running, and I have it configured in HASS, they appear and I can controll them. The problem is a lot of miss messages. In OpenHab I was able to do ON OFF ON OFF fast and the lamps would go on off, "never" (rarely) missing a cycle. In HASS I turn on the lamp, but when I go to put off it fails.

      I remember in OpenHab I had to make a small tweak to the config to make this work, QOS 2 and turn off asynchronously.

      What are your experiences with MQTT GW and the response time and viability?

      Thank you

      posted in Home Assistant
      Soloam
      Soloam
    • RE: [SOLVED] MYSBootloader FOTA Update hangs on ProMini-3V-8MHz (reboot problem)

      @rafael156 I had a similar problem, my node would stop responding when I tried to reboot it. The problem was in the fuse settings, have you checked if they are all set? What version are you using? (16,8 or 1)

      posted in Troubleshooting
      Soloam
      Soloam
    • RE: Request Value from Node

      @mfalkvidd thank you, that will do the job! I leave the ideia to a isReq()! 🙂

      Thank you all

      posted in Development
      Soloam
      Soloam
    • RE: Request Value from Node

      @rozpruwacz You are rigth, I Want GW => Node Request or Node => Node Requests, and I've seen the command type in the notes, but who can I access that command value in the code?

      1;1;2;0;2;0 - Requesting Node 1 Child 1 variable V_STATUS, Who do I know that the Command is 2 (request) ?

      posted in Development
      Soloam
      Soloam
    • RE: Request Value from Node

      @gohan you don't use a dummy variable (VAR_1)? So who do you know when the message arrives if it's a request?

      posted in Development
      Soloam
      Soloam
    • RE: Request Value from Node

      @gohan I see, it's the same solution that i'm using at the moment, it would be nice to have a flag in the requests replay, that would allow to make a cleaner code, without having to use dummy variables.

      Thank You @gohan

      posted in Development
      Soloam
      Soloam
    • RE: Request Value from Node

      @gohan Ii can see the request:

          } else if (sendTime && !pcReceived) {
              // No pulse count value received. Try requesting it again
              request(CHILD_ID, V_VAR1);
              lastSend=now;
          }
      

      But I can't seem to understand where is being processed, in the receive function no validation is preformed to check if it's a request or a actuation. In this case I presume that It's irrelevant (because is a informative node only), but in the case of a nodes with actuators, I need to know if the message that is arriving is a actuator (set) or a request.

      posted in Development
      Soloam
      Soloam
    • Request Value from Node

      Hello all, is there a way in the response method to check if is a request? Similar to for example the isACK method, how can I know if the message arriving is a request os if is a message that should actuate the node?

      Thank you

      posted in Development
      Soloam
      Soloam
    • RE: 💬 MyMasterSensor

      Thank you @Nca78 @sundberg84 I think that I will redo my board to use a Temperature Sensor SI7021 and for light a foto resistance like the GM5539 (any opinion or alternatives?).

      Better do it right, and I can use the sensors that I have around in tests or something.

      One question, I'll use this inside a case, ok I can do holes, but will not this change the temperature and humidity readings?

      posted in OpenHardware.io
      Soloam
      Soloam
    • RE: 💬 MyMasterSensor

      @sundberg84 the idea is to sleep the node whenever possible, and when it wakes up (for example from triggering the PIR) it uses the wakeup to notify all the other nodes and go back to sleep again.

      What you are telling is to use 2 Digital pins to one module? One to power it and other for the data? Is that it? I also thought about doing something like that, I would need to feed the atmega with 3AA (4.5v).

      posted in OpenHardware.io
      Soloam
      Soloam
    • RE: 💬 MyMasterSensor

      @sundberg84 thank you

      So basically to keep this modules, the only thing that I would have powered by the 3V is the radio and the atmega. I planned building the PCB without using the modules, but I have a lot of them laying around and I think that it would make the PCB more useful/easy to others that plan to use it.

      posted in OpenHardware.io
      Soloam
      Soloam
    • RE: 💬 MyMasterSensor

      @nca78 thank you, but will sensors like LM393 Light Sensor and DHT22 Module work with no problems bellow 3V? They are both rated between 3.3V and 5V.

      Thank you

      posted in OpenHardware.io
      Soloam
      Soloam
    • RE: 💬 MyMasterSensor

      Gerber files uploaded, please note that this PCB is still to be tested, work in progress.

      This PCB was inspired one a post made by @Yveaux and @mfalkvidd on https://forum.mysensors.org/topic/6511/hc-sr501-3-3v-randomly-sends-tripped-when-radio-is-on/

      The idea is to remove the voltage regulator from the PIR sensor and power it from 3 AA batteries.

      My main doubt on all this, some test is needed is the rest of the system. At the moment I have all the system powerd by 3 AA batteries (4.5v), it icludes all the sensors and the atmega. And only the radio is powered by the 3V. I don't know if it would be better to use other power configuration, like only the PIR with 4.5, and all the other sensors and atmega with 3v.

      I did this because in the datasheet of all the other sensors it states that it works at 3.3v and with 2AA batteries I get 3V, and with power drain it would be way bellow that.

      What do you guys think it would be better? To keep it this way, or change it for example radio and atmega 3V and all the rest 4.5?

      Please note that this only applies if you supply 2 voltages to the system, if not you can just put the jumper into position number 2 and feed all the system with the same voltage, that should be Radio safe.

      Thank You all

      posted in OpenHardware.io
      Soloam
      Soloam
    • RE: 💬 MyMasterSensor

      This is my project to a all in one sensor, it contains interface to:

      • LM393 Light Level
      • Door Sensor
      • HC-SR501 Motion Sensor
      • DHT22 - Temperature and Humidity Sensor
      • Switch
      • Controlled by a Atmega328p-au and NRF24L01 SMD

      Powered By 3 AA batteries, split in 3v and 4.5v, or if you prefere only 2 AA (3v). You can set the power jumper to safeguard the RF Radio. This interface is the best way to control a PIR sensor and ensure that the power feed to the PIR is inside acceptable range. (please see https://forum.mysensors.org/topic/6511/hc-sr501-3-3v-randomly-sends-tripped-when-radio-is-on/ ), see images to more information.

      Work still in process... comments and recommendations are welcome.

      posted in OpenHardware.io
      Soloam
      Soloam
    • RE: 💬 Roller Shutter Node

      @scalz this is a great work, I'm planning on ordering a couple to use on my system.

      Besides that, I'm most interested in the integrated Current Sensor, and planning on use it on my one PCB. I've been studding your PCB layout and reading regarding the ACS712 and is integration with the LM321. Way didn't you use the schematic on the ACS712 DataSheet (http://henrysbench.capnfatz.com/henrys-bench/arduino-current-measurements/acs712-current-sensor-user-manual/ page 12) to integrate with the LM321? I see that you use a lot more resistors and caps, and the values are not the same. Was this intencional or you did it to reuse a footprint? Would the layout on the DataSheet also work in you board? (From what I can tell it changes the sensitivity).

      Also I see a couple 0 Ohm resistor, I think that that is to reuse footprints correct?

      Thank you for your help and contribute to the community.

      posted in OpenHardware.io
      Soloam
      Soloam
    • RE: 💬 Roller Shutter Node

      @fabien said in 💬 Roller Shutter Node:

      @Soloam
      2 relay for interlocking system and add more security.
      I never mesure my current but it's low ... not 10A !
      Internal clock is not very precise and can vary with external parameters like temperature. And for this project it's better to have good precision.
      It's always better to use relay driver and not directly arduino pin.

      Thank you @Fabien all very clarifying, only one thing that I don't understand (sorry, but I like to use this projects to learn and improve my personal knowledge) I still don't understand way the relays are different model numbers, from what I can see, one is 4 pins, and the other 5 pins, or I'm miss interpreting?

      Thank you

      posted in OpenHardware.io
      Soloam
      Soloam
    • RE: 💬 Roller Shutter Node

      @scalz great work, sorry to dig up the topic, but good topics never die ( 🙂 ). Can you clarify some questions?

      • Way did you used 2 different relays? Way not only one type?
      • What is the Amp consumption of your motors? I know that 10A is overkill, but just to get one idea. Would 2A do it? (at 220V)
      • I see that you added a 8Mhz Cristal, way not use the internal clock? It's 8Mhz
      • I see that you use a relay driver, correct me if I'm wrong, that is because the rated coil consumption to those relays is 80mA.

      Thank You
      Great Work

      posted in OpenHardware.io
      Soloam
      Soloam
    • RE: FOTA Update and Node Repeater

      @tekka I'll try to do that, it will not be a easy task because all the nodes that I use as repeater are inside the wall at the moment, the ones outside (temperature etc) are all sleep nodes, so I disabled the repeater function. I'll try to get one or 2 open to test it out! That will give a better clarification on what is happening.

      Thank You

      posted in MyController.org
      Soloam
      Soloam
    • RE: FOTA Update and Node Repeater

      Thank You @jkandasa . I'm using 1.2.0 I'll try that. But will that make that if some message get lost that the update process will not try again and fail?

      posted in MyController.org
      Soloam
      Soloam
    • FOTA Update and Node Repeater

      Hello, I don't know if this is a issue with MyController ( @jkandasa ) With MySBootloader ( @tekka ) or my code (@Soloam 😏 ). But when I'm updating my nodes with a new firmware using MyController (MQTT Gateway, doubt that is relevant), the nodes that are far away from the Gateway fail a lot (I can see on the MQTT messages that MyController keeps repeating the same message over and over again), but when I send a normal message it works as intended "all the time". Can it be possible that the Repeat Function (MY_REPEATER_FEATURE) does not work as intended with FOTA?

      Thank You All

      posted in MyController.org
      Soloam
      Soloam
    • RE: Safe In-Wall AC to DC Transformers??

      @dbemowsk are you talking about this:

      alt text

      I'll try it out.

      where can I find that clamps? To try out also?

      Thank You

      posted in Hardware
      Soloam
      Soloam
    • RE: Safe In-Wall AC to DC Transformers??

      I give up on soldering Temperature Fuses, for every one that I'm able to solder I blow up 5 of temperature rising from the solder. It would be a good safety improvement, but I'm going crazy with fazes burning ☹ 😐 😤 any recommendation? Who are you guys soldering without blowing them up?

      posted in Hardware
      Soloam
      Soloam
    • RE: Node and Sensor Name In Eeprom

      @gohan it depends, for example the MyController uses the name of the presentation, and if you rename it it overwrite when the node restarts. When I check my list to, for example, update the firmware, I have to recall (or consult excel) to see what is the node id of the node that I want to update.

      posted in General Discussion
      Soloam
      Soloam
    • Node and Sensor Name In Eeprom

      Hello, I was wondering, any one storing the Node And Sensor Names for presentation in the Eeprom? That would be useful to have a generic sketch file and reuse the name on the Eeprom, that could be updated (MQTT for example?). This way the Controllers (mycontroller for example) would recognize the name and display it. Much easier to identify the nome if it displays form example "Light Switch Hall" that a generic "Light Switch" that is repeated in all nodes. And would avoid having to rename all the sketch to contemplate the name.

      Thank You

      posted in General Discussion
      Soloam
      Soloam
    • RE: Process Multiple "receive" at once

      @mfalkvidd and @Yveaux I made de replacement so that the code does not send the ack and simplify the receive... and the result was very positive, not 100%, but very close... If I spam on and off on the kill switch I get, very rarely a error of one of the lights to stay on or off when it all the others change. I think that probably when I spam. I'll review the code to try to improve it further, but for now this will work, no one will spam the button like crazy...

      Thank You

      posted in General Discussion
      Soloam
      Soloam
    • RE: Process Multiple "receive" at once

      @mfalkvidd thank you. I set the ack to true from a early stage of the code, that I ended up changing and removing the digitalwrite to the main loop! I never removed the true! I'll try it out. Thank you for the replay.

      posted in General Discussion
      Soloam
      Soloam
    • RE: Process Multiple "receive" at once

      @yveaux thank you for the input. I'll try to remove the message repeat from the recive function! I'll post back the results!

      Thank you @Yveaux and @mfalkvidd

      posted in General Discussion
      Soloam
      Soloam
    • RE: Process Multiple "receive" at once

      @mfalkvidd Thank you, I will review the code to take that into consideration. I don't upload the code with the debug flag on (MY_DEBUG_X), I only turn it on to debug.

      posted in General Discussion
      Soloam
      Soloam
    • RE: Process Multiple "receive" at once

      Thank you @mfalkvidd I will try to remove the message update to other controllers from the receive, it might be the problem... It was the last update that I made to the code. And the rest of the code is a simple digital write to turn on the light. Do you think that even that should go to the loop?

      So a question, when a message arrives and the previews as not ended, will it continue with the first after the end of the second? I think that is the behavior of the interrupt.

      Thank You

      posted in General Discussion
      Soloam
      Soloam
    • RE: Process Multiple "receive" at once

      Ok, this is my Light Actuator Node, I'm developing a all in one solution, so the code ended up bit complex and a complete mess, I still need to clean it up...

      // Enable debug prints to serial monitor
      
      //#define MY_DEBUG
      //#define MY_DEBUG_X
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      
      // Enabled repeater feature for this node
      #define MY_REPEATER_FEATURE
      
      //#define MY_NODE_ID 1
      
      #include <SPI.h>
      #include <MySensors.h>
      #include <Bounce2.h>
      
      
      #define RELAY_START_ID 1
      #define SWITCH_START_ID 10
      
      // EDIT THIS VALUES--------------------------------
      #define REFRESH_INTERVAL 30000
      #define RETRY_REPEATS 5
      
      #define MESSAGE_REPEATS 5
      #define MESSAGE_REPEATS_DELAY 10
      
      int RELAYS[] = { 0, 6 }; //5,6
      int SWITCH[] = { 7, 8 }; //7,8
      
      // ------------------------------------------------
      
      
      #define RELAY_ON  1
      #define RELAY_OFF 0
      
      const int numberOfActuators = sizeof(RELAYS) / sizeof(int);
      
      Bounce        *debouncers[numberOfActuators];
      MyMessage     *messagesRelay[numberOfActuators];
      MyMessage     *messagesSwitch[numberOfActuators];
      bool          oldvalues[numberOfActuators];
      int           errorSending[numberOfActuators];
      unsigned long lastRefreshTime[numberOfActuators];
      
      
      // MY DEBUG -------------------------------------
      void SerialPrintln(String text) {
      #ifndef MY_DEBUG_X
        return;
      #endif
      
        Serial.println(text);
      }
      
      void SerialPrintln(int text) {
      #ifndef MY_DEBUG_X
        return;
      #endif
      
        Serial.println(text);
      }
      
      void SerialPrint(String text) {
      #ifndef MY_DEBUG_X
        return;
      #endif
      
        Serial.print(text);
      }
      
      void SerialPrint(int text) {
      #ifndef MY_DEBUG_X
        return;
      #endif
      
        Serial.print(text);
      }
      //-------------------------------------
      
      
      int relay_child_id(int index) {
        return (index + RELAY_START_ID);
      }
      
      int switch_child_id(int index) {
        return (index + SWITCH_START_ID);
      }
      
      void setup()
      {
        SerialPrint("Loading ");
        SerialPrint(numberOfActuators);
        SerialPrintln(" actuators");
      
        for (int i = 0; i < numberOfActuators; i++) {
          SerialPrint("Starting Child ");
          SerialPrintln(i);
      
          //Start Messages
          messagesRelay[i]  = new MyMessage(relay_child_id(i), V_STATUS);
          messagesSwitch[i] = new MyMessage(switch_child_id(i), V_STATUS);
      
          // Setup the button
          if (SWITCH[i] > 0) {
            pinMode(SWITCH[i], INPUT);
            digitalWrite(SWITCH[i], HIGH); // Activate internal pull-up
      
            debouncers[i] = new Bounce();//Create Debouncer
            debouncers[i]->attach(SWITCH[i]);
            debouncers[i]->interval(5);
      
            debouncers[i]->update();
            oldvalues[i] = debouncers[i]->read();//Starts Default Switch State
          }
      
          // Make sure relays are off when starting up
          if (RELAYS[i] > 0) {
            digitalWrite(RELAYS[i], RELAY_OFF);
            pinMode(RELAYS[i], OUTPUT);
          }
        }
      }
      
      void SerialPrintLn(String thisIsAString) {
        SerialPrintln(thisIsAString);
      }
      
      void presentation()  {
        char buffer[50];
      
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("Light Actuator", "2.0");
      
      
        // Register all lights and switches to GW
        for (int i = 0; i < numberOfActuators; i++) {
          if (RELAYS[i] > 0) {
            sprintf(buffer, "Light %d", relay_child_id(i));
            SerialPrint("Presenting ");
            SerialPrintln(buffer);
            present(relay_child_id(i), S_BINARY, buffer);
          }
      
          if (SWITCH[i] > 0 && RELAYS[i] == 0) {
            sprintf(buffer, "Switch %d", switch_child_id(i));
            SerialPrint("Presenting ");
            SerialPrintln(buffer);
            present(switch_child_id(i), S_BINARY, buffer);
          }
        }
      }
      
      bool messageRepeat(MyMessage &message, bool ack = true) {
        int repeat = 1;
        int repeatdelay = 0;
        int index;
      
        index = relay_index_id(message.sensor);
        if (index < 0) {
          index = switch_index_id(message.sensor);
        }
      
        if (index < 0) {
          SerialPrintln("ERROR IN INDEX");
          return false;
        }
      
        SerialPrint("Sending message of child ");
        SerialPrintln(message.sensor);
      
      
        while (repeat <= MESSAGE_REPEATS) {
          if (send(message, ack)) {
            SerialPrintln("Send OK");
            errorSending[index] = 0;
            return true;
          } else {
            SerialPrint("Send ERROR ");
            SerialPrintln(repeat);
          }
      
          repeat++;
          repeatdelay = repeatdelay + MESSAGE_REPEATS_DELAY;
          wait(repeatdelay);
        }
      
        if (ack == true)
          errorSending[index]++;
      
        return false;
      }
      
      void status_update(int index) {
        int value;
        bool resend;
        if (errorSending[index] > RETRY_REPEATS) {
          errorSending[index] = 0;
          return;
        } else if (errorSending[index] > 0) {
          SerialPrint("Lets send again ");
          SerialPrintln(index);
          resend = true;
        } else {
          resend = false;
        }
      
        if ( ( lastRefreshTime[index] == 0 ) or (millis() - lastRefreshTime[index] >= REFRESH_INTERVAL) or ( resend == true ) )
        {
          if (lastRefreshTime[index] == 0) {
            lastRefreshTime[index] = millis();
          }
      
          SerialPrint("Sending Update of index ");
          SerialPrintln(index);
      
          //Update Relay
          if (RELAYS[index] > 0) {
            value = digitalRead(RELAYS[index]);
            messageRepeat(messagesRelay[index]->set(value == RELAY_ON ? true : false), resend);
          }
      
          //Update Button
          if (SWITCH[index] > 0 && RELAYS[index] == 0) {
            debouncers[index]->update();
            value = debouncers[index]->read();
            messageRepeat(messagesSwitch[index]->set(value), resend);
          }
      
          lastRefreshTime[index] = millis();
        }
      }
      
      void processLight(int index) {
        bool value;
      
        //Update State Of Light In Controller
        status_update(index);
      
        if (SWITCH[index] <= 0)
          return;
      
        debouncers[index]->update();
        value = debouncers[index]->read();
      
        //Process Switch
        if (value != oldvalues[index]) {
          //Process Relays
          if (RELAYS[index] > 0)
            lightToggle(index);
      
          //Process Switch
          if (SWITCH[index] > 0 && RELAYS[index] == 0)
            messageRepeat(messagesSwitch[index]->set(value), true);
        }
      
        oldvalues[index] = value;
      
        //Checks If Debounce State Changed During Process
        debouncers[index]->update();
        value = debouncers[index]->read();
      
        if (value != oldvalues[index]) {
          SerialPrintln("Value Changed During Process");
          processLight(index);
        }
      }
      
      void lightToggle(int index) { //Toggles Light State
        if (RELAYS[index] <= 0)
          return;
      
        int value = digitalRead(RELAYS[index]);
        lightUpdate(index, (value == LOW ? HIGH : LOW));
      }
      
      void lightUpdate(int index, int value) { //Updates Light State
        if (RELAYS[index] <= 0)
          return;
      
        //Changes Light State
        digitalWrite(RELAYS[index], value);
      
        SerialPrint("--> Relay Light ");
        SerialPrint(RELAYS[index]);
        SerialPrint(" is ");
        SerialPrintln(value);
      
        //Sends Message To Controller
        messageRepeat(messagesRelay[index]->set(value == RELAY_ON ? true : false));
      }
      
      
      void loop()
      {
        for (int i = 0; i < numberOfActuators; i++) {
          processLight(i);
        }
      }
      
      int relay_index_id(int sensor) {
        if (sensor < RELAY_START_ID)
          return -1;
        else if (sensor >= SWITCH_START_ID)
          return -2;
        else if (sensor > numberOfActuators)
          return -3;
        else
          return sensor - RELAY_START_ID;
      }
      
      int switch_index_id(int sensor) {
        if (sensor < SWITCH_START_ID)
          return -1;
        else if (sensor >= ( SWITCH_START_ID + numberOfActuators) )
          return -2;
        else
          return sensor - SWITCH_START_ID;
      }
      
      void receive(const MyMessage &message) {
        int index;
      
        //Only Process V_STATUS Message
        if (message.type != V_STATUS)
          return;
      
        //Only Process Relay Status
        index = relay_index_id(message.sensor);
        if (index < 0)
          return;
      
        if (message.isAck()) {
          SerialPrintln("--------------------");
          SerialPrintln("->>>> Ack To Relay Message <<<<<-");
          SerialPrint("Sensor: ");
          SerialPrint(message.sensor);
          SerialPrint(" Index: ");
          SerialPrint(relay_index_id(message.sensor));
          SerialPrint(" Status: ");
          SerialPrintln(message.getBool());
        } else {
          if (RELAYS[index] <= 0)
            return;
      
          digitalWrite(RELAYS[index], message.getBool());
          SerialPrintln("--------------------");
          SerialPrintln("New Status Message");
          SerialPrint("Sensor: ");
          SerialPrint(message.sensor);
          SerialPrint(" Index: ");
          SerialPrint(relay_index_id(message.sensor));
          SerialPrint(" Status: ");
          SerialPrintln(message.getBool());
      
          //Updates Status On Other Controllers
          messageRepeat(messagesRelay[index]->set(message.getBool()));
        }
      }
      
      
      
      posted in General Discussion
      Soloam
      Soloam
    • Process Multiple "receive" at once

      Hello all, I have a node that contains contains 2 sensors, 2 lights to actuate! This node responds to a income message from a MQTT Gateway that communicates with OpenHab. So far so good, I can turn on and off the lights on the node with OpenHab.

      The problem starts when I want to turn off both lights at the same time, for example a kill all lights switch. I can see on my broker that the message is sent, and they both arrive to my node, the problem is that sometimes one of the lights does not work. It's proving to be very hard to debug this issue, because the problem only occurs once in a while. So I ask:

      Has any one had any kind of problems dealing with multiple income messages on the same response node? When I send the message one by one I rarely (and I mean almost never, or never) have a missed message, arriving to the node. I can't understand if the problem is one of the messages getting lost, or the code dropping one of them... Because when I'm in debug it works...

      Thank You

      posted in General Discussion
      Soloam
      Soloam
    • Share Good Store to Get Enclosures

      Hello all I want to share with you all a good store to get all kind of enclosures to our projects, I have no kind of affiliation with them, I just want to share somting that I find to be very useful:

      https://www.aliexpress.com/store/1006252?spm=a2g03.10010108.100005.1.5d4e5be9KhrC2i

      Hope you enjoy it. And you can share here more stores to get enclosures or the results of you projects in them 😉

      posted in Enclosures / 3D Printing
      Soloam
      Soloam
    • RE: [Solved] FOTA Not Working

      Just to end and close the topic, @tekka great work on the Bootloader and @jkandasa great work on MyController... Thank you

      posted in MyController.org
      Soloam
      Soloam
    • RE: [Solved] FOTA Not Working

      @tekka FOTA and FTDI now working on 8Mhz Bootloader... PR submited!

      Thank you for your help

      posted in MyController.org
      Soloam
      Soloam
    • RE: [Solved] FOTA Not Working

      @tekka it worked 🙂 Thank you for your assist, it was my first time doing this... so... 🙂

      I made the change to HW.h to

      #ifndef BAUD_RATE
      	#if F_CPU >= 16000000L
      		#define BAUD_RATE   115200L
      	#elif F_CPU >= 8000000L
      		#define BAUD_RATE   57600L
      	#elif F_CPU >= 1000000L
      		#define BAUD_RATE   9600L   // 19200 also supported, but with significant error
      	#elif F_CPU >= 128000L
      		#define BAUD_RATE   4800L   // Good for 128kHz internal RC
      	#else
      		#define BAUD_RATE 1200L     // Good even at 32768Hz
      	#endif
      #endif
      

      Compilled the new bootloader, and replaced it on the Arduino IDE folder... Flashed the new 8Mhz Bootloader to my node and now FTDI works... When I get home I'll test out FOTA and post back the results.

      Will you change the GitHub Repo to take into account this change? Or is this a local problem only to me? Do you want me to submit change the code and hex file and submit a change request?

      Thank You

      posted in MyController.org
      Soloam
      Soloam
    • RE: [Solved] FOTA Not Working

      Do you mean over here @tekka?

      /* set the UART baud rate defaults */
      #ifndef BAUD_RATE
      	#if F_CPU >= 8000000L
      		#define BAUD_RATE   115200L
      	#elif F_CPU >= 1000000L
      		#define BAUD_RATE   9600L   // 19200 also supported, but with significant error
      	#elif F_CPU >= 128000L
      		#define BAUD_RATE   4800L   // Good for 128kHz internal RC
      	#else
      		#define BAUD_RATE 1200L     // Good even at 32768Hz
      	#endif
      #endif
      
      

      No, I will try it... Can I do it in "Atom"? any special settings?

      Thank You

      posted in MyController.org
      Soloam
      Soloam
    • RE: [Solved] FOTA Not Working

      @tekka said in FOTA Not Working:

      57600

      hello @tekka I tested out with:

      57600
      38400
      19200
      9600
      4800
      2400

      None worked, strange that is working on the 16Mhz and 1Mhz, and only the 8Mhz is giving problems... exactly the one that I wanted to use... lol

      Thank You

      posted in MyController.org
      Soloam
      Soloam
    • RE: [Solved] FOTA Not Working

      I can confirm that FOTA is working on all frequency, except 8Mhz... I can't get it working on FOTA or FTDI on the 8Mhz version of MYSBootloader!

      Can any one help me with this?

      Thank you

      posted in MyController.org
      Soloam
      Soloam
    • RE: [Solved] FOTA Not Working

      Ok, at this point I can't access by FTDI to the 8Mhz, all the other frequencies ar working... I only tested the FOTA with the 8Mhz, so I'll teste it again today with the 1Mhz and post back the results.

      posted in MyController.org
      Soloam
      Soloam
    • RE: [Solved] FOTA Not Working

      Can It be my version of the Arduino AVR Boards? I have 1.6.21, and the same occurs on 1.6.20.

      Thank You

      posted in MyController.org
      Soloam
      Soloam
    • RE: [Solved] FOTA Not Working

      The complete Log on trying to load the sketch with the FTDI to the ATMEGA! I don't know if not working with the FTDI has anyting related with not being able to flash with the MyController, but it's strange... Just giving all info as possible to try to get some help on the problem.

      Arduino: 1.8.5 (Linux), Board: "ATmega328 with MYSBootloader 1.3.0, 8MHz RC"
      
      Warning: Board breadboard:avr:atmega328bb doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA328BB
      Sketch uses 13290 bytes (43%) of program storage space. Maximum is 30720 bytes.
      Global variables use 714 bytes (34%) of dynamic memory, leaving 1334 bytes for local variables. Maximum is 2048 bytes.
      /opt/arduino-1.8.5/hardware/tools/avr/bin/avrdude -C/opt/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyUSB0 -b115200 -D -Uflash:w:/tmp/arduino_build_550364/LightActuator.ino.hex:i 
      
      avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
               Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
               Copyright (c) 2007-2014 Joerg Wunsch
      
               System wide configuration file is "/opt/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf"
               User configuration file is "/home/diogo/.avrduderc"
               User configuration file does not exist or is not a regular file, skipping
      
               Using Port                    : /dev/ttyUSB0
               Using Programmer              : arduino
               Overriding Baud Rate          : 115200
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
      
      avrdude done.  Thank you.
      
      Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
      
      This report would have more information with
      "Show verbose output during compilation"
      option enabled in File -> Preferences.
      

      Thank You

      posted in MyController.org
      Soloam
      Soloam
    • RE: [Solved] FOTA Not Working

      I tried to flash the several Bootloader into one of the ATMEGA that was not working, the results are strange:

      FTDI Access:

      • Arduino UNO Bootloader: OK
      • ATMEGA on a Breadboard (8Mhz Internal Clock) OK
      • MysBootloader 16Mhz OK
      • MysBootloader 8Mhz NOK
      • MysBootloader 1Mhz OK

      I would assume that the problem was something on the config, but that would not explain way it works on some ATMEGA, and on others not... Can it be defective units (ATMEGA)? Only not working the 8Mhz??

      My boards.txt from github Dev brantch... I only had to change 3 lines to make it work... in Linux at lest we need this on the sketch folder (MYSBL.upload.tool=arduino:avrdude, MYSBL.bootloader.tool=arduino:avrdude, MYSBL.build.core=arduino:arduino, MYSBL.build.variant=arduino:standard)

      ## Add these lines to your boards.txt file in the Arduino installation directory
      ##
      ## Arduino Pro or Pro Mini (3V3 & 5V, 1 - 16 MHz) w/ ATmega328 MYSBootloader
      ## -------------------------------------------------
      
      menu.frequency=Frequency
      
      MYSBL.name=ATmega328 with MYSBootloader 1.3.0
      
      MYSBL.upload.tool=arduino:avrdude
      MYSBL.upload.protocol=arduino
      MYSBL.upload.maximum_size=30720
      MYSBL.upload.maximum_data_size=2048
      MYSBL.bootloader.tool=arduino:avrdude
      MYSBL.build.mcu=atmega328p
      MYSBL.build.board=AVR_UNO
      MYSBL.build.core=arduino:arduino
      MYSBL.build.variant=arduino:standard
      
      MYSBL.menu.frequency.MYSBL16=16MHz XTAL
      MYSBL.menu.frequency.MYSBL16.build.f_cpu=16000000L
      MYSBL.menu.frequency.MYSBL16.upload.speed=115200
      MYSBL.menu.frequency.MYSBL16.bootloader.low_fuses=0xFF
      MYSBL.menu.frequency.MYSBL16.bootloader.high_fuses=0xD2
      MYSBL.menu.frequency.MYSBL16.bootloader.extended_fuses=0x06
      MYSBL.menu.frequency.MYSBL16.bootloader.unlock_bits=0x3F
      MYSBL.menu.frequency.MYSBL16.bootloader.lock_bits=0x0F
      MYSBL.menu.frequency.MYSBL16.bootloader.file=MySensors/MYSBootloader_16MHz.hex
      
      MYSBL.menu.frequency.MYSBL8=8MHz RC
      MYSBL.menu.frequency.MYSBL8.build.f_cpu=8000000L
      MYSBL.menu.frequency.MYSBL8.upload.speed=115200
      MYSBL.menu.frequency.MYSBL8.bootloader.low_fuses=0xE2
      MYSBL.menu.frequency.MYSBL8.bootloader.high_fuses=0xD2
      MYSBL.menu.frequency.MYSBL8.bootloader.extended_fuses=0x06
      MYSBL.menu.frequency.MYSBL8.bootloader.unlock_bits=0x3F
      MYSBL.menu.frequency.MYSBL8.bootloader.lock_bits=0x0F
      MYSBL.menu.frequency.MYSBL8.bootloader.file=MySensors/MYSBootloader_8MHz.hex
      
      MYSBL.menu.frequency.MYSBL1=1MHz RC
      MYSBL.menu.frequency.MYSBL1.build.f_cpu=1000000L
      MYSBL.menu.frequency.MYSBL1.upload.speed=9600
      MYSBL.menu.frequency.MYSBL1.bootloader.low_fuses=0x62
      MYSBL.menu.frequency.MYSBL1.bootloader.high_fuses=0xD2
      MYSBL.menu.frequency.MYSBL1.bootloader.extended_fuses=0x06
      MYSBL.menu.frequency.MYSBL1.bootloader.unlock_bits=0x3F
      MYSBL.menu.frequency.MYSBL1.bootloader.lock_bits=0x0F
      MYSBL.menu.frequency.MYSBL1.bootloader.file=MySensors/MYSBootloader_1MHz.hex
      
      
      posted in MyController.org
      Soloam
      Soloam
    • RE: [Solved] FOTA Not Working

      @tekka , I think I'm getting to the root (or not) of what might be the problem... I stated that I was not able to upload sketches by FTDI, but now I can see that on some ATMEGA I can, and others I can't... I flashed the bootloader to all in series, all in the same way (some where fresh installs, other not, but I can't track witch ones are what). Some ATMEGA I can upload the sketch by FTDI (when I get home I will try the FOTA, and I hope that on the ones that I can upload by FTDI that the FOTA will work), but on others I can't and I get:

      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
      

      This seems the error that I get when I try to upload a sketch in the wrong frequency, but I double checked and all the ATMEGAS have the same fuses (the ones in the image above) and all where flashed in the same way.

      Thank You

      posted in MyController.org
      Soloam
      Soloam
    • RE: WIndow Roller Shutter - Position

      Ok I found your project in openhardware.io nice work 😉

      Thank you

      posted in General Discussion
      Soloam
      Soloam
    • RE: WIndow Roller Shutter - Position

      @scalz thank you for your replay, one qestion, what you use is somting like this?? :

      https://www.ebay.com/itm/181026550454?rmvSB=true
      https://www.ebay.com/itm/251558433854?rmvSB=true

      I like the idea of the auto calibration, It would make this a lot accurate!

      @monte thank you... that would be my second approach... probably an hybrid solution, use the magnets instead of the power sensor to determine the up and down positions.

      Thank You

      posted in General Discussion
      Soloam
      Soloam
    • WIndow Roller Shutter - Position

      Hello, I'm putting a automatic Window Roller Shutter at my home. I already have the system to get them up and down, and now is time to incorporate a MySensor Node. It's easy to get them up and down, just open and close a relay, but the hard part is to get the 10% open, or 50% closed (or open, depending on the point of view 🙂 ). I was thinking on timing the open and close speed and make the math from there... but that seems like it will get it wrong eventually. Another solution would be to have some kind of sensors that would trigger checkpoints.

      Any ideas? Any one implemented something like this?

      Thank you all

      posted in General Discussion
      Soloam
      Soloam
    • RE: [Solved] FOTA Not Working

      0_1522056315171_78c0bc23-d165-4f56-9a52-b1805f25fd51-image.png

      This is my read of the burn on the 8Mhz Burn with the Arduino IDE

      posted in MyController.org
      Soloam
      Soloam
    • RE: [Solved] FOTA Not Working

      Thank you @tekka , so the FTDI should work! Correct?

      The reboot seems to be the problem! I lose communication with the node when I try to reboot, and I need to reset to make it work again!

      Do I need to change the baud on the MySensors? What should I use on the 8Mhz ?

      Thank you and great work

      posted in MyController.org
      Soloam
      Soloam
    • [Solved] FOTA Not Working

      Hello, I'm using mysbootloader from @tekka and I'm trying to make FOTA to work on MyController from @jkandasa. I have MySensors 2.2.0 and a ATMEGA Flashed with the latest mysbootloader. Gateway is MQTT.

      I load the firmware into MyController and add it to a node, I hit start upload And I can see the first package on the MQTT topic:

      mygateway1-in/99/255/4/0/1

      010001000003114C
      

      At the same time I see my node debug

      112152 TSF:MSG:READ,0-0-99,s=255,c=4,t=1,pt=6,l=12,sg=0:010001000003114CE8B01000
      

      Then nothing, no more messages.

      My settings:

      • MySensors 2.2.0
      • MQTT GW
      • MyController
      • MySbootloader (lattest)
      • ATMEGA 328 8Mhz
      • nRF24 Radios

      I compiled the hex file in the Arduino IDE and Exported it with Sketch > Export Compiled Binary, I ended up with 2 hex, LightActuator.ino.standard.hex and LightActuator.ino.with_bootloader.standard.hex. I used LightActuator.ino.standard.hex

      Just one extra question, I can't use the FTDI programmer to program my boards (but I'm able to see the serial monitor output), I was able to on the previews bootloader, but with the MySbootloader I can't. Is this normal?

      Thank You

      posted in MyController.org
      Soloam
      Soloam
    • RE: Burn MYSBootloader error in Arduino IDE

      The problem is that the boards.txt is declaring the use of the tool avrdude, in the sketchbook the IDE is not able to find the avrdude, so the error. That's what you get when you mix a Arduino noob with a linux noob 🙂

      Thank You

      posted in Troubleshooting
      Soloam
      Soloam
    • RE: Burn MYSBootloader error in Arduino IDE

      Ok, I solved the problem.. My bad, I was installing the Bootloader files in the Sketchbook folder... 😣 .

      Mental note... install the .hex files on hardware/arduino/avr/bootloaders/MySensors/ on the installation folder of the Arduino IDE

      Thank You

      posted in Troubleshooting
      Soloam
      Soloam
    • Burn MYSBootloader error in Arduino IDE

      Hello, I've bee trieng to burn MYSBootloader to one of my nodes, and I keep getting a error in my Arduino IDE (Under Linux) telling:

      Could not find tool avrdude
      

      I uploaded the boards.txt content to mine, and the hex files to the hardware folder.

      I have avrdude in my system, but Arduino IDE keeps giving me this error.

      Any ideas?

      Thank You

      posted in Troubleshooting
      Soloam
      Soloam
    • RE: Nrf24l01 with router antenna

      Hello, yes I'm using the LNA version, and at the moment is attached to the gateway.

      According to range, I did not make test, what improved drastically was the reliability! No missed ack, all on the first try. And before I had a lot of problems with ack.

      I don't think that you need something like this, that said, I ordered a new antenna, because I think that I had a bad unit.

      I think that a solution like this might be good to use outside, where range is a must, but some tests have to be done to ensure that it works.

      In my particular case, that the main issue was lost ack, it worked great.

      Thank you

      posted in Hardware
      Soloam
      Soloam
    • RE: SSL support for MQTT on ESP8266

      Also looking at this... was this ever implemented? And where your trials on server encryption or also in client authentication?

      Thank You

      posted in Development
      Soloam
      Soloam
    • RE: Nrf24l01 with router antenna

      I tried and the results are as different as nigh and day. The coverage as improved drastically! I think that I still have a power issue on the gateway, the power source is not very good, but I ordered a new charger with good ratings, and I assume that this will solve the problem!

      On the subject of the antenna, I have to make a reliable test, but so far the results where more than great...

      posted in Hardware
      Soloam
      Soloam
    • RE: Clearance, creepage and other safety aspects in "MySensors" PCBs.

      That is what I do, I create a rule to pads with creepage and rely on my calculations. I'm rebuilding my current switch board to make it safer to use in more polluted environment, I need to use one outside (in a box, but better safe than sorry), and in a bathroom.

      I think that the main problem with the pads and traces spacing is the design constrains. I need to keep it in a 5x5 cm board and that is not easy, especially when you have a AC and DC circuit! I never considered the distance between AC and DC, and that is the main reason for me to rebuild my boards. After reading your post I made some researches, and I found that I had a design problem. Like you stated, I'm not a electrical engineer, and we are always learning 🙂

      posted in Hardware
      Soloam
      Soloam
    • RE: Clearance, creepage and other safety aspects in "MySensors" PCBs.

      Hello @sundberg84 , this is a topic that I have made some research myself, I wanted to make my PCB the safest possible. One question that I would like to put you is the development in KiCad (don't know if you use it), but one thing that I KiCad doesn't take into account, is the "air gap". You put in your design rules that you what to have 8mm of isolation, and if you are required to have less, by layout constrains, and put a air gap in between pads to raise the creepage, Kicad will still give you a error on the design verification. What do you do in this situations? Ignore the errors?

      Another thing that you must also take into consideration is the cooper width, this also is very important.

      Thank You and nice work

      posted in Hardware
      Soloam
      Soloam
    • Nrf24l01 with router antenna

      Hi all, I tried to found a answer to this question, but didn't found it!

      Can a Nrf24l01 with external antenna be used with a 2.4 wifi antena?

      I have one like this around:

      Anttena

      Thank you!

      posted in Hardware
      Soloam
      Soloam
    • RE: Message Send Returns False, but message send

      I ordered a new power supply to my sensebender gateway try to rule out power problems, this one is 5v 2.5A and I know that they are good because I use them on my raspberry pi's.

      posted in Troubleshooting
      Soloam
      Soloam
    • Feature Request: Telegram support to Operation

      Hi, it would be nice if MyController supported Telegram as notification, this allows to send all notifications to Telegram and having all information in one place.

      Thank You for the great work

      posted in MyController.org
      Soloam
      Soloam
    • RE: Memory Consumption

      I can mention that I run MyController in a FreeNas Jail (FreeBSD Jail) and is working well, I had to do some teweeking to make it work. If someone is interested I can Make a tutorial on how to adapt the MyController to work in FreeBSD

      posted in MyController.org
      Soloam
      Soloam
    • RE: Memory Consumption

      Afther some googling I changed the start.sh

      From This

      #Java Heap settings
      HEAP_MIN=-Xms32m
      HEAP_MAX=-Xmx256m
      

      To this

      #Java Heap settings
      HEAP_MIN="-Xms32m -XX:PermSize=32m"
      HEAP_MAX="-Xmx256m -XX:MaxPermSize=256m -Xss1m"
      

      And now the max memory is respected...

      Some dev can pronounce him self if this can give any problems....

      Thank You all

      posted in MyController.org
      Soloam
      Soloam
    • RE: Memory Consumption

      So we are talking about 200Mb of consumption... If its the Rp3 (1Gb Ram)...

      posted in MyController.org
      Soloam
      Soloam
    • RE: Memory Consumption

      I have 16Gb on my system, so 20% would be 3.2 Gb, I have 2Gb, and seems a bit high, I had a problem with memory today in my server, and was looking at the top memory users, and found MyController on the top of the list. I sill only installed My controller, nothing configured yet. Only assign the Gateway and it auto discovered the nodes. I even disabled the MQTT server, since I already have one running.

      posted in MyController.org
      Soloam
      Soloam
    • Memory Consumption

      Hello, any one having problem with memory consumption of MyController? I don't know if its normal, but in my case the java process is consuming almost 2Gb of memory of my system. Is this normal? And if yes, is there any way to reduce this value?

      Thank You

      posted in MyController.org
      Soloam
      Soloam
    • RE: Message Send Returns False, but message send

      I did try to replace the radios, but I didn't see any improvements. For example... I send the messages in this while loop:

      #define REPEAT_DELAY 50
      
      void messageRepeat(MyMessage &message, bool ack = true) {
        int repeat = 1;
        int repeats = 10;
        int repeatdelay = 0;
        boolean sendOK = false;
      
        SerialPrint("Sending message of child ");
        SerialPrintln(message.sensor);
      
        while ((sendOK == false) and (repeat < repeats)) {
          if (send(message, ack)) {
            sendOK = true;
            SerialPrint("Send OK");
          } else {
            sendOK = false;
            SerialPrint("Send ERROR ");
            SerialPrint(repeat);
            repeatdelay += REPEAT_DELAY;
          }
      
          if (ack == true) {
            SerialPrintln(" With ack ");
          } else {
            SerialPrintln(" Without ack ");
          }
      
          repeat++;
          wait(repeatdelay);
        }
      }
      

      It tries to send a message and incresses the timer of the wait on 50ms on every try
      (idea adapted from the @zzz-teo code on https://forum.mysensors.org/topic/7786/about-ack/2 at the moment I don't need to process the ack response, so I adapted it to work only with the send)

      Sometimes I can make it go on the fist try, sometimes it takes 5 tries, and sometimes it takes the max 10. But almost every times I can see the messages appearing in the MQTT topic. I made this topic code from information's on https://forum.mysensors.org/topic/3346/discussion-reliable-delivery/19 of @mfalkvidd and @hek

      At the moment I didn't change the power of the NF24 radios. Do you think that it could help to try and bost the power? Who can I do this?

      I'm using after the HLK-PM01 2 capacitors, a 0.1 uF Capacitor and a 100uF Capacitor, and on my radios a capacitor after the 3v regulator, a 4.7uF Capacitor, I can try to add a extra one or a bigger one to the radio, don't know if it could help, any ideas on the capacity?

      Thank You

      posted in Troubleshooting
      Soloam
      Soloam
    • RE: Message Send Returns False, but message send

      Yes I did! On the nodes... On the gateway, no... The sensebender allready has it... Does it not?

      This is my nodes https://www.openhardware.io/view/83/Smart-Light-Switch-220v

      Thank you

      posted in Troubleshooting
      Soloam
      Soloam
    • RE: Message Send Returns False, but message send

      I have 3 nodes at the moment... All of them with the same problem! The gateway is a sensebender gateway, it can be a power issue on the gateway... It uses a mobile charger... And it's not a official one... It can have problems... Any ideias on how can I test if the problem is on the charger? Or the only way is trial and error?

      Thank you

      posted in Troubleshooting
      Soloam
      Soloam
    • RE: Message Send Returns False, but message send

      I'm sure it appears NACK, but to be sure I'll try again when I get home and post back here the results!

      posted in Troubleshooting
      Soloam
      Soloam
    • Message Send Returns False, but message send

      I tried to make a reliable send process, so I loop the send message while the send does not return true, with a little wait in between! This works great and I'm able to have good send every time! The problem is that I get several false returns from the send, but if I sbscribe to the MQTT topic I can see that that the message are published even when the function returns false.

      What can be the cause?
      Shouldn't the return be only to the hardware communication success?

      I'm sending the messages with ack requests, but I'm only testing the send function, not waiting for the ack response!

      Thank you

      posted in Troubleshooting
      Soloam
      Soloam
    • RE: 💬 MysX2USB

      @tbowmo more out of curiosity, and from someone that just got started on electronics, so please sorry if this sounds like very noob, but, would it not be safer to plug the V_TARGET LED to the +3.3v pin? How do you ensure that the resistor on the V_TARGET will have constant voltage and that will not blow from over voltage if the VCCio pin is depended on the the Motherboard power?

      Thank You and nice work

      posted in OpenHardware.io
      Soloam
      Soloam
    • RE: [SOLVED] Sensebender GW Not Working - Damaged?

      @tbowmo Sir... you are a genius 🙂 .... It worked! thank you 🙂

      posted in Hardware
      Soloam
      Soloam
    • RE: [SOLVED] Sensebender GW Not Working - Damaged?

      Nothing... malfunction unit? Possible replacement?

      posted in Hardware
      Soloam
      Soloam
    • RE: [SOLVED] Sensebender GW Not Working - Damaged?

      I only connected the USB cable to my PC. First It did not worked, then I changes the cables and found one that made the GW appear on my Arduino IDE. I was able to upload the MQTT GW to it. Then I realised that I had debug off, so I tried to upload again with debug on, when I went to do that it stooped responding. I unplug it and when I pug-it back again It seems dead! No lights. Should it have any lights? I didn't even solder the MYSX pins. Only the Ethernet and RF24.

      posted in Hardware
      Soloam
      Soloam
    • [SOLVED] Sensebender GW Not Working - Damaged?

      Need some help, don't know if I did something wrong. Received my sensebender GW today, solder the Ethernet and nrf24l01 pins and tried to install the MQTT GW. At first no signal from the usb, nothing, I only had one light on the board. Then I replaced my cable and I was able to upload the MQTT to the board (At least seen a Upload Success message). I tried to make a serial monitor, but lost connection with the GW from usb, out of nothing. Now I plug my cable and no LED flash... nothing... The only lights are from the Ethernet module. Nothing works on my GW, can't detect it, no led's nothing. Can it be possible that it died?

      Thank You

      posted in Hardware
      Soloam
      Soloam
    • Send Message, pass ID

      It would be nice to, in the send function, that we could pass a extra value after the ack request, that value would be a numeric value that the gw would return back when replying with the ack. That way we could pass a unique id with the message, allowing to filter if the messages that we are acknowledging is the expected one.

      id++;
      send(msg2.set(state?false:true), true,id);
      

      something like this.

      posted in Feature Requests
      Soloam
      Soloam
    • RE: MQTT GW - QOS

      @monte said in MQTT GW - QOS:

      @soloam MySensors currently uses pubsubclient MQTT library. As for now it doesn't support publishing with QoS 1 and 2. There were pull requests with code for QoS 1, but developer refused to implement that. He says its due to low RAM available on arduino platform.

      Correct me if I'm wrong... But when you send a message as QOS1 or QOS2 aren't you basically putting the load and hard work on the MQTT server? Basicly you are telling the server to keep trying until all the subscribers receive the message.

      My main problem is that I'm having a lot of messages that arrive to the MQTT server, but never arrive to OpenHab (subscriber). This is making me fail a lot of triggers. I think that I'll give Ethernet GW a try and see if that improves

      posted in Development
      Soloam
      Soloam
    • RE: Gateway Ack Message

      And do we have a way to get a feedback if act was successful? So that We can make something like... if it fails... do it again

      posted in Development
      Soloam
      Soloam
    • RE: MQTT client gateway suggestions

      I know that this is old, but was this pushed to main? I would really need this! Thank You

      posted in Feature Requests
      Soloam
      Soloam
    • MQTT GW - QOS

      Hello all, is there any whay to change the QOS from a message from a MQTT publish from MySensors GW? I would like to send messages on QOS2! And if possible, not from all of them, only the most important, like switches (temperatures for example I don't need to).

      Thank You all

      posted in Development
      Soloam
      Soloam
    • Gateway Ack Message

      Hello all, who does the Node handles missed messages, messages without a returned ack? Does it try again? Is there a time out? Can I catch a missed ack? I'm using this code in my switch actuators. What happens is that sometimes I click the button and nothing happens, because the GW never replayed back. Questions:

      • Can I make it retry if failed by timeout?
      • Can I catch that time out in any method like the response?

      Thank you all

      posted in Development
      Soloam
      Soloam
    • RE: MQTT Gateway Configuration

      Thank you for your replay. My main doubt was the client-id, I didn't understand if it was a unic name or the GW client-id. You answered my question.

      Thank You for your help

      posted in MyController.org
      Soloam
      Soloam
    • RE: MQTT Gateway Disconnects from Broker

      I'm trying to get a Log to show, but when I unplug the GW to plug it to the pc to get the serial console, I lose the error.

      This is a Arduino Mini powerd by a mobile phone charger with a W5100.

      Thank You

      posted in Troubleshooting
      Soloam
      Soloam
    • RE: MQTT Gateway Configuration

      I think I dind't explain myself proprely, sorry, probably lost in translation.

      I was talking about MyController gateway configuration:

      0_1517508702815_5ae46ab5-8e4b-4532-aa83-77dba4573ed7-image.png

      The Fields on the screen:

      QoS: << Zero? Or should I use 1? >>
      Broker host: This Is the MQTT Broker Address?
      Client id: Is this a unic name to the MyController client, or the GW Name?
      Topic publish: The topics where the Mysensors GW is submitting?
      Topic subscribe: The topics where the Mysensors GW is Subscribing?

      Thank you

      posted in MyController.org
      Soloam
      Soloam
    • MQTT Gateway Disconnects from Broker

      I'm having a problem with my MQTT gateway, it keeps connecting and disconnecting from my MQTT broker. This problem is solved when I restart the mosquitto server, only to come back again some time later...

      This is my MQTT topics

      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/100/0/1/0/1 42.0
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/100/0/1/0/1 42.0
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/100/0/1/0/1 41.0
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/100/1/1/0/0 19.0
      mygateway1-out/100/0/1/0/1 42.0
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/100/0/1/0/1 41.0
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/100/0/1/0/1 42.0
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/100/0/1/0/1 41.0
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/100/0/1/0/1 42.0
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/100/0/1/0/1 41.0
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/100/0/1/0/1 42.0
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/100/1/1/0/0 19.0
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/100/0/1/0/1 42.0
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/100/1/1/0/0 19.0
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/100/0/1/0/1 42.0
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/100/1/1/0/0 19.0
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/0/255/0/0/18 2.1.1
      mygateway1-out/100/0/1/0/1 41.0
      mygateway1-out/0/255/0/0/18 2.1.1
      

      This output is only from more or less 5 min, At this time the service is unusable. I have to restart it to regain control.

      Thank You

      posted in Troubleshooting
      Soloam
      Soloam
    • MQTT Gateway Configuration

      Hello all, a quick but important question. When we add a new mqtt gateway, I get several fields, please confirm:

      QoS: << Zero? Or should I use 1? >>
      Broker host: << The Broker That The MQTT Gateway is pointing to. MY_CONTROLLER_IP_ADDRESS variable >>
      Client id: <<The Gateway ID? Or A Id to The Controller?>>
      Topic publish: << MY_MQTT_SUBSCRIBE_TOPIC_PREFIX variable from gateway >>
      Topic subscribe: << MY_MQTT_PUBLISH_TOPIC_PREFIX variable from gateway >>

      I've been having some problems with the controller and MQTT, and I was wondering if it's some miss configuration

      Using https://www.mysensors.org/build/mqtt_gateway as reference

      Thank You

      posted in MyController.org
      Soloam
      Soloam