Glow warm flexicom 18sx boiler flame detection - gas usage monitoring

Hi,

I am trying to get the boiler gas usage tracking on homeassistant. The boiler is Glow warm flexicom 18sx. As I have a dump electronic gas meter at home (Ireland), it’s not possible to read the gas readings directly from a meter. As the gas boiler is the only appliance at home that is using gas I’ve seen that it’s possible to count the gas usage based on the time that the gas burner is on. However, I have a problem with the implementation of the plan. My gas boiler has a flame detection system - it displays a flame on LCD when the burner is on. I’ve found 2 pins on the logic board that are changing the voltage to 8v when the flame is on, however when I am trying to connect my circuit then the flame detection stops working. I’ve done the following so far:

  1. I’ve connected ESP32 analogue PIN a0 through drop-down resistors to drop the measured voltage below 3v but once I connect it to the circuit, the boiler stops detecting the flame - there is no flame symbol on LCD.

  2. I’ve bought a 12v relay that is able to switch with a lower voltage. when I connect the relay to the 8v signal wire - the same happens - no flame detection and no flame signal on LCD.

Would anyone had the same problem as me - or am I the only one who is so bold to mess with the boiler mainboard :wink:

Below some measurements that I took:

I am wondering now if would it be possible to read the flame status from the LCD using an ESP32 cam. Any ideas?

What kind of gas meter do you have?

I have a basic diaphragm gas meter and stumbled on using a magnetometer to observe the movement of it. I get amazingly clean sinusoidal data that I then use to count cycles/volume.

This post is what got me going down this path:

Landis gyr g130. It’s an electronic dump meter with no diodes or anything else that I could read. The only idea that I may have is a button pusher and a camera to read the numbers but i’m not sure if it won’t discharge the meters battery too quick if I take a reading this way twice or once a day.

Hi Mariusz,

Can you post a photo of your meter, as I have an old, dumb, analog meter that I managed to get reading correctly, and very accurately too? It may be possible to rig something up that way instead.

EDIT: I just looked up the meter and installation manual - wow, I thought my old analog meter was shite, but at least I could pull a signal from it. There doesn’t appear to be anything you can grab a reading from without opening the meter up. :roll_eyes: Here is another thought, how about slipping a coil over the flame detection wire to sense when the 8V is present… this induced current could then be picked up by the ESP32. There are quite a few sensors available on the ESP32Home pages

EDIT 2: Instead of monitoring the flame detection device, why not monitor the voltage for the gas valve actuation solenoid instead? From reading the manual the gas valve looks to be quite readily accessible and the valve is actuated by a voltage fed via a removable plug. See the image below.


The control voltage for the gas valve is shown as “Electrical Connection (removed)”. If you can monitor this, it will only be live when the burner is actuated and actually using gas, and I would have expected it to be at a voltage higher than the 8V flame detector… could even be up to 240V, so you’d have to use a meter to measure it first when the boiler is calling for heat. This should be accurate enough to note the times the burner is on and off, if you know the burn rate of the boiler, you can calculate the gas consumption from that.

Cheers,

Mike.

Thanks Mike, that’s a good idea with the gas valve. From what I can see on the valves data sheet it should be powered with 22v DC. I’ll get it measured and see if there are any voltage changes when I get back home this evening.

Regarding a gas meter - it is absolutely useless. It’s the second meter they’ve installed as a previous one had an internal leak after about 4-5 years of use.

The only thing that I can think of how to read it would be a Switchbot https://amzn.eu/d/ipaviaw and a camera to OCR the values from the screen. The only problem I could see with that is the drain of the meter’s battery itself, as it’s probably not designed for every day reading. On the other hand that’s probably the gas suppliers problem as they can’t really stop you from reading the meter if you’re not tampering with it.

Hi Mariusz,

From reading the meter manual, you have to push one of the buttons for the LCD display to show a value, which really defeats the object of using HA to do it.

I’d go with the gas valve for the present. It will only have voltage on it when the burner is operating. It is a simple solenoid-operated valve - either on or off. Voltage on, it opens; voltage off, it closes. It should be easy to splice into it with a miniature voltage regulator (like this - (additional link for Amazon here) check the solenoid operating voltage to see if it is 24V DC or AC - the regulator link is a DC > DC regulator) and feed the output from the voltage regulator into the ESP32 GPIO pin to start logging the gas usage.

