Will there be support for the new line of Ezlo/Vera hubs?
r-nox
Posts
-
Vera/Ezlo -
Killing Nanos, one after the other -
Getting Pin Change Interrupts working together with Timer interrupts / sleep(XX ms) on Arduino Pro MiniI think this is the same thing as you were trying to accomplish.
Sleep for 6 minutes or when interrupted. I have a reed switch on pin 2
pinMode(REED_SWITCH, INPUT); // set the reed switch digital pin as input //digitalWrite(REED_SWITCH, HIGH); pinMode(REED_SWITCH, INPUT_PULLUP);sleep(digitalPinToInterrupt(REED_SWITCH), CHANGE, 360000); //3600000 hour -
Message Payload type@frits Thank you for catching that. I was just reworking and now it's sending proper values. :)
-
Message Payload typeSending as V_TEXT did not have the effect needed.
void sendToReceiver(boolean reed_tripped) { char percent; Serial.print(" Light Status "); Serial.println(reed_tripped); switch (reed_tripped) { case 0: percent = "0"; Serial.print(" Select case is "); Serial.println("0"); send(msgDimmer_to_5.setDestination(5).setSensor(0).set(percent).setType(V_TEXT)); //send(msgDimmer_to_5.setDestination(5).setSensor(0).set(percent)); //send(msgDimmer_to_5.set(percent, 0)); break; case 1: percent = "30"; Serial.print(" Select case is "); Serial.println("30"); send(msgDimmer_to_5.setDestination(5).setSensor(0).set(percent).setType(V_TEXT)); //send(msgDimmer_to_5.setDestination(5).setSensor(0).set(percent)); //send(msgDimmer_to_5.set(percent, 0)); break; } }and the results
3201 TSF:MSG:SEND,8-8-0-5,s=0,c=1,t=47,pt=2,l=2,sg=0,ft=0,st=OK:4Payload still shows as P_INT16 and payload is 4 but in fact should be 30
This should be simple. I don't understand what's going wrong.
-
Message Payload typeI tried this. Here's the results. They are close but payload looks corrupted.
char buf[MAX_PAYLOAD_SIZE+1]; strcpy ( buf, percent ); void sendToReceiver(boolean reed_tripped) { char percent; Serial.print(" Light Status "); Serial.println(reed_tripped); switch (reed_tripped) { case 0: percent = "0"; Serial.print(" Select case is "); Serial.println("0"); char buf[MAX_PAYLOAD_SIZE+1]; strcpy ( buf, percent ); send(msgDimmer_to_5.setDestination(5).setSensor(0).set(buf).setType(V_TEXT)); break; case 1: percent = "30"; Serial.print(" Select case is "); Serial.println("30"); char buf2[MAX_PAYLOAD_SIZE+1]; strcpy ( buf, percent ); send(msgDimmer_to_5.setDestination(5).setSensor(0).set(buf2).setType(V_TEXT)); break; }My results have had their molecules mixed during transport. I expected "30" but received :⸮
4870 TSF:MSG:SEND,8-8-0-5,s=0,c=1,t=47,pt=0,l=3,sg=0,ft=0,st=OK:⸮Any further advice?
-
Message Payload typeI'm sending a message from node to node but when the message gets there it's the wrong type.
I need to send as P_STRING but it's showing as P_INT16This is my send
void sendToReceiver(boolean reed_tripped) { char percent; Serial.print(" Light Status "); Serial.println(reed_tripped); switch (reed_tripped) { case 0: percent = "0"; send(msgDimmer_to_5.setDestination(5).setSensor(0).set(percent).setType(V_PERCENTAGE)); //send(msgDimmer_to_5.setDestination(5).setSensor(0).set(percent)); //send(msgDimmer_to_5.set(percent, 0)); break; case 1: percent = "30"; send(msgDimmer_to_5.setDestination(5).setSensor(0).set(percent).setType(V_PERCENTAGE)); //send(msgDimmer_to_5.setDestination(5).setSensor(0).set(percent)); //send(msgDimmer_to_5.set(percent, 0)); break; } }and the message
2836 !TSF:MSG:SEND,8-8-5-5,s=0,c=1,t=3,pt=2,l=2,sg=0,ft=0,st=NACK:4 2842 !TSF:RTE:N2N FAIL 2846 TSF:MSG:SEND,8-8-0-5,s=0,c=1,t=3,pt=2,l=2,sg=0,ft=0,st=OK:4 2854 MCO:SLP:MS=360000,SMS=0,I1=0,M1=1,I2=255,M2=255 2861 TSF:TDI:TSLWhat the heck am I doing wrong?
-
Vera is getting a reboot.There's been a lot of complaints about Vera over the last few years. It looks like there's been a buy out or a buy in and as a result it's getting some much needed attention.
http://forum.micasaverde.com/index.php/topic,102841.0/topicseen.html
Sorry if this isn't exactly related but I figure it's a good place to update people. If not just delete it.
-
ESP8266 gateway + WebServer = Awesome!Where did this all end up?
-
Old user returning to Vera/MySensors -
[SOLVED] MySensors and DHT22 - difficoulties in getting started@neo-mod said in [SOLVED] MySensors and DHT22 - difficoulties in getting started:
@r-nox Thank you R-Nox! I finally figured it out, and I wrote my conclusions here. I hope it may be useful for other users. :)
I'm glad you got it working. I too had the hardest time finding the right library. That's why I responded. You're write up should help other in the future too. Thank you.
-
[SOLVED] MySensors and DHT22 - difficoulties in getting started -
S_RGB_LIGHTUsing the code below I seem to be having trouble getting the control to show in the UI. When I include the device only the arduino node shows up.
Where have I gone wrong?/* https://forum.mysensors.org/topic/7456/ws2812b-information-leds-blinking https://www.domoticz.com/forum/viewtopic.php?t=8039 */ // Enable debug prints #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 // Set LOW transmit power level as default, if you have an amplified NRF-module and // power your radio separately with a good regulator you can turn up PA level. /** * @def MY_RF24_PA_LEVEL * @brief Default RF24 PA level. Override in sketch if needed. * * - RF24_PA_MIN = -18dBm * - RF24_PA_LOW = -12dBm * - RF24_PA_HIGH = -6dBm * - RF24_PA_MAX = 0dBm */ #define MY_RF24_PA_LEVEL RF24_PA_LOW // ENABLE REPEATER MODE //#define MY_REPEATER_FEATURE // ENABLE LOOP EVEN IF RADIO FAILS. #define MY_TRANSPORT_WAIT_READY_MS 15000 #include <MySensors.h> #include <SPI.h> #include <FastLED.h> const int stripPin = 4 ; // pin where 2812 LED strip is connected const int numPixel = 3 ; // set to number of pixels CRGB leds[numPixel]; char actRGBvalue[] = "000000"; // Current RGB value uint16_t actRGBbrightness = 0xFF ; // Controller Brightness int actRGBonoff=0; // OnOff flag #define CHILD_ID 0 MyMessage lastColorStatusMsg(CHILD_ID,V_VAR1); void setup() { FastLED.addLeds<NEOPIXEL, stripPin >(leds, numPixel); // initialize led strip // Flash the "hello" color sequence: R, G, B, black. colorBars(); } void presentation() { //begin(incomingMessage, NODE_ID, false); // initialize MySensors sendSketchInfo("AWI RGB Light", "1.1"); present(CHILD_ID, S_RGB_LIGHT, "RGB Strip"); // present to controller //Request the last stored colors settings request(CHILD_ID, V_VAR1); } void loop() { //gw.process(); // wait for incoming messages } void colorBars() { SendColor2AllLEDs( CRGB::Red ); FastLED.show(); delay(500); SendColor2AllLEDs( CRGB::Green ); FastLED.show(); delay(500); SendColor2AllLEDs( CRGB::Blue ); FastLED.show(); delay(500); SendColor2AllLEDs( CRGB::Black ); FastLED.show(); delay(500); } void SendColor2AllLEDs(const CRGB lcolor) { for(int i = 0 ; i < numPixel ; i++) { leds[i] = lcolor; } } void SendLastColorStatus() { String cStatus=actRGBvalue+String("&")+String(actRGBbrightness)+String("&")+String(actRGBonoff); send(lastColorStatusMsg.set(cStatus.c_str())); } String getValue(String data, char separator, int index) { int found = 0; int strIndex[] = {0, -1}; int maxIndex = data.length()-1; for(int i=0; i<=maxIndex && found<=index; i++){ if(data.charAt(i)==separator || i==maxIndex){ found++; strIndex[0] = strIndex[1]+1; strIndex[1] = (i == maxIndex) ? i+1 : i; } } return found>index ? data.substring(strIndex[0], strIndex[1]) : ""; } // ############################ INCOMING MESSAGE ########################### void incomingMessage(const MyMessage &message) { if (message.type == V_RGB) { // check for RGB type actRGBonoff=1; strcpy(actRGBvalue, message.getString()); // get the payload SendColor2AllLEDs(strtol(actRGBvalue, NULL, 16)); SendLastColorStatus(); } else if (message.type == V_DIMMER) { // if DIMMER type, adjust brightness actRGBonoff=1; actRGBbrightness = map(message.getLong(), 0, 100, 0, 255); FastLED.setBrightness( actRGBbrightness ); SendLastColorStatus(); } else if (message.type == V_STATUS) { // if on/off type, toggle brightness actRGBonoff = message.getInt(); FastLED.setBrightness((actRGBonoff == 1)?actRGBbrightness:0); SendLastColorStatus(); } else if (message.type==V_VAR1) { // color status String szMessage=message.getString(); strcpy(actRGBvalue, getValue(szMessage,'&',0).c_str()); actRGBbrightness=atoi(getValue(szMessage,'&',1).c_str()); actRGBonoff=atoi(getValue(szMessage,'&',2).c_str()); SendColor2AllLEDs(strtol(actRGBvalue, NULL, 16)); FastLED.setBrightness((actRGBonoff == 1)?actRGBbrightness:0); } FastLED.show(); }``` -
MySensors-powered arcade game screen with wireless gamepad controllerGreat work. I'm going to build this for my back yard!
-
How to remove a sensor from Vera (Newbie)When you include a sensor it creates an Arduino node and the sensor itself. Make sure to delete them both.
-
Noob : Cant get Sensor talking to gatewayHere's the clear eeprom sketch if you need it.
https://github.com/mysensors/MySensors/blob/master/examples/ClearEepromConfig/ClearEepromConfig.ino
-
Don't see my Arduino node device in VeraThere you have it!
-
Noob : Cant get Sensor talking to gatewayIf you have used this same sensors as a test in the past you may need to clear the eeprom data also.
Just a guess...