Any ETA on support for RFM69 ? Need to extend my coverage
Posts made by Patrik Söderström
-
RE: 💬 Building a Raspberry Pi Gateway
-
RE: 💬 Soil Moisture Sensor
Is there any updated sketch to use with the Soil Moisture Sensor shown in the pictures?
-
RE: 💬 Motion Sensor
Do you have an example sketch of connecting two PIRs to one Arduino? Would really need that in my setup.
-
RE: 💬 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.
-
RE: 💬 Building a Raspberry Pi Gateway
Can I attach one or more DallasTemp sensors on the Raspberry Pi gateway?
-
RE: water meter - reading method with Line Track Sensor
oh, 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? -
RE: 💬 Water Meter Pulse Sensor
Great! 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. -
RE: 💬 Water Meter Pulse Sensor
Should 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).```
-
RE: 💬 Temperature Sensor
I 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).```
-
RE: 💬 Water Meter Pulse Sensor
I 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 -
RE: 💬 Temperature Sensor
I have trouble with this on a NodeMCU 0.9.
#error "Please define I/O register types here"Anyone who can help?
-
RE: 💬 Building a Raspberry Pi Gateway
Just 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 refresher
I 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?
-
RE: 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
-
RE: ESP8266 GW with sensors
Thanks!
Yes I ordered a couple of days ago, waiting for them Need them for the temp. sensor as well. -
RE: ESP8266 GW with sensors
65535 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 -
RE: ESP8266 GW with sensors
The 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;PING
Telnet
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;75360
I´m using a LM393 Light sensor, if that helps.
-
ESP8266 GW with sensors
Hi,
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); }
-
RE: 💬 Building a WiFi Gateway using ESP8266
Cool, 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); //######################################################### }
-
RE: 💬 Building a WiFi Gateway using ESP8266
Uploaded this sktech to a NodeMcu yesterday, i can add it in domoticz. When i try to add a light sensor, it shows up as a light sensor node in domoticz under the Mysensors lan gateway. but it does not show any device. Anyone who have an idea?
-
RE: 💬 Motion Sensor
I have just started with an Arduino Nano and connected both radio and a HC-SR50I PIR.
When I check the Serial monitor it spams me with
0;1;1;0;16;0Is that common or is something wrong? Thanks for help.
-
SCT-013-030 to measure watt
Hi,
I would like to reach the watt usage. I would like to use SCT-013-030, but as it seems to have a 3.5" connector, how can I connect this to my arduino? I can only see project where one is using pulse power. But with this one I would not need to install a new energy meter where I would like to read the watt usage.
Any tips and ideas?
-
RE: 💬 Building a Raspberry Pi Gateway
When do you think the install and build instructions will come up? Will this work with a B-model? (bought 2013)
-
RE: Distance for sensor and board
@sundberg84 Yesterday I found you forum post at bygghus.se I was stuck at the phone for a long time reading it all! I´m very impressed and I will for sure order some of your board for the aurdino.
@stevebus Great!
I´m trying to find a Arduino Uno board, looks like the one in the mysensors hardware is out of stock. I searched on ebay and found this one, is it legit and the real thing?
http://www.ebay.com/itm/Arduino-Genuino-UNO-R3-Compatible-ATmega328P-ATmeg-a16U2-with-USB-cable-/252365926607?hash=item3ac22e70cf:g:DR8AAOSw1DtXHD1s -
RE: Distance for sensor and board
Thanks
Then I will test it out If it does not work I have to find other cables.
Yes I have seen that, really awesome -
Distance for sensor and board
Hey,
how long cables can I use for the sensor that is connected to a arduino board?
I have seen this 20cm cables one can use. But I was thinking of having the sensors in locations like a couple of meters away from the arduino board. Like place the board in one area and pull cables to nearby rooms for temp readings etc.As its low power I would assume I could do this. Any recommendations?
Could a regular network cable be used or is the twisted cables not good to use for this purpose?Thanks
Br.
Patrik -
RE: What hardware to choose for this scenarios
Again, thanks for quick reply.
I´m starting to get a better understanding now of how its meant to be usedI have ordered some hardware now and will start to test.
Thanks once again.
-
RE: What hardware to choose for this scenarios
Thanks for quick reply.
My idea is to have several nodes with "MySensors" connected to Domoticz. I currently have Domoticz running on my Synology NAS, so there is no option to attach gateway for that unit. Thats why I would need the gateways to have WIFI or ethernet connection. I can use ethernet in some places but else it would be wireless.
So the NRF24L01, or RFM69 modules is not WIFI network? WIFI is only included in the ESP8266?
But all system either if I use ESP8266 or Aurdino I need NRF24L01, or RFM69 for the system to function?What I dont understand is what those modules are doing As I connect the sensors directly to the Aurdino or ESP8266. I never connect anything to the NRF module, right?
Sorry for all stupid questions Appreciate all help.
Br.
-
What hardware to choose for this scenarios
Hi,
I´m new here at MySensors and are very interested to start with sensors to hook them up to my Domoticz system.
My confusion comes with what hardware I should buy to accomplice my task.I want to have wireless network on my controller, so that I can get Domoticz to talk to the controller over my existing wireless network
.
Will all three of the below options solve this or which one of the below? Will I need more than the hardware below?- Arduino Nano and attach a NRF24L01+ 2.4GHz Wireless Transceiver
or - NodeMcu Lua ESP8266 CH340 WIFI Internet
or - NodeMcu Lua ESP8266 CH340 WIFI Internet and attach NRF24L01+ 2.4GHz Wireless Transceiver
Thanks
/Patrik - Arduino Nano and attach a NRF24L01+ 2.4GHz Wireless Transceiver