Any ETA on support for RFM69 ? Need to extend my coverage :)
Patrik Söderström
Posts
-
💬 Building a Raspberry Pi Gateway -
💬 Soil Moisture SensorIs there any updated sketch to use with the Soil Moisture Sensor shown in the pictures?
-
💬 Motion SensorDo you have an example sketch of connecting two PIRs to one Arduino? Would really need that in my setup.
-
💬 Building a Raspberry Pi Gateway@mfalkvidd Alright :) The thing is that I have my Raspberry Pi as a Gateway today near my server rack and would like to measure the temperatur. Maybe I just get a Nano to do the work for me. Just would have been great to use the Raspberry.
-
💬 Building a Raspberry Pi GatewayCan I attach one or more DallasTemp sensors on the Raspberry Pi gateway?
-
water meter - reading method with Line Track Sensoroh, I should have read this before I ordered the TCRT5000. I two seems to have hard time to get readings from my water meter.
I also have this small wheels.
I have a RPi and USB camera, so I could try that solution. But should have been nice with the TCRT5000.
Have anyone made any updates? -
💬 Water Meter Pulse SensorGreat! Thanks for the help :)
Now I just need to figure out a good placement for it and get values to Domoticz.
But this helped me a lot to get started. -
💬 Water Meter Pulse SensorShould have said that I was trying to run it on a Node MCU 0.9. I can compile fine for Arduino Nano but not for Node MCU. Also I got another error now when I upgraded to 1.6.12.
In file included from C:\Users\xxxxx\Documents\Arduino\libraries\MySensors-development/MySensors.h:337:0, from C:\Users\xxxxxxx\AppData\Local\Temp\untitled921979828.tmp\sketch_oct14a\sketch_oct14a.ino:44: C:\Users\xxxxxxx\Documents\Arduino\libraries\MySensors-development/core/MyMainESP8266.cpp:4:22: fatal error: Schedule.h: No such file or directory #include "Schedule.h" ^ compilation terminated. exit status 1 Error compiling for board NodeMCU 0.9 (ESP-12 Module).``` -
💬 Water Meter Pulse SensorRunning 1.6.11, will try and update.
-
💬 Temperature SensorI use the following code, I have added the GW support for ESP board.
/** * 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. * ******************************* * * DESCRIPTION * * Example sketch showing how to send in DS1820B OneWire temperature readings back to the controller * http://www.mysensors.org/build/temp */ // Enable debug prints to serial monitor #define MY_DEBUG // Enable and select radio type attached //#define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 // Use a bit lower baudrate for serial prints on ESP8266 than default in MyConfig.h #define MY_BAUD_RATE 9600 #define MY_GATEWAY_ESP8266 #define MY_ESP8266_SSID "TP54C10" #define MY_ESP8266_PASSWORD "blarretp54c10" // The port to keep open on node server mode #define MY_PORT 5003 // How many clients should be able to connect to this gateway (default 1) #define MY_GATEWAY_MAX_CLIENTS 2 #include <ESP8266WiFi.h> #include <SPI.h> #include <MySensors.h> #include <DallasTemperature.h> #include <OneWire.h> #define COMPARE_TEMP 1 // Send temperature only if changed? 1 = Yes 0 = No #define ONE_WIRE_BUS 3 // Pin where dallase sensor is connected #define MAX_ATTACHED_DS18B20 16 unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds) OneWire oneWire(ONE_WIRE_BUS); // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs) DallasTemperature sensors(&oneWire); // Pass the oneWire reference to Dallas Temperature. float lastTemperature[MAX_ATTACHED_DS18B20]; int numSensors=0; bool receivedConfig = false; bool metric = true; // Initialize temperature message MyMessage msg(0,V_TEMP); void before() { // Startup up the OneWire library sensors.begin(); } void setup() { // requestTemperatures() will not block current thread sensors.setWaitForConversion(false); } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Temperature Sensor", "1.1"); // Fetch the number of attached temperature sensors numSensors = sensors.getDeviceCount(); // Present all sensors to controller for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) { present(i, S_TEMP); } } void loop() { // Fetch temperatures from Dallas sensors sensors.requestTemperatures(); // query conversion time and sleep until conversion completed int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution()); // sleep() call can be replaced by wait() call if node need to process incoming messages (or if node is repeater) sleep(conversionTime); // Read temperatures and send them to controller for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) { // Fetch and round temperature to one decimal float temperature = static_cast<float>(static_cast<int>((getConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.; // Only send data if temperature has changed and no error #if COMPARE_TEMP == 1 if (lastTemperature[i] != temperature && temperature != -127.00 && temperature != 85.00) { #else if (temperature != -127.00 && temperature != 85.00) { #endif // Send in the new temperature send(msg.setSensor(i).set(temperature,1)); // Save new temperatures for next compare lastTemperature[i]=temperature; } } sleep(SLEEP_TIME); }the exakt error I get in Arduino IDE is
In file included from C:\Users\xxxxx\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.h:22:0, from Z:\MySensors\NodeMCU-Water meter\NodeMCU-Water_meter\NodeMCU-Water_meter.ino:51: C:\Users\xxxxxx\Documents\Arduino\libraries\OneWire/OneWire.h:108:2: error: #error "Please define I/O register types here" #error "Please define I/O register types here" ^ exit status 1 Error compiling for board NodeMCU 0.9 (ESP-12 Module).``` -
💬 Water Meter Pulse SensorI get error on compiling.
"exit status 1
call of overloaded 'set(volatile long unsigned int&)' is ambiguous"The following line gets red marked in Arduino IDE
send(lastCounterMsg.set(pulseCount)); // Send pulsecount value to gw in VAR1 -
💬 Temperature SensorI have trouble with this on a NodeMCU 0.9.
#error "Please define I/O register types here"Anyone who can help?
-
💬 Building a Raspberry Pi GatewayJust installed MySensors on one of my Raspberry. Works really great! :) Picks up the other node I have over NRF without trouble. Next I will try and add some sensors directly on the Raspberry.
Big thanks for this! -
Hack air refresherI have an air refresher in the main bathroom, the problem with that one is that is spraying in constant intervals, so even if no one has been in the bathroom for a long time (during night for example).
Now when I have started with Arduino and MySensors I think it would be possible to hack this one, so I can trigger it via sensors or schedules.

