Intigrating ESP Easy to Cayenne
Moderators: grovkillen, Stuntteam, TD-er
Intigrating ESP Easy to Cayenne
Hi. I was wondering if anyone hire would have the skillset to add the IOT portal Cayenne / https://mydevices.com/ to the supported portals.
The Cayenne project has a very nice interface, a very good app and is just a delight to work with. Combined with Esp Easy it would be Very powerfull!
Hope for some feedback. Or maybe som inputs on howto do it.
Cayenne also runs MQTT.
The Cayenne project has a very nice interface, a very good app and is just a delight to work with. Combined with Esp Easy it would be Very powerfull!
Hope for some feedback. Or maybe som inputs on howto do it.
Cayenne also runs MQTT.
-
- New user
- Posts: 1
- Joined: 01 Nov 2017, 16:41
Re: Intigrating ESP Easy to Cayenne
I think that is a great idea. I am trying to find a way to implement it into Cayenne, but unfortunately I don't have the skills to do it....
Re: Intigrating ESP Easy to Cayenne
Hi
I would also love a integration to Cayenne!
The issue today if I chose generic MQTT integration in the ESPEasy is that the key-length for Cayenne is longer than the webinterface allows.
I think this would be a easy task for the right person to add, maybe as a new entry in the "Controllers page"
The cayenne have a generic ESP8266 library created so it should be possible to just borrow/implement parts of this directly to the ESPEasy...
https://github.com/myDevicesIoT/Cayenne-MQTT-ESP
One issue with the current ESPEasy is the lengt of "Mqtt Username", "Mqtt Password" and "Client ID", Cayenne uses 36, 40, 36 char
There is a topic on the ESPEasy GIT that thiscuss some changes to the MQTT but the length isn't part of this as I can see?
https://github.com/letscontrolit/ESPEasy/issues/378
There are also changes planned for 2.1.0 but I don't know if this would be resolved?
2.1.0 (planned)
Security
Revamp MQTT handling (send cmd to "all" and "group", not only single unit)
Generic MQTT handling (+QoS)

I would love to see this implemented as a generic feature in the ESPEasy or as a seperate plugin. Cayenne seems to be a great service for the people that don't have the time or skill to setup a RaspberyPI with Openhab or any other HomeAutomation software...
I would also love a integration to Cayenne!
The issue today if I chose generic MQTT integration in the ESPEasy is that the key-length for Cayenne is longer than the webinterface allows.
I think this would be a easy task for the right person to add, maybe as a new entry in the "Controllers page"
The cayenne have a generic ESP8266 library created so it should be possible to just borrow/implement parts of this directly to the ESPEasy...
https://github.com/myDevicesIoT/Cayenne-MQTT-ESP
One issue with the current ESPEasy is the lengt of "Mqtt Username", "Mqtt Password" and "Client ID", Cayenne uses 36, 40, 36 char
There is a topic on the ESPEasy GIT that thiscuss some changes to the MQTT but the length isn't part of this as I can see?
https://github.com/letscontrolit/ESPEasy/issues/378
There are also changes planned for 2.1.0 but I don't know if this would be resolved?
2.1.0 (planned)
Security
Revamp MQTT handling (send cmd to "all" and "group", not only single unit)
Generic MQTT handling (+QoS)

I would love to see this implemented as a generic feature in the ESPEasy or as a seperate plugin. Cayenne seems to be a great service for the people that don't have the time or skill to setup a RaspberyPI with Openhab or any other HomeAutomation software...
Re: Intigrating ESP Easy to Cayenne
I was working on MQTT issues last night and I guess -judging on the issues added today- I will be tonight.
So please add these requests to the corresponding github issues and use thumbs-up tags to make it easier to sort for me
Problem with longer strings in the settings is that it renders stored configurations unusable.
So that's kind of a thing.
Maybe we should also think about how to solve that.
So please add these requests to the corresponding github issues and use thumbs-up tags to make it easier to sort for me

Problem with longer strings in the settings is that it renders stored configurations unusable.
So that's kind of a thing.
Maybe we should also think about how to solve that.
Re: Intigrating ESP Easy to Cayenne
I don't think it has because i know how busy you guys are. But i would also love to have a Cayenne integration. Did anything happen in that direction?

