I’m not sure what you mean with mosquitto_sub. Listening to the topic returns this:
Message 1 received on CumulusMX/Interval at 8:35:
{
"time": "08:35:28",
"tempOut": 15.6,
"tempIn": 20.2,
"tempTA": 9.6,
"humidity": 63,
"wgust": 2.7
}
Any chance the sensor configuration in yaml is wrong? But apparently it works for a while, then giving up. i was thinking that maybe somenthin is missing, like “state”…? Or the ’ ’ around the value.json string should be with " " instead.
At a guess, you’re getting occasional empty or different messages on the topic, which you need to filter out. Try:
value_template: >-
{% if tempOut in value_json %}
{{ value_json.tempOut }}
{% else %}
{{ states('sensor.vp2_temp_out') }}
{% endif %}
…which uses the prior value of the sensor if the incoming data can’t be processed. I don’t think you’ve posted all of your sensors with the references to other data points, but a similar approach could be used for all.
This is why it’s important to understand code, not just copy and paste it. Indentation is critical in YAML, and you don’t seem to be clear on what my template is doing.
I think you want sensor.vp2_windgust10m in your template for this sensor — the template is referencing its own sensor.
Well, first of all thanks for your effort and support everyone!
Now I’ve been running mqtt overnight without any problems. I have a guess what could trigger the error.
Cumulus sends data to Mosquitto via a readable .txt file. It looks like this right now:
I have added sensors that match the inputs above, just to start over.
Before this I’ve done edits and added data fields with notepad++ and saved as a .txt file in a long single line, then after some time I got this annoying “entity is non numeric” error.
Yesterday I edited the “stock” file from Cumulus MX with Sublime text, making some minor adjustments to meet my needs, and inputs were automatically shifted to a new line (a 2:nd line, see above), not a single line with all inputs. So far no errors.