Have anyone tried this before? :)
-
ESP8266 GW with sensors@mfalkvidd how did you come up with what kind of resistor I should use? Could be good to know in coming project. If you want to share, thanks :)
-
ESP8266 GW with sensorsThanks! :)
Yes I ordered a couple of days ago, waiting for them :) Need them for the temp. sensor as well. -
ESP8266 GW with sensors65535 is the value I get when I print analogRead(LIGHT_SENSOR_ANALOG_PIN).
So, then I´m unable to use this light sensor on this NodeMCU? I better set it up on some other node.
Thanks for quick and informative replies :) -
ESP8266 GW with sensorsThe Serial.printIn(lightLeve) is there already.
Serial Monitor
0;255;3;0;9;Client 0: 0;0;3;0;18;PING -6306 0;255;3;0;9;MCO:SLP:MS=30000,SMS=0,I1=255,M1=255,I2=255,M2=255 0;255;3;0;9;!MCO:SLP:REP 0;255;3;0;9;Client 0: 0;0;3;0;18;PINGTelnet
0;255;3;0;14;Gateway startup complete. 0;255;0;0;18;2.0.1-beta 0;255;3;0;11;Light Sensor 0;255;3;0;12;1.0 0;0;0;0;16; 0;255;3;0;2;2.0.1-beta 0;255;3;0;22;14999 0;255;3;0;22;25062 0;255;3;0;22;35146 0;255;3;0;22;45277 0;255;3;0;22;55305 0;255;3;0;22;65331 0;255;3;0;22;75360I´m using a LM393 Light sensor, if that helps.
-
ESP8266 GW with sensorsHi,
I´m using MySensors dev branch 2.0.1 as I heard this one should allow GW´s to have sensors on them and show for controllers.I´m using a NodeMCU with the follow sketch, I can add the GW and it shows up, it presents me with nodes and there I can see S_LIGHT_LEVEL but there is no Name or Value to it. And I do not see any device.
Can anyone see some error in the code?
// Enable debug prints to serial monitor #define MY_DEBUG // Use a bit lower baudrate for serial prints on ESP8266 than default in MyConfig.h #define MY_BAUD_RATE 9600 // Enables and select radio type (if attached) #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 #define MY_GATEWAY_ESP8266 #define MY_ESP8266_SSID "******" #define MY_ESP8266_PASSWORD "*********" // Enable UDP communication //#define MY_USE_UDP // Set the hostname for the WiFi Client. This is the hostname // it will pass to the DHCP server if not static. // #define MY_ESP8266_HOSTNAME "sensor-gateway" // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP) #define MY_IP_ADDRESS 10,35,10,70 // If using static ip you need to define Gateway and Subnet address as well #define MY_IP_GATEWAY_ADDRESS 10,35,10,1 #define MY_IP_SUBNET_ADDRESS 255,255,255,0 // The port to keep open on node server mode #define MY_PORT 5003 // How many clients should be able to connect to this gateway (default 1) #define MY_GATEWAY_MAX_CLIENTS 2 // Controller ip address. Enables client mode (default is "server" mode). // Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere. //#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 68 // Enable inclusion mode #define MY_INCLUSION_MODE_FEATURE // Enable Inclusion mode button on gateway // #define MY_INCLUSION_BUTTON_FEATURE // Set inclusion mode duration (in seconds) #define MY_INCLUSION_MODE_DURATION 60 // Digital pin used for inclusion mode button #define MY_INCLUSION_MODE_BUTTON_PIN 3 // Set blinking period // #define MY_DEFAULT_LED_BLINK_PERIOD 300 // Flash leds on rx/tx/err // Led pins used if blinking feature is enabled above #define MY_DEFAULT_ERR_LED_PIN 16 // Error led pin #define MY_DEFAULT_RX_LED_PIN 16 // Receive led pin #define MY_DEFAULT_TX_LED_PIN 16 // the PCB, on board LED #if defined(MY_USE_UDP) #include <WiFiUDP.h> #else #include <ESP8266WiFi.h> #endif #include <MySensors.h> #define CHILD_ID_LIGHT 0 #define LIGHT_SENSOR_ANALOG_PIN 0 unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds) MyMessage msg(CHILD_ID_LIGHT, V_LIGHT_LEVEL); int lastLightLevel; void setup() { } void presentation() { // Present locally attached sensors here // Send the sketch version information to the gateway and Controller sendSketchInfo("Light Sensor", "1.0"); // Register all sensors to gateway (they will be created as child devices) present(CHILD_ID_LIGHT, S_LIGHT_LEVEL); } void loop() { // Send locally attached sensors data here int16_t lightLevel = (1023-analogRead(LIGHT_SENSOR_ANALOG_PIN))/10.23; Serial.println(lightLevel); if (lightLevel != lastLightLevel) { send(msg.set(lightLevel)); lastLightLevel = lightLevel; } sleep(SLEEP_TIME); } -
💬 Building a WiFi Gateway using ESP8266Cool, I downloaded it and replaced the old master brach.
Still get the same effect.
I paste my sketch here, all except the wifi part, that works. Tell me if I should include it here as well. But I feel its something in this below part that is failing on me#include <MySensors.h> //###################### LIGHT SENSOR ##################### #define CHILD_ID_LIGHT 0 #define LIGHT_SENSOR_ANALOG_PIN 0 unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds) MyMessage msg(CHILD_ID_LIGHT, V_LIGHT_LEVEL); int lastLightLevel; //######################################################### void setup() { } void presentation() { //###################### LIGHT SENSOR ##################### // Send the sketch version information to the gateway and Controller sendSketchInfo("Light Sensor", "1.0"); // Register all sensors to gateway (they will be created as child devices) present(CHILD_ID_LIGHT, S_LIGHT_LEVEL); //######################################################### } void loop() { //###################### LIGHT SENSOR ##################### int16_t lightLevel = (1023-analogRead(LIGHT_SENSOR_ANALOG_PIN))/10.23; Serial.println(lightLevel); if (lightLevel != lastLightLevel) { send(msg.set(lightLevel)); lastLightLevel = lightLevel; } sleep(SLEEP_TIME); //######################################################### }