Navigation

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

    Homer

    @Homer

    17
    Reputation
    146
    Posts
    980
    Profile views
    0
    Followers
    1
    Following
    Joined Last Online

    Homer Follow

    Best posts made by Homer

    • RF433 Hub for controlling Watts Clever switches

      Hi everyone!

      I would like to share with you all something that I have been working on for some time. It isn't my first project, but it is the first that I have shared in this way, and I must say that I am a little excited haha

      BACKGROUND

      A couple years ago I was at my local electronics store and they had a sale on some wall switches which were controllable using rf433. Each box had two switches as well as a hub that converted an infrared signal into rf433 which the individual switches were able to learn so they could be turned on and off. At that time I was playing around with Mysensors but had only made a couple relays, temp nodes and the like. I bought these at the time with the intention of using my Harmony Remote Hub to operate the switches. 3 years ago will finally moved into our new home, and while doing so we somehow misplaced the whole Harmony setup, so up until a couple months ago these switches gathered dust in the garage.

      Fast forward to a couple months ago, and with the help of some awesome members here, I was able to build a Mysensors RF433 Hub wot control all 6 of my switches. I had used a little maths to work out the signals, and even though I had only had 3 of the switches enter use, they seemed to be working as they should; that was until a couple days ago when I noticed that my pool pump which was powered through one of my switches was turning on every day at 1pm, despite no scenes in my controller (Vera 3) doing so. Long story short (haha) I worked out that when my fish tank lights turned on at 1pm, that switches frequency must have been too similar to the pool pump!

      So the last couple days I have been doing lots of searching, and hopefully a little learning. I was going to use the Candle Signal Hub, but ended up doing something on my own. I was lucky and found someone else on the internet who also had 6 plugs and had shared the code for each switch, which was very helpful!

      It's probably time for me to stop rambling lol so first here are some pics:

      The Switch
      0_1558261451143_switch.jpg

      The Hub
      0_1558261488775_node.jpg

      Please excuse all the extra wires on the Nano; it stopped being recognised by all my computers so I had to program it using an FTDI adaptor.

      Here is the sketch. I am certain that it could be tidied up a lot.

      // Enable debug prints to serial monitor
      //#define MY_DEBUG
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      
      // Enable repeater functionality for this node
      #define MY_REPEATER_FEATURE
      
      #include <SPI.h>
      #include <MySensors.h>
      #include <RCSwitch.h>
      
      #define MY_NODE_ID AUTO
      
      #define NUMBER_OF_PLUGS 6 // Total number of attached plugs
      
      #define SHORTPULSE 316
      #define LONGPULSE 818
      
      #define CODE_1On 4072574
      #define CODE_1Off 4072566
      #define CODE_2On 4072572
      #define CODE_2Off 4072564
      #define CODE_3On 4072570
      #define CODE_3Off 4072562
      #define CODE_4On 1386894
      #define CODE_4Off 1386886
      #define CODE_5On 1386892
      #define CODE_5Off 1386884
      #define CODE_6On 1386890
      #define CODE_6Off 1386882
      
      
      
      RCSwitch mySwitch = RCSwitch();
      
      void setup() {
        mySwitch.enableTransmit(4);
        mySwitch.setRepeatTransmit(15);
      }
      
      void presentation()
      {
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("433mhz HUB", "2.0");
      
        for (int sensor = 1 ; sensor <= NUMBER_OF_PLUGS; sensor++) {
          // Register all sensors to gw (they will be created as child devices)
          present(sensor, S_LIGHT);
        }
      }
      
      
      void loop()
      {
      
      }
      
      void receive(const MyMessage &message) {
        // We only expect one type of message from controller. But we better check anyway.
        if (message.type == V_LIGHT) {
          int incomingLightState =  message.getBool();
          int incomingOutlet = message.sensor;
      
          Serial.print("Outlet #: ");
          Serial.println(message.sensor);
          Serial.print("Command: ");
          Serial.println(message.getBool());
      
          if (incomingOutlet == 1) {
            if (incomingLightState == 1) {
              // Turn on  socket 1
              Serial.println("Turn on Socket 1");
              mySwitch.send(CODE_1On, 24); // These codes are unique to each outlet
              delay(50);
            }
            if (incomingLightState == 0)  {
              // Turn off socket 1
              Serial.println("Turn off Socket 1");
              mySwitch.send(CODE_1Off, 24);
              delay(50);
            }
          }
          if (incomingOutlet == 2) {
            if (incomingLightState == 1) {
              // Turn on  socket 2
              Serial.println("Turn on Socket 2");
              mySwitch.send(CODE_2On, 24);
              delay(50);
            }
            if (incomingLightState == 0)  {
              // Turn off socket 2
              Serial.println("Turn off Socket 2");
              mySwitch.send(CODE_2Off, 24);
              delay(50);
            }
          }
          if (incomingOutlet == 3) {
            if (incomingLightState == 1) {
              // Turn on  socket 3
              Serial.println("Turn on Socket 3");
              mySwitch.send(CODE_3On, 24);
              delay(50);
            }
            if (incomingLightState == 0)  {
              // Turn off socket 3
              Serial.println("Turn off Socket 3");
              mySwitch.send(CODE_3Off, 24);
              delay(50);
            }
          }
          if (incomingOutlet == 4) {
            if (incomingLightState == 1) {
              // Turn on  socket 4
              Serial.println("Turn on Socket 4");
              mySwitch.send(CODE_4On, 24);
              delay(50);
            }
            if (incomingLightState == 0)  {
              // Turn off socket 4
              Serial.println("Turn off Socket 4");
              mySwitch.send(CODE_4Off, 24);
              delay(50);
            }
          }
          if (incomingOutlet == 5) {
            if (incomingLightState == 1) {
              // Turn on  socket 5
              Serial.println("Turn on Socket 5");
              mySwitch.send(CODE_5On, 24);
              delay(50);
            }
            if (incomingLightState == 0)  {
              // Turn off socket 5
              Serial.println("Turn off Socket 5");
              mySwitch.send(CODE_5Off, 24);
              delay(50);
            }
          }
          if (incomingOutlet == 6) {
            if (incomingLightState == 1) {
              // Turn on  socket 6
              Serial.println("Turn on Socket 6");
              mySwitch.send(CODE_6On, 24);
              delay(50);
            }
            if (incomingLightState == 0)  {
              // Turn off socket 6
              Serial.println("Turn off Socket 6");
              mySwitch.send(CODE_6Off, 24);
              delay(50);
            }
          }
        }
        delay(50);
      }```
      
      I would like to give my sincere thanks to everyone here. I may not post all that much, but I enjoy reading what others are doing and trying to learn from it, although much of it is still way over my head! To @hek I still remember how excited I was when I found MySensors all those years ago, and I thank you and your crew for keeping this great community going!
      
      I am also certain that most of you won't get very much from this technical-wise; I just needed to share this for myself. Thank you all.
      posted in My Project
      Homer
      Homer
    • RE: rboard - Cheap relay/radio/arduino board ~$10

      Ok, looks like I am slowly getting there 🙂

      fyi I tried playing around with the above sketch, but it's a no go as Codebender tells me <Bounce2.h> is missing.

      posted in Hardware
      Homer
      Homer
    • RE: Possible problem with sketch?

      Thank you for everyone's replies!

      posted in Troubleshooting
      Homer
      Homer
    • RE: DHT and DOOR sensor

      I can't believe I spotted am error in the code! I guess I'm starting to get a bit better at this! 😁😁

      posted in My Project
      Homer
      Homer
    • RE: rboard - Cheap relay/radio/arduino board ~$10

      @mfalkvidd said in rboard - Cheap relay/radio/arduino board ~$10:

      @homer that sketch was made for MySensors 1.x and needs to be converted to work for MySensors 2.x.
      Followthe guide at https://forum.mysensors.org/topic/4276/converting-a-sketch-from-1-5-x-to-2-0-x to convert it.

      Alternatively, remove MySensors 2 and install MySensors 1 instead.

      Thanks mate! I was thinking something like that might be the case, but I didn't know for sure.

      Thank you so much for pointing me in the right direction!!

      posted in Hardware
      Homer
      Homer
    • RE: Node not working

      I'm still keen to know if there is a way to call up any logs to check why things don't work, but at this stage I've been able to get the node to work again as it should. All I needed to do was give it more power.

      posted in Troubleshooting
      Homer
      Homer
    • RE: Ethernet gateway

      @terence-faul I'm only new to this myself, so I can't help with anything specific, but I did a search and found another thread where someone was having issues with a similar setup to you. Maybe you might find some info there that helps you. The thread is here :
      https://forum.mysensors.org/topic/5059/ethernet-gateway-with-w5100

      posted in My Project
      Homer
      Homer
    • RE: rboard - Cheap relay/radio/arduino board ~$10

      I just wanted to say that I managed to upload a sketch and I have it working!

      I attempted to change the code so it was compatible but I gave that up and decided to merge two sketches. It was good fun, and I enjoyed learning!

      posted in Hardware
      Homer
      Homer
    • RE: Old user returning to Vera/MySensors

      Thank you for your responses! Exactly what I was after!

      posted in Vera
      Homer
      Homer
    • RE: Example sketch not updated to new Mysensors version

      UPDATE

      Once I added the suggested modified libraries, it compiles.

      I did find a spelling mistake that @hek might be interested in: In the EXAMPLE section it states "DTH" when it should be "DHT".

      posted in Troubleshooting
      Homer
      Homer

    Latest posts made by Homer

    • RE: Can't even get a base Mysensors sketch to work

      OK.... I have solved the biggest issue by rebooting my computer. Silly me! The base motion sketch works as it should, kind of.... it does seem to be sending messages quite quickly. Anyways I have uploaded my motion and 2 led dimmer sketch and am in the process of joining it to my Vera Controller, but it still does seem to be sending messages very often. Can someone review my sketch and offer feedback? Please note that I did take the very easy route and adapted a RGB controller sketch for the led dimming part; I plan to just be using 2 of the lights in the sketch to control my 2 led strips. When I have more time I plan to learn how to do it properly.

      Here is the sketch as it stands:

      
      #define SN   "Motion+2 LED Dimmer"
      #define SV   "v1"
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG 
      
      //#define MY_REPEATER_FEATURE
      
      // Enable and select radio type attached
      #define MY_RADIO_RF24
      //#define MY_RADIO_RFM69
      
      #include <MySensors.h>  
      
      uint32_t SLEEP_TIME = 120000; // Sleep time between reports (in milliseconds)
      #define DIGITAL_INPUT_SENSOR 3   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
      #define CHILD_ID 7   // Id of the sensor child
      
      // Arduino pin attached to MOSFET Gate pin
      #define RED_PIN 7   
      #define GREEN_PIN 5
      #define BLUE_PIN 6
      
      // Define message name and type to send sensor info
      MyMessage RedStatus(RED_PIN, V_DIMMER);   
      MyMessage GreenStatus(GREEN_PIN, V_DIMMER);
      MyMessage BlueStatus(BLUE_PIN, V_DIMMER);
      MyMessage Status(1, V_DIMMER);
      MyMessage rgbShowState(0, V_LIGHT);
      // Initialize motion message
      MyMessage msg(CHILD_ID, V_TRIPPED);
          
      // Serial.print translate sensor id to sensor name
      char color[][6] = {"","","","RED","","GREEN","BLUE"}; 
         
      // Vars for rgbShow function
      int redval = 0;
      int greenval = 0;
      int blueval = 0;
      long time=0;
      int isShow;
           
      void setup() 
      {
        // Define pin mode (pin number, type)
        pinMode(RED_PIN, OUTPUT);   
        pinMode(GREEN_PIN, OUTPUT);
        pinMode(BLUE_PIN, OUTPUT);
        pinMode(DIGITAL_INPUT_SENSOR, INPUT);      // sets the motion sensor digital pin as input
      
        // Correct saved RGB value for first start
        saveState(RED_PIN, constrain((int8_t)loadState(RED_PIN), 0, 100)); 
        saveState(GREEN_PIN, constrain((int8_t)loadState(GREEN_PIN), 0, 100)); 
        saveState(BLUE_PIN, constrain((int8_t)loadState(BLUE_PIN), 0, 100)); 
                   
        // Get value from eeprom and write to output
        analogWrite(RED_PIN, 255 * loadState(RED_PIN) / 100);     
        analogWrite(GREEN_PIN, 255 * loadState(GREEN_PIN) / 100);
        analogWrite(BLUE_PIN, 255 * loadState(BLUE_PIN) / 100);
               
        // Write some debug info
        Serial.print("Load from eeprom RED: "); 
        Serial.print(loadState(RED_PIN)); 
        Serial.println("%"); 
        Serial.print("Load from eeprom GREEN: "); 
        Serial.print(loadState(GREEN_PIN)); 
        Serial.println("%"); 
        Serial.print("Load from eeprom BLUE: "); 
        Serial.print(loadState(BLUE_PIN)); 
        Serial.println("%");  
        
        // Send RGB value to controler (request ack back: true/false)
        Serial.println("Send eeprom value to controler"); 
        send( RedStatus.set(loadState(RED_PIN)), false );    
        send( GreenStatus.set(loadState(GREEN_PIN)), false );
        send( BlueStatus.set(loadState(BLUE_PIN)), false );
        
        // Correct RGB show state for first start and load it (set to 'On' at first start)
        saveState(0, constrain((int8_t)loadState(0), 0, 1));
        isShow=loadState(0);
             
        // Send RGB show state to controler (request ack back: true/false)
        send( rgbShowState.set(isShow), false);
        
        if (isShow==1){Serial.println("RGB show running..."); }
        Serial.println("Ready to receive messages...");  
      }
      
      void presentation()  {
        // Present sketch (name, version)
        sendSketchInfo(SN, SV);        
             
        // Register sensors (id, type, description, ack back)
        present(RED_PIN, S_DIMMER, "RED LED", false);
        present(GREEN_PIN, S_DIMMER, "GREEN LED", false);
        present(BLUE_PIN, S_DIMMER, "BLUE LED", false);
        present(0, S_LIGHT, "Show button LEDs", false);
        // Register Motion sensor to gw (they will be created as child devices)
        present(CHILD_ID, S_MOTION);
      }
      
      void loop()
      {
          // Read digital motion value
          bool tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH;
      
          Serial.println(tripped);
          send(msg.set(tripped?"1":"0"));  // Send tripped value to gw
      
          
          // Sleep until interrupt comes in on motion sensor. Send update every two minute.
          sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME);
      }
      
      
      void receive(const MyMessage &message)
      {
        if (message.isAck())
        {
          Serial.println("Got ack from gateway");
        }
        if (message.type == V_LIGHT)
        {
          // Incoming on/off command sent from controller ("1" or "0")
          int lightState = message.getString()[0] == '1';
        
          // if receive RGB Show On commands, start the show
          if (message.sensor==0 && lightState==1){ rgbShowOn(); }
              // if receive RGB Show Off commands, stop the show
          else if (message.sensor==0 && lightState==0){ rgbShowOff(); }
             
          // if receive RGB switch On command
          else if (lightState==1)
          {
            // Write some debug info
                  Serial.print("Incoming change for ");
                  Serial.print(color[message.sensor]);
                  Serial.println(": On");
                  Serial.print("Load from eeprom: ");
                
            if ( loadState(message.sensor) == 0)
            {
              // Pick up last saved dimmer level from the eeprom
                      analogWrite(message.sensor, 255 * loadState(10*message.sensor) / 100);
                      // Save loaded value to current
                      saveState(message.sensor, loadState(10*message.sensor));
                      Serial.print(loadState(10*message.sensor)); 
                      Serial.println("%");
                      // Send value to controler
                      Serial.println("Send value to controler");
                      send(Status.setSensor(message.sensor).set(loadState(10*message.sensor)),false);
                  }
                  else
                  {
                      // Pick up last saved dimmer level from the eeprom
                      analogWrite(message.sensor, 255 * loadState(message.sensor) / 100);
                      Serial.print(loadState(message.sensor));
                      Serial.println("%"); 
                      // Send value to controler
                      Serial.println("Send value to controler");
                      send(Status.setSensor(message.sensor).set(loadState(message.sensor)),false);
                  } 
                  // Stop the show if it's running
                  if (isShow==1){ rgbShowStop(message.sensor); }
              }
          // if recieve switch Off command
          else if (lightState==0)
          {
            // Write output to 0 (Off)
                  analogWrite(message.sensor, 0);
                  // Save old value to eeprom if it'was not zero
                  if ( loadState(message.sensor) != 0 )
                  {
                      saveState(10*message.sensor, constrain((int8_t)loadState(message.sensor), 0, 100)); 
                  }
                  // Save new value to eeprom
                  saveState(message.sensor, 0); 
                  // Write some debug info
            Serial.print("Incoming change for ");
            Serial.print(color[message.sensor]);
            Serial.print(": ");
            Serial.println("Off");  
                  Serial.print("Store old value: ");
                  Serial.print(loadState(10*message.sensor));  
                  Serial.println("%");
                  // Send value to controler
                  Serial.println("Send value to controler");
                  send(Status.setSensor(message.sensor).set(loadState(message.sensor)),false);
            // Stop the show if it's running
            if (isShow==1){ rgbShowStop(message.sensor); }
          }
        }
        else if (message.type == V_DIMMER)
        {    
            uint8_t incomingDimmerStatus = message.getByte();
            // limits range of sensor values to between 0 and 100 
            incomingDimmerStatus = constrain((int8_t)incomingDimmerStatus, 0, 100);
            // Change Dimmer level
            analogWrite(message.sensor, 255 * incomingDimmerStatus / 100);
            //Save value to eeprom
            saveState(message.sensor, incomingDimmerStatus); 
            // Write some debug info
            Serial.print("Incoming change for ");
            Serial.print(color[message.sensor]);
            Serial.print(": ");
            Serial.print(incomingDimmerStatus);
            Serial.println("%");
              // Send value to controler
              Serial.println("Send value to controler");
              send(Status.setSensor(message.sensor).set(loadState(message.sensor)),false);
            // Stop the show if it's running
            if (isShow==1){ rgbShowStop(message.sensor); }
          }
      }
         
      void rgbShow()
      {
        time = millis();
        redval = 128+250*cos(2*PI/300000*time);
        greenval = 128+250*cos(2*PI/300000*time-222);
        blueval = 128+250*cos(2*PI/300000*time-111);
        // limits range of sensor values to between 0 and 255 
        redval = constrain(redval, 0, 255);
        greenval = constrain(greenval, 0, 255);
        blueval = constrain(blueval, 0, 255);
      }
      
      void rgbShowOn()
      {
        // define show On
        isShow=1;
        // Save state
        saveState(0, 1); 
        // Write some debug info
        Serial.println("Show must go on");
      }
         
      void rgbShowOff()
      {
        // define show Off
        isShow=0;
        // Save state
        saveState(0, 0);
        // Save RGB value to eeprom
        saveState(RED_PIN, 100 * redval / 255); 
        saveState(GREEN_PIN, 100 * greenval / 255);
        saveState(BLUE_PIN, 100 * blueval / 255);
        // Write some debug info
        Serial.println("Stop the show");
        // Send actual RGB value and state to controler and request ack back (true/false)
        Serial.println("Send eeprom value to controler"); 
        send( RedStatus.set(loadState(RED_PIN)), false );    
        send( GreenStatus.set(loadState(GREEN_PIN)), false );
        send( BlueStatus.set(loadState(BLUE_PIN)), false );
        send( rgbShowState.set(0), false);
      }
      
      void rgbShowStop(int sensor)
      {
         // define show Off
         isShow=0;
         // Save state
         saveState(0, 0);
         // Write some debug info
         Serial.println("Stop the show");
         // Send actual RGB value and state to controler and request ack back (true/false)
         Serial.println("Send eeprom value to controler"); 
         if (sensor != RED_PIN)
         {
              saveState(RED_PIN, 100 * redval / 255); 
              send( RedStatus.set(loadState(RED_PIN)), false );  
          }
          if (sensor != GREEN_PIN)
          {
              saveState(GREEN_PIN, 100 * greenval / 255); 
              send( GreenStatus.set(loadState(GREEN_PIN)), false );
          }
          if (sensor != BLUE_PIN)
          {
              saveState(BLUE_PIN, 100 * blueval / 255);
              send( BlueStatus.set(loadState(BLUE_PIN)), false );
          }
          send( rgbShowState.set(0), false);
      }
      
      posted in Troubleshooting
      Homer
      Homer
    • Can't even get a base Mysensors sketch to work

      Hi all

      I want to create a sensor which is a motion sensor and a controller of two dimmable LED strips. When I upload the sketch that I hope will work, it looks like the motion part of it doesn't stop sending info, so I decided to start small to try and work out the issue.

      When I upload the Dimming LED sketch on its own, it all seems to work fine according to the serial monitor. Then I wipe the arduino and upload the motion part only, and the serial monitor goes crazy! The Mysensors sign or whatever it's called shows in the serial monitor, then it scrolls on and on, printing either a '1' or '0' on each line and it doesn't stop, and it's FAST!

      I am using an Arduino Nano. The motion sketch is the base example provided on Mysensors, but here it is anyways:

      
      // Enable debug prints
      // #define MY_DEBUG
      
      // Enable and select radio type attached
      #define MY_RADIO_RF24
      //#define MY_RADIO_NRF5_ESB
      //#define MY_RADIO_RFM69
      //#define MY_RADIO_RFM95
      
      #include <MySensors.h>
      
      uint32_t SLEEP_TIME = 120000; // Sleep time between reports (in milliseconds)
      #define DIGITAL_INPUT_SENSOR 3   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
      #define CHILD_ID 1   // Id of the sensor child
      
      // Initialize motion message
      MyMessage msg(CHILD_ID, V_TRIPPED);
      
      void setup()
      {
          pinMode(DIGITAL_INPUT_SENSOR, INPUT);      // sets the motion sensor digital pin as input
      }
      
      void presentation()
      {
          // Send the sketch version information to the gateway and Controller
          sendSketchInfo("Motion Sensor", "1.0");
      
          // Register all sensors to gw (they will be created as child devices)
          present(CHILD_ID, S_MOTION);
      }
      
      void loop()
      {
          // Read digital motion value
          bool tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH;
      
          Serial.println(tripped);
          send(msg.set(tripped?"1":"0"));  // Send tripped value to gw
      
          // Sleep until interrupt comes in on motion sensor. Send update every two minute.
          sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME);
      }
      

      I have even tried this sketch as it is on another Arduino Nano and I still get the same result. I'm keen to hear your thoughts.

      Thanks

      posted in Troubleshooting
      Homer
      Homer
    • RE: New to Domoticz, joining it with Vera and Mysensors question

      @dbemowsk said in New to Domoticz, joining it with Vera and Mysensors question:

      @homer My first question would be, what devices are not working on your Vera controller?

      The problem I have is that I want to use some of the cheap rf433 sensors. I have been trying to get the Candle Hub working but haven't been successful, so I'm thinking about using RF Link, which I know works with Domoticz. I'm hoping to be able to use the rf433 devices using the RF Link and having that talk to Domoticz, and then my Vera controller getting that info from Domoticz.

      posted in Domoticz
      Homer
      Homer
    • RE: Best 3d printers

      @skywatch said in Best 3d printers:

      @homer I think you've made a good choice - good luck with with your new source of frustration and learning! 🙂

      If it turns out you don't like it, feel free to send it to me (Heeeee) 😉

      From experience though, test out your printer with something simple from thingiverse.com and see how it goes....

      For me the following were the areas I had problems with at first.....

      1. Bed leveling - this has to be right to get the first layer the same thickness.
      2. Bed adhesion - I had 'lifting' problems that took a while to sort out.
      3. Supports - You'll get a feel for where and when to use supports, it takes a little trail and error though....

      Thanks mate! So far I'm liking it, so I'm sorry to say that I won't be sending it to you anytime soon haha

      So far I've printed 3 things. The first was the cat that was on the SD card, and this came out perfect. I used the filament that came with the printer. My next two models were the same, a sign for two of my kids who play Fortnite. The object was quite flat but spread across the bed. Each was printer with different filament. The first lifted very badly but not bad enough to use. The good thing was that this print was nice and easy to remove from the bed haha. The third printed perfectly but wow it was extremely difficult to get off the bed!

      I do have an issue with leveling. The bar that holds the printer head, no matter what I do in the way of adjustment, the right side is close to 3mm higher than the left. I'm in the process of having this addressed with who I bought it from, but at this stage all they are saying is to level the bed automatically, which seems to be working fine, but I don't know how it will go with taller prints.

      I would like to start making my own boxes for my Mysensors, but don't know what program to use. I've never done this sort of thing before, so at the moment I'm a little concerned about the learning curve, so if you or anyone knows of a program that is simple to use for this purpose, please share what it is!

      posted in Enclosures / 3D Printing
      Homer
      Homer
    • RE: Best 3d printers

      I just purchased a Creality CR-10S Pro. It should arrive in a couple days. Anyone own one of these? This is my first step into the 3D making world 🙂

      posted in Enclosures / 3D Printing
      Homer
      Homer
    • RE: Candle - signal Hub - A universal 433Mhz signal detector and cloner

      @alowhum Yes, no touchscreen

      Here is the first section of the code:

      /*
       *
       * Signal Hub
       * 
       * This device can copy signals from wireless remote controls that use the 433 frequency, and then rebroadcast them. It can optionally also copy Infra red (IR) signals.
       * 
       * It can do this in three ways:
       * - Copy and replay ON and OFF signals. For example, from cheap wireless power switches. It basically copies remote controls.
       * - Copy and then replay a single signal. For example, to emulate a window sensor.
       * - Recognise signals without replaying them. For example, After learning the signal once, it can detect when a window sensor is triggered again. Or when a button on a remote control is pressed.
       * 
       * This allows you to:
       * - Create a smart home security solution using cheap window and movement sensors.
       * - Automatically turn on lights and other devices when you get home, or when the sun goes down etc, using wireless power sockets.
       * - Control automations using wireless buttons or remote controls.
       * 
       * An Arduino Nano can store 50 "recognise only" signals, or about 20 on/off signals. You can store any combination of these. If you need to store more signals you could look into using an Arduino Mega.
       * 
       * Are there any limits?
       * - This does not work on things like garage door openers or keyless entry systems for cars. 
       * These devices have a very basic protection: the code changes everytime you use it, so replaying signals will not open the door again.
       * 
       * Security?
       * - Many cheap 433Mhz devices do not use encryption. This allows us to copy the signal in the first place. 
       * This also means that your neighbour can in theory do the same thing you can: copy and replay signals picked up through the walls.
       *
       * 
       * 
       * SETTINGS */
      
       
      //#define HAS_TOUCH_SCREEN                            // Have you connected a touch screen? Connecting a touch screen is recommend.  
      
      //#define MY_ENCRYPTION_SIMPLE_PASSWD "changeme"      // If you are using the Candle Manager, the password will be changed to what you chose in the interface automatically. Be aware, the length of the password has an effect on memory use.
      
      
       /* END OF SETTINGS
        *  
        * 
        * ABOUT THE CODE
        * 
        * The code has a number of states it can be in.
        * LISTENING MODE. Here The main loop continuously listens for signals. If it detects it calls three successive funtions:
        * 1. Check if signal is a signal (SignalViabilityCheck function)
        * 2. Clean up the signal (signalCleaner function)
        * 3. Analyse the signal to find the binary code it represents (signalAnalysis function).
        * 
        * If a valid binary code is found, the next action depends on which 'state' the system is in.
        * - If in LISTENING_SIMPLE state, then the signal is compared to all the stored signals. It lets you know if there is a match.
        * - If in LISTENING_ON state, then the signal is compared to all the stored signals. It lets you know if there is a match.
        * - If in COPYING_SIMPLE state, the code is stored as a 'simple' signal. This can then be replayed later.
        * - If in COPYING_ON state, the code is stored, after which the system asks for the OFF code (COPYING_OFF state), and then stores it with the same data. 
        * - If in LEARNING_SIMPLE state, only the binary code is stored, and not the meta-data required to fully recreate the signal.
        * 
        * The final states the system can be in are:
        * - IN_MENU. This is when the system is displaying a menu on the screen.
        * - REPLAYING. This is the state while a signal is being replayed.
        * 
        * Depending on the current state the various functions can work in slightly different ways. 
        * take for example the scanEeprom function:
        * - When in LISTENING state it compares the latest found signal to existing signals stored in the EEPROM memory.
        * - When in REPLAYING state it returns data required to rebuild the original signal.
        * - If called with a 0, then it does not try to recognise or rebuild anything. This is used during setup, when we only need to know how many signals are stored.
        * 
        * __SIGNAL ANALYSIS DETAILS__
        * When it detects a signal, the code tries to find the part of the signal that repeats. 
        * In normal operation the signalCleaner function cleans up the signal and simultaneously tries to find the 'betweenSpace' variable. 
        * Often, 433Mhz signals have a repeating binary code that is interrupted by a short burst of different signals (called the 'anomaly' in this code).
        * If no anomaly can be detected, then the repeating part is probably 'back to back', without a separator signal. 
        * In this case there is a 'backup' function, the 'pattern finder'. This uses brute force to find the signal.
        * If both methods fail, then the signal cannot be copied.
        *  
        *  
        *  
        *  TODO
        *  - Check if signal is already stored before storing it. Then again, there can be good reasons to store a signal twice. Perhaps only check for doubles with recognise-only signals?
        *  - Another bit could be used to store if an on/off signal should also be recognisable. That way the remote could be used twice somehow.. Or: 
        *  - Request current status of on/off toggles from the controller. Though it might be jarring or even dangerous if all devices suddenly toggled to their new positions.
        *  - Turn off the display after a while.
        *  - Send new children as they are created.
        */
      
      
      //#define DEBUG                                     // Do you want to see extra debugging information in the serial output?
      //#define DEBUG_SCREEN                              // Do you want to see extra debugging information about the touch screen in the serial output?
      //#define MY_DEBUG                                  // Enable MySensors debug output to the serial monitor, so you can check if the radio is working ok.
      
      // Receiver and transmitter pins
      #define RECEIVER 3                                  // The pin where the receiver is connected.
      #define TRANSMITTER 4                               // The pin where the transmitter is connected.
      
      #define TOUCH_SCREEN_RX_PIN 7                       // The receive (RX) pin for the touchscreen. This connects to the transmit (TX) pin of the touchscreen.
      #define TOUCH_SCREEN_TX_PIN 8                       // The receive (TX) pin for the touchscreen. This connects to the transmit (RX) pin of the touchscreen.
      
      
      // This code has an extra pattern finding trick. Using brute force it will try to find a pattern in the data. The downside is it takes a lot of time to analyse signals this way. 
      // This means the system might not detect a signal because it is busy analysing a bad signal. It's up to you if you want to use it.
      //#define PATTERN_FINDER
      
      // Enable and select the attached radio type
      #define MY_RADIO_RF24                               // This is a common and simple radio used with MySensors. Downside is that it uses the same frequency space as WiFi.
      //#define MY_RADIO_NRF5_ESB                         // This is a new type of device that is arduino and radio all in one. Currently not suitable for beginners yet.
      //#define MY_RADIO_RFM69                            // This is an open source radio on the 433mhz frequency. Great range and built-in encryption, but more expensive and little more difficult to connect.
      //#define MY_RADIO_RFM95                            // This is a LoRaWan radio, which can have a range of 10km.
      
      // MySensors: Choose your desired radio power level. High power can cause issues on cheap Chinese NRF24 radio's.
      //#define MY_RF24_PA_LEVEL RF24_PA_MIN
      //#define MY_RF24_PA_LEVEL RF24_PA_LOW
      #define MY_RF24_PA_LEVEL RF24_PA_HIGH
      //#define MY_RF24_PA_LEVEL RF24_PA_MAX
      
      // Mysensors advanced security
      //#define MY_SECURITY_SIMPLE_PASSWD "changeme"      // Be aware, the length of the password has an effect on memory use.
      //#define MY_SIGNING_SOFT_RANDOMSEED_PIN A7         // Setting a pin to pickup random electromagnetic noise helps make encryption more secure.
      
      // Mysensors advanced settings
      #define MY_TRANSPORT_WAIT_READY_MS 10000            // Try connecting for 10 seconds. Otherwise just continue.
      //#define MY_RF24_CHANNEL 100                       // In EU the default channel 76 overlaps with wifi, so you could try using channel 100. But you will have to set this up on every device, and also on the controller.
      //#define MY_RF24_DATARATE RF24_1MBPS                 // Slower datarate makes the network more stable?
      //#define MY_NODE_ID 10                             // Giving a node a manual ID can in rare cases fix connection issues.
      //#define MY_PARENT_NODE_ID 0                       // Fixating the ID of the gatewaynode can in rare cases fix connection issues.
      //#define MY_PARENT_NODE_IS_STATIC                  // Used together with setting the parent node ID. Daking the controller ID static can in rare cases fix connection issues.
      //#define MY_SPLASH_SCREEN_DISABLED                   // Saves a little memory.
      //#define MY_DISABLE_RAM_ROUTING_TABLE_FEATURE      // Saves a little memory.
      
      
      
      // REQUIRED LIBRARIES
      
      #include <MySensors.h>                              // The library that helps form the wireless network.
      #include <EEPROM.h>                                 // Allows for storing data on the Arduino itself, like a mini hard-drive.
      
      
      //#define HAS_BASIC_OLED_SCREEN                     // Have you connected a simple OLED screen? Connecting a screen is recommend. 
      
      // Basic OLED screen
      #ifdef HAS_BASIC_OLED_SCREEN
      #define INCLUDE_SCROLLING 0                         // Simple drivers for the OLED screen.
      #define OLED_I2C_ADDRESS 0x3C
      #include <SSD1306Ascii.h>                           
      #include <SSD1306AsciiAvrI2c.h>
      SSD1306AsciiAvrI2c oled;
      #endif
      
      
      // Touch screen
      #ifdef HAS_TOUCH_SCREEN
      
      #include <SoftwareSerial.h>
      SoftwareSerial mySerial(TOUCH_SCREEN_RX_PIN,TOUCH_SCREEN_TX_PIN);                       // RX (receive) pin, TX (transmit) pin
      
      #define MAX_BASIC_COMMAND_LENGTH 16                 // How many bytes are in the longest basic command?
      #define TOUCHSCREEN_WIDTH 240
      #define TOUCHSCREEN_HEIGHT 320
      #define BUTTON_HEIGHT 53                            // How many pixels tall are the touch screen buttons?
      #define BUTTON_PADDING (BUTTON_HEIGHT/2) - 7        // The font is 14 pixels high, so this calculation places it in the middle of the buttons.
      
      posted in My Project
      Homer
      Homer
    • RE: Best 3d printers

      I'm thinking about buying the Creality CR-10 S5. Has anyone had any experience with this 3D printer or have heard any good or negative comments about it?

      posted in Enclosures / 3D Printing
      Homer
      Homer
    • RE: Have I blown the MOSFETS?

      I found a YouTube video that explained how to test them, but my multimeter must not be up to the job. So I created a single led dimmer sensor and hooked it up to the three MOSFETS one at a time to test, and they seem to work as they should. So my issue must be with the sketch.

      Mods, you can delete this thread if you like.

      posted in Troubleshooting
      Homer
      Homer
    • Have I blown the MOSFETS?

      A week or so ago I built a sensor to control a strip of RGB LEDs. This afternoon I thought I was going to have some time to myself to wire up the LEDs to the sensor, but things came up and I got distracted. I really wanted to see the strip light up so before going to bed I quickly wired it up, but I accidentally connected power the wrong way, not to the Arduino but to the strip. When I realised what I had done I swapped it around but it won't work. When I disconnected the strip from the sensor and powered the strip another way, the strip worked fine.

      This is my first attempt at creating such a sensor, so I can't be 100% sure that the sketch is correct, so it could be possible that it didn't work for another reason other than frying the MOSFETs. So to those of you who know more about MOSFETs than me, is it likely that they are now damaged to the point that they will no longer work? Is there a way to test them while still wired up to the sensor?

      I'll appreciate any help that can be provided. Thanks!

      posted in Troubleshooting
      Homer
      Homer
    • RE: MQTT - explanation for beginner

      @pihome awesome, thanks heaps! I'll check it that video later today 👍

      posted in General Discussion
      Homer
      Homer