My gas meter is being changed to a meter with a pulse output. I already read a pulse from an electric meter. This is in an adjacent meter box with an emonTx. Can the emonTX read a second pulse so I can monitor gas consumption with the same emonTx?
No - at least, not easily. I’m afraid there are only two interrupt inputs available, and one is used for the RFM69CW radio, leaving the second, which you are already using for the electricity meter.
If you are not using the temperature input, and your emonTx is mains powered, it might be possible to use that as a pulse input, but the sketch would need to be heavily modified to ‘poll’ the second pulse input. This would only work if the gas meter has a long pulse duration and a slow pulse rate - which is likely.
If you go that route, have a look at the PinChange interrupts. As well as the two IRQ lines, any pin can be configured to generate an interrupt on change of state. You’ll get an interrupt on both falling and rising edges, so will need to deal with that, but that can actually turn out to be useful if you need to do any de-glitching / de-bouncing.
Tasmota does have pulse counters. Up to 4, depending on what else you have attached. Tasmota speaks MQTT so reasonably easy to get it to talk to emoncms. It might be possible to do it directly, but I use NodeRED to listen to MQTT and massage the data and then send to emoncms.
Many thanks for all the replies. My emonTx is using emonESP but rather than recoding the emonTx I shall just use an ESP direct with Tasmota. I already have a number of these reporting temperature and now I have learnt Tasmota has counters that is by far the quickest and most economic solution. Does anyone know if the shop pulse counter will interface directly with an ESP? I recall there has been a lot of discussion about how the shop pulse counter works.