Skip to content

Development

Discuss Arduino programming, library tips, share example sketches and post your general programming questions.
1.5k Topics 13.5k Posts

Subcategories


  • 56 578
    56 Topics
    578 Posts
    HJ_SKH
    Hi2All! Surprising is here. After about 24hours I refresh HA and suddenly my motion sensor was integrated. There is also second entity > battery : 0 , have to look deeper into that for understanding. Need to change little in the sketch, because don't want every short time 'no movement' so only when there is motion and maybe once a hour indication sensor is alive. Meantime I found 3 other good threats: https://forum.mysensors.org/topic/11200/finally-progress-evidence-based-radio-testing-method-and-capacitors https://forum.mysensors.org/topic/1664/which-are-the-best-nrf24l01-modules/27 https://forum.mysensors.org/topic/9550/build-a-reliable-power-supply-chain Very usefull for me also finally progress because of lacking time in the past. Great jobs are done here! Thanks for this all of you guys or girls!
  • Vs2015+Visual Micro + MySensors

    5
    0 Votes
    5 Posts
    2k Views
    S
    I can absolutely confirm this with VS2015, Visual Micro and MySensors 2.1.1. This is clearly a kind of merging, that is done by Visual Micro. All includes have to be made BEFORE the first line of code is executed. The initialization of your SENSOR_ANALOG_PINS array is such a line of code. Just posting it to keep it visible and well-scored at search engines, as this is SOLVED and works fine. Thank you!
  • Controllingood power to moisture sensors

    3
    0 Votes
    3 Posts
    861 Views
    rchampR
    I'm in the 2.0 code. I'll have to play around some more and do some tests over the next few weeks. I like using the intermediary modules to generate a binary alert vs doing the analog reads. Seems faster to calibrate based on the moisture levels I need for different plants. However, the battery drain of those modules is crazy. I'll do some current measements aND report back. If the consumption is too high for the pro mini digital out, I reckon I can use a mosfet to control power to the modules and power it on and wait a little before getting my reads. I think that will be the fastest solution and least path of resistance (no pun intended) :)
  • 0 Votes
    8 Posts
    3k Views
    breimannB
    @Boots33 thanks for your input. Really encouraging. I can't do the 5v plug pack in the power point as the pump has it's own controller which just turns itself on when it detects pressure fluctuations (ie a tap is turned on) so there's always power to the pump if that makes sense? Good idea though! Thanks for your ideas and taking the time to post your suggestions. Very much appreciated.
  • 0 Votes
    1 Posts
    450 Views
    No one has replied
  • RFID Lock Sensor/Actuator (1.4)

    rfid pn532 lock
    12
    0 Votes
    12 Posts
    9k Views
    cadetC
    Please modify code for mrc522 spi interface This hardware cheaper Thank you
  • 0 Votes
    8 Posts
    2k Views
    gohanG
    https://www.mysensors.org/build Always start from the main site, a lot of things have been already covered ;-)
  • Guide: Setting up and testing MQTT Client Gateway

    78
    2 Votes
    78 Posts
    53k Views
    S
    Sorry if i shouldn't be bringing an old thread back to life, however it is a sticky and therefor I assume you guys would be okay with this being brought up to date. I have a pretty simple question really; My W5100GatewayMQTTClient is in a loop, as shown below on the serial monitor, it seems to be reconnecting to the MQTT server every 8-10 seconds. Is this normal behaviour or not? I'm by no means asking for a solution (if i get one i will be sure to post here for others to revert back to if needed), but if you would like to suggest something, then it would be appreciated. I'm looking more for just a confirmation of if this is normal behaviour as of MySensors 2.1 or not. I used to run this client gateway back when MySensors V1.6 was in the development branch back in late 2015 and It didn't do anything like this back then.
  • NodeMCU ESP-12 PIR Sensor Publish to MQTT Broker on PI over Wifi

    7
    0 Votes
    7 Posts
    4k Views
    mfalkviddM
    I looked over the motion sketch linked and still not any clearer. Yes I see the basics of reading the pin but it is setup to publish to a gateway not directly to the broker as a client via my wifi. :( Yes it will publish to the gateway. As per your sketch above you have configured the gateway to publish to mqtt. That's it. No more work to be done :)
  • BMP085 + DHT22

    5
    0 Votes
    5 Posts
    2k Views
    DannyMD
    @pepson I did what you tried to do, and it worked, also in Domoticz two temps are visible. This is my code: /** * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * Copyright (C) 2013-2015 Sensnology AB * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors * * Documentation: http://www.mysensors.org * Support Forum: http://forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* * * REVISION HISTORY * Version 1.0 - Henrik Ekblad * * DESCRIPTION * Pressure sensor example using BMP085 module * http://www.mysensors.org/build/pressure * Toegevoegd: na 10x dezelfde waarde te hebben gelezen bij TeEmp en Hum toch een waarde aan de GW sturen. */ #include <SPI.h> #include <Wire.h> #include <DHT.h> #include <MySensor.h> #include <Adafruit_BMP085.h> static const uint8_t FORCE_UPDATE_N_READS = 10; uint8_t nNoUpdatesTemp; uint8_t nNoUpdatesHum; #define BARO_CHILD 0 #define TEMP_CHILD 1 #define CHILD_ID_HUM 2 #define CHILD_ID_TEMP 3 #define HUMIDITY_SENSOR_DIGITAL_PIN 3 const float ALTITUDE = 1.05; // <-- adapt this value to your own location's altitude. // Sleep time between reads (in seconds). Do not change this value as the forecast algorithm needs a sample every minute. const unsigned long SLEEP_TIME = 60000; const char *weather[] = { "stabiel", "zonnig", "bewolkt", "onstabiel", "onweer", "onbekend" }; enum FORECAST { STABIEL = 0, // "Stable Weather Pattern" ZONNIG = 1, // "Slowly rising Good Weather", "Clear/Sunny " BEWOLKT = 2, // "Slowly falling L-Pressure ", "BEWOLKT/Rain " ONSTABIEL = 3, // "Quickly rising H-Press", "Not Stable" ONWEER = 4, // "Quickly falling L-Press", "ONWEER" ONBEKEND = 5 // "ONBEKEND (More Time needed) }; Adafruit_BMP085 bmp = Adafruit_BMP085(); // Digital Pressure Sensor MySensor gw; float lastPressure = -1; float lastTempBMP = -1; int lastForecast = -1; const int LAST_SAMPLES_COUNT = 5; float lastPressureSamples[LAST_SAMPLES_COUNT]; // this CONVERSION_FACTOR is used to convert from Pa to kPa in forecast algorithm // get kPa/h be dividing hPa by 10 #define CONVERSION_FACTOR (1.0/10.0) int minuteCount = 0; bool firstRound = true; // average value is used in forecast algorithm. float pressureAvg; // average after 2 hours is used as reference value for the next iteration. float pressureAvg2; float dP_dt; DHT dht; float lastTempDHT; float lastHum; boolean metric = true; MyMessage tempMsg(TEMP_CHILD, V_TEMP); MyMessage pressureMsg(BARO_CHILD, V_PRESSURE); MyMessage forecastMsg(BARO_CHILD, V_FORECAST); MyMessage msgHum(CHILD_ID_HUM, V_HUM); MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP); void setup() { gw.begin(); dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); // Send the sketch version information to the gateway and Controller gw.sendSketchInfo("BaroHum", "2.0"); if (!bmp.begin()) { Serial.println("Could not find a valid BMP085 sensor, check wiring!"); while (1) {} } // Register sensors to gw (they will be created as child devices) gw.present(BARO_CHILD, S_BARO); gw.present(TEMP_CHILD, S_TEMP); gw.present(CHILD_ID_HUM, S_HUM); gw.present(CHILD_ID_TEMP, S_TEMP); metric = gw.getConfig().isMetric; } void loop() { float pressure = bmp.readSealevelPressure(ALTITUDE) / 100.0; float temperatureBMP = bmp.readTemperature(); if (metric) { // Convert to fahrenheit temperatureBMP = temperatureBMP * 9.0 / 5.0 + 32.0; } int forecast = sample(pressure); Serial.print("Temperature = "); Serial.print(temperatureBMP); Serial.println(metric ? " *C" : " *F"); Serial.print("Pressure = "); Serial.print(pressure); Serial.println(" hPa"); Serial.print("Forecast = "); Serial.println(weather[forecast]); if (temperatureBMP != lastTempBMP) { gw.send(tempMsg.set(temperatureBMP, 1)); lastTempBMP = temperatureBMP; } if (pressure != lastPressure) { gw.send(pressureMsg.set(pressure, 0)); lastPressure = pressure; } if (forecast != lastForecast) { gw.send(forecastMsg.set(weather[forecast])); lastForecast = forecast; } delay(dht.getMinimumSamplingPeriod()); float temperatureDHT = dht.getTemperature(); if (isnan(temperatureDHT)) { Serial.println("Failed reading temperature from DHT"); } else if (temperatureDHT != lastTempDHT || nNoUpdatesTemp == FORCE_UPDATE_N_READS) { lastTempDHT = temperatureDHT; if (!metric) { temperatureDHT = dht.toFahrenheit(temperatureDHT); } nNoUpdatesTemp = 0; gw.send(msgTemp.set(temperatureDHT, 1)); Serial.print("T: "); Serial.println(temperatureDHT); } else { // Increase no update counter if the temperature stayed the same nNoUpdatesTemp++; } float humidity = dht.getHumidity(); if (isnan(humidity)) { Serial.println("Failed reading humidity from DHT"); } else if (humidity != lastHum || nNoUpdatesHum == FORCE_UPDATE_N_READS) { lastHum = humidity; nNoUpdatesHum = 0; gw.send(msgHum.set(humidity, 1)); Serial.print("H: "); Serial.println(humidity); } else { // Increase no update counter if the temperature stayed the same nNoUpdatesHum++; } gw.sleep(SLEEP_TIME); } 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 // Pressure in hPa --> forecast done by calculating kPa/h 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 = getLastPressureSamplesAverage(); } else if (minuteCount == 35) { float lastPressureAvg = getLastPressureSamplesAverage(); float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR; if (firstRound) // first time initial 3 hour { dP_dt = change * 2; // note this is for t = 0.5hour } else { dP_dt = change / 1.5; // divide by 1.5 as this is the difference in time from 0 value. } } else if (minuteCount == 65) { float lastPressureAvg = getLastPressureSamplesAverage(); float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR; if (firstRound) //first time initial 3 hour { dP_dt = change; //note this is for t = 1 hour } else { dP_dt = change / 2; //divide by 2 as this is the difference in time from 0 value } } else if (minuteCount == 95) { float lastPressureAvg = getLastPressureSamplesAverage(); float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR; if (firstRound) // first time initial 3 hour { dP_dt = change / 1.5; // note this is for t = 1.5 hour } else { dP_dt = change / 2.5; // divide by 2.5 as this is the difference in time from 0 value } } else if (minuteCount == 125) { float lastPressureAvg = getLastPressureSamplesAverage(); pressureAvg2 = lastPressureAvg; // store for later use. float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR; if (firstRound) // first time initial 3 hour { dP_dt = change / 2; // note this is for t = 2 hour } else { dP_dt = change / 3; // divide by 3 as this is the difference in time from 0 value } } else if (minuteCount == 155) { float lastPressureAvg = getLastPressureSamplesAverage(); float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR; if (firstRound) // first time initial 3 hour { dP_dt = change / 2.5; // note this is for t = 2.5 hour } else { dP_dt = change / 3.5; // divide by 3.5 as this is the difference in time from 0 value } } else if (minuteCount == 185) { float lastPressureAvg = getLastPressureSamplesAverage(); float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR; if (firstRound) // first time initial 3 hour { dP_dt = change / 3; // note this is for t = 3 hour } else { dP_dt = change / 4; // divide by 4 as this is the difference in time from 0 value } pressureAvg = pressureAvg2; // 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 = ONBEKEND; if (minuteCount < 35 && firstRound) //if time is less than 35 min on the first 3 hour interval. { forecast = ONBEKEND; } else if (dP_dt < (-0.25)) { forecast = ONWEER; } else if (dP_dt > 0.25) { forecast = ONSTABIEL; } else if ((dP_dt > (-0.25)) && (dP_dt < (-0.05))) { forecast = BEWOLKT; } else if ((dP_dt > 0.05) && (dP_dt < 0.25)) { forecast = ZONNIG; } else if ((dP_dt >(-0.05)) && (dP_dt < 0.05)) { forecast = STABIEL; } else { forecast = ONBEKEND; } // uncomment when debugging //Serial.print(F("Forecast at minute ")); //Serial.print(minuteCount); //Serial.print(F(" dP/dt = ")); //Serial.print(dP_dt); //Serial.print(F("kPa/h --> ")); //Serial.println(weather[forecast]); return forecast; } /** * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * Copyright (C) 2013-2015 Sensnology AB * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors * * Documentation: http://www.mysensors.org * Support Forum: http://forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* * * REVISION HISTORY * Version 1.0 - Henrik Ekblad * * DESCRIPTION * Pressure sensor example using BMP085 module * http://www.mysensors.org/build/pressure * Toegevoegd: na 10x dezelfde waarde te hebben gelezen bij TeEmp en Hum toch een waarde aan de GW sturen. */ #include <SPI.h> #include <Wire.h> #include <DHT.h> #include <MySensor.h> #include <Adafruit_BMP085.h> static const uint8_t FORCE_UPDATE_N_READS = 10; uint8_t nNoUpdatesTemp; uint8_t nNoUpdatesHum; #define BARO_CHILD 0 #define TEMP_CHILD 1 #define CHILD_ID_HUM 2 #define CHILD_ID_TEMP 3 #define HUMIDITY_SENSOR_DIGITAL_PIN 3 const float ALTITUDE = 1.05; // <-- adapt this value to your own location's altitude. // Sleep time between reads (in seconds). Do not change this value as the forecast algorithm needs a sample every minute. const unsigned long SLEEP_TIME = 60000; const char *weather[] = { "stabiel", "zonnig", "bewolkt", "onstabiel", "onweer", "onbekend" }; enum FORECAST { STABIEL = 0, // "Stable Weather Pattern" ZONNIG = 1, // "Slowly rising Good Weather", "Clear/Sunny " BEWOLKT = 2, // "Slowly falling L-Pressure ", "BEWOLKT/Rain " ONSTABIEL = 3, // "Quickly rising H-Press", "Not Stable" ONWEER = 4, // "Quickly falling L-Press", "ONWEER" ONBEKEND = 5 // "ONBEKEND (More Time needed) }; Adafruit_BMP085 bmp = Adafruit_BMP085(); // Digital Pressure Sensor MySensor gw; float lastPressure = -1; float lastTempBMP = -1; int lastForecast = -1; const int LAST_SAMPLES_COUNT = 5; float lastPressureSamples[LAST_SAMPLES_COUNT]; // this CONVERSION_FACTOR is used to convert from Pa to kPa in forecast algorithm // get kPa/h be dividing hPa by 10 #define CONVERSION_FACTOR (1.0/10.0) int minuteCount = 0; bool firstRound = true; // average value is used in forecast algorithm. float pressureAvg; // average after 2 hours is used as reference value for the next iteration. float pressureAvg2; float dP_dt; DHT dht; float lastTempDHT; float lastHum; boolean metric = true; MyMessage tempMsg(TEMP_CHILD, V_TEMP); MyMessage pressureMsg(BARO_CHILD, V_PRESSURE); MyMessage forecastMsg(BARO_CHILD, V_FORECAST); MyMessage msgHum(CHILD_ID_HUM, V_HUM); MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP); void setup() { gw.begin(); dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); // Send the sketch version information to the gateway and Controller gw.sendSketchInfo("BaroHum", "2.0"); if (!bmp.begin()) { Serial.println("Could not find a valid BMP085 sensor, check wiring!"); while (1) {} } // Register sensors to gw (they will be created as child devices) gw.present(BARO_CHILD, S_BARO); gw.present(TEMP_CHILD, S_TEMP); gw.present(CHILD_ID_HUM, S_HUM); gw.present(CHILD_ID_TEMP, S_TEMP); metric = gw.getConfig().isMetric; } void loop() { float pressure = bmp.readSealevelPressure(ALTITUDE) / 100.0; float temperatureBMP = bmp.readTemperature(); if (metric) { // Convert to fahrenheit temperatureBMP = temperatureBMP * 9.0 / 5.0 + 32.0; } int forecast = sample(pressure); Serial.print("Temperature = "); Serial.print(temperatureBMP); Serial.println(metric ? " *C" : " *F"); Serial.print("Pressure = "); Serial.print(pressure); Serial.println(" hPa"); Serial.print("Forecast = "); Serial.println(weather[forecast]); if (temperatureBMP != lastTempBMP) { gw.send(tempMsg.set(temperatureBMP, 1)); lastTempBMP = temperatureBMP; } if (pressure != lastPressure) { gw.send(pressureMsg.set(pressure, 0)); lastPressure = pressure; } if (forecast != lastForecast) { gw.send(forecastMsg.set(weather[forecast])); lastForecast = forecast; } delay(dht.getMinimumSamplingPeriod()); float temperatureDHT = dht.getTemperature(); if (isnan(temperatureDHT)) { Serial.println("Failed reading temperature from DHT"); } else if (temperatureDHT != lastTempDHT || nNoUpdatesTemp == FORCE_UPDATE_N_READS) { lastTempDHT = temperatureDHT; if (!metric) { temperatureDHT = dht.toFahrenheit(temperatureDHT); } nNoUpdatesTemp = 0; gw.send(msgTemp.set(temperatureDHT, 1)); Serial.print("T: "); Serial.println(temperatureDHT); } else { // Increase no update counter if the temperature stayed the same nNoUpdatesTemp++; } float humidity = dht.getHumidity(); if (isnan(humidity)) { Serial.println("Failed reading humidity from DHT"); } else if (humidity != lastHum || nNoUpdatesHum == FORCE_UPDATE_N_READS) { lastHum = humidity; nNoUpdatesHum = 0; gw.send(msgHum.set(humidity, 1)); Serial.print("H: "); Serial.println(humidity); } else { // Increase no update counter if the temperature stayed the same nNoUpdatesHum++; } gw.sleep(SLEEP_TIME); } 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 // Pressure in hPa --> forecast done by calculating kPa/h 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 = getLastPressureSamplesAverage(); } else if (minuteCount == 35) { float lastPressureAvg = getLastPressureSamplesAverage(); float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR; if (firstRound) // first time initial 3 hour { dP_dt = change * 2; // note this is for t = 0.5hour } else { dP_dt = change / 1.5; // divide by 1.5 as this is the difference in time from 0 value. } } else if (minuteCount == 65) { float lastPressureAvg = getLastPressureSamplesAverage(); float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR; if (firstRound) //first time initial 3 hour { dP_dt = change; //note this is for t = 1 hour } else { dP_dt = change / 2; //divide by 2 as this is the difference in time from 0 value } } else if (minuteCount == 95) { float lastPressureAvg = getLastPressureSamplesAverage(); float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR; if (firstRound) // first time initial 3 hour { dP_dt = change / 1.5; // note this is for t = 1.5 hour } else { dP_dt = change / 2.5; // divide by 2.5 as this is the difference in time from 0 value } } else if (minuteCount == 125) { float lastPressureAvg = getLastPressureSamplesAverage(); pressureAvg2 = lastPressureAvg; // store for later use. float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR; if (firstRound) // first time initial 3 hour { dP_dt = change / 2; // note this is for t = 2 hour } else { dP_dt = change / 3; // divide by 3 as this is the difference in time from 0 value } } else if (minuteCount == 155) { float lastPressureAvg = getLastPressureSamplesAverage(); float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR; if (firstRound) // first time initial 3 hour { dP_dt = change / 2.5; // note this is for t = 2.5 hour } else { dP_dt = change / 3.5; // divide by 3.5 as this is the difference in time from 0 value } } else if (minuteCount == 185) { float lastPressureAvg = getLastPressureSamplesAverage(); float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR; if (firstRound) // first time initial 3 hour { dP_dt = change / 3; // note this is for t = 3 hour } else { dP_dt = change / 4; // divide by 4 as this is the difference in time from 0 value } pressureAvg = pressureAvg2; // 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 = ONBEKEND; if (minuteCount < 35 && firstRound) //if time is less than 35 min on the first 3 hour interval. { forecast = ONBEKEND; } else if (dP_dt < (-0.25)) { forecast = ONWEER; } else if (dP_dt > 0.25) { forecast = ONSTABIEL; } else if ((dP_dt > (-0.25)) && (dP_dt < (-0.05))) { forecast = BEWOLKT; } else if ((dP_dt > 0.05) && (dP_dt < 0.25)) { forecast = ZONNIG; } else if ((dP_dt >(-0.05)) && (dP_dt < 0.05)) { forecast = STABIEL; } else { forecast = ONBEKEND; } // uncomment when debugging //Serial.print(F("Forecast at minute ")); //Serial.print(minuteCount); //Serial.print(F(" dP/dt = ")); //Serial.print(dP_dt); //Serial.print(F("kPa/h --> ")); //Serial.println(weather[forecast]); return forecast; }
  • Sending Time to a Node

    4
    0 Votes
    4 Posts
    1k Views
    K
    Your sw controller must support this function. Maybe helps this. https://forum.mysensors.org/topic/2229/how-to-receive-time Btw, your date in example is 2. January 1970
  • Mysensors Gateway on OrangePi (Zero) (opi)

    117
    0 Votes
    117 Posts
    43k Views
    D
    Hi to all, I don't know if this is the right thread, but I'm trying to use an odroid c1 as a gateway. I'm posting here because I think you all could help me. The original thread I have done is this one https://forum.mysensors.org/topic/6083/odroid-c1-as-getaway Feel free to go over there and give me advises.
  • Can't find the right documentation... Reading receive messages

    4
    0 Votes
    4 Posts
    860 Views
    mfalkviddM
    @Alain-Mizreh only create a variable for the data you are using. If you use a string, get a string.
  • MYSrelayboard using a bipolar relay

    1
    0 Votes
    1 Posts
    549 Views
    No one has replied
  • MyExtension

    7
    3 Votes
    7 Posts
    2k Views
    pansenP
    Nice work but please considering giving it a better name than "MyExtension" ;)
  • i need a change in transport serial gateway

    5
    0 Votes
    5 Posts
    2k Views
    R
    @Boots33 channel 0 and 76 that i use and test seem not busy and my problem is not related to this . as I said before . i think this is not related to my hardware because i use several . i test 5 model radio. also i test LED instead of relay but i have % of error (much). use power 5v 10A use radio adapter.use reglator .... but ... so i think best of solution is little change in library.do you think with decrease boud rate or increase number of resend or increase delay between command and ack can resolve this issue ?
  • help about simple roller shutter sketch

    1
    0 Votes
    1 Posts
    806 Views
    No one has replied
  • Parking Sensor & DHT22 combinated

    9
    0 Votes
    9 Posts
    2k Views
    ghislainG
    I make this sketch, it is working, code may be cleaner but it's working... Available on github : https://github.com/Gis70/MySensors/tree/master/ParkingTempHum_sensor
  • Is my project possible with MySensors?

    14
    0 Votes
    14 Posts
    4k Views
    F
    I'm rethinking my network layout right now and I was thinking if I could use an ESP8266 in AP mdoe (running a websocket server like: https://github.com/Links2004/arduinoWebSockets) as a serial gateway? The description of the example code on the "Building a serial gateway" page says: * DESCRIPTION * The ArduinoGateway prints data received from sensors on the serial link. * The gateway accepts input on seral which will be sent out on radio network. So could I just use Serial.write() to push my commands the esp8266 received from my smartphone on the websocket connection to serial, which will then be sent out to the nodes via radio? In the other direction I would need to read data from the serial and push it to the smartphone via the websocket connection. I was also thinking to just connect my phone to the gateway via usb and then make an app that sends commands to the gateway over serial, but a wireless connection would be so much nicer. I'm probably gonna order some nrf24 module and some more arduinos on the weekend so I can tinker a bit with them as I'm new to radio stuff.
  • How to scan rf remote

    12
    0 Votes
    12 Posts
    5k Views
    A
    The community is just amazing :o) I found this https://www.mysensors.org/hardware/wall-plug Should be enough for me
  • use of ACK

    10
    1 Votes
    10 Posts
    5k Views
    rozpruwaczR
    ok, thanks. As I understand this will only affect battery powered node when changing the batteries (or rebooting the node in some other way). Without MY_TRANSPORT_WAIT_READY_MS the gateway must be up and running and in the range of the node, if not the node may drain the batery quickly.

12

Online

11.7k

Users

11.2k

Topics

113.1k

Posts