Email End Point - How to Send device data as JSON?
I understand thinger.io is fairly new, but I am having some difficulty finding any information on how to utilize this feature for simple email alerts on high temp to include the temperature that triggered the call.
I was able to get a reading from the DHT22 sensor.
Hi, this a recent feature and it is not currently documented.
To add a value in your email body, or a HTTP endpoint, you can set the key value inside double brackets, like {{Humidity}} in your case. You can add multiple values if you want. You can also set values without a key ({{}}) if your resource or data does not define an output key.
Hi @ega, take a look to the documentation for sending data to endpoints. You need to include this information when calling the endpoint, so the back-end can use the information provided. Let me know if the following documentation solve your problem:
And I’ve received the data in mail using the following code:
The actual level is {{}}%
@alvarolb Can I help you to improve the documentation? because I think this is really easy (after get it done of course), but before that I didn’t saw it really clear how can I get this done.
I would like to add an example of how to use email endpoint, with the sketch code, and email code, I think that is more easy for a beginner to understand this seeing a complete example.
Any contribution you do to the documentation is really welcome! If you know how Github works, you can share it directly, or I can upload your docs and pictures if you want. Let me know!
Hi Team, not sure what am I doing wrong but it is it isn’t working for me. I do receive the email but there is no way to get the variable value on the body of the received mail.
on the EndPoint I have tried the following options
1 - Consumo llegĂł a un nĂvel critico de {{ValLitros}} Litros
2 - "Consumo llegĂł a un nĂvel critico de {{ValLitros}} Litros"
3 - Consumo llegĂł a un nĂvel critico de {{litros}} Litros
4 - "Consumo llegĂł a un nĂvel critico de {{litros}} Litros"
5 - Consumo llegĂł a un nĂvel critico de {{}} Litros
6 - "Consumo llegĂł a un nĂvel critico de {{}} Litros"
none of them worked. Please let me know what am I doing wrong.
I have not used the email end recently, I do not have it implemented now, but according to my publication, it should work with option 1 on the call and option 5 on the endpoint.
I recommend that you avoid the use delay function, this causes the abnormal behavior in the thinger platform, use another method to control the loop or functions frequency.
@ega many thanks for your reply. I followed your suggestions (including deleting the delay function) but unfortunately there was no progress. Mail is received but the data value (litros) arrives empty.
Any other suggestion? Do you know if there is a way to contact Thinger directly (i guess Alvaro is the owner/developer)
Surely it is, maybe it was lost unintentionally in some platform update.
Is your issue solved? can you send emails with values in the device?
If you need just one resource you can define the “thing” as I shown you with just one resource, its not needed to have more than one using that definition method.