RTL_433 Timestamps

Hello,

I thought that [SYS] Add timestamp for messages by dkneisz · Pull Request #1677 · 1technophile/OpenMQTTGateway · GitHub “Add timestamp for messages” is available in version 1.7 but the rtl433ToMqtt gatway does not seem to give me a time in the mqtt message.

Do I hav to enable that or will it be enabled in a future version?

Hello,

Yes you have to enable the build flag, and generate your own build. It can’t be done at runtime

Thank you very much :slight_smile:

I thought I would only do config in the platform.ino file, but I now edited the User_config.h and set # define message_UTCtimestamp true

but rtl_433 output to mqtt does not show a tiemstamp…

Does the board have internet access ?

yes, I see the time on the display but not in the rtl_433tomqtt message:

N: [ OMG->MQTT ] topic: home/OMG_esp32doitv1-sx1278/SSD1306toMQTT msg: {“onstate”:true,“brightness”:50,“display-flip”:true,“idlelogo”:true,“log-oled”:false,“json-oled”:true,"UTCtime":“2024-08-30T11:48:00Z”}
N: [ OMG->MQTT ] topic: home/OMG_esp32doitv1-sx1278/WebUItoMQTT msg: {“displayMetric”:true,“webUISecure”:true,“displayQueue”:0,“UTCtime”:“2024-08-30T11:48:00Z”}
N: type: null
N: [ OMG->MQTT ] topic: home/OMG_esp32doitv1-sx1278/RTL_433toMQTT/Bresser-7in1/1272 msg: {“model”:“Bresser-7in1”,“id”:1272,“temperature_C”:20.8,“humidity”:73,“wind_max_m_s”:1.7,“wind_avg_m_s”:1.5,“wind_dir_deg”:84,“rain_mm”:1069.2,“light_klx”:23.095,“light_lux”:23095,“uv”:3.3,“battery_ok”:1,“mic”:“CRC”,“protocol”:“Bresser Weather Center 7-in-1”,“rssi”:-84,“duration”:40996} **
N: type: null

Could you try the latest development version.
It should fix your issue

Thank you very very much, problem solved, now the time is within the mqtt message :slight_smile:

I did a “git pull origin development” and again adapted the User_config (changed NTP to my own, message_UTCtimestamp true)

{“model”:“Bresser-6in1”,“id”:1367343940,“channel”:0,“sensor_type”:1,“wind_max_m_s”:0.9,“wind_avg_m_s”:0.9,“wind_dir_deg”:60,“rain_mm”:119.6,“startup”:1,“flags”:1,“mic”:“CRC”,“protocol”:“Bresser Weather Center 6-in-1, 7-in-1 indoor, soil, new 5-in-1, 3-in-1 wind gauge, Froggit WH6000, Ventus C8488A”,“rssi”:-102,“duration”:33996,"UTCtime":“2024-08-30T12:07:11Z”}

Great, I would advise to create a prod_env.ini with your custom environment. It will be easier to maintain for you.