Is that still same situation? I can't even find the option "generic MQTT integration"

Re: Intigrating ESP Easy to Cayenne
The controllers now have the option for "extended credentials"
This allows for longer username/pass
This allows for longer username/pass
Re: Intigrating ESP Easy to Cayenne
Do you know by any chance which controller i should choose to send data to Cayenne? Someone talked about "Generic MQTT"... But i don't see that in the last built.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Intigrating ESP Easy to Cayenne
Try the open hab one.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Re: Intigrating ESP Easy to Cayenne
Hmm. Doesn't seem to work on my side. I am running the mega-20200608 and when i input the Controller User. It cuts off 30% or so. Is that only a GUI problem or still not fixed?
- Attachments
-
- extended.png (9.59 KiB) Viewed 34408 times
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Intigrating ESP Easy to Cayenne
It's only visual, it should work.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Re: Intigrating ESP Easy to Cayenne
Have you reloaded the page after turning on the extended credentials? (and saving)
It could be the input field uses a max. length which is set based on the state of that checkbox at loading the page.
It could be the input field uses a max. length which is set based on the state of that checkbox at loading the page.
Re: Intigrating ESP Easy to Cayenne
Yes. The extended credentials works fine. *Thumbs up*
The same clientID for two devices will not work (I did that for testing and it took me a while to figure out what actually was the problem)
At the end i managed to receive data on Cayenne. Here my settings in case somebody else needs it:
The same clientID for two devices will not work (I did that for testing and it took me a while to figure out what actually was the problem)
At the end i managed to receive data on Cayenne. Here my settings in case somebody else needs it:
- Attachments
-
- Opera Snapshot_2020-06-19_124632_192.168.8.217.png (37.41 KiB) Viewed 34347 times
-
- Opera Snapshot_2020-06-19_124805_192.168.8.217.png (53.61 KiB) Viewed 34347 times
Re: Intigrating ESP Easy to Cayenne
How to get different readings to be sent to different channels?
"Controller Publish:" wrote like this "v1/username/things/clientID/data/channel"



I also tried to do this through the rules, but nothing is sent at all, Tried so
and so
"Controller Publish:" wrote like this "v1/username/things/clientID/data/channel"



I also tried to do this through the rules, but nothing is sent at all, Tried so
Code: Select all
on Clock#Time=All,**:01 do
Publish,v1/41277350-e1a5-11eb-883c-638d8ce4c***/things/53b3fc50-e1a5-11eb-8779-7d56e82df***/data/json,{"channel":"1","value":"[HTU21D#Temperature]","type":"temp","unit":"c"}
endon
Code: Select all
on Clock#Time=All,**:01 do
Publish,v1/41277350-e1a5-11eb-883c-638d8ce4c***/things/53b3fc50-e1a5-11eb-8779-7d56e82df***/data/1,HTU21D#Temperature
endon
Re: Intigrating ESP Easy to Cayenne
You have set Controller Publish to a fixed string, so that is the only topic you can reach using MQTT. The default there is this: %sysname%/%tskname%/%valname% where %sysname% is the name of the ESP and %tskname% %valname% the Task and Value name of the task data that is being sent. You can use any variable or function there, instead of a part of your fixed string, to include something context specific. Only %tskname% and %valname% aren't mentioned on the Tools/System Variables page (where most variables are listed), as these 2 variables need the context of a Task and that's only available when sending the data via a controller.
/Ton (PayPal.me)
Re: Intigrating ESP Easy to Cayenne
I still don't understand how it should look.Ath wrote: ↑11 Jul 2021, 13:12 You have set Controller Publish to a fixed string, so that is the only topic you can reach using MQTT. The default there is this: %sysname%/%tskname%/%valname% where %sysname% is the name of the ESP and %tskname% %valname% the Task and Value name of the task data that is being sent. You can use any variable or function there, instead of a part of your fixed string, to include something context specific. Only %tskname% and %valname% aren't mentioned on the Tools/System Variables page (where most variables are listed), as these 2 variables need the context of a Task and that's only available when sending the data via a controller.
My sensor

My controller

