Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Controllers
  3. Domoticz
  4. Error sending switch command, check device/hardware !

Error sending switch command, check device/hardware !

Scheduled Pinned Locked Moved Domoticz
15 Posts 6 Posters 4.9k Views 7 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • kk02067K Offline
    kk02067K Offline
    kk02067
    wrote on last edited by kk02067
    #5

    I put together another node exactly the same but keeping it at my workbench roughly the same distance from the gateway. It works without any troubles so far. The only change in the sketch is the node id and no ds18b20 temperature reading.
    The log from myscontroller show that it works even if the node doesn't send back the same status as the command. Domoticz doesn't complain as it does with the first node. This behaviour was last night.

    Now this morning the replys from the new nodes is also present. They weren't last night. At least not in the logs from MYScontroller.

    When domoticz sends a switchcommand to the gateway it does so with with ACK flag set. Does mysensors library automatically reply?
    I haven't programmed in a replyfunction in my sketch so it seems like it. But in that case why doesn't my first node reply every time?

    Strange. Have to investigate this further.

    mfalkviddM 1 Reply Last reply
    0
    • kk02067K Offline
      kk02067K Offline
      kk02067
      wrote on last edited by kk02067
      #6

      Having checked the serial output from the new node at my computer I see that the library returns the command when a ACK i requested. I also looked in the sourcecode for the library and it seems that it handles the ackmessage.
      So it seems that the ACK message get missed in the recieving node. Why, is the next question.

      Investigation continues...

      1 Reply Last reply
      0
      • kk02067K kk02067

        I put together another node exactly the same but keeping it at my workbench roughly the same distance from the gateway. It works without any troubles so far. The only change in the sketch is the node id and no ds18b20 temperature reading.
        The log from myscontroller show that it works even if the node doesn't send back the same status as the command. Domoticz doesn't complain as it does with the first node. This behaviour was last night.

        Now this morning the replys from the new nodes is also present. They weren't last night. At least not in the logs from MYScontroller.

        When domoticz sends a switchcommand to the gateway it does so with with ACK flag set. Does mysensors library automatically reply?
        I haven't programmed in a replyfunction in my sketch so it seems like it. But in that case why doesn't my first node reply every time?

        Strange. Have to investigate this further.

        mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by
        #7

        ... why doesn't my first node reply every time?

        My guess is that it does reply every time. But the message gets lost along the way. The most common reason is power problems on the sending node.

        kk02067K 1 Reply Last reply
        1
        • mfalkviddM mfalkvidd

          ... why doesn't my first node reply every time?

          My guess is that it does reply every time. But the message gets lost along the way. The most common reason is power problems on the sending node.

          kk02067K Offline
          kk02067K Offline
          kk02067
          wrote on last edited by
          #8

          @mfalkvidd After Little more investigating and experimenting I am pretty sure I have found a bug in the library. I found that when debug is active all is working as expected. But if I commented out debug it starts to not work. I tried it about 10 times, once with debug and then without. And everytime debug is active it works, no debug it fails.
          I opened the transport sourcefile and added a delay(100) at the procedure where the debug message is sent. With that change it works everytime with or without debug. It seems that if the ackmessage is sent to quick it gets missed by the gateway. Any thoughts on this?

          1 Reply Last reply
          1
          • sundberg84S Offline
            sundberg84S Offline
            sundberg84
            Hardware Contributor
            wrote on last edited by
            #9

            We should ping @tekka and @hek as well for this one @kk02067.

            Controller: Proxmox VM - Home Assistant
            MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
            MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
            RFLink GW - Arduino Mega + RFLink Shield, 433mhz

            1 Reply Last reply
            0
            • mfalkviddM Offline
              mfalkviddM Offline
              mfalkvidd
              Mod
              wrote on last edited by
              #10

              The problem could be related to https://forum.mysensors.org/topic/4450/sensor-presentation-failure/ if the debug causes enough delay.

              1 Reply Last reply
              0
              • hekH Offline
                hekH Offline
                hek
                Admin
                wrote on last edited by
                #11

                We just discussed this in the core team. Unless it is a compiler problem (like the other one we experienced some time ago) the most probably cause is..

                1. Radio problems. Could be bad really bad clone, or that radio doesn't have time to "recharge" enough between transmissions.
                2. Slow node, Fast Gw => GW sends response and node isn't in RX mode yet. But this is also quite strange as GW retransmits 15x with a 1.5ms delay before failing.
                1 Reply Last reply
                0
                • martinhjelmareM Offline
                  martinhjelmareM Offline
                  martinhjelmare
                  Plugin Developer
                  wrote on last edited by
                  #12

                  I've experienced a similar problem when testing OTA updates on SensebenderMicro. With debug active, no missed messages, with debug disabled, a lot of missed messages and retries. It was a really obvious difference, since the rate of messages during OTA updates is quite fast. Gateway was an UNO and radios were clones.

                  1 Reply Last reply
                  0
                  • N Offline
                    N Offline
                    novicit
                    wrote on last edited by
                    #13

                    @kk02067 , Would you please post specifically where you added the delay(100). I have exactly the same problem as you and would like to be sure the ack gets back to the controller. Thank you!

                    In other tests and explorations I had noticed that with debug enabled things seemed to work a bit more consistently - but had not tied it to this problem. Unfortunately, debug sacrifices quite a bit of flash which I need for other uses.

                    kk02067K 1 Reply Last reply
                    0
                    • N novicit

                      @kk02067 , Would you please post specifically where you added the delay(100). I have exactly the same problem as you and would like to be sure the ack gets back to the controller. Thank you!

                      In other tests and explorations I had noticed that with debug enabled things seemed to work a bit more consistently - but had not tied it to this problem. Unfortunately, debug sacrifices quite a bit of flash which I need for other uses.

                      kk02067K Offline
                      kk02067K Offline
                      kk02067
                      wrote on last edited by
                      #14

                      @novicit If I remember correctly i put it here: https://github.com/mysensors/MySensors/blob/master/core/MyTransport.cpp#L463
                      just to test that it worked. Then I removed the change to keep the library source original.

                      I turned on debug again to get it working again.. The reason why I wanted to have debuging disabled was to keep the hexfile size down so the OTA update wouldn't take so long time. I hope this issue will be fixed in a more elegant manner in a future release.

                      1 Reply Last reply
                      1
                      • N Offline
                        N Offline
                        novicit
                        wrote on last edited by novicit
                        #15

                        Update. Please note that when @kk02067 gave the response directly above it was for Ver 2.0 and referenced a line in that code. It appears that changes leading to Ver 2.1.1 the location has changed and the delay(100) line would not be added at L463 as referenced. In Ver 2.1.1 it is now added between L659 and L660. It will look like this I believe:

                        L658 _msgTmp.destination = sender;
                        L659 // send ACK, use transportSendRoute since ACK reply is not internal, i.e. if !transportOK do not reply
                        ADD delay(100) here!!
                        L660 (void)transportSendRoute(_msgTmp);

                        Also, I have not yet used Ver 2.1.1, so don't know if the changes in the latest version might solve the Domoticz relay ack issue I had. This solution solved my problems 100% in Ver 2.0.

                        1 Reply Last reply
                        1
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        14

                        Online

                        11.7k

                        Users

                        11.2k

                        Topics

                        113.1k

                        Posts


                        Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • MySensors
                        • OpenHardware.io
                        • Categories
                        • Recent
                        • Tags
                        • Popular