Note that you can make use of any MAX485 module that is suitable for the arduino (5V). Basically they are all the same except for a few minor tweaks like LEDs or other non relevant stuff.
Posts made by Heinz
- 
    RE: Sensor for Vallox DigitSE RS485 ventilation system with integration into FHEM.posted in My Project
- 
    RE: Sensor for Vallox DigitSE RS485 ventilation system with integration into FHEM.posted in My ProjectWell basically the part list is very simple 1x Arduino Mega 2560 
 1x NRF24L01+
 1x Pushbutton
 2x MAX485 Module TTL Switch Module (one for sender, one for receiver)
 (e.g. https://protosupplies.com/product/max485-ttl-to-rs-485-interface-module/)The 1x Resistor 120Ohms is only neccessary if not already mounted on the MAX485 Module. It depends on what module 
 you bought. So have a look at the layout and check if there is a 120Ohms resistor mounted between pins A and B.
 The module (https://protosupplies.com/product/max485-ttl-to-rs-485-interface-module/) already contains that resistor.Optionally you can add a capacitor between + and - to stabilize the voltage level if your power supply is a weak one. 
 Anyone will do like 10uF, 100uF...
- 
    RE: Sensor for Vallox DigitSE RS485 ventilation system with integration into FHEM.posted in My ProjectOk ... after my holidays. 
- 
    RE: Sensor for Vallox DigitSE RS485 ventilation system with integration into FHEM.posted in My ProjectHi @captaindork 
 sorry for delay,.... the position of the damper (which is the bypass) is indicated through a single bit of the multi purpose IO-Port 2. The library defines that as property 38 DamperMotorPositionProperty.
 In the mysensors example it is published as
 const uint8_t DAMPER_MOTOR_POSITION = 42;
 The value is either 1 or 0.I mapped it in FHEM as follows attr MYSENSOR_Vallox mapReading_DamperMotorPosition 42 value1define MYSENSOR_Vallox_DamperMotorPosition dummy attr MYSENSOR_Vallox_DamperMotorPosition alias WRG-Bypass attr MYSENSOR_Vallox_DamperMotorPosition devStateIcon 1:rc_GREEN 0:rc_BLANK attr MYSENSOR_Vallox_DamperMotorPosition event-on-update-reading state attr MYSENSOR_Vallox_DamperMotorPosition group Status attr MYSENSOR_Vallox_DamperMotorPosition icon vent_bypass attr MYSENSOR_Vallox_DamperMotorPosition room Lüftung attr MYSENSOR_Vallox_DamperMotorPosition sortby 3 define MYSENSOR_Vallox_DamperMotorPosition_Notify notify MYSENSOR_Vallox:DamperMotorPosition:.* { my $d = sprintf ("%.0f", ReadingsVal("MYSENSOR_Vallox","DamperMotorPosition", 0));; fhem("set MYSENSOR_Vallox_DamperMotorPosition $d");;} define MYSENSOR_Vallox_DamperMotorPosition_Notify2 at +*00:01:00 { my $d = sprintf "%.0f", ReadingsVal("MYSENSOR_Vallox","DamperMotorPosition", 0);; fhem("set MYSENSOR_Vallox_DamperMotorPosition $d");;}
- 
    RE: Bosch BME680 Sensorposted in My Project@sm_ali 
 You can have a look at this lib here
 https://raw.githubusercontent.com/DFRobot/DFRobot_BME680/master/bme680.cthere is code that handles the calib thing 
- 
    RE: Air quality nodeposted in General Discussion@neverdie same with me. I gave up using the BME680 for the same reasons you have. It is cheap and offers 4 readings in one chip but can not be really used with a small microcontroller like arduino nano or the sensebender micro as Bosch does all the drift compensation using software that requires large memory. 
 I believe theis chip was meant to be used in smartphones instead of homeautomation sensors.
 I will order a SGP30 today. Thanks for pointing into that direction...
 Gr Heinz
- 
    RE: Bosch BME680 Sensorposted in My Project@alexsh1 
 No I am not using the BSEC library. I read the raw values of the resistance and calculate the first derivative for triggering the ventilation system. The ventilation system is turned on, when
 (delta resistance)/minute > thresholdSometimes the ventilation is also triggered when I open my fridge. Then the smell of food coming out of the fridge also fires the trigger. It is said that the sensor is very sensitive to any kind of silicone which is basically everywhere in the air when you have dishes created from silicone in your kitchen. Silicone poisens/blinds the sensor immediately for several hours. 
 So be careful when making experiments with it.
- 
    RE: Bosch BME680 Sensorposted in My ProjectI like the BME680 sensor as it has a very low power consumption. But it has also some disadvantages that have impact on the application and the environment it should be used. 
 As far as I know the sensor was developed to be used in mobile phones or smart watches. Those devices are exposed to "fresh air" almost every day which makes it possible to estimate the air quality from the resistante of the sensor. The resistance of the sensor increases over the weeks and months as the internal chemical layer is exhausted or used up depending on the environment it is exposed to. The fading of the resistance can be compensated through smart algorithms that work on historical data (see post above). When the sensor is exposed to "fresh air" once a day, the algorithm can use this value as a kind of reference value to estimate the air quality index.
 But if you want to use this sensor for indoor applications, where the environment is very constant or changing very slowly, then I doubt that the algorithm is able to calculate an exact value for the air quality index.
 Knowing this means that you can use the sensor resistance also without the BSEC library and with your own simplified algorithm when "recalibration with fresh air" is done sometimes on your own. Another useful application could also be an outdoor weather station where the sensor is exposed to fresh air most of the time.
 All in all it is a cool product as it offers other measurements, too which spares hardware and minimizes the costs. In addition to that you can change the meaurement parameters of the sensor on your own as a good user manual of the sensor is also available.I am using the sensor in my kitchen to detect when someone is cooking. In this case I am not interested in the absolute resistance, but in the change over time. If the air quality gets worse in a very short time (resistance change per minute), then I can activate the ventilation system. The same could be done on the toilet  best regards Heinz 
- 
    RE: [Solved] Help: gateway is sometimes receiving wrong valuesposted in Bug ReportsStudying the log files of the night I found one damaged value 2017-11-04_23:02:43 MYSENSOR_BME680_R 33597 Ohm 
 2017-11-04_23:02:53 MYSENSOR_BME680_R 33760 Ohm
 2017-11-04_23:03:04 MYSENSOR_BME680_R 33814 Ohm
 2017-11-04_23:03:25 MYSENSOR_BME680_R 33705 Ohm
 2017-11-04_23:03:25 MYSENSOR_BME680_R 2164818857 Ohm
 2017-11-04_23:03:36 MYSENSOR_BME680_R 33814 Ohm
 2017-11-04_23:03:46 MYSENSOR_BME680_R 33869 Ohm
 2017-11-04_23:04:07 MYSENSOR_BME680_R 33624 Ohm
 2017-11-04_23:04:49 MYSENSOR_BME680_R 33924 OhmWell, exchanging the radio improved the situation significantly, but unfortunately the problem might be still there.... 
- 
    RE: [Solved] Help: gateway is sometimes receiving wrong valuesposted in Bug ReportsOk, it seems that I found the cause of the problem: after changing the radio everything works as expected: Here the green line with sporadic wrong values: 
  And here the result with a new radio: 
  --> SOLVED 
- 
    RE: [Solved] Help: gateway is sometimes receiving wrong valuesposted in Bug ReportsI am not using the beta but the standard 2.0.0 release 
- 
    RE: [Solved] Help: gateway is sometimes receiving wrong valuesposted in Bug ReportsArduino uno with Ethernet 
 https://forum.mysensors.org/uploads/upload-2ceff83a-1538-4fd4-816d-d3cfef6e0c06.JPGmysensors 2.0 
- 
    RE: [Solved] Help: gateway is sometimes receiving wrong valuesposted in Bug ReportsThen I will exchange the radio... 
- 
    RE: [Solved] Help: gateway is sometimes receiving wrong valuesposted in Bug ReportsYes the left one is printed directly from the sensor node. 
 Why does it look corrupted from the start???The value to be transmitted is an uint32_t which represents a resistance in Ohm. 
 On the left side the values are ok, but the value received from the gateway is sometimes a very large one.
 This occurs sporadically 1-3 times per hour. The value should be transfered every 10 seconds.All other nodes here in my home work very well. Only this one makes problems. 
 Adruino Uno, NRF, BME680 breakoutboard from watterott (http://www.watterott.com/de/BME680-Breakout) via I2C.The strange thing is that not only the value is damaged, but also the type. 
 Sketch can be found here:
 https://github.com/windkh/mysensors/tree/master/BME680Sensor
- 
    RE: [Solved] Help: gateway is sometimes receiving wrong valuesposted in Bug ReportsNobody who can explain the jammed data on 16:21:30? 
 What happens if two sensors send data at the same time?
- 
    [Solved] Help: gateway is sometimes receiving wrong valuesposted in Bug ReportsHi maybe someone can help me with a strange problem. 
 I noticed that one of my sensors sent wrong values (very high ones).
 So I added some serial prints in the sketch and connected the MysController to log the values received from the gateway.Here is a picture where you can see the comparision between the output of the sensor 103 and the received values: 
  The red rectangles show the inconsistent values, while the blue value can not be found at all. 
 The green rectangle seems to be an unexpected type: S_TEMP was received, but S_AIR_QUALITY was expected.The following screenshot is the raw data from the sam scenario: 
  The value I am sending is of type uint32_t: 
 MyMessage resistanceMsg(CHILD_ID_RESISTANCE, V_LEVEL);
 present(CHILD_ID_RESISTANCE, S_AIR_QUALITY);
 send(resistanceMsg.set(lastResistance)Any suggestions what went wrong here??? 
- 
    Bosch BME680 Sensorposted in My ProjectI just created a sketch for controlling a BME680 sensor via I2C. 
 For the ones who are interested in it, the sketch can be downloaded at:
 https://github.com/windkh/mysensors/tree/master/BME680SensorRight now only the gas resistance value is transmitted as the air quality value (IAQ) can only be calculated when you make use of the closed source library from Bosch (which is by the way only available for ARM, X86, ...) The pressure is, like on the BME280 ,an absolute value. The sketch calculates the sealevel pressure from it. I am using the breakout board from watterott which can be found here: 
 https://github.com/watterott/BME680-BreakoutRight now you have to download this library in order to be able to compiile the sketch: 
 https://github.com/windkh/BME680_Breakout
 This fork replaces the original I2C read and write routines from https://github.com/vicatcu/BME680_Breakout.Wiring: 
 I am using a standard Arduino Uno with Radio attached to the standard pins with the mysensors 2.0 lib.
 To connect the breakout-board you need 4 wires:Breakout --> Arduino 
 GND - GND
 NC
 VCC - 3.3V
 SCL - A5
 SDA - A4
 SDO
 CSThe chip supports SPI and I2C. I used SCL and SDA for I2C and left SDO and CS disconnected. The next steps will be making the air quality values useful by finding an appropriate algorithm... stay tuned. 
- 
    RE: 💬 Atmospheric Pressure Sensorposted in AnnouncementsWhich altitude did you enter, or at which sealevel do you live (in meters)? const float ALTITUDE = 688; // <-- adapt this value to your own location's altitude.The pressure of 728 hPa is a bit strange as it should be around 1000 hPa. In my eyes you threw out the code to correct the pressure depending on the sealevel of your home. See the code from my sketch: float pressure = bmp.seaLevelForAltitude(SEALEVEL, absolutePressure);Here you can download the sketch I am using: 
 https://github.com/windkh/mysensors/blob/master/WeatherStationSensor/WeatherStationSensor.inoThe forecast will be unknown for at least 30minutes, because the sensor needs that time to detect a weather trend. 
- 
    RE: Sensor for Vallox DigitSE RS485 ventilation system with integration into FHEM.posted in My ProjectThe "no reply" message is from the mysensors library, but I don't know what it means. 
 The line "started cyclic update timer" indicates that the sensor initialized successfully, but it is missing in your output.My latest code is online at 
 https://github.com/windkh/valloxserial/blob/master/examples/mysensors/ValloxSensor.ino
- 
    RE: Sensor for Vallox DigitSE RS485 ventilation system with integration into FHEM.posted in My ProjectHi, 
 here is my output:Opening port Port open Starting repeater (RNNRA-, 2.0.0) TSM:INIT TSM:RADIO:OK TSP:ASSIGNID:OK (ID=100) TSM:FPAR TSP:MSG:SEND 100-100-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: TSP:MSG:READ 1-1-100 s=255,c=3,t=8,pt=1,l=1,sg=0:1 TSP:MSG:FPAR RES (ID=1, dist=1) TSP:MSG:PAR OK (ID=1, dist=2) TSP:MSG:READ 0-0-100 s=255,c=3,t=8,pt=1,l=1,sg=0:0 TSP:MSG:FPAR RES (ID=0, dist=0) TSP:MSG:PAR OK (ID=0, dist=1) TSP:MSG:READ 104-104-100 s=255,c=3,t=8,pt=1,l=1,sg=0:1 TSP:MSG:FPAR RES (ID=104, dist=1) TSP:MSG:READ 1-1-100 s=255,c=3,t=8,pt=1,l=1,sg=0:1 TSP:MSG:FPAR RES (ID=1, dist=1) TSM:FPAR:OK TSM:ID TSM:CHKID:OK (ID=100) TSM:UPL TSP:PING:SEND (dest=0) TSP:MSG:SEND 100-100-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1 TSP:MSG:READ 0-0-100 s=255,c=3,t=25,pt=1,l=1,sg=0:1 TSP:MSG:PONG RECV (hops=1) TSP:CHKUPL:OK TSM:UPL:OK TSM:READY TSP:MSG:SEND 100-100-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100 !TSP:MSG:SEND 100-100-0-0 s=255,c=0,t=18,pt=0,l=5,sg=0,ft=0,st=fail:2.0.0 TSP:MSG:SEND 100-100-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=1,st=ok:0 TSP:MSG:READ 0-0-100 s=255,c=3,t=6,pt=0,l=1,sg=0:M TSP:MSG:SEND 100-100-0-0 s=255,c=3,t=11,pt=0,l=15,sg=0,ft=0,st=ok:Vallox Digit SE TSP:MSG:SEND 100-100-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=ok:2.5 TSP:MSG:SEND 100-100-0-0 s=0,c=0,t=4,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=1,c=0,t=6,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=2,c=0,t=6,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=3,c=0,t=6,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=4,c=0,t=6,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=5,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=6,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=7,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=8,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=9,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=10,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=11,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=12,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=13,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=14,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=15,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=24,c=0,t=4,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=25,c=0,t=4,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=26,c=0,t=4,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=27,c=0,t=4,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=28,c=0,t=4,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=29,c=0,t=4,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=30,c=0,t=4,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=31,c=0,t=4,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=32,c=0,t=4,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=33,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=34,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=35,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=36,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=37,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=38,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=39,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=40,c=0,t=4,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=41,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=42,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=43,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=44,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=45,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=46,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=47,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=48,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: TSP:MSG:SEND 100-100-0-0 s=49,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=ok: Started cyclic update timer. Request registration... TSP:MSG:SEND 100-100-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=ok:2 TSP:MSG:READ 0-0-100 s=255,c=3,t=27,pt=1,l=1,sg=0:1 Node registration=1 Init complete, id=100, parent=0, distance=1, registration=1 Dropped 0 Received telegram from 21->11 command=0 arg=A3 Received telegram from 11->21 command=A3 arg=29 Property 200 changed 41 Power state 1 TSP:MSG:SEND 100-100-0-0 s=8,c=1,t=2,pt=2,l=2,sg=0,ft=0,st=ok:1 CO2 adjust state 0 TSP:MSG:SEND 100-100-0-0 s=9,c=1,t=2,pt=2,l=2,sg=0,ft=0,st=ok:0 Humidity adjust state 0 TSP:MSG:SEND 100-100-0-0 s=10,c=1,t=2,pt=2,l=2,sg=0,ft=0,st=ok:0 Heating state 1 TSP:MSG:SEND 100-100-0-0 s=11,c=1,t=2,pt=2,l=2,sg=0,ft=0,st=ok:1 Filter guard indicator 0 TSP:MSG:SEND 100-100-0-0 s=12,c=1,t=24,pt=2,l=2,sg=0,ft=0,st=ok:0 Heating indicator 1 TSP:MSG:SEND 100-100-0-0 s=13,c=1,t=24,pt=2,l=2,sg=0,ft=0,st=ok:1 Fault indicator 0 TSP:MSG:SEND 100-100-0-0 s=14,c=1,t=24,pt=2,l=2,sg=0,ft=0,st=ok:0 Serivce reminder indicator 0 TSP:MSG:SEND 100-100-0-0 s=15,c=1,t=24,pt=2,l=2,sg=0,ft=0,st=ok:0 Received telegram from 21->11 command=0 arg=29 Received telegram from 11->21 command=29 arg=1 Received telegram from 21->11 command=0 arg=35 Received telegram from 11->21 command=35 arg=9D Temp incomming 19 TSP:MSG:SEND 100-100-0-0 s=4,c=1,t=0,pt=2,l=2,sg=0,ft=0,st=ok:19 Received telegram from 21->11 command=0 arg=71 Received telegram from 11->21 command=71 arg=0 Received telegram from 21->11 command=0 arg=A3 Received telegram from 11->21 command=A3 arg=29This is the output of the mysensors 2.0 version which can be downloaded from 
 https://github.com/windkh/mysensors/tree/master/ValloxSensorI wonder why your node has id=0. 
- 
    RE: 💬 Atmospheric Pressure Sensorposted in AnnouncementsI just ordered one at ebay... 
 Nice to see that other weatherstations make use of this code.
- 
    Sensebender Micro + BMP085 Module: Power Consumptionposted in HardwareHi, 
 I intend to attach a BMP085 Module (http://www.ebay.com/itm/Replace-BMP085-5Pin-3-3V-5V-BMP180-Digital-Barometric-Pressure-Sensor-Module-/182056609374?hash=item2a636b665e:g:CU8AAOSwvg9XeI9z) to a SensebenderMicro.
 As the module contains a power regulator which converts 5V to 3.3V for the BMP085 I would like to feed the battery supplied voltage directly to the 3.3V pin (simply to bypass the regulator).- 
Will the regulator drain my batteries through the 3.3V pin (although the 5V pin is not connected)? 
- 
Does the BMP085 chip need a regulated voltage to be accurate or will the sensor provide exact measurements if the voltage of the batteries drops below 3.0V? 
 Anyone has an idea? 
- 
- 
    RE: Sensor for Vallox DigitSE RS485 ventilation system with integration into FHEM.posted in My ProjectAh ok I see. Probably you can get some help in the fhem forum. I also thought about doing this using a raspi... you could use the library to write a standalone exe which reads the serial stuff from usb and sets the values in fhem using the webinterface. 
- 
    RE: Sensor for Vallox DigitSE RS485 ventilation system with integration into FHEM.posted in My ProjectYou can use this rs485 to usb adapter to control the vallox device, no problem there. But do you intend to use your windows pc as controller then? Or do you want to use the stick directly with fhem? this would require some software which takes the serial telegrams and imports the values into fhem... or any other homeautomation controller. 
- 
    RE: Weather stationposted in Troubleshooting@Dylano the sketch in this thread is from @NBM, if you mean 
 https://github.com/windkh/mysensors/blob/master/WeatherStationSensor/WeatherStationSensor.ino
 then this one is working very well.This one is the official mysensors example 
 https://github.com/mysensors/Arduino/blob/development/libraries/MySensors/examples/WeatherStationSensor/WeatherStationSensor.ino
- 
    RE: Weather stationposted in TroubleshootingA function is missing in your case: void incomingMessage(const MyMessage &message){}
- 
    RE: Weather stationposted in TroubleshootingThe BMP085 and the DHT have both a temperature: lastTemp of both sketches collide! 
 Have a look at this sketch which is a merge of a BMP085 and a DHT
 https://github.com/windkh/mysensors/blob/master/WeatherStationSensor/WeatherStationSensor.ino
- 
    RE: Weather stationposted in TroubleshootingWiring is shown here 
 http://www.mysensors.org/build/pressureThe child ids of BARO and LIGHT are both 2 in your sketch. 
- 
    RE: Riotsposted in General DiscussionThe greatest thing about mysensors is, that it can be combined with almost any home-automation controller. That was the reason for me to have a closer look at it. I will be able to reuse my whole sensor network when I will exchange my controller in future. Riot would be interesting for me if the hardware is cheap and if there would be a nice housing for the babies, and ofcourse if it would be compatible to mysensors. 
- 
    RE: Riotsposted in General Discussion@samulist 
 The main difference is, that there is already a large community around mysensors. 
- 
    RE: Riotsposted in General DiscussionLooks very similar, though that mother unit seems to be a gateway and a controller, or? 
- 
    RE: Air Quality Sensorposted in HardwareMQ-135 with 10k results in a R0 of around 360 in my environment. So you could start experimenting with values around 300-500. I had to use a voltage regulator to get reliable values from the sensor. 
- 
    RE: Sensebender Microposted in Announcements@nivoc 
 I can confirm your results: I am running two different sensors in the same room next to each other. The sensebender is always above the dht-22. Right now it is
 52% to 47.8% rel. humidity, while the temperature is 17.8 to 17.9 (which is nearly equal).
- 
    Data stored in the EEPROMposted in DevelopmentChatting about storing data into the EEPROM with @paqor I got a little bit curious what the mysensors library stores into that EEPROM so I wrote a little function for dumping that data. I tested it with the 1.4 version of the library: void DumpMySensorsEepromData() { Serial.println("Dumping MySensors EEPROM:"); Serial.println(""); Serial.print("Node id: "); Serial.println(EEPROM.read(EEPROM_NODE_ID_ADDRESS)); Serial.print("Parent node id: "); Serial.println(EEPROM.read(EEPROM_PARENT_NODE_ID_ADDRESS)); Serial.print("Distance: "); Serial.println(EEPROM.read(EEPROM_DISTANCE_ADDRESS)); Serial.println(""); // child --> route Serial.println("Routing information: "); for (int route = EEPROM_ROUTES_ADDRESS; route < EEPROM_CONTROLLER_CONFIG_ADDRESS; route++) { int child = route - EEPROM_ROUTES_ADDRESS; uint8_t destination = EEPROM.read(route); if (destination != 0xff) { Serial.print(child); Serial.print(" --> "); Serial.print(destination); Serial.println(""); } } Serial.println(""); // metric imperial Serial.println("Controller config: "); uint8_t isMetric = EEPROM.read(EEPROM_CONTROLLER_CONFIG_ADDRESS); if (isMetric == 0xFF) { Serial.println("is metric"); } else { Serial.println("is imperial"); } Serial.println(""); Serial.println("Controller config raw data: "); for (int config = EEPROM_CONTROLLER_CONFIG_ADDRESS; config < EEPROM_FIRMWARE_TYPE_ADDRESS; config++) { Serial.print(EEPROM.read(config)); Serial.print(", "); if ((config - EEPROM_CONTROLLER_CONFIG_ADDRESS + 1) % 8 == 0) { Serial.println(""); } } Serial.println(""); Serial.print("Firmware Type: "); Serial.print(EEPROM.read(EEPROM_FIRMWARE_TYPE_ADDRESS + 0)); Serial.print(", "); Serial.println(EEPROM.read(EEPROM_FIRMWARE_TYPE_ADDRESS + 1)); Serial.print("Firmware Version: "); Serial.print(EEPROM.read(EEPROM_FIRMWARE_BLOCKS_ADDRESS + 0)); Serial.print(", "); Serial.println(EEPROM.read(EEPROM_FIRMWARE_BLOCKS_ADDRESS + 1)); Serial.print("Firmware Blocks: "); Serial.print(EEPROM.read(EEPROM_FIRMWARE_VERSION_ADDRESS + 0)); Serial.print(", "); Serial.println(EEPROM.read(EEPROM_FIRMWARE_VERSION_ADDRESS + 1)); Serial.print("Firmware CRC: "); Serial.print(EEPROM.read(EEPROM_FIRMWARE_CRC_ADDRESS + 0)); Serial.print(", "); Serial.println(EEPROM.read(EEPROM_FIRMWARE_CRC_ADDRESS + 1)); Serial.println(""); Serial.print("Start of local user config is at address: "); Serial.println(EEPROM_LOCAL_CONFIG_ADDRESS); Serial.println(""); Serial.println("Local user data: "); for (int localConfig = EEPROM_LOCAL_CONFIG_ADDRESS; localConfig < EEPROM_LOCAL_CONFIG_ADDRESS + 255; localConfig++) { Serial.print(EEPROM.read(localConfig)); Serial.print(", "); if ((localConfig - EEPROM_LOCAL_CONFIG_ADDRESS + 1) % 8 == 0) { Serial.println(""); } } Serial.println(""); }The output looks as follows: Dumping MySensors EEPROM: Node id: 1 
 Parent node id: 0
 Distance: 1Routing information: 
 0 --> 0
 1 --> 1
 2 --> 100
 5 --> 101
 65 --> 101
 100 --> 100
 101 --> 101
 102 --> 102
 104 --> 100
 105 --> 105
 106 --> 106
 107 --> 107
 108 --> 108
 109 --> 109
 110 --> 110
 111 --> 111
 112 --> 112
 129 --> 101
 243 --> 243Controller config: 
 is imperialController config raw data: 
 1, 255, 255, 255, 255, 255, 255, 255,
 255, 255, 255, 255, 255, 255, 255, 255,
 255, 255, 255, 255, 255, 255, 255, 255,Firmware Type: 255, 255 
 Firmware Version: 255, 255
 Firmware Blocks: 255, 255
 Firmware CRC: 255, 255Start of local user config is at address: 291 Local user data: 
 255, 0, 0, 0, 255, 255, 255, 255,
 255, 255, 255, 255, 255, 255, 255, 255,
 255, 255, 255, 255, 255, 255, 255, 255,
 255, 255, 255, 255, 255, 255, 255, 255,
 255, 1, 1, 1, 255, 255, 255, 255,
 255, 255, 255, 255, 255, 255, 255, 255,
 255, 255, 255, 255, 255, 255, 255, 255,
 255, 255, 255, 255, 255, 255, 255, 255,
 255, 255, 255, 255, 255, 255, 255, 255,
 ...The data is from a repeater. Note that the layout may change in upcoming mysensors versions. 
 Your local data is for example stored at offset 291, so be careful when using the native EEPROM functions where you have to provide an offset!
- 
    RE: Arduino Pro Mini 3.3v - solar power - How?posted in HardwareAbout the battery: 
 A low power arduino runs several months with a 1000mA battery. As the sun hopefully rises every morning to charge the battery, you could use the cheapest one you can get.
- 
    RE: Air Quality Sensorposted in HardwareHi @paqor, 
 I wrote a little sketch which you could use as a start, it uses the MQ135 library.
 I also used a timer library, but this could be replaced by a simple sleep, too.RZERO should be changed when calibrating the sensor, this can be done at compile-time or during runtime by sending the value to the sensor via the gateway. Unfortunately I could not test the sketch yet, but it should help you getting started. 
 If you have a second sensor which provides humidity and temperature then you can also get the corrected ppm from the library,...good luck! /* MQ135 MySensor A0 white D0 black GND brown 5V red */ #include <SPI.h> #include <MySensor.h> #include <MQ135.h> #include "Timer.h" Timer timer; // 30 seconds #define TEMP_UPDATE_INTERVAL 30000 // MQ135 #define CHILD_ID_CO2 0 #define CHILD_ID_R0 1 #define CO2_SENSOR_ANALOG_PIN 0 /// Calibration resistance at atmospheric CO2 level #define RZERO 300.0 #define EEPROM_R0 0 MQ135 gasSensor = MQ135(CO2_SENSOR_ANALOG_PIN, RZERO); int lastC02; float lastR0; //----------------------------------------------------------------------------- // MySensor MySensor gw; MyMessage msgCO2(CHILD_ID_CO2, V_VAR1); MyMessage msgR0(CHILD_ID_R0, V_VAR1); //----------------------------------------------------------------------------- void setup() { gw.begin(incomingMessage, AUTO, true); gw.sendSketchInfo("MQ135 Sensor", "1.0"); gw.present(CHILD_ID_CO2, S_AIR_QUALITY); gw.present(CHILD_ID_R0, S_CUSTOM); uint8_t R02 = gw.loadState(EEPROM_R0); // get R0 from EEPROM float R0 = R02 * 2; // do a plausibility check if (R0 > 1.0 && R0 < 400.0) { Serial.print(F("Setting R0 from EEPROM: ")); } else { Serial.print(F("Setting default R0: ")); R0 = RZERO; } Serial.print(R0); Serial.println(F("")); gasSensor.setR0(R0); timer.every(TEMP_UPDATE_INTERVAL, timerHandler); } bool MQ135Changed() { bool changed = false; lastR0 = gasSensor.getRZero(); Serial.print(F("R0: ")); Serial.println(lastR0); { float ppm = gasSensor.getPPM(); Serial.print(F("CO2 ppm: ")); Serial.print(ppm); int roundedPpm = (int)ppm; Serial.print(F(" --> ")); Serial.println(roundedPpm); if (roundedPpm != lastC02) { lastC02 = roundedPpm; changed = true; } } return changed; } void timerHandler() { bool airQualityChanged = MQ135Changed(); if (airQualityChanged) { gw.send(msgCO2.set(lastC02)); gw.send(msgR0.set(lastR0, 2)); } } void loop() { gw.process(); timer.update(); } // Gets the R0 value from the gw passes ot to the lib and stores it into the EEPROM. void incomingMessage(const MyMessage& message) { Serial.println(F("Incoming Message:")); if (message.isAck()) { Serial.println(F("This is an ack from gateway")); } uint8_t sensor = message.sensor; if (sensor == CHILD_ID_R0) { float R0 = message.getFloat(); Serial.print(F("Incoming R0: ")); Serial.print(R0); Serial.println(F("")); gw.saveState(EEPROM_R0, (uint8_t)(R0/2)); gasSensor.setR0(R0); gw.send(msgR0.set(R0, 2)); } }
- 
    RE: Air Quality Sensorposted in HardwareI used this library: 
 https://github.com/GeorgK/MQ135Together with this description: 
 https://hackaday.io/project/3475-sniffing-trinket/log/12363-mq135-arduino-librarySimple to use and very good explanations. 
- 
    RE: Air Quality Sensorposted in HardwareLooks strange, could you supply your code? 
 Btw the sensor draws a lot of current, the power supply should be able to deliver 1A. Did you burn in the sensor for 12-24 hours?
- 
    RE: 433Mhz Garage opener projectsposted in My ProjectHi, as a start you could modify the following sketch: remove the flamingo.h include and all flamingo related stuff. https://github.com/windkh/flamingoswitch/blob/master/examples/mysensors/FlamingoSwitchSensor.ino Have a look at the function incommingMessage line 196. Here the message from the gateway is received. Replace 230 with your own code. 
- 
    RE: Nano vs unoposted in TroubleshootingSometimes clearing the EEPROM helps: 
 http://www.mysensors.org/build/debug
- 
    Arduino MKR1000posted in HardwareA new Arduino will be shipped next year: 
 https://www.arduino.cc/en/Main/ArduinoMKR1000Having a look at the specs I thought that this could be the next hardware mysensors should support as everything seems to be fine - performance
- wlan integrated
- battery powered
- Crypt support
 But this one should cost around 50€ which is way too much for a simple sensor. Any ideas what this one could be useful for? 
- 
    RE: Air Quality Sensorposted in HardwareThe sensor is in my kitchen. The value in the screenshot is very high as I made some french fries 2 hours ago. 
  
- 
    RE: Air Quality Sensorposted in HardwareAdjusting my mq-135 sensor took several atempts as the CO2 value of the atmosphere is not a constant value of 399ppm. 
 This value is measured in Hawaii ( see http://co2now.org/ ) and is probably significantly lower than at your home. In germany for example you should calibrate your sensor when the wind comes from west over the atlantic which brings fresh air along. See http://www.donnerwetter.de/deutschland/co2.htmEverytime my sensor passed values below 400 I adjusted the R0 value. In the end I modified the sketch to be able to send this R0 value from FHEM to the sensor to avoid recompiling the sketch everytime. 
 See
 https://github.com/windkh/mysensors/tree/master/CO2Sensor/CO2sensor.ino Line 440ff 
- 
    RE: Simple enhancement for PressureSensor example (Weatherstation)posted in My ProjectOk, no problem, I will create a pull request this weekend. 
 rgrds Heinz
- 
    Simple enhancement for PressureSensor example (Weatherstation)posted in My ProjectThe pressure sensor example of the mysensors library contains a simple forecast algorithm. When integrating this into FHEM I noticed that the forecast is "stable" most of the time. What I wanted to have was an additional indicator which displays the current weather situation based on the sealevel pressure of 1013hPa. Well, actually this is what a simple analog weatherstation does. So I modified the PressureSensor example so that it transfers a second sensor value: weather situation enum WEATHER_SITUATION { VERY_LOW_PRESSURE = 0, // p>-7.5hPa LOW_PRESSURE = 1, // p>-2.5hPa NORMAL_PRESSURE = 2, // p <+/-2.5hPa HIGH_PRESSURE = 3, // p>2.5hPa VERY_HIGH_PRESSURE = 4,// p>7.5hPa };The FHEM plot looks like 
  Sorry for the german labels: 
 Vorhersage = forecast
 Wetterlage = current weather situationHH = very high pressure 
 H = high pressure
 T = low pressure
 TT = very low pressureIn the picture you can see that the forecast is sunny though the current weather situation is rainy: indeed it's raining cats and dogs and cows at the moment. BTW: 
 To make it a real weatherstation i merged the dht-22 code into it to get the humidity value, too.
- 
    RE: Sensor for Vallox DigitSE RS485 ventilation system with integration into FHEM.posted in My ProjectFor those who want to have the FHEM files here they are: 
 _MYSENSOR_Vallox.cfg
 simply place the file in FHEM's subfolder FHEM and include it your fhem.cfg:include ./FHEM/_MYSENSOR_Vallox.cfgAnd here are the plot files which have to be placed in the subfolder www\gplot 
 SVG_FileLog_Vallox_6.gplot
 SVG_FileLog_Vallox_5.gplot
 SVG_FileLog_Vallox_4.gplot
 SVG_FileLog_Vallox_3.gplot
 SVG_FileLog_Vallox_2.gplot
 SVG_FileLog_Vallox_1.gplotYou will likely have to adapt the room and group names, and of course the german names, sorry for that. 
- 
    RE: Sensor for Vallox DigitSE RS485 ventilation system with integration into FHEM.posted in My Project@m26872 
 I simply copied the dark style of FHEM and named it dark2:copy the following files to your FHEM subfolder www/pgm2 
 dark2style.css
 dark2svg_defs.svg
 dark2svg_style.cssIn your FHEM.cfg select this style for your WEB Frontend e.g.: 
 define WEB FHEMWEB 8083 global
 attr WEB stylesheetPrefix dark2That's it. If you want to have other plot colours edit the files starting with dark2svg... I think it is self explaining. 
- 
    RE: Sensor for Vallox DigitSE RS485 ventilation system with integration into FHEM.posted in My Project@m26872 
 I modified the dark style. If you need the files I will upload em with a description how to integrate those.
- 
    RE: Sensor for Vallox DigitSE RS485 ventilation system with integration into FHEM.posted in My ProjectSome people asked if the library is able to control other parameters than the fan speed. The answer is yes. The following screenshot shows my sliders and buttons in FHEM:  Sorry for the german labels again: 
 The first group shows the power state (ON/OFF), the heating-state (winter season=ON, summer season=OFF) and the HRC damper position (inactive=OFF). See last post.The second group shows some alerts (none at the moment) 
 the third group shows a button to switch between summer and winter season. The sliders control some temperature thresholds and other parameters.If you want to have a look at the bus data yourself you can download my sniffer tool which is a .Net port of the serial library described above under valloxserial.net 
- 
    RE: Sensor for Vallox DigitSE RS485 ventilation system with integration into FHEM.posted in My ProjectAfter some months of testing a little update: 
 I received some e-mails questioning the so called "heat recovery cell bypass" mode. There is a damper inside the device that can
 is switched automatically by the vallox-controller to bypass the heat recovery cell (HRC) to avoid heating up the house during the
 summer months. Well, when you open the device on a hot summer day you will probably see the damper in an obvious wrong position:
 the air does not bypass the HRC! Huh! whats wrong here?Explanation: 
 The device tries to cool down the incoming air by leading it through the HRC which is still colder than the temperature outside. If the temperature outside is colder than the air inside the house the damper is switched to the expected position. There are two things to you have to do to make all that work correctly:- turn off heating mode (the LED of the left most button on your control device must be off)
- the HRC bypass temperature must be set to a value below the outside temperature (e.g. 14 degrees)
 To illustrate that effect I logged the temperatures in FHEM:  Sorry for the german labels. 
 The first plot shows the damper position: blue background: HRC bypass is active.
 The second plot shows the temperature outside the house (blue) and the temperature inside the house (red)As soon as the temperature outside is greater than the temperature inside the HRC bypass is deactivated to cool the incoming air by leading the air through the "colder" HRC. The fourth diagram shows the temperature of the air that is entering the rooms (purple) and the temperature outside the house (blue). 
 You can see that the fresh air entering the rooms is lower than the temperature outside: the cooling effect works (even if it is only few degrees)To all guys thinking about how to control the damper on their own logic from a raspi or arduino. This is not neccessary as the vallox logic works very well. 
- 
    RE: Pressure example BMP085posted in Bug ReportsYou don't need to upgrade to 1.5, you can simply download the sketch from here 
 https://github.com/mysensors/Arduino/tree/development/libraries/MySensors/examples/PressureSensor
- 
    RE: Pressure example BMP085posted in Bug Reports@5546dug 
 Yes, the altitude is in meters.
 A complete sketch containing the changes and some bug fixes is part of the mysensors library 1.5. So you don't have to merge the code from above, simply download it from github.
- 
    RE: Sensebender Microposted in AnnouncementsToday I integrated my first 2 sensebender micros into my homeautomation and they almost worked out of the box. I like this board really much! Good work, I will order more! Pitfall: 
 When updating the mysensors lib from 1.4.x to 1.5 the sensor failed to get an id from the controller which btw was still running on 1.4.x.
 After having done all the things like "clearing eeprom", "soldering a capacitor to the radio" and so on... I noticed that I changed the RF_CHANNEL from the default 76 to some other value in MyConfig.h some months ago (probably for some paranoia reason).
 When updating to lib 1.5 the sensor sketch got the 76 while the gateway still used the other one and so the communication between both failed. After changing the radio channel to the one the controller uses, everything worked very quickly!Probably this post helps someother guy who fell into the same trap. 
- 
    RE: Debugging temp sensorposted in HardwareI use http://forum.mysensors.org/topic/838/windows-gui-controller-for-mysensors 
 for logging the communication between the controller and the nodes.
- 
    RE: Making Code for Weather Stationposted in Troubleshooting@Brutus 
 Yes, memory on the nano is limited. I already ran out of memory when merging ketches, but fortunately the compiler tells you that at compile time.
- 
    RE: Making Code for Weather Stationposted in Troubleshooting@sundberg84 nice project. I noticed that the code in your weatherstation makes use of the buggy forecast algorithm. You should update your sketch to have reliable data in future. 
- 
    RE: Making Code for Weather Stationposted in TroubleshootingI have already merged the sketch for a dht-22 and a bmp085 sensor. You can take the sketch as a starting point https://github.com/windkh/mysensors/blob/master/WeatherStationSensor/WeatherStationSensor.ino Always have look at the memory consumption of your sketch. Merging too many sketches into one will eat up your memory very quickly. 
- 
    RE: Pressure example BMP085posted in Bug ReportsMine is also working well...here is my FHEM screentshot of today. Right now it is clearing up again after a short thunder storm...  I also added a weather situation indicator which works like a common barometer: it shows sunny when the pressure is above 1013hPa and rainy if the pressure is below this world wide average. The field "Vorhersage" shows the forecast "sunny" as the pressure raised last last hours significantly. 
- 
    RE: Pressure example BMP085posted in Bug ReportsThe library used in the pressure example of the mysensors project already supports this: float pressure = bmp.readSealevelPressure(ALTITUDE) / 100.0;Btw I fixed some issues in the sample see also 
 https://github.com/mysensors/Arduino/tree/master/libraries/MySensors/examples/PressureSensor
- 
    RE: Pressure example BMP085posted in Bug ReportsWell, after the changes the forecast obviously works well. I will try to submit the changed code the next days. 
- 
    RE: Pressure example BMP085posted in Bug ReportsThe forecast of my weatherstation is always "stable". The wrong factor could be an explanation for that. I changed the sketch some minutes ago, now I am curious if the forcast algorithm works as expected. 
- 
    RE: Pressure example BMP085posted in Bug ReportsAccording to Samuel the calculation of the forecast is wrong: 
 He wrote:The forecast algorithm is incorrect. In the code you do dP_dt = (((65.0 / 1023.0) * change) / 3). However, there is no reason to multiply the change by 65/1023. In the source, they do this because their barometer is like that : when their barometer return 1, it means 1 * 65.0 / 1023.0 kPa. In our sketch, when our barometer return 1, it means 1 Pa, and in this part of the code pressure is in hPa so we should divide by 10.0 Should be in kPa/h. I guess someone should rework the whole sketch. 
- 
    RE: Doubts about sensor types versus variable typesposted in ControllersI think that the value types could be recuced to a minimum by declaring the number format instead of repeating the sensor type in the variable type 
 V_NUM, V_BOOL, V_PERCENTAGE, V_STRING, ...V_NUM or V_FLOAT would fit to many values sent by the sensors. 
 The order of different sensor values is a contract between the controller and the sensor anyway. The same goes for the units of the values. The controller must know if the values sent by a distance sensor is mm or cm.So why are there dozens of variable types? It looks like a bit over-engineered to me? 
- 
    RE: My sensorboard MYS 1.0betaposted in Hardware@hek ah ok I see. Well that sounds reasonable to me. That could explain why a repeater node did not work with a nano but with an uno ... Thanx alot 
- 
    RE: My sensorboard MYS 1.0betaposted in Hardware@hek I had the same problem. The sensor was received by the gateway but not vice versa. In the end I found out that the power level of the gateway is not set to max by default. After changing this to max everything worked fine. Is there a reason for this default? 
 As there are always the same problems here popping up in the forum: how about setting up a FAQ page?
- 
    RE: help newbie: MEGA2560 + Ethernet Shield = always failsposted in HardwareHi ruslan, sorry for delay. 
 I am not sure but I think I did not change anything in RF_Config.h but found out that the radio needs to be connected to those pins 50, 51, 52. Have a look at the mega pinout sheet. It tells you that 50=miso, 51=mosi, 52=sck. So I connected the radio to those pins and it worked. That configuration runs on a sensor without ethernet shield. I believe that it has nothing to do with the shield but more with that special mega pinout.
 Could you simply remove the shield, attach the radio and download a sensor sketch to make sure that the mega and the radio work together. After that step attach the shield and try again with a gateway sketch.
- 
    RE: Node-Red as Controllerposted in Node-REDwhich browser did you take? Probably you should try another one. 
- 
    RE: Is there a way of seeing what the gateway is doing on rpi?posted in TroubleshootingDownload and run myscontroller It helped me alot: 
 http://www.mysensors.org/controller/myscontroller
- 
    Pressure example BMP085posted in Bug ReportsI had a closer look at the code for the pressure example (http://www.mysensors.org/build/pressure) and was a little bit 
 confused about the weather forecast algorithm. It should follow the algorithm proposed here:
 http://www.freescale.com/files/sensors/doc/app_note/AN3914.pdfThe sketch takes the pressure every minute and stores the value in a global array. The array has room for 180 sample which makes 3 hours. 
 Every 30 minutes the average of the last 5 minutes is taken and compared to the average values in the past to find if the pressure is raising or not. Well that seems to be an easy job, but the code looks really ugly and consumes too much memory.First of all I would only store the last 5 samples instead of all 180, as the other samples are not used anyway in the whole sketch. 
 Then I think there is an error when minute 180 is reached. The sketch stores the average5 into average0 (Line 169) and sets the minute counter to 5 (Line 99) which immediately triggers the calculation of average0 agaein (line 105) which is based on old data (minutes 0-4).
 I think the minute counter should be set to 6 here.I reached the memory limit of my arduino nano when merging the code for several sensors together. So I had a deeper look at the code and changed it like below: globals: const char *weather[] = { "stable", "sunny", "cloudy", "unstable", "thunderstorm", "unknown" }; enum FORECAST { STABLE = 0, // Stable weather SUNNY = 1, // Slowly rising HP stable good weather CLOUDY = 2, // Slowly falling Low Pressure System, stable rainy weather UNSTABLE = 3, // Quickly rising HP, not stable weather THUNDERSTORM = 4, // Quickly falling LP, Thunderstorm, not stable UNKNOWN = 5 // Unknown, more time needed }; const int LAST_SAMPLES_COUNT = 5; float lastPressureSamples[LAST_SAMPLES_COUNT]; #define MULTIPLIER (65.0/1023.0) int minuteCount = 0; bool firstRound = true; float pressureAvg[7]; float dP_dt;algorithm float getLastPressureSamplesAverage() { float lastPressureSamplesAverage = 0; for (int i = 0; i < LAST_SAMPLES_COUNT; i++) { lastPressureSamplesAverage += lastPressureSamples[i]; } lastPressureSamplesAverage /= LAST_SAMPLES_COUNT; return lastPressureSamplesAverage ; } // Algorithm found here // http://www.freescale.com/files/sensors/doc/app_note/AN3914.pdf int sample(float pressure) { // Calculate the average of the last n minutes. int index = minuteCount % LAST_SAMPLES_COUNT; lastPressureSamples[index] = pressure; minuteCount++; if (minuteCount > 185) minuteCount = 6; if (minuteCount == 5) { pressureAvg[0] = getLastPressureSamplesAverage(); } else if (minuteCount == 35) { pressureAvg[1] = getLastPressureSamplesAverage(); float change = (pressureAvg[1] - pressureAvg[0]); if (firstRound) // first time initial 3 hour dP_dt = (MULTIPLIER * 2 * change); // note this is for t = 0.5hour else dP_dt = ((MULTIPLIER * change) / 1.5); // divide by 1.5 as this is the difference in time from 0 value. } else if (minuteCount == 65) { pressureAvg[2] = getLastPressureSamplesAverage(); float change = (pressureAvg[2] - pressureAvg[0]); if (firstRound) //first time initial 3 hour dP_dt = (MULTIPLIER * change); //note this is for t = 1 hour else dP_dt = ((MULTIPLIER * change) / 2); //divide by 2 as this is the difference in time from 0 value } else if (minuteCount == 95) { pressureAvg[3] = getLastPressureSamplesAverage(); float change = (pressureAvg[3] - pressureAvg[0]); if (firstRound) // first time initial 3 hour dP_dt = ((MULTIPLIER * change) / 1.5); // note this is for t = 1.5 hour else dP_dt = ((MULTIPLIER * change) / 2.5); // divide by 2.5 as this is the difference in time from 0 value } else if (minuteCount == 125) { pressureAvg[4] = getLastPressureSamplesAverage(); float change = (pressureAvg[4] - pressureAvg[0]); if (firstRound) // first time initial 3 hour dP_dt = ((MULTIPLIER * change) / 2); // note this is for t = 2 hour else dP_dt = ((MULTIPLIER * change) / 3); // divide by 3 as this is the difference in time from 0 value } else if (minuteCount == 155) { pressureAvg[5] = getLastPressureSamplesAverage(); float change = (pressureAvg[5] - pressureAvg[0]); if (firstRound) // first time initial 3 hour dP_dt = ((MULTIPLIER * change) / 2.5); // note this is for t = 2.5 hour else dP_dt = ((MULTIPLIER * change) / 3.5); // divide by 3.5 as this is the difference in time from 0 value } else if (minuteCount == 185) { pressureAvg[6] = getLastPressureSamplesAverage(); float change = (pressureAvg[6] - pressureAvg[0]); if (firstRound) // first time initial 3 hour dP_dt = ((MULTIPLIER * change) / 3); // note this is for t = 3 hour else dP_dt = ((MULTIPLIER * change) / 4); // divide by 4 as this is the difference in time from 0 value pressureAvg[0] = pressureAvg[5]; // Equating the pressure at 0 to the pressure at 2 hour after 3 hours have past. firstRound = false; // flag to let you know that this is on the past 3 hour mark. Initialized to 0 outside main loop. } int forecast = UNKNOWN; if (minuteCount < 35 && firstRound) //if time is less than 35 min on the first 3 hour interval. forecast = UNKNOWN; else if (dP_dt < (-0.25)) forecast = THUNDERSTORM; else if (dP_dt > 0.25) forecast = UNSTABLE; else if ((dP_dt > (-0.25)) && (dP_dt < (-0.05))) forecast = CLOUDY; else if ((dP_dt > 0.05) && (dP_dt < 0.25)) forecast = SUNNY; else if ((dP_dt >(-0.05)) && (dP_dt < 0.05)) forecast = STABLE; else forecast = UNKNOWN; // Unknown return forecast;} Could anyone verify this as I could easily be wrong. 
- 
    RE: Node-Red as Controllerposted in Node-REDI paused the project as I am working on my low power sensors. As soon as I continue I will post it here. 
- 
    RE: Building an Ethernet Gateway on an Arduino Megaposted in TroubleshootingWhy do you want to connect A0, A1, A2 to the radio? 
 The picture above clearly says:
 PIN 50 = MISO
 PIN 51 = MOSI
 PIN 52 = SCK
 I connected to radio to those pins and everything worked well without any modifications!.
- 
    RE: More than one sensor on one arduino pro miniposted in DevelopmentHave a look at the dallas temperature sensor sample. This sketch reads several temperature sensors via onewire and sends the values as so called child sensor values to the gateway. 
- 
    RE: Node-Red as Controllerposted in Node-RED@Dheeraj right now I do not have a database attached as the flow is not finished. I plan to use redis or mongodb. @vikasjee Indid not reference any mysensors lib in the flow. Split is standard javascript. I wonder why this should not work on your system. 
- 
    RE: Node-Red as Controllerposted in Node-REDif anybody wants to try it on his own here is the source which can be imported into node-red. [{"id":"e2627000.52f61","type":"serial-port","serialport":"COM13","serialbaud":"115200","databits":"8","parity":"none","stopbits":"1","newline":"10","bin":"false","out":"time","addchar":true},{"id":"ae116278.ceadf","type":"serial in","name":"SerialGateway","serial":"e2627000.52f61","x":75.5,"y":170.3333511352539,"z":"6e87bdcb.1ab8d4","wires":[["421469f9.a974f8"]]},{"id":"421469f9.a974f8","type":"function","name":"split message","func":"var message = msg.payload;\nsplitMessage = message.split(\" \");\nif(splitMessage[0] == \"0;0;3;0;9;read:\")\n{\n msg.route = splitMessage[1].split(\"-\");\n \n var splitData = splitMessage[2].split(\"\\n\");\n var tokens = splitData[1].split(\";\")\n \n msg.rawData = tokens;\n if(tokens.length == 6)\n {\n msg.nodeId = tokens[0];\n msg.childSensorId = tokens[1];\n msg.messageType = tokens[2];\n msg.ack = tokens[3];\n msg.subType = tokens[4];\n msg.payload = tokens[5];\n }\n}\nelse\n{\n \n}\nreturn msg;","outputs":1,"valid":true,"x":260.5,"y":170.3333511352539,"z":"6e87bdcb.1ab8d4","wires":[["ea996599.33b75"]]},{"id":"ea996599.33b75","type":"switch","name":"switch message type","property":"messageType","rules":[{"t":"eq","v":"0"},{"t":"eq","v":"1"},{"t":"eq","v":"2"},{"t":"eq","v":"3"},{"t":"eq","v":"4"}],"checkall":"true","outputs":5,"x":461.49998474121094,"y":170.3333511352539,"z":"6e87bdcb.1ab8d4","wires":[["4bca8505.d463e4"],["cfb87963.3e2a8"],["7cd01fb.f71436"],["e722ad62.22ebd"],["9f4ff922.f54838"]]},{"id":"4bca8505.d463e4","type":"function","name":"presentation","func":"msg.topic = \"presentation\";\nreturn msg;","outputs":1,"valid":true,"x":681.5,"y":37.333335876464844,"z":"6e87bdcb.1ab8d4","wires":[[]]},{"id":"7cd01fb.f71436","type":"function","name":"req","func":"msg.topic = \"req\";\nreturn msg;","outputs":1,"valid":true,"x":698.3333129882812,"y":152.33334350585938,"z":"6e87bdcb.1ab8d4","wires":[[]]},{"id":"e722ad62.22ebd","type":"function","name":"internal","func":"msg.topic = \"internal\";\nreturn msg;","outputs":1,"valid":true,"x":693.3333129882812,"y":203.33334350585938,"z":"6e87bdcb.1ab8d4","wires":[[]]},{"id":"9f4ff922.f54838","type":"function","name":"stream","func":"msg.topic = \"stream\";\nreturn msg;","outputs":1,"valid":true,"x":692.3333129882812,"y":261.3333435058594,"z":"6e87bdcb.1ab8d4","wires":[[]]},{"id":"137f8a82.b7ce45","type":"debug","name":"debug","active":true,"console":"false","complete":"true","x":897.3333129882812,"y":101.33333587646484,"z":"6e87bdcb.1ab8d4","wires":[]},{"id":"ff056cd7.417e98","type":"http response","name":"http out","x":744,"y":444.3333740234375,"z":"6e87bdcb.1ab8d4","wires":[]},{"id":"74b70760.4f808","type":"http in","name":"","url":"/mysensorsdata","method":"get","x":151.00001525878906,"y":444.3333740234375,"z":"6e87bdcb.1ab8d4","wires":[["68713a54.5c30ec"]]},{"id":"e26e1fbf.606c8","type":"template","name":"html template","field":"","format":"html","template":"\nGateway <br />\nreceived at: {{data.timestamp}}<br />\nnode-id: {{data.nodeId}}<br />\nchild-SensorId: {{data.childSensorId}}<br />\nmessageType: {{data.messageType}}<br />\nsubType: {{data.subType}}<br />\npayload: {{data.payload}}\n","x":560.0000152587891,"y":445.33336663246155,"z":"6e87bdcb.1ab8d4","wires":[["ff056cd7.417e98"]]},{"id":"68713a54.5c30ec","type":"function","name":"message buffer","func":"context.data = context.data || new Object();\n\nswitch (msg.topic) {\n case \"set\":\n context.data.timestamp = new Date().toLocaleString();\n context.data.nodeId = msg.nodeId;\n context.data.childSensorId = msg.childSensorId;\n context.data.messageType = msg.messageType;\n context.data.subType = msg.subType;\n context.data.payload = msg.payload;\n msg = null;\n break;\n default:\n \tmsg.data = context.data;\n}\n\nreturn msg;","outputs":1,"valid":true,"x":393.00001525878906,"y":445.3333435058594,"z":"6e87bdcb.1ab8d4","wires":[["e26e1fbf.606c8"]]},{"id":"8f3083f8.2dc96","type":"http in","name":"","url":"/mysensors","method":"get","x":135.00001525878906,"y":507.3333740234375,"z":"6e87bdcb.1ab8d4","wires":[["92f9be8f.e42c68"]]},{"id":"92f9be8f.e42c68","type":"template","name":"Auto Update Script","field":"","template":"<script>\n setInterval(function(){\t\n\t var theUrl = \"http://localhost:1880/mysensorsdata\";\n\t var xmlHttp = new XMLHttpRequest();\n\t xmlHttp.open( \"GET\", theUrl, false );\n\t xmlHttp.send( null );\n\t document. getElementById('mysensorsdata')\n\t \t.innerHTML = xmlHttp.responseText;\n },1000);\n</script>\n<div id = 'mysensorsdata'>\n ... Loading ...\n</div>\n","x":410,"y":507.3333740234375,"z":"6e87bdcb.1ab8d4","wires":[["ff056cd7.417e98"]]},{"id":"cfb87963.3e2a8","type":"function","name":"set","func":"msg.topic = \"set\";\nreturn msg;","outputs":1,"valid":true,"x":696.5,"y":101.33333587646484,"z":"6e87bdcb.1ab8d4","wires":[["137f8a82.b7ce45","68713a54.5c30ec"]]}]
- 
    RE: Node-Red as Controllerposted in Node-REDThe following node-red sample illustrates how the data sent by the serial gateway can be analysed. 
  
 The upper lane receives the data from COM-Port, splits the incomming message into single tokens and feeds the result into
 a switch block.
 The lower lane implements a http request which displays data for message type "set".
 The result of this simple sniffer looks like:
  On the top right I added a debug node to visualize the incomming data: 
  This should be a minimalistic sample to get a feeling for how much work it would take to implement a fully functional controller. 
 If the "presentation" messages would be fed into some no-sql database like mongoose, answering nodeid-requests shouldn't be a challenging task. In the end I think this could be done in 1-2 days.
- 
    RE: Node-Red as Controllerposted in Node-RED@vikasjee 
 Everything is straight forward:- install FHEM on a rapsberry
- add the MYSENSORS gateway to fhem.cfg
 define MYSENSOR_Gateway MYSENSORS 192.168.178.20:5003 attr MYSENSOR_Gateway autocreate 1 attr MYSENSOR_Gateway requestAck 1 attr MYSENSOR_Gateway stateFormat connection- install mosquitto on the raspberry
- add the MQTT device to fhem.cfg (point to local MQTT broker)
 define mqtt MQTT 127.0.0.1:1883- publish sensor data (e.g. MQTT_CO2) from FHEM to MQTT
 define MQTT_CO2 MQTT_BRIDGE MYSENSOR_MQ135_CO2 attr MQTT_CO2 IODev mqtt attr MQTT_CO2 publishState fhem/CO2 attr MQTT_CO2 stateFormat transmission-stateWhenever the CO2 value changes it is forwarded to the local mosquitto broker via topic fehm/CO2 
 Now you any client in the world that has access to the raspberry my subscribe this topic. You simply have to
 know the IP address of the MQTT broker.- install Node-Red on the raspberry
- open the Node-Red window of the raspberry <IP>:1883
- drag the MQTT input node to the sheet
- configure the MQTT input node so that it uses the local broker and the topic from above
- drag a debug output node to the sheet
- connect both
- Deploy
  --> The CO2 values are printed in the debug window. The same can be done from within bluemix with the difference that node-red runs in the cloud accessing your local broker in the raspberry. 
- 
    RE: help newbie: MEGA2560 + Ethernet Shield = always failsposted in HardwareDid you wire the radio correctly. The mega needs the PINS 50, 51, 52 to be connected to the radio 
 see wiring in:
 http://forum.mysensors.org/topic/949/sensor-for-vallox-digitse-rs485-ventilation-system-with-integration-into-fhem/3
- 
    RE: Node-Red as Controllerposted in Node-REDI managed to get the following configuration to run: MySensors --> MySensorsEthernetGateway --> FHEM --> FHEM/MQTTDevice --> Mosquitto--> Node-Red 
 FHEM and Mosquitto are running an a raspberry.
 Running Node-Red on IBM Bluemix in the cloud also succeeded to connect to my local mosquitto broker.
- 
    RE: Wierd issue with a nanoposted in TroubleshootingI had a similar issue. 
 Clearing the EEPROM helped me out. (see http://www.mysensors.org/build/debug).
- 
    RE: How to contribute code to the MySensors projectposted in Announcements2012-1014? I just can't belive it! 
- 
    RE: Health of meshposted in Feature RequestsExcellent! This is really great. Are you going to release this in somewhere? Myscontroller is really helpful, but this could run on a raspi all the time. Good job! 
- 
    RE: "req node id" problemposted in TroubleshootingI got it running again by clearing the eeprom of the gateway and downloading the sketch of the gateway again. 
- 
    "req node id" problemposted in TroubleshootingHelp! 
 some days ago I noticed that new nodes failed to request a node id. Having a look at the communication using MYSController I can see the node sending the REQUEST message. The next line seems to be the RESPONSE from the controller or from the gateway. But why does the node not accept the new id. Anyone has an idea where to look for the error? The window underneath MYSController is the serial output of the sensor. 
- 
    RE: sending sensor reading with more than one valueposted in Development.... or define 3 different sensors in your sketch 
- 
    Dallas Temperature Example: wrong values from sensorsposted in Bug ReportsHi, I used the DallasTemperatureSensor Example to monitor the heating of my house. All in all I soldered 8 sensors in a star-configuration and took the sketch without any modifications. Having a look at the plots in FHEM I noticed that the values are mixed up between the single sensors. So I modified the sketch and used the sensor address instead of the sensor index. Now the values seem to be the right ones. 
 It seems that getting the temperature by index sometimes returns the value of another sensor in the one-wire network. Any explanations?
  
 On the left side of the picture there are the mixed vales... After the straight line I started the sensor with the modified sketch. The last vales seem to be reliable.
- 
    RE: Remote controlled switches (433MHz) and temperature sensorsposted in My Project@CaptainZap I had the same problem with the range. 
 The sensor is able to send data to the gateway but the gateway fails to send commands to the sensor.
 I found out that the maximum power level of the gateway sender is not set to maximum by default, but the
 level of the sensor is. I simply changed the value before compiling the gateway in
 MyConfig.h
 #define RF24_PA_LEVEL_GW RF24_PA_MAX
- 
    RE: Remote controlled switches (433MHz) and temperature sensorsposted in My ProjectIndexes usually start at 0 not at 1 
 try getTempCByIndex(0);