Yes i was stupid ;-)
It is working now with all my values.
Very cool that i can use MQTT.
So i will switch to MQTT instead of file reading for my SmartHome with FHEM.
I have one last question, the reading idx seems to be off by -1 hour in MQTT,
in my normal file templating this is not the case.
So in MQTT i use:
'#idx \'"idx" : "%Y-%m-%d %H:%M:%S",\'#\n'
And i get this value:
pywws_idx 2024-01-30 20:05:28 received at 2024-01-30 21:05:33
All other values are totally up to date.
In my normal file templating i do not have this.
Perhaps you have a idea.
Thanks,
Stefan
Just for everyone interested in MQTT template here my template_txt definition:
template_txt = ('\n'
'#idx \'"idx" : "%Y-%m-%d %H:%M:%S",\'#\n'
'#wind_dir \'"wind_dir" : "%s",\'#\n'
'#wind_dir \'"wind_dir_degrees" : "%.d",\' \'\' \'winddir_degrees(x)\'#\n'
'#wind_dir \'"wind_dir_text" : "%s",\' \'\' \'winddir_text(x)\'#\n'
'#wind_ave \'"wind_ave_mps" : "%.2f",\'#\n'
'#wind_ave \'"wind_ave_kmph" : "%.2f",\' \'\' \'wind_kmph(x)\'#\n'
'#wind_ave \'"wind_ave_kn" : "%.2f",\' \'\' \'wind_kn(x)\'#\n'
'#wind_gust \'"wind_gust_mps" : "%.2f",\'#\n'
'#wind_gust \'"wind_gust_kmph" : "%.2f",\' \'\' \'wind_kmph(x)\'#\n'
'#wind_gust \'"wind_gust_kn" : "%.2f",\' \'\' \'wind_kn(x)\'#\n'
'#calc \'wind_chill(data["temp_out"],data["wind_ave"])\' \'"wind_chill_c" : "%.1f",\'#\n'
'#calc \'dew_point(data["temp_out"],data["hum_out"])\' \'"dew_point_out_c" : "%.1f",\'#\n'
'#calc \'dew_point(data["temp_in"],data["hum_in"])\' \'"dew_point_in_c" : "%.1f",\'#\n'
'#hum_out \'"hum_out" : "%.d",\'#\n'
'#hum_in \'"hum_in" : "%.d",\'#\n'
'#temp_in \'"temp_in_c" : "%.1f",\'#\n'
'#temp_out \'"temp_out_c" : "%.1f",\'#\n'
'#calc \'apparent_temp(data["temp_out"],data["hum_out"],data["wind_ave"])\' \'"temp_out_realfeel_c" : "%.1f",\'#\n'
'#rel_pressure \'"pressure_rel_hpa": "%.1f",\'#\n'
'#abs_pressure \'"pressure_abs_hpa": "%.1f",\'#\n'
'#illuminance \'"illuminance_lux" : "%.1f",\'#\n'
'#illuminance \'"illuminance_wm2" : "%.2f",\' \'\' \'illuminance_wm2(x)\'#\n'
'#uv \'"uv" : "%.d",\'#\n'
'#raw#\n'
'#rain \'"rain_mm" : "%.1f",\'#\n'
'#calc \'rain_hour(data)\' \'"rain_last_hour_mm": "%.1f",\'#\n'
'#calc \'rain_24hr(data)\' \'"rain_last_24hours_mm": "%.1f",\'#\n'
'#calc \'rain_day(data)\' \'"rain_day_mm": "%.1f",\'#\n'
'#hourly#\n'
'#calc \'Zambretti(params, data)\' \'"forecast": "%s",\'#\n'
'#calc \'ZambrettiCode(params, data)\' \'"forecast_code": "%s",\'#\n'
'#pressure_trend \'"pressure_tendency" : "%s",\' \'\' \'pressure_trend_text(x)\'#\n'
'\n')