logo elektroda
logo elektroda
X
logo elektroda

OpenBeken: Issue with AddChangeHandler Command for JSON Telemetry to ThingsBoard

qrmonzergamal 408 1
ADVERTISEMENT
  • #1 21247061
    qrmonzergamal
    Level 2  
    hello,,
    i think repeating command is not working :/
    command : AddChangeHandler Channel0 != -999 publish telemetry {"Temperature":$Ch0}
    I just want to send data directly to ThingsBoard as JSON like this: {"Temperature":$Ch0},,
    but OpenBeken does not send it in this form so I need to use publish command with repeating command :)
  • ADVERTISEMENT
  • #2 21265169
    p.kaczmarek2
    Moderator Smart Home
    1. what you are posting is not a "repeating command", it's change handler
    2. it's working, but it's fired only when channel 0 transitions from being -999 to be other value than -999, and NOT on other transition
    3. you are most likely looking for:
    
    addEventHandler OnChannelChange 20 publishFloat myAliasedVal $CH20*0.1
    

    or something like that, it's just a sample, change publishFloat to anything you want
    Helpful post? Buy me a coffee.
ADVERTISEMENT