Hi, I am having a problem adding a reed switch (that is attached to a water meter) to either a Arduino Uno or a Raspberry Pi (which ever is easiest), to try to make a Smart meter that logs the overall running total reading and sends a daily / weekly / monthly report via Cayenne. I have searched lots of different versions but none have been done using Cayenne. The main issue is with the hardware, does it require pull up resistor, would it be a digital or analog connection and would I need a de-bounce circuit.
Just to add, I am very late to this at 62, and without the help of these forums I would be absolutely stumped. Thanks.
Hi @311, welcome to the Cayenne Community, and apologies your post didn’t get a more immediate response yesterday.
What I would do is break the problem into two steps. This approach works pretty well with troubleshooting Cayenne things since our software is fairly straightforward – sending and receiving sensor and actuator data and acting on what it gets.
First get the hardware/circuit working outside the context of Cayenne and logging data to the Arduino serial monitor. That seems to be mostly what you’re asking for in your initial post here. I’ll confess to being much more of a software than a hardware guy (though always learning), so to that end I usually need some sort of guide to tell me when a resistor is appropriate, things like that. I’d start with something like this reed switch hookup guide, and get it working with the example code on that page. Even if you don’t have an LED, you can just output text to the Serial Monitor to debug.
Certainly feel free to ask the forum for help along the way here – we’re happy to have non-Cayenne IoT/hardware/project discussion on the forum, in fact we’d like to see more of it and build our community as a place for makers and hobbyists to discuss these items.
Once you have things working outside of Cayenne, you can add the Arduino to Cayenne, and then a widget to represent the state of the reed switch (likely a 2-state custom widget), and then build off of that.
I’d be happy to walk you through the Cayenne end of things when you get there, but at the risk of typing many paragraphs when they aren’t needed (as I’m want to do), I’ll leave you with the getting started guide for Cayenne with Arduino which walks through setting up your device, the Arduino IDE, connecting the device, and adding basic widgets. By all means, if this raises more questions, or if you have trouble or something not covered there, just ask and we’ll do our best to fill in the gaps.
OK, thanks a lot for that, I am on the way now to make a working smart water meter. Looking forward to you counter widget hitting the dashboard.
Hi all. I have put together a project to read pulses from fuel meters. The Netvox sensors are working beautifully through TTN. I need the pulses to be emailed once the full amount is received after the full amount of pulses are received (Not once reaching a threshold). I probably only need it all sent once per day. The other issue is multiplying some of the pulses by what is called a K-factor (eg x 2.57) to convert the pulses to litres.
you cannot do this. Sending the pulses via email is not possible. Also if you want to multiple the k-factor then you will have to code it on your device.
How is a water meter read? Is this through the dashboard? It’s the scheduled email and trigger notification only to show if something is operating or has reached a level?
I am not sure what you are asking but the reading is from the sensor you are using. it sends the payload to cayenne through TTN, then it is decoded at the server to show the respective widget data type.
yes. you can only trigger when the value has receahed the set trigger value.
Instead of trigger, can we use daily notifications in scheduling to send the pulses counted?
That is not possible.