Availability of gas sensing devices - Schlumberger R5 with a PI-ZERO acting a MQTT feed

Nothing but the low voltage wire running to the meter

1 Like

some success tonight, albeit baby steps. I copied the code from @Tagware (David’s) python code. Installed raspbian 32bit with the gui onto my model A pi. My son has snapped the sdcard holder so the sd card is being clamped in using an overkill diy clamp.

I managed to get paho-mqtt installed through the gui package manager. Doing it through terminal was not happening. Then using mu which is the beginner’s python ide on the raspbian out of the box setup I began to try to run said code with nothing attached to the pi gpio wise. I commented out the contents of the loop and put in a single publish with the 5 sec delay. My success here is that I have seen the mqtt message arrive in homeassistant’s configure screen having set it to listen to the topic in the code. Anyway now the next task is to setup a button via the two resistors to gpio16 and see whether i can start to increment that value.


a bit more success, setup the button and two resistor setup as per the video and ran the code in the loop as was above in this thread. Now you can see the value incrementing.

left to do.

  1. read the meter and put in my actual initial value
  2. find the correct outputs on the rj11 cable for the reed switch
  3. attach said outputs instead of the push button
  4. assign a variable in homeassistant to be written to by the mqtt publishes and use that in the energy tab to create the gas usage graphs
  5. automate the update to my gas provider so that I can avoid having to go check the meter manually.

feels like the home straight though.

Moring Andrew,

You could publish the results to Open Energy (which is what the code did in my case) with it’s own separate “Gas Meter” feed and you could then integrate it into home assistant by placing this code below in “configuration.yaml”

  • platform: emoncms
    api_key: 394c958a5f1182b06cd7628xxxxxxxxx # Read & Write API Key Found on the “My Account” Page
    url: http://192.168.0.105/ # open energy monitor IP
    id: 1

That way you also get the electrical info as well as the gas stuff.

Just a thought. Your system your call. :o)

Regards
David Vincent