Navigation

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

    blackdog65

    @blackdog65

    2
    Reputation
    9
    Posts
    518
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    blackdog65 Follow

    Best posts made by blackdog65

    • RE: Generic Temperature/repeater node

      It drives me crazy! The oldest part of the house pre-dates 1650 and was built to last. I have 4 wifi points hard-wired in as wifi will only reach the next room.

      On the plus side, it's cool in summer and warm in winter 😉

      posted in Development
      blackdog65
      blackdog65
    • RE: Project boxes for MySensor's nodes and gateway?

      I've got a few of these with 2xAAA, Arduino pro + radio + DS18b20 crammed into them

      Vented Box

      @mvdarend has my vote though... much cheaper and fun

      posted in Enclosures / 3D Printing
      blackdog65
      blackdog65

    Latest posts made by blackdog65

    • RE: Project boxes for MySensor's nodes and gateway?

      I've got a few of these with 2xAAA, Arduino pro + radio + DS18b20 crammed into them

      Vented Box

      @mvdarend has my vote though... much cheaper and fun

      posted in Enclosures / 3D Printing
      blackdog65
      blackdog65
    • RE: Generic Temperature/repeater node

      It drives me crazy! The oldest part of the house pre-dates 1650 and was built to last. I have 4 wifi points hard-wired in as wifi will only reach the next room.

      On the plus side, it's cool in summer and warm in winter 😉

      posted in Development
      blackdog65
      blackdog65
    • RE: Generic Temperature/repeater node

      How odd? Turned off and on... (which I'd tried obviously) and has worked perfectly since
      go figure

      posted in Development
      blackdog65
      blackdog65
    • RE: Generic Temperature/repeater node

      Ah... actually it doesn't work 😞
      It takes one temp reading and then sits there with a led flashing... damn!

      Anyone see the problem?

      posted in Development
      blackdog65
      blackdog65
    • RE: Generic Temperature/repeater node

      Ok... I tried this based on the standard dallas DS18B20 sketch and I think it's working.

      It shows up in MSController as both a TEMP sensor and an ARDUINO_RELAY

      Tomorrow I'll try it with Domoticz

      Many thanks for the advice 😉

      #include <MySensor.h>  
      #include <SPI.h>
      #include <DallasTemperature.h>
      #include <OneWire.h>
      
      #define COMPARE_TEMP 0 // Send temperature only if changed? 1 = Yes 0 = No
      
      #define ONE_WIRE_BUS 3 // Pin where dallase sensor is connected 
      #define MAX_ATTACHED_DS18B20 16
      unsigned long WAIT_TIME = 300000; // Wait time between reads (in milliseconds)
      OneWire oneWire(ONE_WIRE_BUS); // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
      DallasTemperature sensors(&oneWire); // Pass the oneWire reference to Dallas Temperature. 
      MySensor gw;
      float lastTemperature[MAX_ATTACHED_DS18B20];
      int numSensors=0;
      boolean receivedConfig = false;
      boolean metric = true; 
      // Initialize temperature message
      MyMessage msg(0,V_TEMP);
      
      void setup()  
      { 
        // Startup up the OneWire library
        sensors.begin();
        // requestTemperatures() will not block current thread
        sensors.setWaitForConversion(false);
      
        // Startup and initialize MySensors library. Set callback for incoming messages. 
        gw.begin(NULL, AUTO, true);
      
        // Send the sketch version information to the gateway and Controller
        gw.sendSketchInfo("Temperature Sensor", "1.1");
      
        // Fetch the number of attached temperature sensors  
        numSensors = sensors.getDeviceCount();
      
        // Present all sensors to controller
        for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {   
           gw.present(i, S_TEMP);
        }
      }
      
      
      void loop()     
      {     
        // Process incoming messages (like config from server)
        gw.process(); 
      
        // Fetch temperatures from Dallas sensors
        sensors.requestTemperatures();
      
        // query conversion time and sleep until conversion completed
        int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution());
        // sleep() call can be replaced by wait() call if node need to process incoming messages (or if node is repeater)
        gw.wait(conversionTime);
      
        // Read temperatures and send them to controller 
        for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
       
          // Fetch and round temperature to one decimal
          float temperature = static_cast<float>(static_cast<int>((gw.getConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.;
       
          // Only send data if temperature has changed and no error
          #if COMPARE_TEMP == 1
          if (lastTemperature[i] != temperature && temperature != -127.00 && temperature != 85.00) {
          #else
          if (temperature != -127.00 && temperature != 85.00) {
          #endif
       
            // Send in the new temperature
            gw.send(msg.setSensor(i).set(temperature,1));
            // Save new temperatures for next compare
            lastTemperature[i]=temperature;
          }
        }
        gw.wait(WAIT_TIME);
      }
      posted in Development
      blackdog65
      blackdog65
    • RE: Generic Temperature/repeater node

      Thanks for the reply!

      I got my "Arduino for Dummies" book from Amazon today... sooo let's give it a go 🙂

      posted in Development
      blackdog65
      blackdog65
    • Generic Temperature/repeater node

      Hi Guys,

      I have several nodes up and running which I feed into Domoticz.

      I'm currently trying to turn the DallasTemperatureSensor script into a repeater node. I have built some plug-in temp sensors but I have range issues due to living in a "Faraday Mansion". Some of my internal walls are 700mm+ in thickness! My current "get around" is to have a Raspberry Pi + Arduino gateway connected to each wifi point (yeah wifi is a huge issue too!)

      So far I have
      gw.begin(NULL, AUTO, true);
      in the
      void setup()

      and I'm calling process() in my loop()

      But I don't know where to go with regard to sleep/wait etc.
      I'd like to take a temp reading every 10 - 15 mins but I'm stuck

      Any pointers? 😄

      posted in Development
      blackdog65
      blackdog65
    • RE: Windows GUI/Controller for MySensors

      @tekka WOW! I thought that was going to be SO difficult... but it took 10mins total! Thank you very much... I'm good to go 😉

      posted in Controllers
      blackdog65
      blackdog65
    • RE: Windows GUI/Controller for MySensors

      Hi Tekka,
      Great tool and SO useful for debugging.
      I have MYSController running under Wine on Linux Mint with no problems.

      I do have one small issue though. I have a serial gateway that reports to Domoticz on my Mint PC. This works fine and MSController connects fine. When I tried to move my gateway to a remote installation of Domoticz on a Raspberry Pi (same network) MSController cannot see it if I try to connect by TCP. I hope it's just something silly like port no. or something, but any ideas?

      Many thanks

      posted in Controllers
      blackdog65
      blackdog65