@Dalhoj I know it's not much of a help that I've been trying to do pretty much the same thing and using the same statements you are and countering the same problems, I'm not a programmer or from a programming background but I try and understand as much as possible about what's going on but I just can't seem to get my head around it..
Kind regards.
andyuno
Posts
-
Problem with node reciving data -
smoke/lightlevel/humidty/temp/smoketest@ikjes said:
just one of the build
sensor node with smoke detection, mess light level, humidty and temp
en also the posibl to remotly test the smoke detectorand spare for motion detector and trip
Great idea, like the way you've doubled the function of the smoke detector by utilising the space.
-
Basic Lcd Node@rvendrame thanks I think I get what you mean I'll give that a go still not sure if I'm On the right path.
-
Basic Lcd NodeHaving a bit of problem receiving Data from another node am I missing something here or do I need to add something to the transmitting node. Just can't think where to go from here.:confused: HELP! Please.
Andy.#include <SPI.h> #include <MySensor.h> #include <LiquidCrystal_I2C.h> #include <Wire.h> #include <DHT.h> #define CHILD_ID_HUM 0 #define CHILD_ID_TEMP 1 #define CHILD_ID_LIGHT 2 #define HUMIDITY_SENSOR_DIGITAL_PIN 3 #define LIGHT_SENSOR_ANALOG_PIN 0 unsigned long SLEEP_TIME = 100; // Sleep time between reads (in milliseconds) (We do calculations and wait 5 ms between readings) int readingscounter = 0; MySensor gw; LiquidCrystal_I2C lcd(0x27, 16, 2); //DHT dht; float lastTemp; float lastHum; boolean metric = true; MyMessage msgHum(CHILD_ID_HUM, V_HUM); MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP); MyMessage msgLight(CHILD_ID_LIGHT, V_LIGHT_LEVEL); int lastLightLevel; void setup() { // Register all sensors to gateway (they will be created as child devices) gw.begin(); //DHT.setup(HUMIDITY_SENSOR_DIGITAL_PIN); 3 // Send the Sketch Version Information to the Gateway gw.sendSketchInfo("Hum-Temp-Light-Lcd", "1.0"); // Register all sensors to gw (they will be created as child devices) gw.present(CHILD_ID_HUM, S_HUM); gw.present(CHILD_ID_TEMP, S_TEMP); gw.present(CHILD_ID_LIGHT, S_LIGHT_LEVEL); metric = gw.getConfig().isMetric; gw.present(CHILD_ID_LIGHT, V_HUM); gw.present(CHILD_ID_TEMP, V_TEMP); delay(3000); } void loop() { int lightLevel = (1023-analogRead(LIGHT_SENSOR_ANALOG_PIN))/10.23; Serial.println(lightLevel); if (lightLevel != lastLightLevel) { // gw.send(msg.set(lightLevel)); lastLightLevel = lightLevel; } lcd.init(); lcd.clear(); lcd.backlight() ; lcd.setCursor(0, 0); lcd.print("Temperature: "); lcd.print("C "); lcd.print(V_TEMP ); lcd.setCursor(0, 1); lcd.print("Humidity: "); lcd.print("% "); lcd.print(V_HUM ); } -
Basic Lcd Node@FotoFieber Thank you for your response much appreciated I'm not much of a coder but I can feel my way through if I have examples to work from and this will help a bit .
Thank you Andy. -
Basic Lcd NodeIs there someone who can tell me where I'm going wrong, here I can't seem to get the data from another node, Am I missing something here or do I have to put something in on my transmitting node, not sure where to go from here.:confused: HELP! Please.
Thanks Andy#include <SPI.h> #include <MySensor.h> #include <LiquidCrystal_I2C.h> #include <Wire.h> #include <DHT.h> #define CHILD_ID_HUM 0 #define CHILD_ID_TEMP 1 #define CHILD_ID_LIGHT 2 #define HUMIDITY_SENSOR_DIGITAL_PIN 3 #define LIGHT_SENSOR_ANALOG_PIN 0 unsigned long SLEEP_TIME = 100; // Sleep time between reads (in milliseconds) (We do calculations and wait 5 ms between readings) int readingscounter = 0; MySensor gw; LiquidCrystal_I2C lcd(0x27, 16, 2); //DHT dht; float lastTemp; float lastHum; boolean metric = true; MyMessage msgHum(CHILD_ID_HUM, V_HUM); MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP); MyMessage msgLight(CHILD_ID_LIGHT, V_LIGHT_LEVEL); int lastLightLevel; void setup() { // Register all sensors to gateway (they will be created as child devices) gw.begin(); //DHT.setup(HUMIDITY_SENSOR_DIGITAL_PIN); 3 // Send the Sketch Version Information to the Gateway gw.sendSketchInfo("Hum-Temp-Light-Lcd", "1.0"); // Register all sensors to gw (they will be created as child devices) gw.present(CHILD_ID_HUM, S_HUM); gw.present(CHILD_ID_TEMP, S_TEMP); gw.present(CHILD_ID_LIGHT, S_LIGHT_LEVEL); metric = gw.getConfig().isMetric; gw.present(CHILD_ID_LIGHT, V_HUM); gw.present(CHILD_ID_TEMP, V_TEMP); delay(3000); } void loop() { int lightLevel = (1023-analogRead(LIGHT_SENSOR_ANALOG_PIN))/10.23; Serial.println(lightLevel); if (lightLevel != lastLightLevel) { // gw.send(msg.set(lightLevel)); lastLightLevel = lightLevel; } lcd.init(); lcd.clear(); lcd.backlight() ; lcd.setCursor(0, 0); lcd.print("Temperature: "); lcd.print("C "); lcd.print(V_TEMP ); lcd.setCursor(0, 1); lcd.print("Humidity: "); lcd.print("% "); lcd.print(V_HUM ); }``` -
PCB Design and ProductionUsing through-hole & pants is fine for components i.e. NRF24l01. I found Eagle to have most of what I needed within the library but you can download more libraries by doing a search for Eagle libraries.
-
Displaying Radio informationIs there a way of displaying radio information with in Vera, from each node i.e. signal strength and ID.
-
PCB Design and ProductionThis is my first printed circuit, refined a little, might actually get this one done.

