Navigation

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

    Posts made by FotoFieber

    • RE: What did you build today (Pictures) ?

      @tbowmo said in What did you build today (Pictures) ?:

      Not hardware though, but I'm working on my dashboard solution for a wallmounted tablet.

      Sigh, this is on my todo list for a long time. I have a working solution with imperihome (gateway to imperihome implemented in node-red) but never get to mount the tablet. 😞

      I kind of already have this working in angular, but lately I have switched to react

      Second sigh.... popularity of angular seems to decrease. Do I have to learn another framework?

      (joined a new project at work where they use react for frontend development), so wanted to see how "easy" it would be to create a something similar to my angular dashboard, but in react instead.

      ...

      All data, except weather forecast and channel lists, is from my mqtt broker, where I use mqtt over websockets.

      Third sigh 🙂 I like your chosen architecture except for the decision using websockets. (It is neither nice from a security standpoint nor is it proxy friendly, but who cares in a closed home enviroment.)

      I have a bunch of python scripts, and a node-red instance, to wrap things up for the display, and also do a lot of magical stuff, like turning on TV and amplifiers automatically when casting youtube, and then turn the TV etc. off again, when I haven't streamed anything for a couple of minutes. (So the kids doesn't forget to turn off the TV when they're finished watching cartoons)

      I really like your project. Maybe you can publish some react code? (Then I can try t understand another ui framework...)

      posted in General Discussion
      FotoFieber
      FotoFieber
    • RE: What did you build today (Pictures) ?

      Modified a laser filament sensor (pat9125, used with Prusa mk3) to be used with an ESP32.

      Maybe I will use it as a filament stuck sensor with octoprint. Or a filament meter?

      0_1571850670675_IMG_4393.jpg

      posted in General Discussion
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff
      My experiments with VOC sensors were all not satisfactory.

      The NDIR-sensors reported more or less the same as the netatmo devices and I will therefore stick with them. Apart from that, using the NDIR-sensors in arduino is much easier and you don't have to store baselines or link precompiled code.

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: What did you build today (Pictures) ?

      Prototyping my netatmo replacement device. It has an led strip that can simulate a lighouse, a rainbow or a fireplace...
      (If not used only for fun, it should warn you, if there is too much CO2 in the air.)
      0_1558731422060_IMG_3858.JPG

      posted in General Discussion
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff
      I downloaded the binaries from the Bosch site and the source library from the github repo.

      In the binaries archive is an arduino library with an example with the error, you found.... The github repo has no binaries and I couldn't get it up with the binary.

      The binary distribution of essential code makes it more complicated than it could be...

      The integration in platformio is not to complicated in my code. I only had to add (after investigating for some hours)

      build_flags =   -Llib/BSEC/src/esp32/
                      -lalgobsec
      
      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff said in Particle Powered Air Quality Sensor Logging to Google Docs:

      ...
      inputs[nInputs].signal = _data.humidity/1000.0f; // Need to divide by 1000 for fp;
      ...

      WTF, they have a known bug in the library and we all have to discover it by ourselves?....

      How cool is that, you seem to have solved the problem I had.... 🙂

      BSEC library version 1.4.7.3
      Timestamp [ms], raw temperature [°C], pressure [hPa], raw relative humidity [%], gas [Ohm], IAQ, IAQ accuracy, temperature [°C], relative humidity [%], Static IAQ, CO2 equivalent, breath VOC equivalent
      End setup()
      279, 21.37, 94698.00, 57.66, 80982.00, 25.00, 0, 21.37, 57.66, 25.00, 500.00, 0.50
      3278, 21.21, 94700.00, 57.42, 111997.00, 25.00, 0, 21.15, 58.10, 25.00, 500.00, 0.50
      6278, 21.22, 94700.00, 57.25, 127972.00, 25.00, 0, 21.16, 57.80, 25.00, 500.00, 0.50
      9278, 21.22, 94702.00, 57.10, 135341.00, 25.00, 0, 21.16, 57.58, 25.00, 500.00, 0.50
      

      I hope I will have a graph in two days and I can compare the Bosch sensor to the NIDIR-Sensors...

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff
      The data is read correctly:

      temp 1883
      hum 54739
      press 94317
      gas resistance 118267
      call bsec_do_steps(..
      return of bsec_do_steps -2
      

      And -2 means:

       BSEC_E_DOSTEPS_VALUELIMITS = -2,                /*!< Value of input (physical) sensor signal passed to bsec_do_steps() is not in the valid range */
      

      I wish I had the source code of the lib....

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff
      ESP32 is the platform I use.

      Linking is no problem (after trial and error of two hours 🙂 ).

      I seem to have made a call to the lib:

      BSEC library version 1.4.7.3
      

      Now adding DEBUG-Messages to the BSEC arduino library.

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff
      Managed to compile Bosch arduino demo code on ESP32 on platformio after 3 hours. 😎

      But then....

      BSEC library version 1.4.7.3
      Timestamp [ms], raw temperature [°C], pressure [hPa], raw relative humidity [%], gas [Ohm], IAQ, IAQ accuracy, temperature [°C], relative humidity [%], Static IAQ, CO2 equivalent, breath VOC equivalent
      BSEC error code : -2
      

      Maybe I give up here, as I really don't like to use binary code in my sensors....

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff
      Seems like I only get an IAQ value for the BME680 and no (e)CO2. Is this correct?

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff
      Found something on https://de.aliexpress.com/item/GY-MCU680V1-BME680-Sensor-Module-Temperature-and-Humidity-Air-Pressure-Air-Quality-IAQ-MCU680-Module/32902672818.html?spm=a2g0x.10010108.1000016.1.3bc92080ZxA8fs&isOrigTitle=true

      When soldering the PS solder joint, the module is in the chip's own IIC mode, at which point the MCU does not participate in the operation and does not consume current. Can be used as a simple BME680 module.

      And in serial mode:
      https://playground.cmmakerclub.com/2018/12/esp32/วิธีการใช้งาน-gy-mcu680-กับ-esp32/

      I will try the I2C mode first.

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff 0_1557243066441_IMG_3835.jpg

      BME680 sensor mith MCU arrived. Hope I can read the chinese specification of the module.... 🙂 (What stand PS for?)

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff said in Particle Powered Air Quality Sensor Logging to Google Docs:

      The BME680 seemed impressive at first but I'm seeing a big difference in temperature and humidity. My thinking it's likely due to the heating elements inside keeping it a little less humid and a little more hot. (These are the compensated values by the way. The non-compensated values are even lower humidity and a hotter.)

      I have tested several temperature sensors in the same setup and will use seperate HTU21D in my production devices anyway. So temperature and humidity would be no problem for me.

      @jaredwolff said in Particle Powered Air Quality Sensor Logging to Google Docs:

      Also, Is your SGP30 plot the dark red one? Definitely not what I'd expect from this sensor. At first I thought it was the CCS811 as that one appears to be less reactive (at least in my testing)

      Yes, it's is the dark red one. 😞
      Yesterday another CCS811 arrived. I will add it to my setup.

      My final setup drifts to:

      • HTU21D temp/hum
      • MHZ19B CO2
      • HC-SR501 (modified for 3.3V) motion
      • WS 2812B led stripes
      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff said in Particle Powered Air Quality Sensor Logging to Google Docs:

      I followed your lead on the Grafana + InfluxDB stuff. It was dead simple to setup.

      Yes, really simple. I use docker for grafana and influxdb.

      Your SGP30 CO2 ppm graph looks like mine... 😞

      I just want to get HTTPS/SSL working.

      I use an nginx-setup here for https.

      Pretty nifty little piece of software.

      Yepp! They are real software gems.

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      S8 readings seem quite goot. (NDIR)
      SGP30 😞 Will try with the adafruit library instead of the sparktech.
      0_1556954956512_sensor-comparison.png

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: What did you build today (Pictures) ?

      Added two other (e)co2 sensors to my test-setup.
      Now 3 NDIR and 2 VOC under observation. 🙂
      0_1556829380676_IMG_3826.JPG

      posted in General Discussion
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      This night was a complete fail for the CCS811 I have here:

      Fresh air at 20:00
      Sleep till 6:15 with closed windows
      -> NDIR sensors show, how air quality gets worse
      -> CCS811 shows, how the air quality gets better during sleep with closed window!
      Fresh air at 06:15

      WTF.... 🙂
      0_1556788324572_sensor-comparison.png

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff
      CO2 is an indicator of air quality. I use it since years mainly with consumer devices from Netatmo. In my graphs you can see, when people are in the rooms consume the air, when they leave, when I open the windows...

      The CO2 measurement with NDIR-sensors seems much more reliable than what I see here from CCS811. They usually show quite good results just plugged in without calibration. They are easier to handle, because you don''t need to bother with handling basline (save and restore). And they don't need a temp/hum measurement to correct their values.

      Yesterday arrived another NDIR-Sensor (Senseair S8) and a SGP30. I am curious, how they perform. Hope I have the first results in two days.

      Are you logging anything other than C02?

      In general I have much more values I log (radioactivity, luminosity, window open/close, motion...)

      In this setup I log what I can get from the sensors.

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff
      The update has brought a big improvement.
      I think one could derive airquality from the measurements, but the CO2 ppm value is still way off.
      0_1556686461628_sensor-comparison.png

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      Firmware upgrade time!

      My CCS811 has bootloader version: 1000

      and had application version: 1100

      I upgraded to the newest firmware (2.0.1). Now waiting for another two days.... 🙂 Hope then I get reasonable results like you have....

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff said in Particle Powered Air Quality Sensor Logging to Google Docs:

      Hmm. Yea they're full timestamps. Pretty useless huh? What are you using to create your graphs? That way we're looking at the same thing.

      I am using grafana with influxdb (both in docker).

      @jaredwolff

      SPG30 is about as easy as the CCS811. As you can see it has its own demons. It does require another power supply (1.8V typical for this part) And it can get power hungry if you run it tons (48mA when the heater is on).

      Awaiting mine impatiently. 🙂 Power consumption is not a real problem in my usage scenario.

      @jaredwolff

      The BME680 is not so easy to integrate into the Particle platform. Mostly due to the added archive file (i.e. static library, i.e..a file).

      Do you build with platform.io? I only found instructions for the arduino ide...

      Temp and hum are measured on the heated sensor and must be calibrated to be useful according to some discussions I read.

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Mozilla Webthings MySensors add-on / adapter

      @alowhum
      Thanks for the integration. I think it is a good pattern to use webthings with mysensors. You can get security with encryption and signing.

      The webthings platform offers direct integration for arduino devices (esp8266 and esp32) whicht don't seem adequate to me. They don't offer encryption or signing: webthings (mozilla iot). Maybe, it is a design problem of the webthings api? Or I am to stupid to get it all... 🙂

      posted in Mozilla WebThings Gateway
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff said in Particle Powered Air Quality Sensor Logging to Google Docs:

      Nice! Glad to see something working for you. The MHZ19B seems like a good option when you have the space.

      The MH-Z19B does use less space than the MH-Z14B. I thinkt the footprint is similar to my CCS811 PCB from aliexpress. But it is taller. I think the main argument against the MH-Z19B could be power consumption.

      I wonder how it is long term.

      I have some MH-Z14B working fine for more than two years. Accoriding to the datasheet, the MH-Z19B should last more than 15 years.

      How many hours have you continuously run your CCS811?

      More than two days. It didn't get better.

      I'm seeing the fresh one I had normalize to zero over almost 24h of continuous running. (See the blue trace below for TVOC & C02)

      I can't see the time on your graph. I only see 2019-0... would it be possible to show the time?

      The manufacturer has improved accuracy with the last firmware of the CCS811. Which version of firmware do you have on your CCS811?

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff
      The MHZ19B is working out of the box without tuning. NDIR sensors seem to be easier to handle but are more power hungry.
      0_1556347989054_sensor-comparison co2.png
      In addition to the CO2 ppm, it has a temperature reading, which is not to bad:
      0_1556348218175_sensor-comparison temp.png
      The temperature of the BMP280 and ST7012 are quite high. They are on the same small pcb as the CCS811.

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff
      Thx for the link to your sourcecode.
      How long is the time interval on the graph in your post?

      I tried to use drive mode 1 (measurement every second) with an average calculation for every minute. But it didn't get better... 😞

      I added now a MH-Z19B to the testbed.

      Awaiting still from aliexpress:
      SGP30
      MICS-VZ-89TE
      GY-MCU680V1 BME680
      Senseair S8-0053
      and another CCS811.
      0_1556312751563_IMG_3814.JPG

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff said in Particle Powered Air Quality Sensor Logging to Google Docs:

      I have no experience with the MH-Z14A but compared to other comparable parts I think the CCS811 is a bit more simple to implement. (And less costly, despite it's $$$ price)

      The MH-Z14A is really simple to implement. Just send some characters over serial interface and get the CO2 value. You don't need to think about baselines and firmware versions. A cheap sensor is of no use, if you can't get correct readings. Maybe I am doing something wrong? 🙂

      But maybe you can share your code and I can get better results?

      The CCS811 I have here maybe cheap….
      0_1555968023025_sensor-comparison.png

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      The CCS81 seems to be much more complicated to handle than the MH-Z14A. There is an MCU on the sensor and you can make firmware upgrades which should reduce the burn in time. After burn in, you shoul save the actual baseline from time to time (e.g. every 24 hours) and restore it, when you reboot.

      My hacked code looks now much more complicated:

      void readCCS811(JsonObject &root)
      {
        static int loopCount = 0;
        static bool bFirst = true;
        static CCS811 myCCS811(CCS811_ADDR);
        JsonObject rootCCS811;
      
        loopCount++;
        if (bFirst)
        {
          DEBUG_PRINTLN("Initializing CCS811");
          CCS811Core::status returnCode = myCCS811.begin();
          DEBUG_PRINT("CCS811 begin exited with: ");
          printDriverError(returnCode);
          DEBUG_PRINTLN("");
      
          if (returnCode == CCS811Core::SENSOR_SUCCESS)
            bFirst = false;
      
          //This sets the mode to 60 second reads, and prints returned error status.
          returnCode = myCCS811.setDriveMode(3);
          DEBUG_PRINT("Mode request exited with: ");
          printDriverError(returnCode);
          DEBUG_PRINTLN("");
      
          if ((EEPROM.read(0) == 0xA5) && (EEPROM.read(1) == 0xB2))
          {
            DEBUG_PRINTLN("EEPROM contains saved data.");
            //The recovered baseline is packed into a 16 bit word
            unsigned int baselineToApply = ((unsigned int)EEPROM.read(2) << 8) | EEPROM.read(3);
            DEBUG_PRINT("Saved baseline: 0x");
            if (baselineToApply < 0x100)
              DEBUG_PRINT("0");
            if (baselineToApply < 0x10)
              DEBUG_PRINT("0");
            DEBUG_PRINT(baselineToApply, HEX);
            //This programs the baseline into the sensor and monitors error states
            CCS811Core::status errorStatus = myCCS811.setBaseline(baselineToApply);
            if (errorStatus == CCS811Core::SENSOR_SUCCESS)
            {
              DEBUG_PRINTLN("Baseline written to CCS811.");
            }
            else
            {
              printDriverError(errorStatus);
            }
          }
        }
      
        if (myCCS811.dataAvailable())
        {
      
          myCCS811.readAlgorithmResults();
          myCCS811.setEnvironmentalData(lasthum, lasttemp);
      
          uint16_t lastppm = myCCS811.getCO2();
      
          if (lastppm > 0)
          { // bis und mit 400 nur an der Initialisierung
            rootCCS811 = root.createNestedObject("ccs811");
            rootCCS811["co2"] = lastppm;
            rootCCS811["tvoc"] = myCCS811.getTVOC();
          }
        }
      
        // save Baseline every 24 hours
        if (loopCount >= 24 * 60)
        {
          // read baseline
          unsigned int baseline = myCCS811.getBaseline();
      
          rootCCS811["baseline"] = baseline;
      
          DEBUG_PRINTLN("baseline for this sensor: 0x");
          if (baseline < 0x100)
            DEBUG_PRINT("0");
          if (baseline < 0x10)
            DEBUG_PRINT("0");
          DEBUG_PRINTLN(baseline, HEX);
          //The baseline is saved (with valid data indicator bytes)
          EEPROM.write(0, 0xA5);
          EEPROM.write(1, 0xB2);
          EEPROM.write(2, (baseline >> 8) & 0x00FF);
          EEPROM.write(3, baseline & 0x00FF);
          EEPROM.commit();
      
          loopCount = 0;
        }
      }
      

      The results in the first 24 hours don't seem better. Hope they will getting better after 48 hours. 😞

      I am not really keen on programming a firmware upgrade program for the CCS811. The second sensor I ordered from aliexpress is hopefully better.

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff said in Particle Powered Air Quality Sensor Logging to Google Docs:

      @fotofieber I've had some luck with removing the fraction portion of the temperature readings. It looks like the Adafruit code does use it. The suggested code from AMS does not use it.

      Could you please share your code?

      There is an application note about update frequency on https://ams.com/documents/20143/36005/CCS811_AN000369_2-00.pdf/fb08da36-5b40-732b-39b0-62d2d9db5a3c

      It is recommended that the T+RH data is read from the ENS210 at the same frequency as the
      CCS811 generates eCO2 and TVOC outputs. For example in mode 3, 60 second mode, the
      application software should read the ENS210 data once every minute.

      The code in the application notes

      i2c_buff[0] = ((RH % 1000) / 100) > 7 ? (RH/1000 + 1)<<1 : (RH/1000)<<1;
      i2c_buff[1] = 0;
      if(((RH % 1000) / 100) > 2 && (((RH % 1000) / 100) < 8))
      {
      i2c_buff[0] |= 1;
      }
      

      looks quit different to the adafruit implementation:

      uint8_t hum_perc = humidity << 1;
      	
      // other code
      
      
      	uint8_t buf[] = {hum_perc, 0x00,
      		(uint8_t)((temp_conv >> 8) & 0xFF), (uint8_t)(temp_conv & 0xFF)};
      

      In the same document the handling of baseline is described. I think the adafruit code may be incomplete... 🙂

      I'll try the sparkfun lib, it hase baseline support and looks more like the programming note from aws.

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Piezzo siren/alarm

      @ben999
      You could try DC (one output) with 12V to the piezo. If you want to use only 5V, the AC solution should be louder, as it gets 10V difference to the piezo.

      I usually stop optimizing, when it is good enough. If AC is enough, go with it. 🙂

      posted in Hardware
      FotoFieber
      FotoFieber
    • RE: Piezzo siren/alarm

      @ben999 said in Piezzo siren/alarm:

      I did also put a 1k resistor in between the piezo speaker pins... but it lowered the tone by quite a lot..

      Cool, you sorted it out! The resistor may only help in an DC setup (one output from the arduino). In your AC setup it is useless.

      posted in Hardware
      FotoFieber
      FotoFieber
    • RE: Piezzo siren/alarm

      @ben999 said in Piezzo siren/alarm:

      @fotofieber thanks a lot, but that thread is for high-level hobbyists!!! Schematics, yummy!!!
      "replace the resistor with an inductor then you double the swing" but no figures... i'll google that and see where it gets me...
      I dont even know the specs of my piezo

      I try to simplify: Take a 1 kOhm resistor and attach each side of it to another pin of the piezo. Don't change anything else.

      posted in Hardware
      FotoFieber
      FotoFieber
    • RE: Piezzo siren/alarm

      @ben999 said in Piezzo siren/alarm:

      But i don't quite get it :

      driving the piezo speaker with up to 25V doesn't improve noise level at all
      switching to differential drive @5V (so it's a 10V potential peak-to-peak) opens hell's doors wide open

      You may try to use a 1kOhm resistor parallel to the piezo (as suggested on eevblog).

      posted in Hardware
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff
      I am using the adafruit library and compensating temp/hum with the measurements of a SI7021. The results are really bad and I have ordered another CCS811 for comparison.

      void readCCS811(JsonObject &root)
      {
        static bool bFirst = true;
        static Adafruit_CCS811 sensor;
        if (bFirst)
        {
          DEBUG_PRINTLN("Initializing CCS811");
          if (!sensor.begin())
          {
            DEBUG_PRINTLN("CCS811 Initialization failed.");
          }
          else
          {
            sensor.setDriveMode(CCS811_DRIVE_MODE_IDLE);
            delay(10000);
            sensor.setDriveMode(CCS811_DRIVE_MODE_60SEC);
            bFirst = false;
          }
        }
        if (sensor.available())
        {
      
          // setEnvironmentalData(uint8_t humidity, double temperature);
          sensor.setEnvironmentalData(lasthum, lasttemp);
      
          if (!sensor.readData())
          {
            uint16_t lastppm = sensor.geteCO2();
            if (lastppm > 0)
            { 
              JsonObject rootCCS811 = root.createNestedObject("ccs811");
              rootCCS811["co2"] = lastppm;
              rootCCS811["tvoc"] = sensor.getTVOC();
            }
          }
          else
          {
            DEBUG_PRINTLN("CCS811 ERROR!");
          }
        }
      }
      
      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Piezzo siren/alarm

      AFAIK the piezo acts like a capacitor. If you don't use AC, you may have to discharge it with a parallel resistor or discharge it with a transistor.

      You could find some useful information on eevblog, e.g. http://www.eevblog.com/forum/projects/how-to-connect-a-piezo-speaker-to-a-microcontroller/

      toneAC:
      https://bitbucket.org/teckel12/arduino-toneac/wiki/Home

      posted in Hardware
      FotoFieber
      FotoFieber
    • RE: Particle Powered Air Quality Sensor Logging to Google Docs

      @jaredwolff said in Particle Powered Air Quality Sensor Logging to Google Docs:

      Particle^2 Air Quality Sensor

      The CO2 measurement seems to be based on AMS CCS811. What is your experience with this sensor?

      I was comparing this sensor with Netatmo (+-50 ppm accuracy according to the website) and a MH-Z14A. Maybe you can tell me from my graph, if my sensor is broken and I should consider oredering another:

      0_1554993748723_co2-sensor-comparison.png

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Piezzo siren/alarm

      For portable usage I have a https://pokitmeter.com/ which is really small and lightweight.

      posted in Hardware
      FotoFieber
      FotoFieber
    • RE: What did you build today (Pictures) ?

      @nca78 said in What did you build today (Pictures) ?:

      And about BME680 there are boards on AliExpress with included STM32 Cortex M0+, basically it's the same than the MiCS-VZ-89. Search for GY-MCU680V1.

      Thx, ordered one on aliexpress. Hope I have time to test when they arrive... 🙂
      EDIT: first results, hope CCS811 will calibrate better in the next two days
      0_1554786685400_co2-sensor-comparison.png

      posted in General Discussion
      FotoFieber
      FotoFieber
    • RE: What did you build today (Pictures) ?

      @nca78 said in What did you build today (Pictures) ?:

      @fotofieber said in What did you build today (Pictures) ?:

      Testing a CCS811 CO2 sensor.

      Unfortunately this is not a CO2 sensor. It's only a VOC sensor giving an estimated eCO2 value. It's useful to tell you if your room needs ventilation, but not much more. And as even the VOC part is not calibrated it's only good for relative measurement.

      My tests will show, how far away I am with this sensor in my indoor usage scenario.

      My Netatmo sensors claim to measure CO2 and are battery powered. They seem to calibrate themselves to the lowest level they measure in 24 hours. This behaviour seems to be similar with the CCS811. The Netatmo sensors seem quite close to my MH-Z14A.

      In the datasheet for the CCS811 I have read, that you can't use them in your green house, because of its self calibration. Netatmo may have the same restriction too.

      AFAIK the only similar sensors which are calibrated and give absolute values are SGP30 and BME680.

      I have ordered a SGP30 some days ago and will test it too. The BME680 needs binary code linked which is a no go for me. (As a gift I would take it into my test setup. 🙂 )

      If you want to measure CO2 you need a CO2 sensor and it's going to consume a lot of power, at least too much for a battery powered sensor.

      The problem with high power sensors is, that they produce heat, which can make your temperature measurements unusable. 😞

      As my CO2 sensors have a color led to show air quality, they are mains powered anyway.

      [edit] there's also the MiCS-VZ-89TE TVOC sensor, they claim to have a curve of eCO2 not too far from NDIR sensor in their datasheet. But that datasheet is strangely poor in details, they didn't even put any electrical characteristics...
      https://sgx.cdistore.com/datasheets/sgx/MiCS-VZ-89TE_V1.0.pdf

      Thank you for the link. I have ordered one for my test setup. They are really expensive, about twice the price of the MH-Z14A, the SGP30 or the CCS811.

      Other CO2 sensors I should use in my test setup?

      I like the MH-Z14A and depending on my tests may stay with them.

      EDIT: ordered a MHZ-19 for the tests

      posted in General Discussion
      FotoFieber
      FotoFieber
    • RE: Confirming node connected to gateway.

      @skywatch
      I look for messages (e.g. presentation) at the gateway to diagnose connections at bootup. And I have a flow in node-red, which shows me, when a node didn't send for some time.

      You could use a led and blink codes on the node, if you really need a local indicator. A OLED would be a no go with battery powered sensors.

      posted in General Discussion
      FotoFieber
      FotoFieber
    • RE: What did you build today (Pictures) ?

      Testing a CCS811 CO2 sensor. It seems to use less power then the MH-Z14A I am using now. The CCS811 may even run on battery. I will compare measurements of these two sensors with a Netatmo sensor. The sensors have to burn in for two days bevore I start the comparison.
      0_1554572353955_IMG_3788.JPG
      The CCS811 breakout board I use hast temp, hum and barometer sensors (and the CO2).

      posted in General Discussion
      FotoFieber
      FotoFieber
    • RE: Using an 802.11g wifi transport

      @mfalkvidd said in Using an 802.11g wifi transport:

      @eveningstariot If you have wifi, the MySensors library adds almost nothing to your project. Connect your wifi devices directly to your controller, using mqtt or whatever protocols your controller supports.

      MySensors was the starting point for me to build my own parts for home automation. It is more than a library:

      • active community
      • inspiration for new projects
      • an API which I more or less transferred to a generic API for other sensors (zWave, homematic...)

      I have reduced the usage of radio based sensors (only one active sensor left) and sometimes I get blue, that mysensors has no real solution for my WiFi-based sensors. The solution with one gateway per WiFi node is not appealing. (No auto discovery, many endpoints to one controller...) I switched to MQTT (without mysensors) and direct REST-API calls. But it feels a little bit clumsy. 😞

      posted in MyController.org
      FotoFieber
      FotoFieber
    • RE: how can i find out the Check code in XY1F remote control?

      Could you please be more specific?

      XY1F and gree doesn't show any useful links in google... 🙂

      Maybe you could tell us, what you want to achieve.

      Do you have a product link?

      Is it an infrared remote control?

      posted in Development
      FotoFieber
      FotoFieber
    • RE: How to protect rain sensor from oxidation?

      @martim said in How to protect rain sensor from oxidation?:

      @fotofieber I have no idear.

      Put two sensors outside but only wire one. If only the wired one looks bad after some weeks, it is likely a problem with electrolysis. If both look bad, it is more likely a problem with oxidation. You coud then try to solder the conductor path on the sensor. Or gold-plate 🙂

      If it is a problem with electrolysis, you could try another wiring and sketch (flip input and ground pin with every measurement)

      posted in Hardware
      FotoFieber
      FotoFieber
    • RE: What did you build today (Pictures) ?

      Building a (xenon) flash to notify alarms. Flashes every 5 seconds if activated.
      0_1551620885559_IMG_3712.JPG

      posted in General Discussion
      FotoFieber
      FotoFieber
    • RE: Ethernet/WiFi-Client Gateway enhancement

      @mfalkvidd
      Yes, this could be a solution.

      When using gateways as 'nodes', I miss the automatic ID handling (I_ID_REQUEST...) and registration in the controller. I have to configure something in the controller for every new node.

      This could maybe solved by a new hal/transport/ip.

      As the ESP32 can act as AccesPoint and WifiClient at the same time, he could be a gateway offering his service to nodes via his AccessPoint on a separate WLAN.

      posted in Feature Requests
      FotoFieber
      FotoFieber
    • Ethernet/WiFi-Client Gateway enhancement

      Today I was playing with MY_GATEWAY_ESP32. I like to use several ESP32 talking to node-red with a client connection (MY_CONTROLLER_IP_ADDRESS). To my understanding I have to open one port for every ESP32, to distinguish the different ESP32 gateways. This is not a nice solution.

      I suggest to add a define
      #define MY_API_PREFIX "example"
      and to send this prefix with every message.

      Are there better solutions?

      posted in Feature Requests
      FotoFieber
      FotoFieber
    • RE: How to protect rain sensor from oxidation?

      Hi Marcel

      Is it oxidation or electrolysis? Some of the sensor use DC to detect rain which can cause electrolysis.

      Markus

      posted in Hardware
      FotoFieber
      FotoFieber
    • RE: New Z-WAVE interface,

      I think Z-Uno is more interesting for makers https://z-uno.z-wave.me/

      IMO it is way to expensive compared to mysensors or solutions based on ESP32/ESP8266.

      posted in Controllers
      FotoFieber
      FotoFieber
    • RE: Hardware for the ultimate smart home controller

      @alowhum said in Hardware for the ultimate smart home controller:

      Let's say you wanted to create a future proof universal smart home controller.

      My assumptions are:

      • The target audience doesn't have smart home devices yet.

      Really? Who doesn't at least have Philips or Ikea lights with zigbee?

      • The device should have local voice control (for privacy reasons).

      Local voice recognition is a tough requirement. www.mycroft.ai plans to add a solution for this but it will require a GPU...

      Do you really need local voice recognition? I have sold all my alexa devices for privacy concerns and do not really miss them. I have tablet with imperihome and operate with fingers instead of voice which is much faster and there is no Alexa that can missunderstand me... 🙂

      posted in General Discussion
      FotoFieber
      FotoFieber
    • RE: What did you build today (Pictures) ?

      My actual project is a doorbell sensor with additional temperature and humidity sensors. Tried different ways to detect the ring:

      • hall sensor (failed)
      • microphone (FFT, ongoing research)
      • optocoupler to detect the 12V AC -> favorite solution

      As I was heavy prototyping, I tried wire wrapping and it is fun:
      0_1550390000040_SUNP0002_Moment.jpg

      posted in General Discussion
      FotoFieber
      FotoFieber
    • RE: Why IOYT matters...

      Just got disconnected from my data collected with 3 points from minut via their API. (To much data traffic.) They seem to want to keep the data on their cloud only... 🙂

      posted in General Discussion
      FotoFieber
      FotoFieber
    • RE: 💬 temp,hum,co2,led,motion with esp32

      Sorry, I am leaving the contest 2017.

      Other projects were more important. I really want to finish this device, but it will be later than the deadline for the contest.

      posted in OpenHardware.io
      FotoFieber
      FotoFieber
    • RE: Node-Red as Controller

      With this standardisation, I can write simple adapters. Here is one for imperihome:

      [{"id":"83e8531b.e90b4","type":"debug","z":"a5e97fda.4d467","name":"","active":true,"console":"false","complete":"payload","x":851.2857437133789,"y":251.00000286102295,"wires":[]},{"id":"ab451d5a.6cd2e","type":"http in","z":"a5e97fda.4d467","name":"","url":"/LG53/system","method":"get","swaggerDoc":"","x":190.2857437133789,"y":163.00000286102295,"wires":[["bc40a5db.70b1b8"]]},{"id":"7cd541a2.7f6ba","type":"http in","z":"a5e97fda.4d467","name":"","url":"/LG53/devices","method":"get","swaggerDoc":"","x":178.2857437133789,"y":236.00000286102295,"wires":[["fe9ee011.09dfa"]]},{"id":"247f001b.66de7","type":"http in","z":"a5e97fda.4d467","name":"","url":"/LG53/rooms","method":"get","swaggerDoc":"","x":169.2857437133789,"y":313.00000286102295,"wires":[["2ed87d9a.fe1cd2"]]},{"id":"cfc02ef5.b0a42","type":"http response","z":"a5e97fda.4d467","name":"","x":733.2857437133789,"y":194.00000286102295,"wires":[]},{"id":"bc40a5db.70b1b8","type":"function","z":"a5e97fda.4d467","name":"","func":"msg.payload = { \"id\": \"ISS:LG53:03\", \"apiversion\": 1};\nreturn msg;","outputs":1,"noerr":0,"x":431.2857437133789,"y":160.00000286102295,"wires":[["cfc02ef5.b0a42"]]},{"id":"40424d8c.d0dc34","type":"comment","z":"a5e97fda.4d467","name":"Imperihome","info":"","x":171.2857437133789,"y":119.00000286102295,"wires":[]},{"id":"a77d6fd5.c5549","type":"inject","z":"a5e97fda.4d467","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":157.2857437133789,"y":277.00000286102295,"wires":[["2ed87d9a.fe1cd2"]]},{"id":"2ed87d9a.fe1cd2","type":"function","z":"a5e97fda.4d467","name":"rooms from context.global.hastate","func":"var alasql = global.get('alasql');\n\n\nvar ha = context.global.hastate;\nvar disprooms = [\n        {room:'bedroom parents',disp:'Eltern'}, \n        {room:'bedroom laura', disp:'Laura'},\n        {room:'bedroom baba',disp:'Baba'},\n        {room:'living room',disp:'Wohnzimmer'},\n        {room:'backyard',disp:'Garten hinten'},\n        {room:'basement',disp:'Keller'},\n        {room:'bathroom',disp:'Bad'},\n        {room:'entrance',disp:'Eingang'},\n        {room:'kitchen',disp:'Küche'},\n        {room:'laundry',disp:'Waschküche'},\n        {room:'staircase',disp:'Treppenhaus'},\n        {room:'shower',disp:'Dusche'},\n        {room:'toilet',disp:'Gäste WC'},\n        {room:'tv',disp:'Fernsehraum'}\n        ];\n        \n//var res = alasql('SELECT [1]->payload FROM ? WHERE [1]->payload->room=?',[ha, room]);\n\nvar res = alasql('SELECT DISTINCT ha.[1]->room room, disp.[1]->disp disp FROM ? ha LEFT JOIN ? disp ON ha.[1]->room = disp.[1]->room ORDER BY 1',[ha,disprooms]);\n\n\n\nvar rooms = [];\n\nfor (var room in res) {\n    rooms.push( \n        {\n            \"id\"    : 'room_' + hashcode(res[room].room).toString(),\n            \"name\"  : res[room].disp || res[room].room\n        }\n    );\n}\n\nvar resp = { \"rooms\": rooms };\n\nmsg.payload = JSON.stringify(resp);\n\n//msg.payload = JSON.stringify(res);\n\n//msg.payload = {\"rooms\": [{ \"id\": \"roomID1\", \"name\": \"Test Room\" }]};\nreturn msg;\n\n\nfunction hashcode(str) {\n  var hash = 0, i, chr, len;\n  if (str.length === 0) return hash;\n  for (i = 0, len = str.length; i < len; i++) {\n    chr   = str.charCodeAt(i);\n    hash  = ((hash << 5) - hash) + chr;\n    hash |= 0; // Convert to 32bit integer\n  }\n  return hash;\n}","outputs":1,"noerr":0,"x":473.2857437133789,"y":287.00000286102295,"wires":[["83e8531b.e90b4","cfc02ef5.b0a42"]]},{"id":"a6a951b8.fedbf","type":"inject","z":"a5e97fda.4d467","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":166.2857437133789,"y":200.00000286102295,"wires":[["fe9ee011.09dfa"]]},{"id":"15947c1c.319ae4","type":"function","z":"a5e97fda.4d467","name":"","func":"var alasql = global.get('alasql');\n\nvar ha = context.global.hastate;\n\nvar device =  Number(msg.req.params.deviceID);\nvar startdate = Number(msg.req.params.startdate);\nvar enddate = Number(msg.req.params.enddate);\n\n\n//var startdate = 1463992263701;\n//var enddate = 1463992263701;\n\nvar topic = alasql('SELECT VALUE ha.[1]->topic FROM ? ha  WHERE ha.[1]->topichc=?',[ha,device]);\n\nmsg.topic = topic;\nmsg.startdate = startdate;\nmsg.enddate = enddate;\n\nreturn msg;","outputs":1,"noerr":0,"x":511.2857437133789,"y":683.000002861023,"wires":[["e65fbae2.f30598"]]},{"id":"7331dd31.45cae4","type":"http in","z":"a5e97fda.4d467","name":"ISS Rest Actions History","url":"/LG53/devices/:deviceID/:paramKey/histo/:startdate/:enddate","method":"get","swaggerDoc":"","x":159.2857437133789,"y":611.000002861023,"wires":[["15947c1c.319ae4"]]},{"id":"8746e45c.4cd538","type":"http response","z":"a5e97fda.4d467","name":"","x":716.2857437133789,"y":534.000002861023,"wires":[]},{"id":"e6416541.255858","type":"inject","z":"a5e97fda.4d467","name":"","topic":"deviceid","payload":"1897446547","payloadType":"str","repeat":"","crontab":"","once":false,"x":319.2857437133789,"y":696.000002861023,"wires":[["15947c1c.319ae4"]]},{"id":"eb3d187d.5eae98","type":"influxdb in","z":"a5e97fda.4d467","influxdb":"ab6501aa.2f69a","name":"Get History from Influx","query":"","x":945.2857437133789,"y":758.000002861023,"wires":[["d55f902c.1a3b4"]]},{"id":"e65fbae2.f30598","type":"function","z":"a5e97fda.4d467","name":"Select History","func":"measurement = msg.topic.split('/').join('.');\n\nmsg.query = \"SELECT time, value FROM /\" + measurement + \"/ WHERE time >= \" + msg.startdate + \"ms AND time <= \" + msg.enddate +\"ms ORDER BY time\";\n\nreturn msg;","outputs":1,"noerr":0,"x":722.2857437133789,"y":760.000002861023,"wires":[["eb3d187d.5eae98","8b54b1c8.95d46"]]},{"id":"c01efb63.763dc8","type":"inject","z":"a5e97fda.4d467","name":"","topic":"deviceid","payload":"1897446547","payloadType":"str","repeat":"","crontab":"","once":false,"x":340.2857437133789,"y":768.000002861023,"wires":[["64f1c1c5.dbb0d"]]},{"id":"64f1c1c5.dbb0d","type":"function","z":"a5e97fda.4d467","name":"","func":"msg.topic = \"HA/0/bedroom baba/S_TEMP/0/V_TEMP\";\n\nmsg.startdate = 1463993343938;\nmsg.enddate = 1464166145880;\n              \nreturn msg;","outputs":1,"noerr":0,"x":529.2857437133789,"y":758.000002861023,"wires":[["e65fbae2.f30598"]]},{"id":"6ca3314f.2e221","type":"debug","z":"a5e97fda.4d467","name":"","active":false,"console":"false","complete":"false","x":1262.285743713379,"y":758.000002861023,"wires":[]},{"id":"8b54b1c8.95d46","type":"debug","z":"a5e97fda.4d467","name":"","active":false,"console":"false","complete":"query","x":955.2857437133789,"y":847.000002861023,"wires":[]},{"id":"d55f902c.1a3b4","type":"function","z":"a5e97fda.4d467","name":"Convert to Imperihome Format","func":"erg = msg.payload[0];\n\nvar resp = [];\n\nfor (var i in erg) {\n    var mesDate = new Date(erg[i].time);\n    \n    resp.push( \n        {\n            \"value\" :  erg[i].value,\n            \"date\"  : mesDate.getTime()\n        }\n    );\n}\n\nmsg.payload = {\"values\": resp };\n\nreturn msg;","outputs":1,"noerr":0,"x":979.2857437133789,"y":634.000002861023,"wires":[["6ca3314f.2e221","8746e45c.4cd538"]]},{"id":"2003094c.594996","type":"debug","z":"a5e97fda.4d467","name":"","active":true,"console":"false","complete":"req.params","x":434.2857437133789,"y":471.00000286102295,"wires":[]},{"id":"7eb92db4.13ccf4","type":"http in","z":"a5e97fda.4d467","name":"ISS Rest Actions","url":"/LG53/devices/:deviceID/action/:actionName/:actionParam","method":"get","swaggerDoc":"","x":129.2857437133789,"y":469.00000286102295,"wires":[["2003094c.594996","70c707e7.138c18"]]},{"id":"70c707e7.138c18","type":"function","z":"a5e97fda.4d467","name":"","func":"var alasql = global.get('alasql');\n\nvar ha = context.global.hastate;\n\nvar device =  Number(msg.req.params.deviceID);\n\nvar topic = alasql('SELECT VALUE ha.[1]->topic FROM ? ha  WHERE ha.[1]->topichc=?',[ha,device]);\n\nvar output = {};\n\noutput.topic = \"imperihome/\"+topic+\"/\" + msg.req.params.actionName;\noutput.payload = msg.req.params.actionParam;\n\nreturn output;","outputs":1,"noerr":0,"x":285.2857437133789,"y":543.000002861023,"wires":[["59c69af0.4ef8e4"]]},{"id":"59c69af0.4ef8e4","type":"debug","z":"a5e97fda.4d467","name":"","active":true,"console":"false","complete":"false","x":455.2857437133789,"y":541.000002861023,"wires":[]},{"id":"fe9ee011.09dfa","type":"function","z":"a5e97fda.4d467","name":"devices from context.global.hastate","func":"var alasql = global.get('alasql');\n\nvar devices = [];\n\n\nvar ha = context.global.hastate;\nvar disprooms = [\n        {room:'bedroom parents',disp:'Eltern'}, \n        {room:'bedroom laura', disp:'Laura'},\n        {room:'bedroom baba',disp:'Baba'},\n        {room:'living room',disp:'Wohnzimmer'},\n        {room:'backyard',disp:'Garten hinten'},\n        {room:'basement',disp:'Keller'},\n        {room:'bathroom',disp:'Bad'},\n        {room:'entrance',disp:'Eingang'},\n        {room:'kitchen',disp:'Küche'},\n        {room:'laundry',disp:'Waschküche'},\n        {room:'staircase',disp:'Treppenhaus'},\n        {room:'shower',disp:'Dusche'},\n        {room:'toilet',disp:'Gäste WC'},\n        {room:'tv',disp:'Fernsehraum'}\n        ];\n        \n\n// Tür/Fenstersensoren\n\nvar res = alasql('SELECT DISTINCT ha.[1]->room room, ha.[1]->`topichc` srcid, ha.[1]->`value` wert, disp.[1]->disp disp, ha.[1]->`index` idx FROM ? ha LEFT JOIN ? disp ON ha.[1]->room = disp.[1]->room WHERE [1]->`type` = \"S_DOOR\" ORDER BY 1',[ha,disprooms]);\n\n\nfor (var device in res) {\n    devices.push( \n        {\n            \"id\"    :  res[device].srcid,\n            \"name\"  : \"FT\" + res[device].idx + \" \" + (res[device].disp || res[device].room),\n            \"type\"  : \"DevDoor\", \n            \"room\"  : 'room_' + hashcode(res[device].room).toString(),\n            \"params\": [{\"key\": \"Tripped\",\"value\": res[device].wert, \"graphable\": true}]\n        }\n    );\n}\n\n// Motion\n//var res = alasql('SELECT DISTINCT ha.[1]->room room, ha.[1]->`topichc` srcid, ha.[1]->`value` wert, disp.[1]->disp disp, ha.[1]->`index` idx FROM ? ha LEFT JOIN ? disp ON ha.[1]->room = disp.[1]->room WHERE [1]->`type` = \"S_MOTION\" ORDER BY 1',[ha,disprooms]);\n\nvar res = alasql('SELECT DISTINCT ha.[1]->room room, ha.[1]->`topichc` srcid, ha.[1]->`value` wert, disp.[1]->disp disp, ha.[1]->`index` idx, ABS(DATEDIFF(Minute, ha.[1]->`timestamp`,NOW())) minuten FROM ? ha LEFT JOIN ? disp ON ha.[1]->room = disp.[1]->room WHERE [1]->`type` = \"S_MOTION\" ORDER BY 1',[ha,disprooms]);\n\n\nfor (var device in res) {\n    if (res[device].minuten > 15) {\n        motion = 0;    \n    } else\n    {\n        motion = 1;\n    }\n    \n    devices.push( \n        {\n            \"id\"    :  res[device].srcid,\n            \"name\"  : \"MO\" + res[device].idx + \" \" + (res[device].disp || res[device].room),\n            \"type\"  : \"DevMotion\", \n            \"room\"  : 'room_' + hashcode(res[device].room).toString(),\n            \"params\": [{\"key\": \"Tripped\",\"value\": motion, \"graphable\": true}]\n        }\n    );\n}\n\n// Temperatur\nvar res = alasql('SELECT DISTINCT ha.[1]->room room, ha.[1]->`topichc` srcid, ha.[1]->`value` wert, disp.[1]->disp disp, ha.[1]->`index` idx  FROM ? ha LEFT JOIN ? disp ON ha.[1]->room = disp.[1]->room WHERE [1]->`type` = \"S_TEMP\" ORDER BY 1',[ha,disprooms]);\n\nfor (var device in res) {\n    devices.push( \n        {\n            \"id\"    :  res[device].srcid,\n            \"name\"  : \"Temp\" + res[device].idx + \" \" + (res[device].disp || res[device].room),\n            \"type\"  : \"DevTemperature\", \n            \"room\"  : 'room_' + hashcode(res[device].room).toString(),\n            \"params\": [{\"key\": \"value\",\"value\": res[device].wert, \"graphable\": true}]\n        }\n    );\n}\n\n// Feuchtigkeit\n\nvar res = alasql('SELECT DISTINCT ha.[1]->room room, ha.[1]->`topichc` srcid, ha.[1]->`value` wert, disp.[1]->disp disp, ha.[1]->`index` idx  FROM ? ha LEFT JOIN ? disp ON ha.[1]->room = disp.[1]->room WHERE [1]->`type` = \"S_HUM\" ORDER BY 1',[ha,disprooms]);\n\nfor (var device in res) {\n    devices.push( \n        {\n            \"id\"    :  res[device].srcid,\n            \"name\"  : \"Hyg\" + res[device].idx + \" \" + (res[device].disp || res[device].room),\n            \"type\"  : \"DevHygrometry\", \n            \"room\"  : 'room_' + hashcode(res[device].room).toString(),\n            \"params\": [{\"key\": \"value\",\"value\": res[device].wert, \"graphable\": true}]\n        }\n    );\n}\n\n// CO2\nvar res = alasql('SELECT DISTINCT ha.[1]->room room, ha.[1]->`topichc` srcid, ha.[1]->`value` wert, disp.[1]->disp disp, ha.[1]->`index` idx  FROM ? ha LEFT JOIN ? disp ON ha.[1]->room = disp.[1]->room WHERE [1]->`type` = \"S_AIR_QUALITY\" ORDER BY 1',[ha,disprooms]);\n\nfor (var device in res) {\n    devices.push( \n        {\n            \"id\"    :  res[device].srcid,\n            \"name\"  : \"CO2\" + res[device].idx + \" \" + (res[device].disp || res[device].room),\n            \"type\"  : \"DevCO2\", \n            \"room\"  : 'room_' + hashcode(res[device].room).toString(),\n            \"params\": [{\"key\": \"value\",\"value\": res[device].wert, \"graphable\": true}]\n        }\n    );\n}\n\n// BARO\n\nvar res = alasql('SELECT DISTINCT ha.[1]->room room, ha.[1]->`topichc` srcid, ha.[1]->`value` wert, disp.[1]->disp disp, ha.[1]->`index` idx  FROM ? ha LEFT JOIN ? disp ON ha.[1]->room = disp.[1]->room WHERE [1]->`type` = \"S_BARO\" ORDER BY 1',[ha,disprooms]);\n\nfor (var device in res) {\n    devices.push( \n        {\n            \"id\"    :  res[device].srcid,\n            \"name\"  : \"Luftdruck\",\n            \"type\"  : \"DevPressure\", \n            \"room\"  : 'room_' + hashcode(res[device].room).toString(),\n            \"params\": [{\"key\": \"value\",\"value\": res[device].wert, \"graphable\": true}]\n        }\n    );\n}\n\n// Licht\n\n\nvar res = alasql('SELECT DISTINCT ha.[1]->room room, ha.[1]->`topichc` srcid, ha.[1]->`value` wert, disp.[1]->disp disp, ha.[1]->`index` idx  FROM ? ha LEFT JOIN ? disp ON ha.[1]->room = disp.[1]->room WHERE [1]->`type` = \"S_LIGHT_LEVEL\" ORDER BY 1',[ha,disprooms]);\n\nfor (var device in res) {\n    devices.push( \n        {\n            \"id\"    :  res[device].srcid,\n            \"name\"  : \"Licht\" + res[device].idx + \" \" + (res[device].disp || res[device].room),\n            \"type\"  : \"DevLuminosity\", \n            \"room\"  : 'room_' + hashcode(res[device].room).toString(),\n            \"params\": [{\"key\": \"value\",\"value\": res[device].wert,\"unit\":\"%\", \"graphable\": true}]\n        }\n    );\n}\n\n// Noise\nvar res = alasql('SELECT DISTINCT ha.[1]->room room, ha.[1]->`topichc` srcid, ha.[1]->`value` wert, disp.[1]->disp disp, ha.[1]->`index` idx  FROM ? ha LEFT JOIN ? disp ON ha.[1]->room = disp.[1]->room WHERE [1]->`type` = \"S_SOUND\" ORDER BY 1',[ha,disprooms]);\n\nfor (var device in res) {\n    devices.push( \n        {\n            \"id\"    :  res[device].srcid,\n            \"name\"  : \"Lärm\" + res[device].idx + \" \" + (res[device].disp || res[device].room),\n            \"type\"  : \"DevNoise\", \n            \"room\"  : 'room_' + hashcode(res[device].room).toString(),\n            \"params\": [{\"key\": \"value\",\"value\": res[device].wert, \"graphable\": true}]\n        }\n    );\n}\n\n// S_LIGHT -> V_POWWER, V_STATUS\nvar res = alasql('SELECT DISTINCT ha.[1]->room room, ha.[1]->`topichc` srcid, ha.[1]->`value` wert, disp.[1]->disp disp, ha.[1]->`index` idx  FROM ? ha LEFT JOIN ? disp ON ha.[1]->room = disp.[1]->room WHERE [1]->`type` = \"S_LIGHT\" AND [1]->`unit` = \"V_STATUS\" ORDER BY 1',[ha,disprooms]);\n\nfor (var device in res) {\n    devices.push( \n        {\n            \"id\"    :  res[device].srcid,\n            \"name\"  : \"Schalter\" + res[device].idx + \" \" + (res[device].disp || res[device].room),\n            \"type\"  : \"DevSwitch\", \n            \"room\"  : 'room_' + hashcode(res[device].room).toString(),\n            \"params\": [{\"key\": \"Status\",\"value\": res[device].wert, \"graphable\": true}]\n        }\n    );\n}\n\nvar res = alasql('SELECT DISTINCT ha.[1]->room room, ha.[1]->`topichc` srcid, ha.[1]->`value` wert, disp.[1]->disp disp, ha.[1]->`index` idx  FROM ? ha LEFT JOIN ? disp ON ha.[1]->room = disp.[1]->room WHERE [1]->`type` = \"S_LIGHT\" AND [1]->`unit` = \"V_POWER\" ORDER BY 1',[ha,disprooms]);\n\nfor (var device in res) {\n    devices.push( \n        {\n            \"id\"    :  res[device].srcid,\n            \"name\"  : \"Watt\" + res[device].idx + \" \" + (res[device].disp || res[device].room),\n            \"type\"  : \"DevElectricity\", \n            \"room\"  : 'room_' + hashcode(res[device].room).toString(),\n            \"params\": [{\"key\": \"Watts\",\"value\": res[device].wert, \"graphable\": true}]\n        }\n    );\n}\n\n\nvar resp = { \"devices\": devices };\n\nmsg.payload = JSON.stringify(resp);\n\n//msg.payload = JSON.stringify(res);\n\n//msg.payload = {\"rooms\": [{ \"id\": \"roomID1\", \"name\": \"Test Room\" }]};\nreturn msg;\n\n\nfunction hashcode(str) {\n  var hash = 0, i, chr, len;\n  if (str.length === 0) return hash;\n  for (i = 0, len = str.length; i < len; i++) {\n    chr   = str.charCodeAt(i);\n    hash  = ((hash << 5) - hash) + chr;\n    hash |= 0; // Convert to 32bit integer\n  }\n  return hash;\n}","outputs":1,"noerr":0,"x":449,"y":222,"wires":[["cfc02ef5.b0a42"]]},{"id":"ab6501aa.2f69a","type":"influxdb","z":"a5e97fda.4d467","hostname":"127.0.0.1","port":"8086","database":"HA","name":"Storage for HA"}]
      

      New sensors appear with this setup automagically in imperihome.

      posted in Node-RED
      FotoFieber
      FotoFieber
    • RE: Node-Red as Controller

      @gohan
      Have you seen my controller flow?

      I have a multi-protocol setup and use sensors from zwave, homegear, netatmo, mysensors, sonoff, mystrom... All the messages are standardised and everything can talk to everything (in theory, wired via node-red). This setup is quite complex but very flexible. If you want to control mysensors-devices only, this may be to complicated.

      Warning: following code was not intended for general usage by anyone else but me. 😄

      Here is a shortened excerpt of my generic mapping code:

      [{"id":"c912e7c5.0e2cf8","type":"function","z":"9496189e.de6028","name":"Map Messages to Generic Messages (HA/)","func":"var mqtt2mqtt = \n{\n// Netatmo\n// - Indoor, TV\n\"netatmo/dashboard_data/Temperature\":\n    {\"destination\":\"\",\"payloadTransformation\":\"\",\"floor\":1, \"room\":\"tv\", \"type\":\"S_TEMP\",\"index\":0, \"unit\":\"V_TEMP\"},\n\"netatmo/dashboard_data/Humidity\":\n    {\"destination\":\"\",\"payloadTransformation\":\"\",\"floor\":1, \"room\":\"tv\", \"type\":\"S_HUM\",\"index\":0, \"unit\":\"V_HUM\"},\n// Haustüre\n\"homegear/1234-5678-9abc/plain/45/1/STATE\":\n    {\"destination\":\"\",\"payloadTransformation\":\"OpenClose\",\"floor\":1, \"room\":\"entrance\", \"type\":\"S_DOOR\",\"index\":0, \"unit\":\"V_TRIPPED\"},\n\n// Philio Motion/Door\n// Treppenhaus oben\n// 21.0 C\n\"fhem/ZWave/ZWave_SENSOR_NOTIFICATION_13/temperature\":\n    {\"destination\":\"\",\"payloadTransformation\":\"SplitFirst\",\"floor\":1, \"room\":\"staircase\", \"type\":\"S_TEMP\",\"index\":0, \"unit\":\"V_TEMP\"},\n//4 %\n\"fhem/ZWave/ZWave_SENSOR_NOTIFICATION_13/luminance\":\n    {\"destination\":\"\",\"payloadTransformation\":\"SplitFirst\",\"floor\":1, \"room\":\"staircase\", \"type\":\"S_LIGHT_LEVEL\",\"index\":0, \"unit\":\"V_LIGHT_LEVEL\"},\n// MyStrom\n\n\"myStrom/Switch1/watt\":\n    {\"destination\":\"\",\"payloadTransformation\":\"\",\"floor\":0, \"room\":\"laundry\", \"type\":\"S_LIGHT\",\"index\":0, \"unit\":\"V_POWER\"},\n\"myStrom/Switch1/on\":\n    {\"destination\":\"\",\"payloadTransformation\":\"False0True1\",\"floor\":0, \"room\":\"laundry\", \"type\":\"S_LIGHT\",\"index\":1, \"unit\":\"V_STATUS\"},\n\n// Heat Befehle des UI\n\"HEAT/bedroom laura\":\n    {\"destination\":\"\",\"payloadTransformation\":\"\",\"floor\":1, \"room\":\"bedroom laura\", \"type\":\"S_HEATER\",\"index\":0, \"unit\":\"V_HEATER_SW\", \"append\":\"/SET\"},\n\n\"HEAT/bedroom parents\":\n    {\"destination\":\"\",\"payloadTransformation\":\"\",\"floor\":1, \"room\":\"bedroom parents\", \"type\":\"S_HEATER\",\"index\":0, \"unit\":\"V_HEATER_SW\", \"append\":\"/SET\"},\n\n// Temp/Hum Stube\n\"MYS-NODERED/2/167/1/V_TEMP\":\n    {\"destination\":\"\",\"payloadTransformation\":\"\",\"floor\":1, \"room\":\"living room\", \"type\":\"S_TEMP\",\"index\":0, \"unit\":\"V_TEMP\"},\n\"MYS-NODERED/2/167/2/V_HUM\":\n    {\"destination\":\"\",\"payloadTransformation\":\"\",\"floor\":1, \"room\":\"living room\", \"type\":\"S_HUM\",\"index\":0, \"unit\":\"V_HUM\"},\n\"MYS-NODERED/2/167/0/V_LEVEL\":\n    {\"destination\":\"\",\"payloadTransformation\":\"\",\"floor\":1, \"room\":\"living room\", \"type\":\"S_AIR_QUALITY\",\"index\":0, \"unit\":\"MM_PPM\"},\n // Temp/Hum/CO2 Badezimmer\n\"MYS-NODERED/2/15/1/V_TEMP\":\n    {\"destination\":\"\",\"payloadTransformation\":\"\",\"floor\":1, \"room\":\"bathroom\", \"type\":\"S_TEMP\",\"index\":0, \"unit\":\"V_TEMP\"},\n\"MYS-NODERED/2/15/2/V_HUM\":\n    {\"destination\":\"\",\"payloadTransformation\":\"\",\"floor\":1, \"room\":\"bathroom\", \"type\":\"S_HUM\",\"index\":0, \"unit\":\"V_HUM\"},\n\"MYS-NODERED/2/15/0/V_LEVEL\":\n    {\"destination\":\"\",\"payloadTransformation\":\"\",\"floor\":1, \"room\":\"bathroom\", \"type\":\"S_AIR_QUALITY\",\"index\":0, \"unit\":\"MM_PPM\"},\n\n};\n\n\nfunction payloadTransformation(payload, transformation) {\n    if (transformation == \"OnOff\") {\n\t\tif (payload === 0) {\n\t\t\tpayload = 'OFF';\n\t\t} \n\t\telse\n\t\t{\n\t\t\tpayload = 'ON';\n\t\t}\n\t} else if  (transformation == \"RemoveBrackets\") {\n\t\tpayload = payload.replace(\"[\",\"\");\n\t\tpayload = payload.replace(\"]\",\"\");\n\t} else if  (transformation == \"NetatmoBatteryIndoor\") {\n\t        /* Battery range: 6000 ... 4200 */\n            // const INDOOR_BATTERY_LEVEL_0 = 5640;/*full*/\n            // const INDOOR_BATTERY_LEVEL_1 = 5280;/*high*/\n            // const INDOOR_BATTERY_LEVEL_2 = 4920;/*medium*/\n            // const INDOOR_BATTERY_LEVEL_3 = 4560;/*low*/\n            /* Below 4560: very low */\n            if (payload >= 5640) {\n                payload = 100;\n            } else if (payload < 4560) {\n                payload = 0;\n            } else {\n                payload = 100.0 * (payload - 4560) / (5640 - 4560);\n            }\n\t} else if  (transformation == \"NetatmoBatteryOutdoor\") {\n             /* Battery range: 6000 ... 3600 */\n            // const BATTERY_LEVEL_0 = 5500;/*full*/\n            // const BATTERY_LEVEL_1 = 5000;/*high*/\n            // const BATTERY_LEVEL_2 = 4500;/*medium*/\n            //const BATTERY_LEVEL_3 = 4000;/*low*/\n            /* below 4000: very low */\n            if (payload >= 5500) {\n                payload = 100;\n            } else if (payload < 4000) {\n                payload = 0;\n            } else {\n                payload = 100.0 * (payload - 4000) / (5500 - 4000);\n            }\n\t}  else if  (transformation == \"HomegearBatteryLOWBAT\") {\n        if (payload == '[false]') {\n            payload = 100;\n        } else {\n            payload = 0;\n        }\n\t}  else if  (transformation == \"SplitFirst\") {\n\t    var tokens = payload.split(\" \");\n        payload = tokens[0];\n\t}  else if  (transformation == \"StringMotion\") {\n\t    upper = payload.toUpperCase();\n\t    if (upper.search(\"MOTION\") > -1) {\n\t        payload = 1;\n\t    }\n\t    else\n\t    {\n\t        payload = 0;\n\t    }\n\t}  else if  (transformation == \"False0True1\") {\n\t    payload = payload.replace(\"[\",\"\");\n\t\tpayload = payload.replace(\"]\",\"\");\n\t    upper = payload.toUpperCase();\n\t    if (upper.search(\"FALSE\") > -1) {\n\t        payload = 0;\n\t    }\n\t    else if (upper.search(\"TRUE\") > -1)\n\t    {\n\t        payload = 1;\n\t    }\n\t}  else if  (transformation == \"False1True0\") {\n\t    payload = payload.replace(\"[\",\"\");\n\t\tpayload = payload.replace(\"]\",\"\");\n\t    upper = payload.toUpperCase();\n\t    if (upper.search(\"FALSE\") > -1) {\n\t        payload = 1;\n\t    }\n\t    else if (upper.search(\"TRUE\") > -1)\n\t    {\n\t        payload = 0;\n\t    } if (upper.search(\"0\") > -1) {\n\t        payload = 1;\n\t    }\n\t    else if (upper.search(\"1\") > -1)\n\t    {\n\t        payload = 0;\n\t    }\n\t}  else if  (transformation == \"Off0On1\") {\n\t    upper = payload.toUpperCase();\n\t    if (upper.search(\"OFF\") > -1) {\n\t        payload = 0;\n\t    }\n\t    else\n\t    {\n\t        payload = 1;\n\t    }\n\t}  else if  (transformation == \"StringClosed\") { // 1 wenn nicht closed (open)\n\t    upper = payload.toUpperCase();\n\t    if (upper.search(\"CLOSED\") > -1) {\n\t        payload = 0;\n\t    }\n\t    else\n\t    {\n\t        payload = 1;\n\t    }\n\t} else \tif (transformation == \"OpenClose\") {\n\t\tif (payload == '[true]') {\n\t\t\tpayload = 1;\n\t\t} \n\t\telse\n\t\t{\n\t\t\tpayload = 0;\n\t\t}\n\t}\n\treturn payload;\n}\n\nmapping =  mqtt2mqtt[msg.topic];\n\nif (mapping === undefined) {\n\treturn;\n}\nelse if (mapping.destination === undefined)\n{\n    var outputMsgs = [];\n    for (var j = 0; j < mapping.length; j++){\n        \n        destination = mapping[j].destination;\n        \n        if (destination === \"\") {\n            destination = \"HA/\" + mapping[j].floor + \"/\" + mapping[j].room + \"/\" +  mapping[j].type + \"/\" + mapping[j].index + \"/\" + mapping[j].unit;\n        }\n        \n        //\"floor\":1, \"room\":\"Bathroom\", \"type\":\"S_HUM\",\"index\":0, \"unit\":\"V_HUM\"\n        //\n        var createmsg = { \n                            topic:  destination, \n                            value:  payloadTransformation(msg.payload,mapping[j].payloadTransformation), \n                            floor:  mapping[j].floor,\n                            room:   mapping[j].room,\n                            type:   mapping[j].type,\n                            index:  mapping[j].index,\n                            unit:   mapping[j].unit,\n                            append: mapping[j].append,\n                            timestamp: Date.now(),\n                            source: msg.topic\n        };\n        \n        \n        if(typeof mapping[j].append !== \"undefined\") {\n            createmsg.topic += mapping[j].append; \n        }\n        \n        outputMsgs.push({       topic: createmsg.topic,\n                                payload: createmsg});\n    }\n\n    return [ outputMsgs ];\n}\nelse\n{\n    var outputMsgs = [];\n    \n    destination = mapping.destination;\n    \n    if (destination === \"\") {\n        destination = \"HA/\" + mapping.floor + \"/\" + mapping.room + \"/\" +  mapping.type + \"/\" + mapping.index + \"/\" + mapping.unit;\n    }\n    \n    var createmsg = { \n                        topic:  destination, \n                        value:  payloadTransformation(msg.payload,mapping.payloadTransformation),\n                        floor:  mapping.floor,\n                        room:   mapping.room,\n                        type:   mapping.type,\n                        index:  mapping.index,\n                        unit:   mapping.unit,\n                        append: mapping.append,\n                        timestamp: Date.now(),\n                        source: msg.topic\n    };\n\n      \n    if(typeof mapping.append !== \"undefined\") {\n            createmsg.topic += mapping.append; \n    }\n    \n \n    outputMsgs.push({       topic: createmsg.topic,\n                            payload: createmsg});\n                            \n    return [ outputMsgs ];\n   \n}","outputs":1,"noerr":0,"x":430.81597900390625,"y":368.27081298828125,"wires":[[]]}]
      

      I persist all the current values in a global state and use alasql to get values from it.

      [{"id":"e4db6599.e95a68","type":"mqtt in","z":"82560a8c.4f93a8","name":"HA Messages","topic":"HA/#","qos":"2","broker":"26224260.2d8dde","x":176,"y":68,"wires":[["6c3867ae.e5a808"]]},{"id":"f8f5de85.ce073","type":"debug","z":"82560a8c.4f93a8","name":"","active":false,"console":"false","complete":"true","x":528,"y":70,"wires":[]},{"id":"5bb12e6f.3a271","type":"function","z":"82560a8c.4f93a8","name":"HA State -> context.global.hastate","func":"var hastate = {};\n\nif (context.global.hastate === undefined)\n{\n    context.global.hastate = hastate;\n}\n\nhc = hashcode(msg.topic);\n\nmsg.payload.topichc = hc;\n\ncontext.global.hastate[msg.topic] = msg.payload;\n\nreturn msg;\n\nfunction hashcode(str) {\n  var hash = 0, i, chr, len;\n  if (str.length === 0) return hash;\n  for (i = 0, len = str.length; i < len; i++) {\n    chr   = str.charCodeAt(i);\n    hash  = ((hash << 5) - hash) + chr;\n    hash |= 0; // Convert to 32bit integer\n  }\n  return hash;\n}","outputs":1,"noerr":0,"x":641,"y":126,"wires":[[]]},{"id":"f6c2ddcb.2d25b","type":"comment","z":"82560a8c.4f93a8","name":"Restore State from Mongo","info":"","x":181,"y":193,"wires":[]},{"id":"1b115bf9.64b9f4","type":"inject","z":"82560a8c.4f93a8","name":"Restore context.global.hastate from Mongo","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":266.25,"y":242,"wires":[["eaaa6edf.b5414"]]},{"id":"98fa3c0.77ffec8","type":"function","z":"82560a8c.4f93a8","name":"restore context.global.hastate","func":"context.global.hastate = {};\n\nvar erg = {};\n\nfor (var item in msg.payload) {\n    var payload = msg.payload[item];\n    var topic = payload.topic;\n    //delete payload.topic;\n    delete payload._id;\n    payload.topichc = hashcode(topic);\n    erg[topic] = payload;\n}\n\nmsg.payload = erg;\n\ncontext.global.hastate = msg.payload;\n\nreturn msg;\n\nfunction hashcode(str) {\n  var hash = 0, i, chr, len;\n  if (str.length === 0) return hash;\n  for (i = 0, len = str.length; i < len; i++) {\n    chr   = str.charCodeAt(i);\n    hash  = ((hash << 5) - hash) + chr;\n    hash |= 0; // Convert to 32bit integer\n  }\n  return hash;\n}","outputs":1,"noerr":0,"x":1074.25,"y":240.75,"wires":[["a7df8317.f084b","8172bfbb.14412"]]},{"id":"c2eaa629.552f18","type":"mongodb in","z":"82560a8c.4f93a8","mongodb":"135c13e7.1b136c","name":"Status aus Mongo lesen","collection":"STATE","operation":"find","x":807.5,"y":240.75,"wires":[["98fa3c0.77ffec8","304fc7dd.6070a8"]]},{"id":"a7df8317.f084b","type":"debug","z":"82560a8c.4f93a8","name":"","active":false,"console":"false","complete":"false","x":1170.75,"y":126,"wires":[]},{"id":"46b56401.cc231c","type":"debug","z":"82560a8c.4f93a8","name":"","active":true,"console":"false","complete":"false","x":565,"y":539,"wires":[]},{"id":"fcde162a.b0bfe8","type":"inject","z":"82560a8c.4f93a8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":143,"y":540,"wires":[["59bf7cc5.978df4"]]},{"id":"59bf7cc5.978df4","type":"function","z":"82560a8c.4f93a8","name":"context.global.hastate","func":"msg.payload = context.global.hastate;\n\nreturn msg;","outputs":1,"noerr":0,"x":367,"y":542,"wires":[["46b56401.cc231c"]]},{"id":"eaaa6edf.b5414","type":"function","z":"82560a8c.4f93a8","name":"limit und skip setzen","func":"msg.limit = 65000;\nmsg.skip = 0;\n\nreturn msg;","outputs":1,"noerr":0,"x":556,"y":243,"wires":[["c2eaa629.552f18"]]},{"id":"8172bfbb.14412","type":"function","z":"82560a8c.4f93a8","name":"HASTATE bereinigen-> älter als 7 Tage","func":"var i=0;\n\nfor (var erg in context.global.hastate) {\n    payload = context.global.hastate[erg];\n    if ((Date.now() - payload.timestamp)>1000*60*60*24*7) {\n        delete context.global.hastate[erg];       \n        i++;\n    }\n}\n\nmsg.payload = i;\n\nreturn msg;","outputs":1,"noerr":0,"x":448,"y":297,"wires":[["c07188b0.618918"]]},{"id":"1e5a496b.e5cdf7","type":"inject","z":"82560a8c.4f93a8","name":"","topic":"","payload":"","payloadType":"date","repeat":"3600","crontab":"","once":false,"x":151,"y":296,"wires":[["8172bfbb.14412"]]},{"id":"c07188b0.618918","type":"debug","z":"82560a8c.4f93a8","name":"","active":true,"console":"false","complete":"false","x":719,"y":297,"wires":[]},{"id":"6c3867ae.e5a808","type":"json","z":"82560a8c.4f93a8","name":"","x":367.5,"y":130,"wires":[["5bb12e6f.3a271","f8f5de85.ce073"]]},{"id":"304fc7dd.6070a8","type":"debug","z":"82560a8c.4f93a8","name":"","active":true,"console":"false","complete":"false","x":918,"y":377,"wires":[]},{"id":"26224260.2d8dde","type":"mqtt-broker","z":"","broker":"192.168.92.5","port":"1883","clientid":"","usetls":false,"verifyservercert":false,"compatmode":false,"keepalive":"15","cleansession":true,"willTopic":"","willQos":"1","willRetain":"false","willPayload":"","birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":""},{"id":"135c13e7.1b136c","type":"mongodb","z":"","hostname":"192.168.92.5","port":"27017","db":"HASTATE","name":"HASTATE"}]
      
      posted in Node-RED
      FotoFieber
      FotoFieber
    • RE: switch is not working when gateway is unavailable

      Yes, please post your sketch.

      posted in Hardware
      FotoFieber
      FotoFieber
    • RE: Are there any RFM69 shields for Arduino pro mini?

      I love this one:
      https://www.openhardware.io/view/268/RFM69HW-interstitial-board-for-Pro-Mini-Temp-Humidity-sensor

      posted in Hardware
      FotoFieber
      FotoFieber
    • RE: Node not connecting in IDE Serial Monitor but does stand alone

      @Petjepet

      However when the node is powered without using the IDE Serial Monitor it is working properly.

      Does the problem only exist, when you open the serial monitor?

      Or does it appear as soon as you attach the node via serial to the computer?

      What is your hardware (arduion type, radio type, serial connection...) and wiring setup?

      posted in Troubleshooting
      FotoFieber
      FotoFieber
    • RE: 💬 temp,hum,co2,led,motion with esp32

      Box has enough space for everything. If I hace time before the end of the contest, I will improve the design to be more friendly to hardware replacement without soldering.

      0_1489923408141_image2.JPG

      Layer 2:
      0_1489923429138_image1.JPG

      posted in OpenHardware.io
      FotoFieber
      FotoFieber
    • RE: 💬 temp,hum,co2,led,motion with esp32

      Redesign of the project box:

      • added a layer for the pro mini
      • replaces hex grids
      • centered display

      0_1489764698324_FotoFieberContest.png

      posted in OpenHardware.io
      FotoFieber
      FotoFieber
    • RE: Node-Red as Controller

      @Fabien
      Please help me understand your requirement.

      Ack from node to gateway are AFAIK handled by the gateway. So this is not your recquirement.

      Then you are maybe looking to send messages from node-red to some nodes with the ack flag set and if you don't get the message back within xx seconds you want to have transmitted it again up to n times.

      Is this your requirement?

      If yes, what are xx and n?

      posted in Node-RED
      FotoFieber
      FotoFieber
    • RE: 💬 temp,hum,co2,led,motion with esp32

      Here is the start of the diary of my project,

      Printing first draft of case:
      0_1489232674648_IMG_2257.JPG

      • Hex lids are fine.
      • back cover of temp hum sensor is missing... where is it 😆
      • The nextion display is not centered. (It is not symdetric in the pcb.) If I want it to be centered I may have to make the box quite a bit larger.

      I am really impressed with the print quality of the wanhao i3 plus compare to the xyzprint davinci I had two years ago.

      posted in OpenHardware.io
      FotoFieber
      FotoFieber
    • RE: Simplifying MySensors security: the third option.

      @alowhum
      If you use RFM69, you can enable hardware encryption with one define and store your password (AES Key) by running one sketch.

      This is enough security for me, as I don't open doors with mysensors.

      Changing the default channel id might be a good choice too.

      posted in Development
      FotoFieber
      FotoFieber
    • RE: Another case for Temp/humidity

      @rborer
      How long is battery life with this setup?

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Scene controller?

      @artipi
      Yes you can connect a pro mini or an uno.

      In sleep mode it draws 15ma.

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: Scene controller?

      I was playing with some nextion displays. You can design your UI with Inkscape and program interaction in a special UI editor. Interface to arduino is via serial and the commands to control/read are really simple. (No GUI code needed on your arduino.) Memory consumption is therefore minimal.

      http://www.ebay.com/itm/3-2-034-Nextion-HMI-Intelligent-Smart-USART-Serial-Touch-Panel-LCD-Module-Display-/191640753340

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: relay with button...relay not physically changing state

      @Ticupolu
      Are thes buttons switches or push buttons?

      You call setRelayState only from the recieve functions. (Do I miss something?) This means, that relay changes must be initiated from outside and don't occur only from a button press.

      posted in Troubleshooting
      FotoFieber
      FotoFieber
    • RE: relay with button...relay not physically changing state

      @Ticupolu
      Do you have a wiring diagram?
      Which arduino do you use'

      Do you really need waits to save batery?

      posted in Troubleshooting
      FotoFieber
      FotoFieber
    • RE: node disconnects - workaround?

      You can send heartbeats:
      https://forum.mysensors.org/topic/2267/ping-function/3

      posted in Development
      FotoFieber
      FotoFieber
    • RE: node disconnects - workaround?

      Try to replace all "delay" with "wait", as the node is not responsible, when you are in a delay.

      Try to add a watchdog:

      • add a a wdt_enable(WDTO_8S) in setup
      • add a wdt_reset() at the start of the loop

      I had several problems with relays and power spikes when they are switched. I changed them all to SSRs and the problems are gone.

      Good luck
      Markus

      posted in Development
      FotoFieber
      FotoFieber
    • RE: node disconnects - workaround?

      @parachutesj
      Could you please post your sketch?

      A wiring diagram or a picture of the node could be helpful too.

      posted in Development
      FotoFieber
      FotoFieber
    • RE: AC Power controller with node to node remotes

      I use a similar design for a wireless door bell. To not be forced to push the button while the node is booting, I charge a large capacitor when a button is pressed.

      posted in My Project
      FotoFieber
      FotoFieber
    • RE: 💬 MySensors Contest 2017

      Hmm, I have so many ideas and not much time.

      • a push mysensors notification for amazon echo (alexa)
      • maybe could be the same hardware as above: notify via voice about: window state, air quality, doorbell from mysensors...
      • nice nextion display showing information about my home and the weather forecast
      • doorbell sensor without additional power supply
      • ac detection without additional power supply
      • a mysensors serial mqtt controller for up to 3 gateways based on arduino due

      Or should I first finish my heating circuit regulation which does work for more than two months now without any problem but isn't mysensorized...

      Or should I invest in a blog explaining all the things I did and could help others? (i.e. how do I distinguish an arduino pro mini 16 MHz from a 8 MHz model or how do I connect different protocols ie zWave, mysensors, homematic, netatmo.....)

      Or should I invest more time in my job? 😆

      What about photography? I really like to take pictures with old cameras on film but have done this last time 2 years ago... 😢

      Or should I paint my garage? It is really time to....

      What about tidy up my garage and all my electronic items I purchased with that many ideas in my mind?

      We don't talk about my family. I swear, they don't get to short.

      Maybe a 3d printing project with my 8 year old daughter?

      Sigh, life is to short...

      posted in Announcements
      FotoFieber
      FotoFieber
    • RE: Battery based atmega328p sensor (no SMD)

      I found a label FTDI on one picture of the PCB. 😀

      I encourage you to read articles about arduino on breadboard and dive deeper or buy complete solutions like the sensebender micro.

      posted in Hardware
      FotoFieber
      FotoFieber
    • RE: Battery based atmega328p sensor (no SMD)

      http://www.psyelmer9.info/blog/may-17th-2012

      You may need to set the fuses to disable bod and burn a bootloader with an ISP-Adapter.

      posted in Hardware
      FotoFieber
      FotoFieber
    • RE: 💬 GPS Sensor

      You can make a map of your mysensors reception area. 🙂

      posted in Announcements
      FotoFieber
      FotoFieber
    • RE: why no one uses latching relays ?

      Apart from 12V supply voltage, this seems interesting:
      http://www.ebay.com/itm/Latching-Bistable-Relay-module-12V-Relay-board-for-AVR-PIC-Arduino-from-EU-/181276052335

      posted in Hardware
      FotoFieber
      FotoFieber
    • RE: Z-uno Gateway

      @thomme
      This gateway has to remember all the sensors on the mysensors network. If you would add a new sensor, you would have to detach and reattach the Z-Uno from zWave network.

      I don't think you have enough memory on the Z-Uno to do such a gateway and AFAIK the sensor types supported on the Z-Uno are very limited.

      My solution for integrating different iot systems is mqtt with node-red. All systems have an adapter to a generic message structure and can be connected to all the others.

      I use a mix of homegear,/homematic mysensors, netatmo, zWave, owntracks, Alexa, imperihome, Sonoff...

      posted in Feature Requests
      FotoFieber
      FotoFieber
    • RE: Serial Gateway and MQTT Broker

      2;0;1;0;23;36 Is a correct message according to the serial API. I don't know anything about your controller...sorry

      Maybe the controller needs the ; translated to / in the topic?

      Have you tried to switch pub/sub topic?

      posted in MyController.org
      FotoFieber
      FotoFieber
    • RE: Serial Gateway and MQTT Broker

      @Frank-C
      The script uses the serial protocol and should be compatible with the mysesnosrs mqtt-gateway. Are the pub/sub-topics set correct?

      posted in MyController.org
      FotoFieber
      FotoFieber
    • RE: Serial Gateway and MQTT Broker

      Maybe this is enough for your requirement:
      https://forum.mysensors.org/topic/4599/how-to-add-a-serial-device-to-use-in-node-red/10

      posted in MyController.org
      FotoFieber
      FotoFieber
    • RE: German users

      https://forum.mysensors.org/topic/2258/german-speaking-members/15

      posted in General Discussion
      FotoFieber
      FotoFieber
    • RE: Gateway in Client Mode and 2 Controller?

      @LastSamurai
      As long as the veras don't try to be the main controller at the same time.

      posted in General Discussion
      FotoFieber
      FotoFieber
    • RE: Gateway in Client Mode and 2 Controller?

      @Corvl
      At least for the internal messages like time and node_id assignment it would be impossible to have multiple gateways.

      What about bridging the two veras? http://wiki.micasaverde.com/index.php/Bridged_Mios_Engines

      posted in General Discussion
      FotoFieber
      FotoFieber
    • RE: Support for ARDUINO_SAM (e.g. ARDUINO DUE)

      @RWoerz
      The due is in my opinion really underestimated. It is fast and has enough memory. The 328p is nearly at his limits with mysensors but it is nice for small, battery powered sensors.

      With it's processing power, the due would be a nice fit for complex nodes: scene controller with TFT and nice animations, power meters with TrueRMS calculations...

      I switched from NRF24L01 to RFM69 and all my transmission issues are gone. With RFM69 there is no SOFTSPI support for mysensors at the moment and you can't make an MQTT/ethernet gateway with the usual AVR-hardware. The due is not a solution neither.
      What do I do with my dues? I am building a due based controller/MQTT gateway, where you can attach up to 3 serial gateways.

      posted in Development
      FotoFieber
      FotoFieber
    • RE: Recommended setup for MQTT and RFM69

      @PhracturedBlue
      At the moment I am using a node.js script to publish from serial gateway to mqtt:
      https://forum.mysensors.org/topic/4599/how-to-add-a-serial-device-to-use-in-node-red/10

      posted in Hardware
      FotoFieber
      FotoFieber
    • RE: SensebenderGateway + Wifi esp8266ex + Radio nrf24l01

      @Viktor-Zeman
      AFAIK the sensebender gateway is intended to be used with ethernet. For wifi you can use an esp8266 without sensebender gateway.

      posted in Hardware
      FotoFieber
      FotoFieber
    • RE: pro mini programming

      @dbemowsk
      Yes, I do program my 5V arduino pro mini with 3.3V
      As long as the serial levels of rx/tx are the same as vcc, it should work with both voltages. As you have written, you have to take care of the attached sensors/actuators.

      posted in Hardware
      FotoFieber
      FotoFieber
    • RE: pro mini programming

      According to the schematic
      https://www.arduino.cc/en/uploads/Main/Arduino-Pro-Mini-schematic.pdf
      the ftdi header is attached to vcc and is not regulated. High level of cpu is then 5V.

      According to the specs 2.7 up to 5.5 V should be ok @ 8 MHZ
      http://www.atmel.com/Images/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Summary.pdf

      I usually do it the other way round: use a 16Mhz pro mini @ 3.3 V to use RFM69 without level shifters. This is out of specification but working fine.

      posted in Hardware
      FotoFieber
      FotoFieber
    • RE: Simple Arduino Controller

      Here is an example with the old library. Parsing should be compatible but the rest will not work with 2.1

      https://github.com/ntruchsess/MySensors/tree/mqttclient/libraries/MySensors/examples/MQTTClientGateway

      posted in Controllers
      FotoFieber
      FotoFieber
    • RE: Simple Arduino Controller

      Do you want to control the nodes from outside (e.g. via MQTT) or will the communication be only inside the mysensors network?

      Implementing a controller on the gateway isn't that simple, as there is no plugin mechanism in the library, where you can extend for example the serial gateway.

      For implementation details you can look at
      https://github.com/mysensors/MySensorsSampleController/blob/master/NodeJsController.js

      It may be easier to have a seperate arduino for the controller and attach a serial gateway. (I am working on a arduino due controller where you can attach up to 3 serial gateways.)

      posted in Controllers
      FotoFieber
      FotoFieber
    • RE: What are these bad practices ?

      @scalz
      I am not sure, if visualmicro really does the same as the arduino ide when compiling code. Ihave here code, that doesn't compile with visualmicro but it does with the arduino IDE....

      posted in Development
      FotoFieber
      FotoFieber
    • RE: 💬 Sensebender Gateway

      @tbowmo
      Yes, that is really nice. 👍

      My other goal was to have a new MQTTClientGateway, as it existed with MySensors 1.1 (which is not only a gateway, but a controller too). It would have been really painful to add it to MySensors 2.1.x, as I would have to patch core files. It is much easier, to throw hardware at it. 😆

      posted in OpenHardware.io
      FotoFieber
      FotoFieber
    • RE: 💬 Sensebender Gateway

      @Anticimex
      One gateway per radio, that is what I think is best. 👍

      What I try to do, is to implement a controller with arduino due for up to three serial gateways. If there would be a solution for ethernet&rfm69 I may not have invested time in this. 😆

      0_1485703507553_DueMysMQTT_Steckplatine.png

      posted in OpenHardware.io
      FotoFieber
      FotoFieber
    • RE: 💬 Sensebender Gateway

      @tbowmo
      Maybe the design of the sensebender gateway doesn't make sense to my architectural viewpoint....

      posted in OpenHardware.io
      FotoFieber
      FotoFieber
    • RE: 💬 Sensebender Gateway

      @tbowmo
      No, I don't have to hack the core. I use the serial API. From an architectural point of view, I don't see the need to change anything in MySensors. A serial controller can be built for under 20€ Including the radio. Why should I add complexity to support more than one radio support with one cpu in MySensors, if I can have the functipnality with the abstraction layer of the serial API? Please keep MySensors s simple as possible.

      posted in OpenHardware.io
      FotoFieber
      FotoFieber
    • RE: 💬 Sensebender Gateway

      @alexsh1
      The question is: will the software restriction be solved? If not, I do not care if it is a software or a hardware restriction. 🙂

      posted in OpenHardware.io
      FotoFieber
      FotoFieber
    • RE: 💬 Sensebender Gateway

      @tbowmo
      The fact, that MySensors doesn't support more then one radio, was the reason for me not to order the sensebender gateway.

      I am working on a gateway⁄controller based on an arduino due, which supports at least up to 3 serial gateways via hardware serial. It handles ID and time (synced with ntp) requests and does pub/sub to mqtt with readable topics.(inspired by the old mqtt client gateway)

      posted in OpenHardware.io
      FotoFieber
      FotoFieber
    • RE: Node only works for a few days

      I had a similar problem with the control of a heating mixer and three dallas sensors. I solved the problem with:

      • replacement of the relays with solid state relays
      • moved conttroller more in distance of the high voltage parts

      I also added a watchdog and a reboot mechanism in case of sensor problems.

      Maybe this sketch can give you an inspiration: (work in progress, MYS-Part not tested in depth)

      // Enable debug prints to serial monitor
      //#define MY_DEBUG      // in Mysensors
      #define EN_DEBUG      // in this sketch
      //#define NO_MYS      // ohne Mysensors Unterstützung?
      //#define SIMULATION
      #define NO_AC_DETECT  // ohne AC sensor
      #define NO_RTC
      
      // RTC nur zusammen mit Mysensors
      #ifdef NO_MYS
      #ifndef NO_RTC
      #define NO_RTC
      #endif
      #endif
      
      #ifdef SIMULATION
      // für Simulation ohne Sensoren
      #define SIMULATE_VOR  35
      #define SIMULATE_RUE  30
      #define SIMULATE_ZU   65
      
      
      #ifdef SIMULATE_VOR
      #warning Achtung! Keine Echtentemperaturmessungen -> Simulation
      #endif
      
      #ifdef SIMULATE_RUE
      #warning Achtung! Keine Echtentemperaturmessungen -> Simulation
      #endif
      
      #ifdef SIMULATE_ZU
      #warning Achtung! Keine Echtentemperaturmessungen -> Simulation
      #endif
      #endif
      
      
      #define START_TARGET_TEMP 40
      #define EEPROM_TARGET_TEMP 900            // Save Porisiton. It is above the Mysensors range of lib 2.1
      #define EEPROM_POWERSTATE  902            // Save Porisiton. It is above the Mysensors range of lib 2.1
      #define MAX_TEMP 50
      #define VORLAUF 0
      #define RUECKLAUF 1
      #define ZULAUF 2
      #define PUMPE 0
      #define MISCHER_ZU  1
      #define MISCHER_AUF 2
      #define POWERLED 7                        // 8. LED
      #define TEMPDOWNLED 5                     // 6. Led
      #define TEMPUPLED 6                       // 7. Led
      #ifndef NO_AC_DETECT
      #define BUDERUSLED 4                      // 5. Led
      #endif
      #define RETRY_TIMEOUT_PUMP 2*60*1000UL     // alle 2 Minuten testen, ob Vorlauf nicht besser (5 Sekunden pumpen)
      #define REGULATION_TIMEOUT_PUMP 30*1000UL  // 30 Sekunden warten nach neuer Einstellung
      #define PROBE_TIMEOUT_PUMP 5*1000UL        // 5 Sekunden Pumpe für Test einschalten, wenn Zulauf zu kalt
      #define BUDERUS_PIN 3                     // Buderus Powererkennung Pumpe auf PIN 3
      
      #ifndef SIMULATION
      #define MISCHER_RESET_TIME 120*1000UL      // 2 Minuten bis Nullstellung
      #else
      #define MISCHER_RESET_TIME 10*1000UL      // 10 Sekunden bis Nullstellung nei Simulation
      #endif
      
      
      
      #ifdef EN_DEBUG
      #define DEBUG_PRINT(x) Serial.print (x)
      #else
      #define DEBUG_PRINT(x)
      #endif
      
      #ifdef EN_DEBUG
      #define DEBUG_PRINTLN(x)  Serial.println (x)
      #else
      #define DEBUG_PRINTLN(x)
      #endif
      
      #ifndef NO_MYS
      // Radio Configuration
      #define MY_TRANSPORT_WAIT_READY_MS (10000ul)
      #define MY_RADIO_RFM69
      #define MY_RFM69_FREQUENCY RF69_868MHZ
      #define MY_RFM69_NETWORKID 13
      #define MY_RFM69_ENABLE_ENCRYPTION
      #define MY_NODE_ID 168
      //#define MY_IS_RFM69HW
      #endif
      
      
      #include <Arduino.h>
      #include <avr/wdt.h>
      #include <EEPROM.h>
      #include <MemoryFree.h>
      
      #ifndef NO_MYS
      #define MIN_REPORT_INTERVAL  5 * 60 * 1000L   // mindestens alle 5 Minuten melden
      #include <SPI.h>
      #include <MySensors.h>
      #include <Time.h>        //http://www.arduino.cc/playground/Code/Time
      #include <Timezone.h>    //https://github.com/JChristensen/Timezone
      #include <TimeLib.h>
      
      //Central European Time (Frankfurt, Paris)
      TimeChangeRule CEST = {"CEST", Last, Sun, Mar, 2, 120};     //Central European Summer Time
      TimeChangeRule CET = {"CET ", Last, Sun, Oct, 3, 60};       //Central European Standard Time
      Timezone CE(CEST, CET);
      bool timeReceived = false;
      unsigned long lastUpdate = 0, lastRequest = 0;
      #endif
      
      #ifndef NO_RTC
      #include <DS3232RTC.h>  // A  DS3231/DS3232 library
      #endif
      
      #define MAX_LEDS 8
      
      byte lastButtonState = 0;
      #define RELAY_ON HIGH
      #define RELAY_OFF LOW
      #define RELAY_1  A0         // Arduino Digital I/O pin number for first relay (second on pin+1 etc)
      #define NUMBER_OF_RELAYS 4  // Total number of attached relays
      
      
      boolean ledState[MAX_LEDS] = { false, false, false, false, false, false, false, false };
      boolean relState[NUMBER_OF_RELAYS] = { false, false, false, false };
      
      #include <TM1638.h>
      #include <DallasTemperature.h>
      #include <OneWire.h>
      
      #define ONE_WIRE_BUS 6 // Pin where dallase sensor is connected 
      #define TEMPERATURE_PRECISION 9
      #define MAX_ATTACHED_DS18B20 3
      
      //28B404080000804A
      DeviceAddress Probe01 = { 0x28, 0xB4, 0x04, 0x08, 0x00, 0x00, 0x80, 0x4A };
      //28C606080000803F
      DeviceAddress Probe02 = { 0x28, 0xC6, 0x06, 0x08, 0x00, 0x00, 0x80, 0x3F };
      //28750808000080C3
      DeviceAddress Probe03 = { 0x28, 0x75, 0x08, 0x08, 0x00, 0x00, 0x80, 0xC3 };
      
      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.
      int numSensors = 0;
      int lastTemperature[MAX_ATTACHED_DS18B20] = { -100, -100, -100 };
      int16_t conversionTime;
      unsigned long previousTempMillis = -1;
      static unsigned long nowms = millis();    // update at start of loop()
      
      
      // define LCD module
      TM1638 ledModule(8, 9, 7);
      
      int displayInfo = -1;
      unsigned long previousDisplayMillis = 0;
      
      int targetTemp = START_TARGET_TEMP;
      #ifdef SIMULATION
      bool powerOn = true;
      #ifndef NO_AC_DETECT
      bool powerOnBuderus = true;
      #endif
      #else
      bool powerOn = false;
      #ifndef NO_AC_DETECT
      bool powerOnBuderus = false;
      #endif
      #endif
      bool resetMischer = true; // mischer zuerst in Nullstellung
      
      #ifndef NO_AC_DETECT
      bool testStateBuderus = false;
      unsigned long lastResetBuderus = -1;
      #endif
      
      #ifndef NO_MYS
      // Initialize messages
      MyMessage msgTemp(0, V_TEMP);
      MyMessage msgStatus(0, V_STATUS);
      MyMessage msgTargetTemp(MAX_ATTACHED_DS18B20 + NUMBER_OF_RELAYS, V_HVAC_SETPOINT_HEAT);
      MyMessage msgPower(MAX_ATTACHED_DS18B20 + NUMBER_OF_RELAYS + 1, V_STATUS);
      #ifndef NO_AC_DETECT
      MyMessage msgPowerBuderus(MAX_ATTACHED_DS18B20 + NUMBER_OF_RELAYS + 2, V_STATUS);
      #endif
      MyMessage msgDebug(MAX_ATTACHED_DS18B20 + NUMBER_OF_RELAYS + 3, V_TEXT);
      #endif
      
      // the setup function runs once when you press reset or power the board
      void setup() {
        DEBUG_PRINTLN(F("Starte setup"));
        wdt_enable(WDTO_8S);
        Serial.begin(115200);
      
      #ifndef NO_RTC
        // the function to get the time from the RTC
        setSyncProvider(RTC.get);
      #endif
      #ifndef NO_MYS
        // Request latest time from controller at startup
        requestTime();
      #endif
      
      
      
      
        // Zieltemperatur aus EERPOM lesem:
        targetTemp = EEPROM.read(EEPROM_TARGET_TEMP);
        if ((targetTemp < 30) || (targetTemp > MAX_TEMP)) {
          targetTemp = START_TARGET_TEMP;
          EEPROM.write(EEPROM_TARGET_TEMP, targetTemp);
        }
      
        int state = EEPROM.read(EEPROM_POWERSTATE);
        if (state == 0) {
          powerOn = false;
        }
        else powerOn = true;
      
      #ifndef NO_AC_DETECT
        // Buderuserkennung auf PIN3
        attachInterrupt(digitalPinToInterrupt(BUDERUS_PIN), buderusSet, CHANGE);
        testStateBuderus = false;
        lastResetBuderus = millis();
      #ifndef NO_MYS
        send(msgPowerBuderus.set(powerOnBuderus));
      #endif
      #endif
      
        // Relayausgänge initialisiern
        for (int sensor = 1, pin = RELAY_1; sensor <= NUMBER_OF_RELAYS; sensor++, pin++) {
          // Then set relay pins in output mode
          pinMode(pin, OUTPUT);
          // Set relay to last known state (using eeprom storage)
          digitalWrite(pin, RELAY_OFF);
        }
      
        // Dallas Temperatursensoren
        sensors.begin();
        sensors.setWaitForConversion(false);
        numSensors = sensors.getDeviceCount();
        DEBUG_PRINT(F("Dallas Sensoren "));
        DEBUG_PRINTLN(numSensors);
        DeviceAddress tempDeviceAddress; // We'll use this variable to store a found device address
      
        for (int i = 0; i < numSensors; i++)
        {
          wdt_reset();
          // Search the wire for address
          if (sensors.getAddress(tempDeviceAddress, i))
          {
            DEBUG_PRINT(F("Found device "));
      #ifdef EN_DEBUG
            Serial.print(i, DEC);
      #endif
            DEBUG_PRINT(F(" with address: "));
            printAddress(tempDeviceAddress);
            DEBUG_PRINTLN();
      
            DEBUG_PRINT(F("Setting resolution to "));
      #ifdef EN_DEBUG
            Serial.println(TEMPERATURE_PRECISION, DEC);
      #endif
            // set the resolution to 12 bit (Each Dallas/Maxim device is capable of several different resolutions)
            sensors.setResolution(tempDeviceAddress, TEMPERATURE_PRECISION);
      
            DEBUG_PRINT(F("Resolution actually set to: "));
      
      #ifdef EN_DEBUG
            Serial.print(sensors.getResolution(tempDeviceAddress), DEC);
      #endif
            DEBUG_PRINTLN();
          } else {
            DEBUG_PRINT(F("Found ghost device at "));
      
      #ifdef EN_DEBUG
            Serial.print(i, DEC);
      #endif
            DEBUG_PRINT(F(" but could not detect address. Check power and cabling"));
          }
        }
      
        wdt_reset();
        sensors.requestTemperatures();
      
        // query conversion time and sleep until conversion completed
        conversionTime = sensors.millisToWaitForConversion(sensors.getResolution());
      }
      
      /*****************************************************/
      // the loop function runs over and over again forever
      void loop() {
        nowms = millis();
      
      #ifndef NO_MYS
        // If no time has been received yet, request it every 10 second from controller
        // When time has been received, request update every hour
        if ((!timeReceived && (nowms - lastRequest) > (10UL * 1000UL))
            || (timeReceived && (nowms - lastRequest) > (60UL * 1000UL * 60UL))) {
          // Request time from controller.
          DEBUG_PRINTLN("requesting time");
          requestTime();
          lastRequest = nowms;
        }
      #endif
      
        wdt_reset();
      
      #ifndef NO_AC_DETECT
        readAC();
      #endif
      
        readTemp();
        readButtons();
      
        updateDisp();
      
        // Temperaturen senden
      
      #ifndef NO_MYS
        sendTemp();
      #endif
      
        // Kontroller
        control();
      
        // Loop 2x pro Sekunde ist aureichend
        unsigned long loopTime = millis() - nowms;
        if (loopTime < 450) {
      #ifdef NO_MYS
          delay (500 - loopTime);
      #else
          wait (500 - loopTime);
      #endif
        }
      }
      // end loop
      
      /**************************************************************/
      // Steuerung
      void control()
      {
      
        wdt_reset();
      
        static unsigned long lastPumpTest = 0;
        static unsigned long lastRegulation = -REGULATION_TIMEOUT_PUMP;
        static unsigned long resetStart = 0;                     // wann wurde die Rücksetzung des Mischers gestartet
        static bool lastPower = powerOn;
        static float moveSeconds = 0.0;                 // Zeiten für Stellmotor Mischer
      
        // controllerState
        // 0 initialized
        // 1 Pumpe für kurzen test aktiviert, warten auf Timeout für Deaktivierung
        // 2 in der Regelung, warten auf Timeout für Deaktivierung
        // 3 in Ausganglage fahren
      
        static int controllerState = 0;
      
        // Emergency
        if  (lastTemperature[VORLAUF] > MAX_TEMP) {
          if (resetStart == 0) {
            if (relState[PUMPE]) {
              DEBUG_PRINT(F("Zu heiss. Emergency Mischer schliessen"));
              DEBUG_PRINTLN(lastTemperature[VORLAUF]);
            }
            closeMischer();
            controllerState = 0;
            return;
          }
        }
      
      
        // Temperatur noch nicht gelesen;
        if (lastTemperature[VORLAUF] == -100) return;
      
        // Fehler mit den Sensoren
        if ((lastTemperature[VORLAUF] < 0) ||
            (lastTemperature[VORLAUF] > 100) ||
            (lastTemperature[RUECKLAUF] < 0) ||
            (lastTemperature[RUECKLAUF] > 100) ||
            (lastTemperature[ZULAUF] < 0) ||
            (lastTemperature[ZULAUF] > 100)) {
          relState[PUMPE] = false;
          updateRelays();
          ledState[PUMPE] = relState[PUMPE];
          // Test
          //powerOn = false;
      #ifndef NO_MYS
          //send(msgPower.set(powerOn));
      #endif
      
          controllerState = 0;
          DEBUG_PRINTLN(F("Fehler mit den Sensoren, Temperaturen unter 0 oder über 100. Poweroff!"));
          return;
        }
      
        if (resetMischer) {
          DEBUG_PRINTLN(F("Mischer initialisieren"));
          closeMischer();
          resetStart = millis();
          resetMischer = false;
          controllerState = 0;
          return;
        }
      
        if (resetStart > 0) {
          if ((millis() - resetStart) > MISCHER_RESET_TIME) {
            DEBUG_PRINTLN(F("Mischer fertig initialisiert"));
            relState[MISCHER_ZU] = false;
            updateRelays();
            ledState[PUMPE] = relState[PUMPE];
            ledState[MISCHER_ZU] = relState[MISCHER_ZU];
            resetStart = 0;
            controllerState = 0;
          }
          return;
        }
      
        // wenn ausser Betrieb -> verlassen;
        if (powerOn == false) {
          if (lastPower == false) return;
      
          DEBUG_PRINTLN("Go to power off state");
      
      #ifndef NO_MYS
          send(msgPower.set(powerOn));
      #endif
      
          lastPower = false;
          relState[PUMPE] = false;
          relState[MISCHER_ZU] = false;
          relState[MISCHER_AUF] = false;
          updateRelays();
          ledState[PUMPE] = relState[PUMPE];
          ledState[MISCHER_ZU] = relState[MISCHER_ZU];
          ledState[MISCHER_AUF] = relState[MISCHER_AUF];
          controllerState = 0;
          EEPROM.write(EEPROM_POWERSTATE, 0);
          return;
        }
        //DEBUG_PRINTLN("a");
        lastPower = true;
      
        switch (controllerState) {
          case  0:  // Initialisiert
            if (lastTemperature[ZULAUF] < 30) {
              if ((millis() - lastPumpTest) > RETRY_TIMEOUT_PUMP) {
                controllerState = 1;
                lastPumpTest = millis();
                DEBUG_PRINTLN(F("Zulauf zu kalt. Schalte Pumpe für 5 Sekunden ein."));
                relState[PUMPE] = true;
                updateRelays();
                ledState[PUMPE] = relState[PUMPE];
              }
              return;
            }
            //DEBUG_PRINTLN("x");
      
            relState[PUMPE] = true;
            updateRelays();
            ledState[PUMPE] = relState[PUMPE];
      
      
            // nicht regulieren, wenn schon genau genug
            if (abs(lastTemperature[VORLAUF] - targetTemp) <= 1) {
              // DEBUG_PRINTLN("diff zu klein, keine Steuerung notwendig");
              return;
            }
      
      
            if ((millis() - lastRegulation) > REGULATION_TIMEOUT_PUMP) {
              controllerState = 2;
              lastRegulation = millis();
      
              int diffZualaufRuecklauf = lastTemperature[ZULAUF] - lastTemperature[RUECKLAUF];
      
              float actPercent = (float)(lastTemperature[VORLAUF] - lastTemperature[RUECKLAUF]) * 100.0 / (float)diffZualaufRuecklauf;
              float shoulPercent = (float)(targetTemp - lastTemperature[RUECKLAUF]) * 100.0 / (float)diffZualaufRuecklauf;
      
              // 120 Sekunden für ganzen Weg
              moveSeconds = (float)MISCHER_RESET_TIME / 1000.0 / 100.0 * abs(shoulPercent - actPercent);
              DEBUG_PRINT(F("Berechnete Sekunden fuer Mischerumstellung "));
              DEBUG_PRINTLN(moveSeconds);
              if (moveSeconds > 8)
                moveSeconds = 8;
      
              if (targetTemp > lastTemperature[VORLAUF]) {
                DEBUG_PRINTLN(F("Mischer auf"));
                relState[MISCHER_ZU] = false;
                relState[MISCHER_AUF] = true;
                updateRelays();
                ledState[MISCHER_ZU] = relState[MISCHER_ZU];
                ledState[MISCHER_AUF] = relState[MISCHER_AUF];
              }
              else
              {
                DEBUG_PRINTLN(F("Mischer zu"));
                relState[MISCHER_ZU] = true;
                relState[MISCHER_AUF] = false;
                updateRelays();
                ledState[MISCHER_ZU] = relState[MISCHER_ZU];
                ledState[MISCHER_AUF] = relState[MISCHER_AUF];
              }
              return;
            }
            return;
            break;
          case  1: // in Testmodus bei zu wenig  Temp im Zulauf
            if ((millis() - lastPumpTest) > PROBE_TIMEOUT_PUMP) {
              relState[PUMPE] = false;
              updateRelays();
              ledState[PUMPE] = relState[PUMPE];
              DEBUG_PRINTLN(F("Pumpe ausgeschaltet"));
              controllerState = 0;
              lastPumpTest = millis();
            }
            return;
            break;
          case  2: // in der Regelung
            if ((millis() - lastRegulation) > moveSeconds * 1000.0) {
              DEBUG_PRINTLN("Mischer zu.");
              relState[MISCHER_ZU] = false;
              relState[MISCHER_AUF] = false;
              updateRelays();
              ledState[MISCHER_ZU] = relState[MISCHER_ZU];
              ledState[MISCHER_AUF] = relState[MISCHER_AUF];
              lastRegulation = millis();
              controllerState = 0;
            }
            return;
            break;
          default:
            DEBUG_PRINT(F("ERROR, unknown state :"));
            DEBUG_PRINTLN(controllerState);
            controllerState = 0;
            return;
        }
      }
      
      // function to print a device address
      void printAddress(DeviceAddress deviceAddress)
      {
        for (uint8_t i = 0; i < 8; i++)
        {
          if (deviceAddress[i] < 16) DEBUG_PRINT("0");
      
      #ifdef EN_DEBUG
          Serial.print(deviceAddress[i], HEX);
      #endif
        }
      }
      
      void updateRelays() {
        static boolean relayStateReported[8] = { false, false, false, false, false, false, false, false };
      #ifndef NO_MYS
        static unsigned long previousStateMillis[NUMBER_OF_RELAYS] = { 0, 0, 0, 0 };
      #endif
      
        for (int i = 0; i < NUMBER_OF_RELAYS; i++) {
          if (relState[i]) {
            digitalWrite(RELAY_1 + i, RELAY_ON);
          }
          else
          {
            digitalWrite(RELAY_1 + i, RELAY_OFF);
          }
      
      #ifndef NO_MYS
          bool bSend = false;
          if (previousStateMillis[i] == 0) {                               // noch nie gesendet
            bSend = true;
          }
          else if (relayStateReported[i] != relState[i] ) { // Änderungen melden
            bSend = true;
          }
          else if ((millis() - previousStateMillis[i]) > MIN_REPORT_INTERVAL) {
            bSend = true;
          }
      
          if (bSend) {
            // TODO: Check if we want to look at the return value of send
            send(msgStatus.setSensor(i + MAX_ATTACHED_DS18B20).set(relState[i] ? 1 : 0));
            previousStateMillis[i] = millis();
            relayStateReported[i] = relState[i];
          }
      #endif
        }
      }
      
      void updateDisp() {
        static char s[8];
        static unsigned long previousDisplayMillis = 0;
      
        // update display?
        if ((millis() - previousDisplayMillis) > 1000) {
          previousDisplayMillis = millis();
          displayInfo++;
      #ifdef NO_MYS
          if (displayInfo > 4) displayInfo = 0;
      #else
          if (displayInfo > 5) displayInfo = 0;
      #endif
      
      
      
          ledModule.clearDisplay();
          // sind die Temperaturen schon gelesen worden? Wenn nicht, abbrechen.
          if (lastTemperature[0] == -100) return;
      
          for (byte i = 0; i <= 7; i++) {
            if (ledState[i])
              ledModule.setLED(1, i);
            else
              ledModule.setLED(0, i);
          }
      
          // 0 Vorlauf, 1 Rücklauf, 2 Zulauf, 3 Sollwert
          switch (displayInfo) {
            case 0: // Vorlauf
              sprintf(s, "Vor %2i",  lastTemperature[VORLAUF]);
              break;
            case 1: // Rücklauf
              sprintf(s, "Rue %2i",  lastTemperature[RUECKLAUF]);
              break;
            case 2: // Zulauf
              sprintf(s, "Zu %2i",  lastTemperature[ZULAUF]);
              break;
            case 3: // Zielwert
              sprintf(s, "Soll %2i",  targetTemp);
              break;
            case 4: // Power
              if (powerOn) {
                sprintf(s, "PowerOn");
              }
              else {
                sprintf(s, "PowerOff");
              }
              break;
      #ifndef NO_MYS
            case 5: //clock
              TimeChangeRule *tcr;
              time_t utc = millis();
              time_t t = CE.toLocal(utc, &tcr);
              unsigned long dispTime = hour(t) * 100 * 100 + minute(t) * 100 + second(t);
              if (hour(t) < 10) {
                sprintf(s, "U 0%lu",  dispTime);
              }
              else
              {
                sprintf(s, "U %lu",  dispTime);
              }
              break;
      #endif
          }
      
          ledModule.setDisplayToString(s);
        }
      }
      
      void closeMischer() {
        relState[PUMPE] = false;
        relState[MISCHER_ZU] = true;
        relState[MISCHER_AUF] = false;
        updateRelays();
        ledState[PUMPE] = relState[PUMPE];
        ledState[MISCHER_ZU] = relState[MISCHER_ZU];
        ledState[MISCHER_AUF] = relState[MISCHER_AUF];
      }
      
      
      #ifndef NO_MYS
      
      void before()
      {
      
      }
      
      // 0 Vorlauf, 1 Rücklauf, 2 Zulauf
      void presentation() {
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("Mischer Node", "1.1");
      
        // Fetch the number of attached temperature sensors
        numSensors = sensors.getDeviceCount();
        DEBUG_PRINT(F("Numsensors "));
        DEBUG_PRINTLN(numSensors);
      
        // Present all sensors to controller
        for (int i = 0; i < numSensors && i < MAX_ATTACHED_DS18B20; i++) {
          present(i, S_TEMP);
        }
      
        for (int sensor = MAX_ATTACHED_DS18B20, pin = RELAY_1; sensor < (MAX_ATTACHED_DS18B20 + NUMBER_OF_RELAYS); sensor++, pin++) {
          // Register all sensors to gw (they will be created as child devices)
          present(sensor, S_BINARY);
        }
      
        // Thermopunkt
        present(MAX_ATTACHED_DS18B20 + NUMBER_OF_RELAYS, S_HVAC);
      
        // Power
        present(MAX_ATTACHED_DS18B20 + NUMBER_OF_RELAYS + 1, S_HEATER);
      
      #ifndef NO_AC_DETECT
        // AC Buderuus
        present(MAX_ATTACHED_DS18B20 + NUMBER_OF_RELAYS + 2, S_BINATY);
      #endif
      
        // Power
        present(MAX_ATTACHED_DS18B20 + NUMBER_OF_RELAYS + 3, S_INFO);
      
        // Initialltemperatur mitteilen
        send(msgTargetTemp.set(targetTemp));
        send(msgPower.set(powerOn));
      }
      
      
      void receive(const MyMessage & message)
      {
        DEBUG_PRINT(F("Meldung an Sensor "));
        DEBUG_PRINT(message.sensor);
        DEBUG_PRINT(F(" mit type "));
        DEBUG_PRINTLN(message.type);
        if (message.type == V_STATUS) {
          int i = message.sensor - MAX_ATTACHED_DS18B20;
          if ((i >= 0) && (i < NUMBER_OF_RELAYS)) {
            DEBUG_PRINT(F("Schaltbefehl für Relay "));
            DEBUG_PRINT(i);
            DEBUG_PRINT(F(" auf "));
            DEBUG_PRINTLN(message.getBool());
            relState[i] = message.getBool();
            ledState[i] = relState[i];
          }
          else if (i == MAX_ATTACHED_DS18B20 + NUMBER_OF_RELAYS + 1) {
            powerOn = message.getBool();
            send(msgPower.set(powerOn));
      
            if (powerOn)
              EEPROM.write(EEPROM_POWERSTATE, 1);
            else
              EEPROM.write(EEPROM_POWERSTATE, 0);
      
            if (powerOn == false) {
              relState[PUMPE] = false;
              ledState[POWERLED] = false;
              DEBUG_PRINTLN(F("Befehl für PowerOff"));
            }
            else {
              ledState[POWERLED] = true;
              DEBUG_PRINTLN(F("Befehl für PowerOn"));
            }
          }
      
          updateRelays();
        }
        else if (message.type == V_HVAC_SETPOINT_HEAT) {
          if (message.sensor == (MAX_ATTACHED_DS18B20 + NUMBER_OF_RELAYS)) {
            targetTemp = message.getInt();
            DEBUG_PRINT(F("Zieltemp gesetzt auf "));
            DEBUG_PRINTLN(targetTemp);
            if (targetTemp > MAX_TEMP) targetTemp = START_TARGET_TEMP;
            if (targetTemp < 20) targetTemp = 20;
            send(msgTargetTemp.set(targetTemp));
          }
        }
      }
      
      // This is called when a new time value was received
      void receiveTime(unsigned long controllerTime) {
        // Ok, set incoming time
        DEBUG_PRINT(F("Time value received: "));
        DEBUG_PRINTLN(controllerTime);
      #ifndef NO_RTC
        RTC.set(controllerTime);
        else
          setTime(controllerTime);
      #endif
        timeReceived = true;
      }
      
      void sendTemp() {
        static int lastSentTemperature[MAX_ATTACHED_DS18B20] = { -100, -100, -100 };
        static unsigned long previousTempMillis[MAX_ATTACHED_DS18B20] = { 0, 0, 0 };
      
        for (int i = 0; i < MAX_ATTACHED_DS18B20 ; i++) {
          if (lastTemperature[i] != -100) {
            bool bSend = false;
            if (previousTempMillis[i] == 0) {                               // noch nie gesendet
              bSend = true;
            }
            else if (abs(lastSentTemperature[i] - lastTemperature[i]) >= 2) { // Differenz von >= zwei Grad werden gemeldet
              bSend = true;
            }
            else if ((millis() - previousTempMillis[i]) > MIN_REPORT_INTERVAL) {
              bSend = true;
            }
      
            if (bSend) {
              // TODO: Check if we want to look at the return value of send
              send(msgTemp.setSensor(i).set(lastTemperature[i], 1));
              previousTempMillis[i] = millis();
              lastSentTemperature[i] = lastTemperature[i];
            }
          }
        }
      }
      #endif
      
      #ifndef NO_AC_DETECT
      void buderusSet() {
        testStateBuderus = true;
      }
      #endif
      
      void reboot() {
        wdt_enable(WDTO_30MS);
        while (1) {};
      }
      
      void readButtons() {
      
        byte buttons = ledModule.getButtons();
      
        if (lastButtonState != buttons) {
          lastButtonState = buttons;
          if (buttons > 0) {
            for (byte i = 0; i <= 7; i++) {
              if ((buttons >> i) & 1) {
                ledState[i] = !ledState[i];
                if (i < NUMBER_OF_RELAYS) relState[i] = ledState[i];
                updateRelays();
                if (ledState[i])
                  ledModule.setLED(1, i);
                else
                  ledModule.setLED(0, i);
                if (i == POWERLED) {
                  powerOn = ledState[i];
      #ifndef NO_MYS
                  send(msgPower.set(powerOn));
      #endif
                  if (powerOn)
                    EEPROM.write(EEPROM_POWERSTATE, 1);
                  else
                    EEPROM.write(EEPROM_POWERSTATE, 0);
      
                }
      
                if (i == TEMPDOWNLED) {
                  targetTemp--;
                  if (targetTemp < 30) targetTemp = 30;
                  EEPROM.write(EEPROM_TARGET_TEMP, targetTemp);
                }
                if (i == TEMPUPLED) {
                  targetTemp++;
                  if (targetTemp > MAX_TEMP) targetTemp = MAX_TEMP;
                  EEPROM.write(EEPROM_TARGET_TEMP, targetTemp);
                }
                DEBUG_PRINT(F("ButtonState changed "));
                DEBUG_PRINTLN(i);
              }
            }
          }
        }
      }
      
      void readTemp() {
        static float temp;
        static int tempi;
        static unsigned long lastReadTemp1 = -1;
        static unsigned long lastReadTemp2 = -1;
        static unsigned long lastReadTemp3 = -1;
      
        if (previousTempMillis == -1) {
          // Dallas
          sensors.requestTemperatures();
          previousTempMillis = nowms;
        }
      
        if ((millis() - previousTempMillis) >= conversionTime) {
          temp = sensors.getTempC(Probe01);
          if (temp != DEVICE_DISCONNECTED_C) {
            tempi = (int)(temp + 0.5);
            lastTemperature[VORLAUF] = tempi;
            lastReadTemp1 = nowms;
          }
      
          if (temp != DEVICE_DISCONNECTED_C) {
            temp = sensors.getTempC(Probe02);
            tempi = (int)(temp + 0.5);
            lastTemperature[RUECKLAUF] = tempi;
            lastReadTemp2 = nowms;
          }
      
          if (temp != DEVICE_DISCONNECTED_C) {
            temp = sensors.getTempC(Probe03);
            tempi = (int)(temp + 0.5);
            lastTemperature[ZULAUF] = tempi;
            lastReadTemp3 = nowms;
          }
      
          if (nowms > 60000) {    // ersta nach einer minute prüfen
            unsigned long compare = nowms - 60000; // vor 1 Minute
            if ((lastReadTemp1 < compare) || (lastReadTemp2 < compare) || (lastReadTemp3 < compare)) {
              DEBUG_PRINTLN(F("Zu lange keine Temeratur -> reset"));
              lastReadTemp1 = -1;
              lastReadTemp2 = -1;
              lastReadTemp3 = -1;
              ledModule.setDisplayToString(F("ERR Reb"));
              delay(1000);
              reboot();
            }
          }
      
          previousTempMillis = -1;
        }
      
      #ifdef SIMULATE_VOR
        lastTemperature[VORLAUF] = SIMULATE_VOR;
        lastReadTemp1 = nowms;
      #endif
      
      #ifdef SIMULATE_RUE
        lastTemperature[RUECKLAUF] = SIMULATE_RUE;
        lastReadTemp3 = nowms;
      #endif
      
      #ifdef SIMULATE_ZU
        lastTemperature[ZULAUF] = SIMULATE_ZU;
        lastReadTemp3 = nowms;
      #endif
      }
      
      #ifndef NO_AC_DETECT
      
      void readAC() {
        if ((millis() - lastResetBuderus) > 100) // bei 50 HZ sind das 25 Durchgänge...
        {
          noInterrupts();
          if (testStateBuderus != powerOnBuderus ) {
            powerOnBuderus = testStateBuderus;
            testStateBuderus = false;
            interrupts();
            ledState[BUDERUSLED] = powerOnBuderus;
      #ifndef NO_MYS
            send(msgPowerBuderus.set(powerOnBuderus));
      #endif
          }
          lastResetBuderus = nowms;
          testStateBuderus = false;
        } else
          interrupts();
      }
      #endif
      
      posted in Troubleshooting
      FotoFieber
      FotoFieber
    • RE: rewards for sharing

      @NeverDie
      Thx very much! Just ordered some other boards.

      posted in General Discussion
      FotoFieber
      FotoFieber
    • RE: rewards for sharing

      @NeverDie
      I really like the "RFM69HW interstitial board for Pro Mini Temp-Humidity sensor" and ordered from OSH park last year. They arrived soon.

      Now I had to use pcb.io, as there don't seem to be all the files on openhardware.io

      I ordered on 28. of december and they are still in fabrication.... quite frustrating if I compare the service to OSH park. And the other manufacturers are to expensive (delivery to switzerland).

      Please add all the necessary files to openhardware.io, I don't think that it is open now, as the gerber files are missing and I can't choose to order, where I wan't.

      posted in General Discussion
      FotoFieber
      FotoFieber