Skip to content

Troubleshooting

Help! Everything just falls apart
2.7k Topics 21.5k Posts
  • Upgrading to 2.0 sketch dificulty

    11
    0 Votes
    11 Posts
    3k Views
    andredtsA
    @Boots33 Thanks, that was exactly what I needed. Synchronizing was a great bonus.
  • Doubt about a concept in GatewayESP8266

    13
    0 Votes
    13 Posts
    3k Views
    Djames SuhankoD
    @Grubstake Hello! I thank you to this tip. I already have a broker MQTT to many other tasks and I'm trying to collect data to automatically decisions. I would like to have the data so simple as possible and I thinking that MQTT would be like a bridge to my own interaction. I can see already data incoming in my MQTT broker, but it's no so clear as I want. In true, the only thing that i want is the mesh network and data sending as a string json or something like that - for this reason I choose MQTT, but MySensors has a protocol behind and nor MQTT messages are clear to me. I will think a bit more about what I can do, but if you have some suggestion to only use mesh without other layers, please, let me know.
  • Mighty Mule Driveway Alarm to Mysensors

    3
    0 Votes
    3 Posts
    2k Views
    C
    sundberg84. Thanks for the advice. The LEDs are not always a good source since they stay on after the first trigger. I was able to tap into the buzzer using an optocoupler/optoisolator. I used a simple button sketch and can get LEDs to blink on the input and output side of the optocoupler (all hardware, no software involved), as well as an LED controlled by the arduino based on input from optocoupler. The struggle I am having is getting a mysensors sketch to adopt to the gateway with this setup. I have other door switch and temp sensors in the system no problem with homeassistant. I have used the basic door/binary/button sketch with no luck. My gateway's LEDs indicate that the signal is coming through but it won't adopt. I have also tried the fire alarm sketches linked below but they will not compile even after fixing the library issue. Awesome video to learn optocouplers https://www.youtube.com/watch?v=m5UQ9nMmamo Fire alarm/mysensors tutorials that did not compile https://forum.mysensors.org/topic/934/mysensoring-a-kidde-smoke-detector-completed https://www.youtube.com/watch?v=mNsar_e8IsI Looking for ideas. I will try to post a video of my wiring and what is going on as soon as possible. I think I am just missing something simple. Thanks!
  • ERROR - 'decode_type_t' does not name a type

    2
    0 Votes
    2 Posts
    2k Views
    mfalkviddM
    @Newzwaver sorry for the late reply. Try removing the MySensors folder (with the Arduino IDE closed) and then re-install MySensors using the Library Manager inside the Arduino IDE.
  • Sensor causing a gateway reboot

    5
    0 Votes
    5 Posts
    1k Views
    ThucarT
    Ok, so I replaced the 3.3V 8MHz Pro Mini with a 5V 16MHz one. Still running it from that same power source, so currently supplying 4.1V to the VCC. And no more gateway reboots. Both Pro Minis have the MysBootloader on them, no other component or code changes. So I guess the next thing is to wire up another 3.3V Mini, flash the bootloader on it and see how it goes.
  • Sensebender Gateway error uploading the sketch

    7
    0 Votes
    7 Posts
    1k Views
    tbowmoT
    @MoeAlmas I'm out of ideas, other than looking for bad soldering etc.
  • Fighting off a relay module

    3
    0 Votes
    3 Posts
    916 Views
    martinhjelmareM
    @moskovskiy82 Add a wait call after sending the initial value. I don't understand why you want to invert the saved state before sending it to the controller.
  • 0 Votes
    11 Posts
    2k Views
    martinhjelmareM
    @Brian-Morris Don't invert the state before you send it back to the controller . Ie this part: state?false:true should be: state?true:false in the receive function.
  • [Solved]Gateway and Sensor not working , TSM:RADIO:FAIL

    9
    0 Votes
    9 Posts
    8k Views
    J
    @mfalkvidd Ok thanks for your reply
  • First install on RPI - bash command not found.

    3
    0 Votes
    3 Posts
    908 Views
    TerrenceT
    @mfalkvidd said in First install on RPI - bash command not found.: write ./configure before all parameters Oh, ok, I will try that.
  • 0 Votes
    18 Posts
    3k Views
    AnticimexA
    @alexanderkind great that the root cause was found! And now we have a forum thread for others to read in case they have the same problem! Thanks for reporting!
  • loungeroom sketch transport failure

    18
    0 Votes
    18 Posts
    3k Views
    markjgabbM
    @sundberg84 solved the light sensitivity level by swapping the 10k for a 100k... makes it more acurate in lighter enviroments, but less so in dark enviroments but by my theory after its a little dim im counting it as dark all the way to full dark for lighting purposes anyway cheers for all your help....
  • Mysensor gateway UNO shield W5100

    4
    0 Votes
    4 Posts
    1k Views
    gohanG
    there is 1.6.20 out... you could give it a shot, maybe they fixed something :D
  • Can't get my new mysensors LED-Dimmer to show up.

    3
    0 Votes
    3 Posts
    973 Views
    H
    @martinhjelmare Thank you! After some reading and poorly written code i managed to get it working. :smile:
  • Node without radio

    10
    0 Votes
    10 Posts
    2k Views
    G
    OMG, thats it. Downgrade to 1.6.11 solved problem. Thanks for your time. Y'r great!
  • Serial gateway problem after upgrade from 1-5 to 2-1-1

    10
    0 Votes
    10 Posts
    2k Views
    pihomeP
    Basic Temperature sensors sketch /** * 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 // 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_LOW // 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. // #define MY_RF24_PA_LEVEL RF24_PA_LOW #define MY_RF24_PA_LEVEL RF24_PA_MAX //#define MY_DEBUG_VERBOSE_RF24 // RF channel for the sensor net, 0-127 #define RF24_CHANNEL 125 //RF24_250KBPS for 250kbs, RF24_1MBPS for 1Mbps, or RF24_2MBPS for 2Mbps #define RF24_DATARATE RF24_250KBPS #include <SPI.h> #include <MySensors.h> #include <DallasTemperature.h> #include <OneWire.h> int BATTERY_SENSE_PIN = A0; // select the input pin for the battery sense point #define COMPARE_TEMP 0 // Send temperature only if changed? 1 = Yes 0 = No //PiHome Node ID #define MY_NODE_ID 25 #define ONE_WIRE_BUS 3 // Pin where dallase sensor is connected #define MAX_ATTACHED_DS18B20 16 unsigned long SLEEP_TIME = 150000; // Sleep time between reads (in milliseconds) int oldBatteryPcnt = 0; 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); // use the 1.1 V internal reference #if defined(__AVR_ATmega2560__) analogReference(INTERNAL1V1); #else analogReference(INTERNAL); #endif } // void sendSketchInfo(const char "Temperature Sensor", const char "1.1", bool ack); 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() { // get the battery Voltage int sensorValue = analogRead(BATTERY_SENSE_PIN); #ifdef MY_DEBUG Serial.println(sensorValue); #endif // 1M, 470K divider across battery and using internal ADC ref of 1.1V // Sense point is bypassed with 0.1 uF cap to reduce noise at that point // ((1e6+470e3)/470e3)*1.1 = Vmax = 3.44 Volts // 3.44/1023 = Volts per bit = 0.003363075 int batteryPcnt = sensorValue / 10; #ifdef MY_DEBUG float batteryV = sensorValue * 0.003363075; Serial.print("Battery Voltage: "); Serial.print(batteryV); Serial.println(" V"); Serial.print("Battery percent: "); Serial.print(batteryPcnt); Serial.println(" %"); #endif if (oldBatteryPcnt != batteryPcnt) { // Power up radio after sleep sendBatteryLevel(batteryPcnt); oldBatteryPcnt = batteryPcnt; } // 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>((getControllerConfig().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); } these message are received on serial gateway... 0;255;3;0;9;TSF:MSG:BC 0;255;3;0;9;TSF:MSG:FPAR REQ,ID=25 0;255;3;0;9;TSF:PNG:SEND,TO=0 0;255;3;0;9;TSF:CKU:OK 0;255;3;0;9;TSF:MSG:GWL OK 0;255;3;0;9;!TSF:MSG:SEND,0-0-25-25,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0 0;255;3;0;9;TSF:MSG:READ,25-25-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 0;255;3;0;9;TSF:MSG:BC 0;255;3;0;9;TSF:MSG:FPAR REQ,ID=25 0;255;3;0;9;TSF:CKU:OK,FCTRL 0;255;3;0;9;TSF:MSG:GWL OK 0;255;3;0;9;!TSF:MSG:SEND,0-0-25-25,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0 0;255;3;0;9;TSF:MSG:READ,25-25-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 0;255;3;0;9;TSF:MSG:BC 0;255;3;0;9;TSF:MSG:FPAR REQ,ID=25 0;255;3;0;9;TSF:CKU:OK,FCTRL 0;255;3;0;9;TSF:MSG:GWL OK``` its looking for hardware ack, any idea why this is happening? only happens if sensors is restarted,
  • Help to Build a Sensor with Arduino Pro 3V

    5
    0 Votes
    5 Posts
    1k Views
    S
    Discovered the problem !! I fed through the "RAW" pin while feeding through the VCC Ok is now working
  • Move MySensor nodes between controllers?

    5
    0 Votes
    5 Posts
    1k Views
    YveauxY
    @Teknor try clearing the EEprom from the problematic nodes.
  • 0 Votes
    9 Posts
    2k Views
    B
    @Newzwaver although I always attach 3 wires to the Dallas DS18B20 sensors (guess you'll be using these...) I think the dallas temp sensor can be run using 2 wires. My 'normal' hardware setup is that I connect the middle leg of the DS18B20 to pin 3 of the 'arduino' (could be any other DI pin of course) from 5V a 4k7 resistor on the same pin 3 and both outer legs of the DS18B20 on GND. works great for me. BR Boozz
  • Relay with button wihtout ackn from controller

    4
    0 Votes
    4 Posts
    978 Views
    BulldogLowellB
    @Markus. I think that is how your original sketch works! Unless the gateway isn't functioning. You can always leave the function in both places.

21

Online

11.7k

Users

11.2k

Topics

113.1k

Posts