MQTT Client Gateway - Retry



  • Hi Folks,

    I came across an issue where sometimes a MQTT message sent to an actuator using the MQTT Client Gateway fails (http://forum.mysensors.org/topic/524/mqtt-client-gateway/32) which means that OpenHAB think's the actuator is in one state, when in actual fact it's in another. In my case it's a Servo connected to a Thermostat to control my heating - so OpenHAB sends a message to turn it off, but it didn't get through, and it doesn't seem like it's retried - so the heating stays on - obviously this is a problem!

    Is there a way to resend the data if it didn't go through correctly?



  • After testing. It seems like it's happening more often than not. I might have to send the same mqtt instruction 4 times before the sensor moves the servo.

    I unfortunately can't debug the gateway as I have to compile it with debug off for the mqtt client gateway to fit on my uno.


  • Hardware Contributor

    In the original code I had to patch the payload according to Post 26 of the thread you quoted. This solved the issue you have for me.

    My new sensors all report back, their state, when they got changed. This has the advantage, that I can react on changes (e.g. in openHAB), if they are not made from outside (e.g. local switch)



  • Hi Foto,

    Thanks for the response, but I already had that code as I forked your code. I don't think the message is getting to the client full stop, the lights on the node don't flash when the node doesn't respond. It's almost as though I need the gateway to insist on getting an ack from the node, and it it doesn't get one, keep sending it till it does.

    The actual radio issue though strikes me as a power issue but, both the gateway and the node use 100uf capacitors which should provide enough reserve power to ensure the radios are fed well?



  • I changed the radio to be powered by the external power supply (it can power both 3.3V and 5V) - and it's much more reliable until eventually it stops - I think the power supply struggles supplying both the servo and the radio.

    I'm going to try hooking up another Nano tonight to purely provide the 3.3V to the radio, see if that improves things.

    But I was wondering what the best power supplies people use to power this stuff? I do seem to have a lot of issues with reliable power. Also, I still would like to implement an ACK feature - I could get the sensor to send a state update on MQTT when the state changes I suppose, but would be nice if the ACK's were built in.


  • Hero Member

    @britcowboy take a look at the conversation a lot has been written on power and supplies


Log in to reply
 

Suggested Topics

  • 3
  • 10
  • 1
  • 2
  • 2
  • 2

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts