Skip to content

Troubleshooting

Help! Everything just falls apart
2.7k Topics 21.5k Posts
  • [SOLVED] Nodes not receviving ACK from Pi3 gateway

    4
    0 Votes
    4 Posts
    655 Views
    O
    Finally got some time to work on it. I started back from scratch, installing the openhabian image and configuring it all over. I problably made a mistake somewhere because now it does works well!
  • Rfid sketch

    9
    0 Votes
    9 Posts
    989 Views
    T
    Hello, now i´m write the sketch to another arduino with rfid and relay. It doesn´t work . From fhem i can trigger the relay and in serial monitor the card´s where shown with serial. In fhem the lockstatus is set to off, when the card is in near of the reader, the lockstatus on doesn´t send to fhem. But the relay doesn´t trigger by card. Where is the mistake? The problem is the lockstate doesnt set to on. /** * 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. * ******************************* * * REVISION HISTORY * Version 1.0 - Henrik Ekblad * * DESCRIPTION * RFID Lock sensor/actuator * * Use RFID tag to lock/unlock a door or trigger a scene on your controller. * This example sketch allows you to add an optional relay or solenoid * which can be activated/opened by RFID or controller. * * Use the I2C wiring option for your RFID module and connect to the following Arduino pins. * * RFID Arduino * ----- ------- * GND -> GND * VCC -> +5V * SCL -> A5 * SDA -> A4 * * Use normal wiring for NRF24L01 radio * * Attach a optional relay or solonoid lock to pin 4 * http://www.mysensors.org/build/rfid */ // Enable debug prints to serial monitor #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 #include <SPI.h> #include <MySensors.h> #include <Wire.h> #include <PN532_I2C.h> #include <PN532.h> // Add your valid rfid keys here. To find you your key just run sketch; hold your new RFID tag in fron ot the reader; // and copy the key from serial output of this sketch. const uint8_t maxKeyLength = 7; uint8_t validKeys[][maxKeyLength] = { { 0xB3, 0xC6, 0xD9, 0x80, 0x00, 0x00, 0x00 }, { 0x5B, 0xFC, 0x7A, 0xD, 0x00, 0x00, 0x00 }, // ADD YOUR KEYS HERE! { 0xF1, 0x13, 0x54, 0x63, 0x00, 0x00, 0x00 }, { 0xCB, 0x6F, 0x2D, 0xD, 0x00, 0x00, 0x00 }, { 0x9B, 0x33, 0x2C, 0xD, 0x00, 0x00, 0x00 }, { 0x73, 0xFA, 0xF6, 0x1A, 0x00, 0x00, 0x00 }, { 0x83, 0x59, 0x36, 0x1A, 0x00, 0x00, 0x00 }, { 0x83, 0x1A, 0x3C, 0x1A, 0x00, 0x00, 0x00 }, { 0xB6, 0xB2, 0x52, 0xF8, 0x00, 0x00, 0x00 }, { 0x17, 0xE5, 0xD2, 0x2B, 0x00, 0x00, 0x00 }, { 0x79 ,0xF7, 0x88, 0x5A, 0x00, 0x00, 0x00 }, { 0x2B, 0xDC, 0x49, 0xB, 0x00, 0x00, 0x00 }}; int keyCount = sizeof validKeys / maxKeyLength; #define CHILD_ID 99 // Id of the sensor child // Pin definition const int lockPin = 4; // (Digital 4) The pin that activates the relay/solenoid lock. bool lockStatus; MyMessage lockMsg(CHILD_ID, V_LOCK_STATUS); PN532_I2C pn532i2c(Wire); PN532 nfc(pn532i2c); void setup() { pinMode(lockPin, OUTPUT); nfc.begin(); uint32_t versiondata = nfc.getFirmwareVersion(); if (! versiondata) { Serial.print("Couldn't find PN53x board"); while (1); // halt } Serial.print("Found NFC chip PN5"); Serial.println((versiondata>>24) & 0xFF, HEX); Serial.print("Firmware ver. "); Serial.print((versiondata>>16) & 0xFF, DEC); Serial.print('.'); Serial.println((versiondata>>8) & 0xFF, DEC); // Set the max number of retry attempts to read from a card // This prevents us from waiting forever for a card, which is // the default behaviour of the PN532. nfc.setPassiveActivationRetries(0x3); // configure board to read RFID tags nfc.SAMConfig(); lockStatus = loadState(0); // Read last lock status from eeprom setLockState(lockStatus, true); // Now set the last known state and send it to controller } void presentation() { sendSketchInfo("RFID Lock", "1.0"); present(CHILD_ID, S_LOCK); } void loop() { bool success; uint8_t key[] = { 0, 0, 0, 0, 0, 0, 0 }; // Buffer to store the returned UID uint8_t currentKeyLength; // Length of the UID (4 or 7 bytes depending on ISO14443A card type) // Wait for an ISO14443A type cards (Mifare, etc.). When one is found // 'uid' will be populated with the UID, and uidLength will indicate // if the uid is 4 bytes (Mifare Classic) or 7 bytes (Mifare Ultralight) success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &key[0], &currentKeyLength); if (success) { Serial.print("Found tag id: "); for (uint8_t i=0; i < currentKeyLength; i++) { if (i>0) Serial.print(","); Serial.print("0x");Serial.print(key[i], HEX); } for (uint8_t i=currentKeyLength; i < maxKeyLength; i++) { Serial.print(",0x00"); } Serial.println(""); bool valid = false; // Compare this key to the valid once registered here in sketch for (int i=0;i<keyCount && !valid;i++) { for (int j=0;j<currentKeyLength && !valid;j++) { if (key[j] != validKeys[i][j]) { break; } if (j==currentKeyLength-1) { valid = true; } } } if (valid) { // Switch lock status setLockState(!lockStatus, true); } // Wait for card/tag to leave reader while(nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &key[0], &currentKeyLength)); } } // Unlocks the door. void setLockState(bool state, bool doSend) { if (state) { Serial.println("open lock"); if (doSend) send(lockMsg.set(true)); digitalWrite(lockPin, true); wait(5000); Serial.println("close lock"); if (doSend) send(lockMsg.set(false)); digitalWrite(lockPin, false); } else { if (doSend) send(lockMsg.set(state)); } } void receive(const MyMessage &message) { // We only expect one type of message from controller. But we better check anyway. if (message.type==V_LOCK_STATUS) { // Change relay state setLockState(message.getBool(), false); // Write some debug info Serial.print("Incoming lock status:"); Serial.println(message.getBool()); } }``` Hm, with other arduino now it works.
  • Raspberry Pi Gateway not working on new install

    5
    0 Votes
    5 Posts
    826 Views
    mfalkviddM
    Although the default permissions are unexpected (at least to me), they are intentional. From: https://linux.die.net/man/3/grantpt The group ID is set to an unspecified value (e.g., tty). The mode of the slave is set to 0620 (crw--w----).
  • Broken gateway with local sensors on MQTT ESP8266 GW

    16
    0 Votes
    16 Posts
    1k Views
    M
    How about adding some warning message (highlighted) that the default Arduino IDE library requires the initialization in the preHwInit() function and not in the setup() function. My mistake was missing the sentence "This example uses the external BH1750 library found here. Please install it and restart the Arduino IDE before trying to compile." I was just using the library that comes with the IDE.
  • What is the correct way to implement a WDT, for reset on a Sleeping node?

    19
    0 Votes
    19 Posts
    1k Views
    N
    Hi. Power side switching.
  • Problem with sensors on arduino and domoticz

    27
    0 Votes
    27 Posts
    2k Views
    H
    @kimot THANKS !!! for 1 sensor it's ok, but if i had a 2nd sensor he doesn't work...
  • OpenHAB & MySensors Child_ID 255 problem

    4
    0 Votes
    4 Posts
    612 Views
    YveauxY
    @nizoo91 Sorry, my bad. Thought I read NODE ID in the topic :sweat_smile: Anyway, Child ID 255 seems reserved for debug messages: https://github.com/mysensors/MySensors/blob/2.3.1/MyConfig.h#L77
  • Wipe/Change serial gateway arduino

    4
    0 Votes
    4 Posts
    683 Views
    G
    I have my ethernet gateway up and running on a breadboard. It worked first time :sunglasses: If this is of use to anyone, all I did in Domoticz was go into Setup/Hardware and change the existing serial gateway to "Mysensors Gateway with LAN interface" and press update. All the sensors are then remembered as the Gateway IDX stays the same.
  • Motion sensor(s) send false trigger a few minutes after motion occured.

    6
    0 Votes
    6 Posts
    1k Views
    YveauxY
    @grumpazoid did you search the forum? E.g. https://forum.mysensors.org/topic/6511/hc-sr501-3-3v-randomly-sends-tripped-when-radio-is-on
  • EasyPcb BH1750 Batterie sketch

    13
    0 Votes
    13 Posts
    1k Views
    mfalkviddM
    In case anyone finds this thread: an error was found in the battery measurement code. See https://forum.mysensors.org/post/97409 for details. Sundberg84 has updated the code on github with a fix.
  • 0 Votes
    6 Posts
    1k Views
    I
    hello, my bad. The second capacitor has not been properly attached, now the node is communicating! :) Thank you for the help. note: 10uF wasn't enough, 110uF works fine for me
  • Temp-Monitoring using OpenHab, MQTT, Pi 3 & Uno

    16
    0 Votes
    16 Posts
    2k Views
    N
    Wohoo got it to finally work :) not using MQTT but via serial gateway which is good enough for now :)
  • 0 Votes
    10 Posts
    1k Views
    pvojP
    @nca78 about my gateways: an old gateway running on MySensors 1.5 for years now. There are several nodes and sensors connected through it like temperature sensors, relays, switches. It controls my heating system with heat pump, buffering, 18 circles of floor heating, garden irrigation, alarm system, and some lights just for fun. the new gateway is a gateway to a Bluetooth network. Since MySensors has a great serial API and I have some experience with it I preferred to use it without a radio. I also think that it will be an interesting way of development and it could help to make MySensors even more popular. I had an idea to fork the library but unfortunately I don't have the experience and time to make it in good quality. But I'm sure letting developers to build connectors to different protocols is a very good idea. Catching Bluetooth messages from the air and decode them (with some reverse engineering) to send it through the MySensors gateway is relatively simple compared to the bidirectional communications. Processing some simple sensor data is a good first step.
  • Signing 2.3.1 no longer allowing upload of new data?

    16
    0 Votes
    16 Posts
    1k Views
    N
    GW Sketch, built under 2.3.1. I have not tried any more recent versions. Regards /** * 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 * The ArduinoGateway prints data received from sensors on the serial link. * The gateway accepts input on seral which will be sent out on radio network. * * The GW code is designed for Arduino Nano 328p / 16MHz * * Wire connections (OPTIONAL): * - Inclusion button should be connected between digital pin 3 and GND * - RX/TX/ERR leds need to be connected between +5V (anode) and digital pin 6/5/4 with resistor 270-330R in a series * * LEDs (OPTIONAL): * - To use the feature, uncomment any of the MY_DEFAULT_xx_LED_PINs * - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly * - ERR (red) - fast blink on error during transmission error or recieve crc error * */ // Enable debug prints to serial monitor //#define MY_DEBUG #define MY_SIGNING_SOFT #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7 //#define MY_SIGNING_WEAK_SECURITY // only for debug // Enable and select radio type attached #define MY_RADIO_RFM69 #define MY_RFM69_FREQUENCY RFM69_433MHZ // Set your frequency here //#define MY_RFM69_TX_POWER_DBM (13) //#define MY_RFM69_MAX_POWER_LEVEL_DBM (13) // max. TX power 10dBm = 10mW //#define MY_IS_RFM69HW // Omit if your RFM is not "H" //#define MY_RF69_IRQ_PIN 2 //#define MY_RF69_IRQ_NUM MY_RF69_IRQ_PIN #define MY_RFM69_CS_PIN 10 // NSS. Use MY_RF69_SPI_CS for older versions (before 2.2.0) //#define MY_RFM69_ENABLE_ENCRYPTION //#define MY_RFM69_NETWORKID 100 // Default is 100 in lib. Uncomment it and set your preferred network id if needed #define MY_SPLASH_SCREEN_DISABLED // 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. //#define MY_RF24_PA_LEVEL RF24_PA_MAX // Enable serial gateway #define MY_GATEWAY_SERIAL // Define a lower baud rate for Arduino's running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender) #if F_CPU == 8000000L #define MY_BAUD_RATE 38400 #endif // Enable inclusion mode #define MY_INCLUSION_MODE_FEATURE // Enable Inclusion mode button on gateway #define MY_INCLUSION_BUTTON_FEATURE // Inverses behavior of inclusion button (if using external pullup) //#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP // 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 // Inverses the behavior of leds //#define MY_WITH_LEDS_BLINKING_INVERSE // Flash leds on rx/tx/err // Uncomment to override default HW configurations #define MY_DEFAULT_ERR_LED_PIN 4 // Error led pin #define MY_DEFAULT_RX_LED_PIN 6 // Receive led pin #define MY_DEFAULT_TX_LED_PIN 7 // tx #include <MySensors.h> void setup() { // Setup locally attached sensors } void presentation() { // Present locally attached sensors } void loop() { // Send locally attached sensor data here }```
  • Raspberry GW rfm95 wont work

    3
    0 Votes
    3 Posts
    482 Views
    GeforceGamerG
    Here the debug log: pi@raspberrypi:~/MySensors $ sudo ./bin/mysgw Feb 12 11:34:17 INFO Starting gateway... Feb 12 11:34:17 INFO Protocol version - 2.3.2-beta Feb 12 11:34:17 DEBUG Serial port /dev/ttyMySensorsGateway (115200 baud) created Feb 12 11:34:17 DEBUG MCO:BGN:INIT GW,CP=RLNGL---,REL=3,VER=2.3.2-beta Feb 12 11:34:17 DEBUG TSF:LRT:OK Feb 12 11:34:17 DEBUG TSM:INIT Feb 12 11:34:17 DEBUG TSF:WUR:MS=0 Feb 12 11:34:17 DEBUG !TSM:INIT:TSP FAIL Feb 12 11:34:17 DEBUG TSM:FAIL:CNT=1 Feb 12 11:34:17 DEBUG TSM:FAIL:DIS Feb 12 11:34:17 DEBUG TSF:TDI:TSL Feb 12 11:34:27 DEBUG TSM:FAIL:RE-INIT Feb 12 11:34:27 DEBUG TSM:INIT Feb 12 11:34:27 DEBUG !TSM:INIT:TSP FAIL Feb 12 11:34:27 DEBUG TSM:FAIL:CNT=2 Feb 12 11:34:27 DEBUG TSM:FAIL:DIS Feb 12 11:34:27 DEBUG TSF:TDI:TSL Where can I find the pins in the config? I think there is something wrong.
  • problem with RF24 and switching relays

    2
    0 Votes
    2 Posts
    546 Views
    YveauxY
    @mhofer The serial log of the node might reveal what's going on with the node. It could very well be the inductive kick from switching the relay that resets or hangs your node. How is everything connected?
  • [SOLVED] ds18b20 vs si7021 loss of granularity in measurement

    9
    1
    0 Votes
    9 Posts
    1k Views
    B
    @yveaux Thanks for the hint and explanation. I appreciate that! I always used the search term: "conversion" (English is not my native language). I tried "casting" in combination with "c#" and I was almost immediately directed to my favorit c++ internet source (cplusplus.com) http://www.cplusplus.com/doc/tutorial/typecasting/ Many thanks! :+1: Boozz
  • Strange problem with OTA

    2
    0 Votes
    2 Posts
    409 Views
    S
    Hi, no one knows how to help me
  • Gateway MQTT with RFM69

    gateway mqtt rfm69
    9
    0 Votes
    9 Posts
    1k Views
    fritsF
    just wanted to add that my W5100/RFM69 ethernet gateway works - but I had to patch two lines in the Ethernet library (w5100.h), see https://forum.mysensors.org/topic/6330/still-searching-for-a-working-ethernet-gw-with-rfm69/8 Now I'll see if the MQTT gateway works, too...
  • RFM69 ATC not working?

    39
    1
    0 Votes
    39 Posts
    4k Views
    K
    Any news from the developers on this issue?

20

Online

11.7k

Users

11.2k

Topics

113.1k

Posts