debug info

This commit is contained in:
Aart van Halteren
2025-07-17 12:46:16 +02:00
parent 968a5cea2f
commit 211b6e7cac

View File

@@ -80,9 +80,9 @@ class InSyncState < StatePattern::State
reading.high_tarif = line.split(/0-0:96.14.0\(|\)/).join.eql?("0002") reading.high_tarif = line.split(/0-0:96.14.0\(|\)/).join.eql?("0002")
end end
if line.match(/0-1:24.2.1/) if line.match(/0-1:24.2.1/)
p "Gas reading found." p "Gas reading found: #{line}"
match = line.match(/^([0-1:24\.2\.1]+)\(([^)]+)\)\(([\d.]+)\*m3\)$/) # Gas verbruik (1x per uur een nieuwe stand) match = line.match(/^(0-1:24.2.1)\(([^)]+)\)\(([\d.]+)\*m3\)$/) # Gas verbruik (1x per uur een nieuwe stand)
p "Gas reading: #{match[1]} (#{match[2]})" p "Gas reading: #{match[1]} (#{match[2]})"
reading.total_m3_gas_consumed = match[3].to_f reading.total_m3_gas_consumed = match[3].to_f
end end