Reply 1 of 3:
As I understand it, you have a couple of APIs:
MQTT API which runs in the micro-controller (pi, 8266, etc) and sends data to the Cayenne Server. This uses the computer generated name/password like 971da7b0-fd21-11e6-ac86-a9a56e70acce and 257f5a90db0155038259970431cxxxxxxxxxx194 which are written in the eprom of the controller.
Cayenne API which runs on the user’s computer, webpage, phone, etc and 1. fetchs data from the Cayenne Server, and 2. sends commands to Cayenne Server to create devices, jobs, etc, and 3. sends commands to Cayenne, which are forwarded down to the micro-controller to turn on leds, motors, etc. This uses human control like MrPeanut@gmail.com and peanutpassword, and the oAuth2 authentication derived from those human name/password.
I’m trying to use Cayenne API to tell my wine controller 8266 that it should stop running the First Fermentation Program, and switch to Second Fermentation Porgram, without unplugging it and re-writting a new program into the eprom.
The Cayenne API doc says I can do this with the commands to platform.mydevices.com
Sending a command to a mqtt channel through HTTP api
I can get his working – that is the authenication and json formats are fine, but the data that arrives is wrong. Many posts on the community having the same problem weeks and years ago. No one seems to have posted a solution. (see post 2)
The idea of using the MQTT API seems in-elegant as I already have the oAuth2 authentication on my Android, but now I’m pretending to be a microcontroller and sending MQTT commands, with those big name/password and Basic authentication with base64 etc, but I gave it a try and cannot get that working either. (see post 3)
So, is there a document or a post, or a human available. If there is a solution, I promise to write it up for the next guy.