My Sensors Test environments
-
Hey all.
I had a problem recently where my prod Vera ran out of memory and this results in not being able to save any settings or create new devices as well as the Vera main process crashing and restarting!! I fixed this by cleaning up some unused plugins and devices...many of which were Arduino devices from testing...
Anyway, as I have two Vera's i realised id better be more carefull and not use the production one for any testing....
My "test" vera is on UI7 and my "production" is on UI5 - both are equipped with a Ethernet Gateway ( ver 1.4.1)I've just posted a multisensor sketch to codebender which has a method i use for setting which mysensors parameters apply to the sketch and to which mysensors network it should operate on. It means i dont need to make changes to the MyConfig file and remember to switch back..a pain when im tweeking a prod sketch...
Anyway here is the snippet below - i just change the MySensorTESTBED from 0 to 1 :
#define MySensorTESTBED 0 #if MySensorTESTBED == 1 #define CLIENT_ID 9 // Sets MYSensors client id #define RADIO_CH 96 // Sets MYSensors to use Radio Channel 96 #define RELAY 4 // Set 4 for mini rboard #define TRIGGER 3 // On Mini Rboard there is D3 (Interupt 1) available on the RX Module pins #endif #if MySensorTESTBED == 0 #define CLIENT_ID AUTO // Sets MYSensors client id #define RADIO_CH 76 // Sets MYSensors to use Radio Channel #define RELAY 4 // Set 4 for mini rboard #define TRIGGER 3 // On Mini Rboard there is D3 (Interupt 1) available on the RX Module pins #endif
these then get used in setup..
gw.begin(incomingMessage, CLIENT_ID , false,AUTO,RF24_PA_MAX,RADIO_CH,RF24_250KBPS);
I can also use the same to control which Pins are used or whatever other variables i need... very good for sleep variables!
Hope this is of interest...
Full sketch here:
https://codebender.cc/sketch:61919
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
LAN8720A - will mysensors work with this module
Development • 13 Nov 2024, 17:06 • Marcin 15 Nov 2024, 10:59 -
Counting Incoming and Outgoing Messages from a Gateway
Development • 10 Dec 2024, 21:57 • Trand 14 Dec 2024, 20:23 -
Home Assistant/MySensors quirks
Development • 26 days ago • OldSurferDude 26 days ago -
PJON and Minicore not working
Development • 21 days ago • Trand 21 days ago -
MQTT-Help me understand about the MQTT Gateway.
Development • 2 Mar 2025, 01:44 • dpcons 12 Mar 2025, 23:39