If you upload your design to https://oshpark.com they will quote you for free boards and it will give you a good representation of what you're bored will look like how cool is that. -
Requesting a sensor value from a different node?@sansespere.. Nice work, I don't think I would've got most of that, now that should give me something to work from thanks.
-
PCB Design and ProductionI downloaded the Eagle free version, and watch all three videos. And i actually produce a usable circuit board.I found it's quite easy and quite straightforward and think that most people on this site will be able to actually produce a circuit board. The Software is quite intuitive and easy to use.
-
Requesting a sensor value from a different node?@sansespere said:
Awesome - pushing from the sensor at the same time it sends to the gateway has got it working. Will have to create what will almost be a stripped down version of a gateway to process all incoming messages and assign the contents to the correct variables for the screen : )
Thanks for the advice!
Hey Great idea been trying something similar myself sometime but getting nowhere any chance of you sharing some of your code, that might help me get started. What size LCD are you thinking of of using, or are you just going to use a small LCD menu driven with a couple buttons.
-
Humidity sensor DHT22. No temperature showing and error when clicking Poll Now button in Veralite UI5 for Temp and Humidity@andyuno that didn't take me long I'm getting good…at this:)
-
Humidity sensor DHT22. No temperature showing and error when clicking Poll Now button in Veralite UI5 for Temp and Humidityokay I'v work that one out I've got it working, all I need to do now is go from Fahrenheit to Celsius
-
Humidity sensor DHT22. No temperature showing and error when clicking Poll Now button in Veralite UI5 for Temp and HumidityI am using the same senses DHT22 and having the same problem, no temperature Reading humidity seems to be working fine just doesn't make any sense.
-
implementing multiple sensorsI think this is a good basis to start. A standard set of multi-senses based on temperature, humidity, light and movement which I think would be useful in all applications
-
Vera Ethernet Gateway uno=wiznet 5100 shieldI change this line to
Ethernet.begin(mac);
my roots issued an IP address
-
implementing multiple sensorsThanks, been doing some more testing it seems as though my movement sensor interacts with the relays which wasn't my intention, and I have no control over them within Vera.
-
implementing multiple sensorsWell this is my first attempt of merging some senses the code compiled with no errors, and they recognised by Vera, but I get no readings or activations as if they're dead
///#include <Sleep_n0m1.h> #include <SPI.h> #include <EEPROM.h> #include <RF24.h> #include <Sensor.h> #include <Relay.h> //andys Added #define DIGITAL_INPUT_SENSOR 3 // The digital input you attached your motion sensor. (Only 2 and 3 generates interrupt!) #define INTERRUPT DIGITAL_INPUT_SENSOR-2 // Usually the interrupt = pin -2 (on uno/nano anyway) #define CHILD_ID 7 // Id of the sensor child #define RELAY_1 4 //andys Added// Arduino Digital I/O pin number for first relay (second on pin+1 etc) #define NUMBER_OF_RELAYS 1 //andys Added #define RELAY_ON 0 //andys Added #define RELAY_OFF 1 //andys Added Sensor gw; //Sleep sleep; void setup() { EEPROM.write(EEPROM_RELAY_ID_ADDRESS, 0); gw.begin(); // Send the sketch version information to the gateway and Controller gw.sendSketchInfo("Motion Sensor", "1.0"); gw.sendSketchInfo("Relay", "1.0"); //Andy Added pinMode(DIGITAL_INPUT_SENSOR, INPUT); // sets the motion sensor digital pin as input // Register all sensors to gw (they will be created as child devices) gw.sendSensorPresentation(CHILD_ID, S_MOTION); for (int i=0; i<NUMBER_OF_RELAYS;i++) { //Andy Added gw.sendSensorPresentation(RELAY_1+i, S_LIGHT); //Andy Added } // Fetch relay status //Andy Added for (int i=0; i<NUMBER_OF_RELAYS;i++) { //Andy Added // Make sure relays are off when starting up //Andy Added digitalWrite(RELAY_1+i, RELAY_OFF); //Andy Added // Then set relay pins in output mode //Andy Added pinMode(RELAY_1+i, OUTPUT); //Andy Added // Request/wait for relay status //Andy Added gw.getStatus(RELAY_1+i, V_LIGHT); //Andy Added setRelayStatus(gw.getMessage()); // Wait here until status message arrive from gw } //Andy Added } void loop() { if (gw.messageAvailable()) { //Andy Added message_s message = gw.getMessage(); //Andy Added setRelayStatus(message); //Andy Added // Read digital motion value boolean tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH; Serial.println(tripped); gw.sendVariable(CHILD_ID, V_TRIPPED, tripped?"1":"0"); // Send tripped value to gw // Power down the radio. Note that the radio will get powered back up // on the next write() call. delay(200); //delay to allow serial to fully print before sleep // gw.powerDown(); // sleep.pwrDownMode(); //set sleep mode // sleep.sleepInterrupt(INTERRUPT,CHANGE); } } void setRelayStatus(message_s message) { if (message.header.messageType==M_SET_VARIABLE && message.header.type==V_LIGHT) { int incomingRelayStatus = atoi(message.data); // Change relay state digitalWrite(message.header.childId, incomingRelayStatus==1?RELAY_ON:RELAY_OFF); // Write some debug info Serial.print("Incoming change for relay on pin:"); Serial.print(message.header.childId); Serial.print(", New status: "); Serial.println(incomingRelayStatus); } }I think I've overlooked something in order not for this to work
-
implementing multiple sensors@henno
Thanks for the pointer I'll give that a go