Temperature Averaging and Device Integration Tips

Hi everyone,

I’ve been diving into some interesting projects lately, and I wanted to share my experiences and ask for your thoughts. First off, I’ve been working on a rule to average temperature readings from multiple sensors. It’s a pretty straightforward concept, but I’m running into some issues. The rule triggers on a temperature update and calculates an average using old readings. Here’s the rule I’ve set up:

plaintext
rule “Work room temp averaging”
when
Item Sonoff_4CH_86_temp received update
then
var Number newValue = Sonoff_4CH_86_temp.state as DecimalType
var Number oldValue = Sonoff_4CH_86_tempAvg.state as DecimalType
var Number avgValue = 0

if(Sonoff_4CH_86_tempAvg.state instanceof DecimalType) {
avgValue = (newValue.floatValue * 0.1) + (oldValue.floatValue * 0.9)
} else {
oldValue = newValue as DecimalType
avgValue = oldValue
}

sendUpdate(Sonoff_4CH_86_tempAvg, avgValue)
end

But I’m getting this error in the logs: [ERROR] [.script.engine.ScriptExecutionThread] - Rule 'Work room temp averaging': org.eclipse.smarthome.core.library.types.DecimalType. Am I messing up the value types, or is there something wrong with my calculation? I’d love to hear if anyone has tackled something similar or has any insights!

On another note, I’ve been exploring integrating my LiftMaster garage door opener without using MyQ. I stumbled upon a workaround involving soldering and ZWave integration with the Linear GD00Z-4. It seems a bit risky, especially with the warning about voiding warranties, but the idea of seamless ZWave integration is super appealing. Has anyone tried this? I’d love to hear success stories or any potential pitfalls!

Lastly, I’m curious about everyone’s thoughts on using cameras and AI for smart home automation instead of traditional sensors. I’ve heard some great things about using computer vision to detect specific actions or states, like identifying which door is open or monitoring appliance usage. It sounds a bit futuristic, but with the advancements in AI, it might be more feasible than I think. What use cases would you implement using computer vision? I’d love to brainstorm some ideas!

Thanks for sharing your thoughts and experiences!

Best,
[Your Name]