Seite 1 von 1

#1 DOMIQ and BU4L S0 Zählerstand

Verfasst: Sa 2. Nov 2019, 11:03
von Andre-sv650
I would like to visualize the S0 Zählerstand from BU4L, but this value is not available as Variable in LCN.

How can i archive and visualize the value as variable in Domiq base?

#2 Re: DOMIQ and BU4L S0 Zählerstand

Verfasst: Mo 4. Nov 2019, 21:00
von Xtof
Hello Andre,

same question to me and I did not manage to solve it with the BU4L which just seems to provide the actual power.
Therefore I used an IV as an impulse counter which made it easier to display the counter value in DOMIQ.

I have two energy meters in my installation which have different output frequencies (IR-LEDs). I use an phototransistor and the LCN-IV.

All I had to do was to handle the rollover:

Code: Alles auswählen

--[[
-- Heating: 800 impulses/kWh
-- Total: 20000 impulses/kWh
heatingEnergyCounter = use 'LCN.value.0.51.t'
function heatingEnergyCounter:onchange(new,old)
   if new < old then
      local previousValue
      previousValue=get('MEM.HeatingEnergy')
      set('MEM.HeatingEnergy',new+previousValue+(65535-old))

       print('Incremented:'..new+previousValue+(65535-old)..' '..((new+previousValue+(65535-old))/800)..'kWh'..' old:'..old..' new:'.. new..' previous:'..previousValue)
   else
      local previousValue
      previousValue=get('MEM.HeatingEnergy')
      set('MEM.HeatingEnergy',new-old+previousValue)
   end
end
--]]

#3 Re: DOMIQ and BU4L S0 Zählerstand

Verfasst: Fr 15. Nov 2019, 20:30
von Andre-sv650
Ich habe den BU4L auf Tastenumsetzer gestellt und zähle nun die Impulse. Das funktioniert, da die angeschlossene Periperie 90ms Impulse ausgibt.

Danke aber für den Code, den kann ich gebrauchen. Jetzt werde ich mir nur noch variablen erstellen für den Verbrauch pro Stunde / Tag usw.

Ich glaube ich weiß auch warum die bei LCN solche Probleme mit dem Messen von Verbräuchen haben, das sind alles 16Bit variablen bei LCN und somit ist eine kontinuierliche Erkennung kaum möglich. Tja wieder mal am falschen Ende gespart.