RA* Cloud - mqtt publish commands
-
- Posts: 132
- Joined: Sun Mar 09, 2014 11:01 am
- Location: Santos - Brazil
RA* Cloud - mqtt publish commands
Hi there
The same way we have the "wifi commands" (http://forum.reefangel.com/viewtopic.ph ... i+commands, do we have a list of "mqqt publish commands"?
Somenthing like: user/outRON1:1 to turn on Relay01?
Best regards
Rafa
The same way we have the "wifi commands" (http://forum.reefangel.com/viewtopic.ph ... i+commands, do we have a list of "mqqt publish commands"?
Somenthing like: user/outRON1:1 to turn on Relay01?
Best regards
Rafa
Re: RA* Cloud - mqtt publish commands
Nothing documented yet
But the commands are very similar.
I'll send an example when I get to a computer.
But the commands are very similar.
I'll send an example when I get to a computer.
Roberto.
-
- Posts: 132
- Joined: Sun Mar 09, 2014 11:01 am
- Location: Santos - Brazil
Re: RA* Cloud - mqtt publish commands
If I sniff the network I am able to get the commands. Just trying to avoid such work.
Re: RA* Cloud - mqtt publish commands
Easier is to just watch the console log on Goggle chrome when you use Uapp.
It should show incoming and outgoing messages.
For the purposes of not getting confused, incoming are messages sent from the UApp or any other MQTT publisher to the RA* controller and outgoing are messages sent from RA* to any other subscriber.
Incoming messages use channel username/in and outgoing messages use channel username/out.
Our MQTT server uses authentication and authorization that are integrated with the forums, so make sure you send username and password when subscribing or publishing any message.
For the sake of exercise, if you send publish message "all:0" to channel username/in, RA* will respond on channel username/out and it will publish all parameters.
Another example is if you send publish message "r:111" to channel username/in, RA* will respond on channel username/out with the status of box1 and it will override box1_port1 to always on.
It should show incoming and outgoing messages.
For the purposes of not getting confused, incoming are messages sent from the UApp or any other MQTT publisher to the RA* controller and outgoing are messages sent from RA* to any other subscriber.
Incoming messages use channel username/in and outgoing messages use channel username/out.
Our MQTT server uses authentication and authorization that are integrated with the forums, so make sure you send username and password when subscribing or publishing any message.
For the sake of exercise, if you send publish message "all:0" to channel username/in, RA* will respond on channel username/out and it will publish all parameters.
Another example is if you send publish message "r:111" to channel username/in, RA* will respond on channel username/out with the status of box1 and it will override box1_port1 to always on.
Roberto.
-
- Posts: 132
- Joined: Sun Mar 09, 2014 11:01 am
- Location: Santos - Brazil
Re: RA* Cloud - mqtt publish commands
Tks Roberto
Already modifying my python code.
With RA+ I was getting the R99 from time to time. Now I can subscribe using mqtt and just wait for it
Already modifying my python code.
With RA+ I was getting the R99 from time to time. Now I can subscribe using mqtt and just wait for it
-
- Posts: 132
- Joined: Sun Mar 09, 2014 11:01 am
- Location: Santos - Brazil
Re: RA* Cloud - mqtt publish commands
Robertorrodriguess wrote:Tks Roberto
Already modifying my python code.
With RA+ I was getting the R99 from time to time. Now I can subscribe using mqtt and just wait for it
Making progress with mqtt client and xmpp server to send push messages to celfone in real time.
Two main features: Real Time push messages, in plain text (transform a code into text message using SQLite) and to Control RA by message, Just like a command line interface.
I already have a version, working with RA+ and x99 output.
Tks for the direction...
I was unable to find the publish messages to change custom Var.
Tried /inC2:0... Did not work.
Any Idea?
Rafa
Re: RA* Cloud - mqtt publish commands
The incoming channel is always lowercase and the outgoing channel is always uppercase.
So, to publish in the incoming channel to change variables or parameters on RA*.
So, for what you are trying to do, you need to publish to username/in channel, the message "c2:1"
So, to publish in the incoming channel to change variables or parameters on RA*.
So, for what you are trying to do, you need to publish to username/in channel, the message "c2:1"
Roberto.
-
- Posts: 132
- Joined: Sun Mar 09, 2014 11:01 am
- Location: Santos - Brazil
Re: RA* Cloud - mqtt publish commands
Tks Roberto!!!!!!!!!!!rimai wrote:The incoming channel is always lowercase and the outgoing channel is always uppercase.
So, to publish in the incoming channel to change variables or parameters on RA*.
So, for what you are trying to do, you need to publish to username/in channel, the message "c2:1"
Enviado de meu Moto G (5S) Plus usando Tapatalk
-
- Posts: 132
- Joined: Sun Mar 09, 2014 11:01 am
- Location: Santos - Brazil
Re: RA* Cloud - mqtt publish commands
Roberto
May be nothing, but publishing the message "c2:1" to username/in does not take any effect.
In fact, looking the messages using google chrome console log, when we try to change any variable it's sending the command "cvar2,1", and than the "out" channel responds with "C2:1" properly.
May be nothing, but publishing the message "c2:1" to username/in does not take any effect.
In fact, looking the messages using google chrome console log, when we try to change any variable it's sending the command "cvar2,1", and than the "out" channel responds with "C2:1" properly.
-
- Posts: 132
- Joined: Sun Mar 09, 2014 11:01 am
- Location: Santos - Brazil
Re: RA* Cloud - mqtt publish commands
Tks Roberto it worked!!
Another quick one:
"mb1" --> sets memory location 100 to 1
"mr" --> gets memory location from 200 to 379 (internal memory used by default functions)
How do I get memory location values from 100 to 199? I used to use the old "/mr100,199", but sending any form of "mr" does not work ("mr100:199", "mr199" and so on).
Also tried to get individual memory locations sending "mb100" (not worked) or simply "mb:100" (did not get, but set mb 100 to 0 instead)
You had the trouble to split the "mr" response into MR00, MR01... up to MR21 kind of format.. so may not be simple to code the a "mr199". If is that the case, would do any harm using locations from 200 to 379 just the way I want, regardeless the default functions? I do not use any any of them.
Rafa
Another quick one:
"mb1" --> sets memory location 100 to 1
"mr" --> gets memory location from 200 to 379 (internal memory used by default functions)
How do I get memory location values from 100 to 199? I used to use the old "/mr100,199", but sending any form of "mr" does not work ("mr100:199", "mr199" and so on).
Also tried to get individual memory locations sending "mb100" (not worked) or simply "mb:100" (did not get, but set mb 100 to 0 instead)
You had the trouble to split the "mr" response into MR00, MR01... up to MR21 kind of format.. so may not be simple to code the a "mr199". If is that the case, would do any harm using locations from 200 to 379 just the way I want, regardeless the default functions? I do not use any any of them.
Rafa
Re: RA* Cloud - mqtt publish commands
You are right.
There is no way to read individual locations outside the range.
If you are not using them, you can save and read using MR.
If you are using internal memory settings, you will have to make sure to not reuse the ones you are already using.
There is no way to read individual locations outside the range.
If you are not using them, you can save and read using MR.
If you are using internal memory settings, you will have to make sure to not reuse the ones you are already using.
Roberto.
-
- Posts: 132
- Joined: Sun Mar 09, 2014 11:01 am
- Location: Santos - Brazil
Re: RA* Cloud - mqtt publish commands
Not using internal memory settings.
I am going to migrate from 100-199 to 200-299, and test it
Ps.: "c0:1" command stopped working again. Uapp got back using "cvar0,1". Maybe a rollback version?
Tks!
I am going to migrate from 100-199 to 200-299, and test it
Ps.: "c0:1" command stopped working again. Uapp got back using "cvar0,1". Maybe a rollback version?
Tks!