Config fields with uderscore in name


Hello and then you for youre help.
I am trying to get the mqtt.client_id file at runtime on an esp32 using C not js

if I call mgos_sys_config_get_mqtt_server() it returns the server address, if I call mgos_sys_config_get_mqtt_client_id() it crashes the MCU.

I am assuming it is because of the unserscore “_” in the field name.

There are a lot of field names in the config that have the ‘_’ in them, how id you read them from C

Thanks Tony


mgos_sys_config_get_mqtt_client_id returns NULL if not defined by your mos.yml