- print(topic,sensor_type,param,value)
- end
+ print(string.format("%s/%s (%s) -> %s", topic, model, sensor_type, sensor_data))
+ else
+ for param,value in pairs(sensor_data) do
+ conn:execute(string.format("CALL meteo.submit_mqtt('%s','%s','%s','%s',NULL)", topic,sensor_type,param,value))
+ conn:commit()
+ print(string.format("%s/%s (%s) -> %s", topic, sensor_type, param, value))
+ end
+ end