Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. siod
    3. Topics
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Topics created by siod

    • siod

      [SOLVED] Node not uisng it´s ID!?
      Troubleshooting • • siod  

      3
      0
      Votes
      3
      Posts
      807
      Views

      siod

      damn it, that did the trick!! Just haven´t noticed... Thx for your superfast support!!
    • siod

      [SOLVED] call of overloaded 'sleep(int, int)' is ambiguous
      Troubleshooting • • siod  

      3
      0
      Votes
      3
      Posts
      935
      Views

      siod

      Hi, thanks for your help, that´s the solution!!
    • siod

      Sonoff Pow with Tasmota: HowTo MQTT?
      Hardware • • siod  

      2
      0
      Votes
      2
      Posts
      2295
      Views

      gohan

      my_device is your device name, you should read it in the code or into the settings, or just subscribe to # with a mqtt client and reboot the sonoff, you should see the sonoff publishing to some topics. Using the sonoff over mqtt is out of the scope of mysensors as it is would get controlled by the controller (OpenHab, Domoticz, HA, etc)
    • siod

      Need help with ESP8266 Node in MQTT Network
      Development • • siod  

      6
      0
      Votes
      6
      Posts
      1746
      Views

      siod

      Hi guys, thanks to both of you! Thanks @TimO for the general information and thanks to @kimot for finding the exact solution for what I was looking for. Awesome!! I will give it a try as soon as possible...
    • siod

      What settings for ESP8266 Node?
      Troubleshooting • • siod  

      2
      0
      Votes
      2
      Posts
      956
      Views

      gohan

      It depends if you want it connected via wifi or via nrf24, if the second just leave the nrf24 define
    • siod

      How to send MQTT message from controller to Node?
      Troubleshooting • • siod  

      4
      0
      Votes
      4
      Posts
      2837
      Views

      siod

      This the code I got so far, which does not work #define MY_RADIO_NRF24 //MySensor Library auf NRF24 Funkmodul einstellen, muss vor MySensor.h Initialisierung geschehen // Define Node ID #define MY_NODE_ID 5 //#define MY_PARENT_NODE_ID 50 //Repeater Node 1! //#define MY_PARENT_NODE_IS_STATIC #include <MySensors.h> #include <SPI.h> #include <IRremote.h> #define CHILD_ID 1 // Id of the sensor child IRsend irsend; // Initialize motion message MyMessage msg(CHILD_ID, V_IR_SEND); void setup() { Serial.begin(9600); } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("LED Licht TV Steuerung", "1.0"); // Register all sensors to gw (they will be created as child devices) present(CHILD_ID, S_IR); } void loop() { } void receive(const MyMessage &message) { // We only expect one type of message from controller. But we better check anyway. if (message.type == V_IR_SEND) { // Send command to Turn LEDs On if (message.getString() == "FF02FD") { // ??? for (int i = 0; i < 3; i++) { irsend.sendNEC(0xFF02FD, 32); Serial.println(message.getString()); Serial.println("Message sent"); delay(40); } } } } edit: from the serial monitor I see that the node receives the "FF02FD" String, but it does not enter this part if (message.getString() == "FF02FD") { // ??? for (int i = 0; i < 3; i++) { irsend.sendNEC(0xFF02FD, 32); Serial.println(message.getString()); Serial.println("Message sent"); delay(40); } } edit2: This is what I am sending from openhab over MQTT: mygateway1-in/5/1/1/0/32 edit3: Ok, now I see where it fails: message.getString() contains FF02FD but when I say if (message.getString() == "FF02FD") it does not recognise the FF02FD. But I don´t understand why edit4: Ok, I got it, finally...: message.getString("FF02FD");
    • siod

      Repeater Node not working, pls help debug...
      Troubleshooting • • siod  

      2
      0
      Votes
      2
      Posts
      984
      Views

      gohan

      NACK usually it is a range issue if the radio module is working correctly. Try putting repeater node closer to the gateway
    • siod

      Pls help debug this...
      Troubleshooting • • siod  

      3
      0
      Votes
      3
      Posts
      889
      Views

      siod

      @tbowmo I removed the 100 uF cap, now it is working
    • siod

      Who can Debug this GW Messages?
      Troubleshooting • • siod  

      1
      0
      Votes
      1
      Posts
      486
      Views

      No one has replied

    • siod

      Repeater Node Question
      Troubleshooting • • siod  

      6
      0
      Votes
      6
      Posts
      4670
      Views

      siod

      ok, thanks for clarifying this!
    • siod

      Security System - send message like TCP/with confirmation
      Development • • siod  

      1
      0
      Votes
      1
      Posts
      500
      Views

      No one has replied

    • siod

      Send custom Message to gw
      Troubleshooting • • siod  

      2
      0
      Votes
      2
      Posts
      1577
      Views

      boozz

      Hi Siod, Have a look at the "download and api" page here on mysensors (link). Read through the section API (link) to see how you can send a message to the gateway and if you need some in-dept info go through the section SERIAL PROTOCOL (link). You'll notice that everytime a message is send to the gateway it contains the node-id. How this is then relayed to your controller is explained in the section "Controller". I guess you can find this for yourself in the menu on top of the homepage. BR, Boozz
    • siod

      problem getting Id from GW (parent)
      Troubleshooting • • siod  

      1
      0
      Votes
      1
      Posts
      644
      Views

      No one has replied

    • siod

      cannot compile new MQTT GW sketch
      Troubleshooting • • siod  

      3
      0
      Votes
      3
      Posts
      1175
      Views

      siod

      Mmh, thx, I just copied and pasted it from the instructions from the main page... So it must get corrected there as well... Thank you, I will try it later! edit: For the sake of completeness, I want to mention, that @Ernst79 already gave the hint in the comments section of "Building a MQTT Gateway" Install-Instruction on the mainpage. I just did not see it, but I would love to see @tbowmo to add this line to the code. Thank you!
    • siod

      how to search within a thread
      General Discussion • • siod  

      4
      0
      Votes
      4
      Posts
      844
      Views

      siod

      I get "error - no plugins available"
    • siod

      Please help with Serial Montor Message
      Troubleshooting • • siod  

      3
      0
      Votes
      3
      Posts
      1092
      Views

      siod

      mmh, but as I mentioned in my first post the node (and all my other notes) reported their status instantly when I restarted my gateway, so I guess it´s a gateway problem.
    • siod

      How To Debug
      Troubleshooting • • siod  

      4
      0
      Votes
      4
      Posts
      2333
      Views

      siod

      Ok guys, thanks for your quick replies and please excuse my late reply...
    • siod

      [Solved] Manually setting node-id does not work
      Troubleshooting • • siod  

      5
      0
      Votes
      5
      Posts
      5400
      Views

      siod

      @tekka said: That's it Nothing more to add, but Thank you!
    • siod

      Problem building MQTT Gateway ver 2.0
      Hardware • • siod  

      8
      0
      Votes
      8
      Posts
      3066
      Views

      Qu3Uk

      @siod said: Contact FensterKzR "Fenster Rechts" (FF_Kz) {mqtt="<[mysensors-1:mygateway1-out/3/2/V_TRIPPED:state:OPEN:1],<[mysensors-1:mygateway1-out/3/2/V_TRIPPED:state:CLOSED:0]"} Can't tell if you fixed this yet but your Contact Item is incorrect. You've stated the topic in the MQTT part as "mygateway1-out/3/2/V_TRIPPED" when it should actually be "mygateway1-out/3/2/1/0/16"
    • siod

      Ethernet Gateway freezes after a while
      Troubleshooting • • siod  

      1
      0
      Votes
      1
      Posts
      483
      Views

      No one has replied

    • siod

      Update every node?
      Troubleshooting • • siod  

      8
      0
      Votes
      8
      Posts
      1611
      Views

      Anduril

      and thats the point where you thoink about OTA updates as a very handy tool...
    • siod

      MQTT, Openhab, Mosquitto and static Node ID Problem
      Troubleshooting • • siod  

      8
      0
      Votes
      8
      Posts
      2914
      Views

      siod

      Thank you Martin, that solved my issue!!
    • siod

      can´t upload my sketches anymore!!!
      Troubleshooting • • siod  

      4
      0
      Votes
      4
      Posts
      1038
      Views

      siod

      I had to re-download and reinstall the complete 1.5 library what solved the issue. Don´t know what happened but that helped! Just the quick and dirty way...
    • siod

      Raspberry Pi NRF24L01+ + MQTT + MQTT Gateway
      Hardware • • siod  

      1
      0
      Votes
      1
      Posts
      1781
      Views

      No one has replied

    • siod

      MQTT - OpenHAB - Mysensor Library -> How to subscribe?
      OpenHAB • • siod  

      2
      0
      Votes
      2
      Posts
      2214
      Views

      siod

      I would like to post my code here, but it´s actually not my code but the code from this website: link I am trying to make it MySensors MQTT Gateway compatible and I am not making any progress right now and need you help. First of all I would like to post the original arduino code from the above mentioned website: #include <SPI.h> #include <Ethernet.h> #include <PubSubClient.h> // http://knolleary.net/arduino-client-for-mqtt/ // MAC Adresse des Ethernet Shields byte mac[] = { 0xDE, 0xED, 0xBA, 0xFE, 0xFE, 0xED }; // IP des MQTT Servers byte server[] = { 192, 168, 2, 9 }; // Ethernet Client zur Kommunikation des MQTT Clients EthernetClient ethClient; // MQTT Client zur Kommunikation mit dem Server // Server - Variable des Types byte mit Serveradresse // 1883 - Ist der Standard TCP Port // callback - Function wird aufgerufen wen MQTT Nachrichten eintreffen. Am ende des Sketches // ethClient - Angabe des Ethernet Clients PubSubClient mqttClient(server, 1883, callback, ethClient); // Timervariable für eine Verzögerung. Als alternative zu delay was die verarbeitung anhält. int timer = 0; int EndTimer = 200; // Pins des RGB LED Strip int LEDred=5; int LEDgreen=6; int LEDblue=3; // Übermittelte Farbwerte int LEDredValue = 0; int LEDgreenValue = 0; int LEDblueValue = 0; // Gerade gesetzte Farbe int CURredValue = 0; int CURgreenValue = 0; int CURblueValue = 0; void setup() { // Setzen der PINS als Ausgang pinMode(LEDblue, OUTPUT); pinMode(LEDred, OUTPUT); pinMode(LEDgreen, OUTPUT); // Bei start Farbe Blau setzen analogWrite(LEDred, 0); analogWrite(LEDgreen, 0); analogWrite(LEDblue, 100); // Initialisierung des Ethernets if (Ethernet.begin(mac) == 0) { // Wenn DHCP fehlschlägt dann rot setzen und aufhören analogWrite(LEDred, 100); analogWrite(LEDgreen, 0); analogWrite(LEDblue, 0); while (true); } else { // Wenn DHCP OK ist dann grün setzen LEDgreenValue = 100; } } void loop() { // Aufbau der Verbindung mit MQTT falls diese nicht offen ist. if (!mqttClient.connected()) { mqttClient.connect("arduinoClient"); // Abonieren von Nachrichten mit dem angegebenen Topics mqttClient.subscribe("/openHAB/Nachtlicht/RED/#"); mqttClient.subscribe("/openHAB/Nachtlicht/GREEN/#"); mqttClient.subscribe("/openHAB/Nachtlicht/BLUE/#"); // Alternative Abonierung aller Topics unter /openHAB/Nachtlicht // mqttClient.subscribe("/openHAB/Nachtlicht/#"); } if (timer <= EndTimer) timer++; else { timer = 0; if (LEDredValue < CURredValue) CURredValue--; else if (LEDredValue > CURredValue) CURredValue++; if (LEDgreenValue < CURgreenValue) CURgreenValue--; else if (LEDgreenValue > CURgreenValue) CURgreenValue++; if (LEDblueValue < CURblueValue) CURblueValue--; else if (LEDblueValue > CURblueValue) CURblueValue++; } analogWrite(LEDred, CURredValue); analogWrite(LEDgreen, CURgreenValue); analogWrite(LEDblue, CURblueValue); mqttClient.loop(); // Schleife für MQTT } // =========================================================== // Callback Funktion von MQTT. Die Funktion wird aufgerufen // wenn ein Wert empfangen wurde. // =========================================================== void callback(char* topic, byte* payload, unsigned int length) { // Zähler int i = 0; // Hilfsvariablen für die Convertierung der Nachricht in ein String char message_buff[100]; // Kopieren der Nachricht und erstellen eines Bytes mit abschließender \0 for(i=0; i<length; i++) { message_buff[i] = payload[i]; } message_buff[i] = '\0'; // Konvertierung der nachricht in ein String String msgString = String(message_buff); // Überprüfung des Topis und setzen der Farbe je nach übermittelten Topic if (String(topic) == "/openHAB/Nachtlicht/RED") LEDredValue = round(msgString.toInt() * 2.55); if (String(topic) == "/openHAB/Nachtlicht/GREEN") LEDgreenValue = round(msgString.toInt() * 2.55); if (String(topic) == "/openHAB/Nachtlicht/BLUE") LEDblueValue = round(msgString.toInt() * 2.55); } and here follows my "modified" part. I hope you guys can support me here! #include <MySensor.h> #include <SPI.h> // Timervariable für eine Verzögerung. Als alternative zu delay was die verarbeitung anhält. int timer = 0; int EndTimer = 200; // Pins des RGB LED Strip int LEDred=3; int LEDgreen=4; int LEDblue=2; // Übermittelte Farbwerte int LEDredValue = 0; int LEDgreenValue = 0; int LEDblueValue = 0; // Gerade gesetzte Farbe int CURredValue = 0; int CURgreenValue = 0; int CURblueValue = 0; MySensor gw; MyMessage dimmerMsg(21, V_DIMMER); //21=Sensor ID 21, Dimmer; An/Aus MyMessage lightMsgR(22, V_LIGHT); //21=Sensor ID 21, Rot MyMessage lightMsgG(23, V_LIGHT); //21=Sensor ID 21, Grün MyMessage lightMsgB(24, V_LIGHT); //21=Sensor ID 21, Blau void setup() { //MySensors Library initialisieren gw.begin(); //Sensor ID und Typ übermitteln gw.present(21, S_DIMMER); gw.present(22, V_LIGHT); gw.present(23, V_LIGHT); gw.present(24, V_LIGHT); // Setzen der PINS als Ausgang pinMode(LEDblue, OUTPUT); pinMode(LEDred, OUTPUT); pinMode(LEDgreen, OUTPUT); // Bei start Farbe Blau setzen analogWrite(LEDred, 0); analogWrite(LEDgreen, 0); analogWrite(LEDblue, 100); } void loop() { // Abonieren von Nachrichten mit dem angegebenen Topics mqttClient.subscribe("/openHAB/Nachtlicht/RED/#"); mqttClient.subscribe("/openHAB/Nachtlicht/GREEN/#"); mqttClient.subscribe("/openHAB/Nachtlicht/BLUE/#"); } if (timer <= EndTimer) timer++; else { timer = 0; if (LEDredValue < CURredValue) CURredValue--; else if (LEDredValue > CURredValue) CURredValue++; if (LEDgreenValue < CURgreenValue) CURgreenValue--; else if (LEDgreenValue > CURgreenValue) CURgreenValue++; if (LEDblueValue < CURblueValue) CURblueValue--; else if (LEDblueValue > CURblueValue) CURblueValue++; } analogWrite(LEDred, CURredValue); analogWrite(LEDgreen, CURgreenValue); analogWrite(LEDblue, CURblueValue); mqttClient.loop(); // Schleife für MQTT } // =========================================================== // Callback Funktion von MQTT. Die Funktion wird aufgerufen // wenn ein Wert empfangen wurde. // =========================================================== void callback(char* topic, byte* payload, unsigned int length) { // Zähler int i = 0; // Hilfsvariablen für die Convertierung der Nachricht in ein String char message_buff[100]; // Kopieren der Nachricht und erstellen eines Bytes mit abschließender \0 for(i=0; i<length; i++) { message_buff[i] = payload[i]; } message_buff[i] = '\0'; // Konvertierung der nachricht in ein String String msgString = String(message_buff); // Überprüfung des Topis und setzen der Farbe je nach übermittelten Topic if (String(topic) == "/openHAB/Nachtlicht/RED") LEDredValue = round(msgString.toInt() * 2.55); if (String(topic) == "/openHAB/Nachtlicht/GREEN") LEDgreenValue = round(msgString.toInt() * 2.55); if (String(topic) == "/openHAB/Nachtlicht/BLUE") LEDblueValue = round(msgString.toInt() * 2.55); } I added LED Red, Green and Blue and set child ID´s to 22,23 and 24, 21 is for Dimmer. I have no idea if this done the right way MyMessage dimmerMsg(21, V_DIMMER); //21=Sensor ID 21, Dimmer; An/Aus MyMessage lightMsgR(22, V_LIGHT); //21=Sensor ID 21, Rot MyMessage lightMsgG(23, V_LIGHT); //21=Sensor ID 21, Grün MyMessage lightMsgB(24, V_LIGHT); //21=Sensor ID 21, Blau especially the following part is a big problem to me because I don´t know how to "subscribe" with the MySensors MQTT library: void loop() { // Abonieren von Nachrichten mit dem angegebenen Topics mqttClient.subscribe("/openHAB/Nachtlicht/RED/#"); mqttClient.subscribe("/openHAB/Nachtlicht/GREEN/#"); mqttClient.subscribe("/openHAB/Nachtlicht/BLUE/#"); } how must I modify this??
    • siod

      openhab controlling rc switch on raspberry pi
      OpenHAB • openhab rc switch • • siod  

      6
      0
      Votes
      6
      Posts
      3609
      Views

      siod

      @Jan-Gatzke said: Did you install the exec addon? Thank you Sir! was asking in a different forum as well, nobody had the idea to install this binding first and I didn´t know a binding is needed for execution of commands... Well then, problem solved
    • siod

      Ethernet Gateway: How to turn Off Debug?
      Troubleshooting • • siod  

      11
      0
      Votes
      11
      Posts
      4496
      Views

      siod

      Ok, so I edited MyConfig.h but now I get this message from Arduino IDE: Sketch uses 31,890 bytes (103%) of program storage space. Maximum is 30,720 bytes. Global variables use 1,564 bytes (76%) of dynamic memory, leaving 484 bytes for local variables. Maximum is 2,048 bytes. So it still doesn´t fit. Any idea how to save some storage space?