Adding more sensors question

Hi all,
I’m just waiting for parts for my first Cayenne project and I have thought of quite a few more uses for cayenne and my Pi. Thing is, I don’t have a clue what if any things will stop me cutting and pasting software into the pi then using cayenne to drive it. I know you can have multi sensors on one GPIO or one sensor on one per GPIO. What I don’t know is, can I just keep cutting and pasting software into my Pi for the different sensors I want to use. Is it as simple as that. Hope someone can help. Thanks

you are using pi agent or using cayenne python library to add cayenne on your raspberry pi?

Sorry for troubling you again Sharmik, I did a general posting because I really didn’t want to bother you again.

Well that’s a good question, which I’m not 100% sure what you mean.

I’ve seen a pie driving some led REB STRIP lights, and I thought I could use that, but do I need another pi or just cut and paste into the pi that I have got which has cayenne on it.

So not sure what your terminology means so I can’t answer it properly

If the software ( scripts ?) Cayenne is running is say python, then does this mean I can cut and past sensors that are running on python into my pi ?

Cayenne agent is where you don’t need any coding to add a sensor, you can just add it from the dashboard. have a look at this docs to know more Cayenne Docs
Whereas you can also add your raspberry pi to cayenne using GitHub - myDevicesIoT/Cayenne-MQTT-Python: Python Library for Cayenne MQTT API where you need to code every time you need to add a new sensor.

Hi Sharmik,
Thanks once again, I’ve not had time to look at the links you sent but I will. Indeed I can’t wait to start …
Thanks again it’s appreciated.

1 Like

Hi all,
I have just been reading the tech data of a HCSR501 PIR. When it sensors movement it gives a 3.3v output. My question is, if I picked up the 3 or 5 volts off the Pi and fed this through a resisitor to a float switch that when activated (when the water drops) it would allow the 3/5v to pass throuh it onto another GPIO pin where I hope I can use cayenne to trigger a relay to control whatever I choose ?
I guess I don’t need to worry about the ground as that would be common would’nt it ?

Sorry I’m new to this and to me it sounds possible, but before I blow up my pi, I really would appreciate someones opinion who is more expert than I am. Thanks

the switch connection with raspberry should be like this Cayenne Docs

Hi shramik,

Thanks again for your help.

I have seen the section about the led and relay switch, and I now have a bank of 8 relays working ( fantastic) , is this what you mean?

What I need to do now is trigger them, ok I can turn them on and off using cayenne manually, but I need to automate it as simply as I can, in my case, using a float switch, hopefully with little or no programming

Does what you sent me have a just a switch configuration, if so I don’t think I can see it.

yes, just in place of switch you need to connect the float.

For trigger have a look at this Cayenne Docs

Hi again
Are you referring to the “led switch” which has a diode and relay?
Sorry Shramik, Im just not clear on which example you mean, can you please explain.

what do you want to add? can you provide a link of it?

Hi Shramik

This is the same as mine.
What I was hoping was to wire +3v3 volts from the GPIO pins on the pi to one side of the float switch and wire the other side of the switch to an input GPIO.

The idea came as I said from the data of a PIR sensor, when triggered, it gives out 3v3, I was just hoping feeding the 3v3 they way I have explained, will trigger the pi to turn on/off one of the 8 relays I have wired up. (without programming :slight_smile:

Shramik, I am now at my desktop PC and I CAN see the switch, I was mobile before and my smart (or not so smart) phone just did’nt show this. So yes I fully understand what you are saying now and this is PERFECT, its really appreciated, I’ll get my float and give it a try, thanks so much and sorry for the blip

who told you the sensor needs a 3.3v power supply? You just need to replace it with the button, from the link i shared above. So that the pi can understand when the switch is high or low.
In your case if the float switch is open the pi might have some difficult understanding whether the switch is closed or not, as the GPIO pin will be floating.

Hi Shramik
I found the info about the 3v3 on the PIR datasheet. But now with your help, I have just done it and its working fine. Your help has really prevented a serious potential accident that could have happen (but not now) . I’m delighted, thanks for helping. All I have to do is install it !

1 Like

Hi all
I seem to want to run before I can walk now I’m a Cayenne convert and now looking ahead to my next ( over winter) project . It’s a burglar alarm and was wondering if I could use this with the motion sensor module. Any advice would be appreciated. Thanks
RCWL-0516 Doppler radar microwave motion sensor,

you can just add this while selecting it as a PIR sensor.

It just gets better, Brilliant, thank you again for your help shramik …


Hi all
I am sure there is a logical answer, but at the moment I can’t see it.
When I go to the GPIO tag and look at the status of my GPIO ports, for example I have a relay attached to pin 20. Its status is LOW. If I change this to HIGH it switches the relay from whatever state it is in, to the opposite state. If I then go to the overview page, I can turn it back again to what it was and it just functions “normally” as it did before I altered it. Even though its still says HIGH. Ive put it back to LOW, just because thats how it was. Can anyone please tell me whats going on. I’ve only been "building up my Pi using Cayenne for a week so still very much in the learning curve. Thanks

i did not understand what you are trying to say.