I look forward to hearing how it goes. :+1:t2:

Cheers,

Mike.

Hi Mike,

You’re a genius! I’ve got it working. There is 12v on the valve when it’s operating so I’ve connected the ESP32 through a 12v relay and it’s working perfectly :wink: I’m delighted and owe you a nice pint of Guinness :wink:

1a001075-20b8-478c-960c-bd8f76322203

1 Like

Yay!! Nice one Mariusz, great work! Why not do a full write up with code etc under the the ‘show off your projects’ section of the forum as this is a great way of monitoring gas consumption when the meter won’t do it. I’m sure it could be beneficial to others in the same situation.

Happy to have helped.

Cheers,

Mike.

I’ll write something up, with a pictures and the code later in a week especially that I couldn’t find anything for the glow-worm gas boiler. I need to calculate the boiler consumption first and implement it as energy meter, so I can show the whole code and the whole project. Thanks again for your help :slight_smile:

I’ve took a meter reading this morning and I am currently counting the boiler on time, so I have an idea of what the average consumption is.

IMG-20230331-WA0000

1 Like

You could do a gas consumption dashboard once you have your consumption rate calculated… this is what I have for mine (I use the regular HA Energy sections too) and is a combination of Meter ‘Helpers’ and custom ‘sensors’ in the configuration.yaml which calculate the Kwh and Costs from the ft3 usage taken from my meter. You could do similar once you have the consumption rate sorted.

Hi Mariusz,

I just spent 15 mins scouring the 'net for gas consumption details, and all I can find are the max and min gas consumption rates from the installation manual. :roll_eyes: I’m afraid you’ll have to do some recording of meter values and boiler on/off times to accurately assess, your usage.

Probably best to knock up a spreadsheet of daily meter readings and boiler timings, and all taken at the same time of day too for consistency. Clearly, the more readings are taken, the greater the accuracy of your calculations.

I presume you get billed in kWh by your current supplier?? If so, when you do your calculations, your gas calorific rate can change, (mine does) so I base my calculations on an average calorific value of about 39.4 (I think) when doing the calcs’ on my gas dashboard. I just went back through previous gas bills to work out an average value - it’s not to the penny, but close enough for my purposes, and you can always fine-tune your figures once up and running and gathering data. :+1:t2:

Cheers,

Mike.

I’ve made energy sensor and a power meter using a Powercalc integration from GitHub - bramstroker/homeassistant-powercalc: Custom component to calculate estimated power consumption of lights and other appliances. At the moment from my short 1-day calculation my hourly usage is coming up to about 17080W per hour, but I’ll be keeping an eye on the meter and measurement for the foreseeable future and I’ll tweak this value around. I must have a look at your configuration as I see that you get a lot more data than me, but maybe I just need to tweak around the Powercalc. I’ll have some more time this evening to play with it.


image

That’s what I am getting at the moment, note that the KWH value is incorrect as I only ran the boiler for a couple of minutes since I created the Powercalc meters and I only had 8000W set as the power value. I didn’t think that the boiler is using that much power but now I realised what the 18sx model stands for - 18 kw :rofl:

The conversion factor in Ireland on my last bill is 11.574/ m3, so that’s how I’ve calculated the 17 kwh value.

Morning Mariusz!

I didn’t use Powercalc at all. I just made some ‘custom’ sensors and used Meter Helpers, as I wanted to understand what was actually happening.

The background info on my own gas meter struggles is here on this thread.

If you want to get similar data to the dashboard I provided earlier, this is what I did…

Dashboard Overview
I get impulses/readings from the gas meter using this sensor - sensor.gas_meter, and this then feeds into the following Meter Helpers to log the various timescales for consumption:-

  1. Daily Total = sensor.gas_consumption_daily_v2
  2. Weekly Total = sensor.gas_consumption_weekly_v2
  3. Monthly Total = sensor.gas_meter_monthly_v2
  4. Annual Total = sensor.gas_consumption_annual_v2

Using those Meter Helpers above, I put together some conversion sensors, as all the above readings were in ft3. This is what I put together in yaml format…

