My 1st time here. I have a smart home project and I’m trying to decide the best software to run it.
So I’m trying cayenne - the api option, but I’m struggling to find detailed documentation.
Where I can find the api detailed docs to know for example the arguments for:
Cayenne.virtualWrite(args???)
I saw the examples
Cayenne.virtualWrite(3, 50, TYPE_PROXIMITY, UNIT_CENTIMETER);
Cayenne.virtualWrite(0, lastMillis);
My first goal now is to thrigger a 12v fan if a thermometer reachs a certain temp.
the fan is controled by a analog relay.
Here’s my piece of code so far:
And then you can add Device/Widget → Digital Input and then select the Virtual Pin that you define to monitor. If it works, you will see either zero or one.
Let me know if you need more help. I can write also the whole code for you later and send it as PM.
Of course that you can add sensors. You can read more in documentation. You can add custom sensors - Here in the Community you can find themes to almost any sensor for Arduino. Some of them are already implemented and there is ready copy/paste code snippets. Also videos are provided.
Documentation → HERE
Just as a reference, usually when someone on the Cayenne forums talks about the API they are usually referring to the MQTT API. From your code I would assume that you are using the Arduino libraries. If you go here it does a decent job explaining everything. The reason you cannot add a sensor is because your Ardunio is offline (or at least there is no connection to the Cayenne servers). After it is online you should be able to add the sensor.