I have tried like this
Code: Select all
%sysname%/%HTU21D%/%Temperature%
cayenne mqtt api:
https://developers.mydevices.com/cayenn ... ensor-data
Can you make an example for me? At the moment I do not quite understand how it works correctly.
Re: Intigrating ESP Easy to Cayenne
Not sure if the taskname or variable name can be long enough, but you may have the same prefix for each, so you could do something like this:
Just as an example, the default publish string for OpenHAB MQTT controller:
These publish topics should be stored in the controller settings.
And you can perhaps name a task (or your node, via %sysname%) to get the desired topic string.
Code: Select all
v1/41277350-e1a5-11eb-883c-%tskname%/things/53b3fc50-e1a5-11eb-8779-%varname%/data/1
Code: Select all
%sysname%/%tskname%/%valname%
And you can perhaps name a task (or your node, via %sysname%) to get the desired topic string.
Re: Intigrating ESP Easy to Cayenne
Another idea is to store the parts in a variable and use the toHex function to convert it to hex.
See: https://espeasy.readthedocs.io/en/lates ... obin-tohex
Not sure if the MQTT topics are case sensitive though.
See: https://espeasy.readthedocs.io/en/lates ... obin-tohex
Not sure if the MQTT topics are case sensitive though.
Re: Intigrating ESP Easy to Cayenne
I think this is not a completely correct example, because their manual says soTD-er wrote: ↑11 Jul 2021, 14:15 Not sure if the taskname or variable name can be long enough, but you may have the same prefix for each, so you could do something like this:
Just as an example, the default publish string for OpenHAB MQTT controller:Code: Select all
v1/41277350-e1a5-11eb-883c-%tskname%/things/53b3fc50-e1a5-11eb-8779-%varname%/data/1
These publish topics should be stored in the controller settings.Code: Select all
%sysname%/%tskname%/%valname%
And you can perhaps name a task (or your node, via %sysname%) to get the desired topic string.

or I need to look for another way to send data to Cayenne ?
Re: Intigrating ESP Easy to Cayenne
Well if it is only the last ID, the channel, which needs to differ among sensor values, then you can try to use the task value name.
How long are the strings of this "channel" ID?
If they do fit in the field for a taskvalue name, you're almost done by simply publishing to a topic like this:
N.B. I noticed I used %varname% in my previous example, but it should be %valname%
N.B.2: This should be used in a controller, not when sending from the rules using publish.
When publishing from the rules, you cannot use %valname% as there is none in that context.
How long are the strings of this "channel" ID?
If they do fit in the field for a taskvalue name, you're almost done by simply publishing to a topic like this:
Code: Select all
v1/xxxx-xxxxx-xxxx.../things/yyyy-yyyy-yyyyy..../%valname%
N.B.2: This should be used in a controller, not when sending from the rules using publish.
When publishing from the rules, you cannot use %valname% as there is none in that context.
Re: Intigrating ESP Easy to Cayenne
As in the screenshot in the first post of this topicTD-er wrote: ↑11 Jul 2021, 14:46 Well if it is only the last ID, the channel, which needs to differ among sensor values, then you can try to use the task value name.
How long are the strings of this "channel" ID?
If they do fit in the field for a taskvalue name, you're almost done by simply publishing to a topic like this:N.B. I noticed I used %varname% in my previous example, but it should be %valname%Code: Select all
v1/xxxx-xxxxx-xxxx.../things/yyyy-yyyy-yyyyy..../%valname%
N.B.2: This should be used in a controller, not when sending from the rules using publish.
When publishing from the rules, you cannot use %valname% as there is none in that context.
I only have MQTT Username, Client ID and Password. Client ID - 36 characters
Code: Select all
v1/myusername/things/myclientID/%valname%
Right?
Re: Intigrating ESP Easy to Cayenne
The max length of the taskvalue name is 40 characters, so you could store the channel ID.
And of course you should replace the user ID and clientID.
The max. topic length you can store in the settings to publish to is 128 bytes.
Then you could try to send data from a task to the controller.
And of course you should replace the user ID and clientID.
The max. topic length you can store in the settings to publish to is 128 bytes.
Then you could try to send data from a task to the controller.
Who is online
Users browsing this forum: Bing [Bot] and 18 guests