template:
  - sensor:
      - name: "Daily Gas Consumption kWh"
        unique_id: daily_gas_usage_kwh
        state: "{{ ((((states('sensor.gas_consumption_daily_v2')|float * 0.0283) * 1.02264) * 39.9) / 3.6)|round(2) }}"
        availability: "{{ states('sensor.gas_consumption_daily_v2')|is_number }}" 
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total

- name: "Weekly Gas Consumption kWh"
        unique_id: weekly_gas_usage_kwh
        state: "{{ ((((states('sensor.gas_consumption_weekly_v2')|float * 0.0283) * 1.02264) * 39.9) / 3.6)|round(2) }}"
        availability: "{{ states('sensor.gas_consumption_weekly_v2')|is_number }}" 
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total

- name: "Monthly Gas Consumption kWh"
        unique_id: monthly_gas_usage_kwh
        state: "{{ ((((states('sensor.gas_consumption_monthly_v2')|float * 0.0283) * 1.02264) * 39.9) / 3.6)|round(2) }}"
        availability: "{{ states('sensor.gas_consumption_monthly_v2')|is_number }}" 
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total

I then also added cost sensors to provide an indication of spend over the different time frames, and this is the yaml for those. The figure shown as 0.09835 is the unit rate in £’s charged by the gas provider - if the price goes up or down, then I will have to change this number - no real hardship I suppose.

template:
  - sensor:
      - name: "Daily Gas Cost"
        unique_id: daily_gas_cost
        state: "{{ (((((states('sensor.gas_consumption_daily_v2')|float * 0.0283) * 1.02264) * 39.9) / 3.6) * 0.09835)|round(2) }}"
        availability: "{{ states('sensor.gas_consumption_daily_v2')|is_number }}" 
        unit_of_measurement: "£"
        device_class: monetary
        state_class: total


      - name: "Weekly Gas Cost"
        unique_id: weekly_gas_cost
        state: "{{ (((((states('sensor.gas_consumption_weekly_v2')|float * 0.0283) * 1.02264) * 39.9) / 3.6) * 0.09835)|round(2) }}"
        availability: "{{ states('sensor.gas_consumption_weekly_v2')|is_number }}" 
        unit_of_measurement: "£"
        device_class: monetary
        state_class: total

      - name: "Monthly Gas Cost"
        unique_id: monthly_gas_cost
        state: "{{ (((((states('sensor.gas_meter_monthly_v2')|float * 0.0283) * 1.02264) * 39.9) / 3.6) * 0.09835)|round(2) }}"
        availability: "{{ states('sensor.gas_meter_monthly_v2')|is_number }}" 
        unit_of_measurement: "£"
        device_class: monetary
        state_class: total

Then using those unique id’s you can pull various entity cards into a dashboard to provide the various readings you need.

Just for clarity the bit of yaml (‘sensor.gas_meter_monthly_v2’)|float * 0.0283) * 1.02264) * 39.9) / 3.6) is the conversion from ft3 to kWh, with the 39.9 figure being the calorific value of the gas - this is an average calorific value as I noted earlier in this thread.

I hope that helps somehow, and was a bit repetitive in setting it up, but it works well for me and I find I look at the data provided more than the regular Energy dashboard.

Cheers,

Mike.

Thanks Mike,

I am trying to use your code for the template sensor however I am getting this error and I am not sure what is causing it. Seems like there is some problem with the name but I can’t figure it out…

That’s the code that I’m using:

 # Boiler energy cost daily
template:
  - sensor:
  - name: "Daily Gas Cost"
    unique_id: daily_gas_cost
    state: "{{ (((((states('sensor.boiler_gas_power_energy_daily')|float * 0.08)}}"
    availability: "{{ states('sensor.boiler_gas_power_energy_daily')|is_number }}" 
    unit_of_measurement: "€"
    device_class: monetary
    state_class: total

And that’s the error log that I am getting:

I fixed it :wink: there were too many brackets in the state section of the code.

1 Like

Excellent. You’re making some good progress! :+1:t2:

Cheers,

Mike

only took me 2hrs of trial and error :wink:

1 Like

Good to know it’s not just me that spends hours doing this!! :grin::grin:

Morning Mariusz!

Just being nosey… Is everything still working as it should, and do your results seem to match your billing?

Mike.

Yep, still working as a charm. I’ve came up with the calculated average of 16.4 kwh/h and it’s accurate enough for me with the readings close to the gas meter readings.

1 Like