Mqtt server

Related to the Portal

Posts: 12865
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Fri Jan 07, 2022 5:55 pm
Try this:
Code: Select all
all:0

on /in channel
Roberto.

Posts: 4
Joined: Sun May 16, 2021 5:38 am
PostPosted: Sat Jan 08, 2022 7:33 pm
Oops so many replies. My original issue is resolved. The correct port s 1883. Don't test with hivemq, better with mosquito if u wanna check server/client comm. It happenned that I had a reef angel standard. By making it work with esp-link, it can be updated OTA. But I stripped off many features from the original source too, only left with relay, temperature, ato. I was amazed how much code u can put inside an Uno, learned alot. Thanks for helping.

Posts: 4
Joined: Sun May 16, 2021 5:38 am
PostPosted: Sat Jan 08, 2022 7:45 pm
When u first view ur uapp, uapp will send an 'all:0' to ur RA controller after the mqtt connection is established. Your controller will reply with a bunch of msg for different functions (relay, temperature, ato)

Posts: 24
Joined: Thu Sep 06, 2012 10:11 pm
PostPosted: Sat Jan 15, 2022 11:10 pm
thanks! "all:0" definitely produces a bunch of info, but how do we get updates to see when things change without sending the command every minute?

Posts: 24
Joined: Thu Sep 06, 2012 10:11 pm
PostPosted: Sat Jan 15, 2022 11:19 pm
Follow up, here are all the responses I get when I send the "all:0"

Code: Select all
C0:0
...
C7:0
R:0
ROFF:255
RON:0
T1:771
...
T3:773
PH:814
T4:0
...
T6:0
ORP:0
SAL:0
PHE:0
PAR:0
CEXP0:0
...
CEXP7:0
ROFF1:119


Questions:
1: why does it call out expansions as 0-7 instead of 1-8?
2. what are R? RON? ROFF?
3. where's the ATO float switch info?
4. I don't see how we get to know if a port is on or off. Even when I set override off for exp box 1, port 8, I get "ROFF1:119" ... how does that make any sense?? That and I see other ports were on when I ran all:0, but still no indication unless it all went by before I could see it.
5. ^what I asked above -- how do I get this info without sending the all:0 command every minute?

Posts: 12865
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sun Jan 16, 2022 1:32 pm
Just keep watching the channel.
Whenever there is a change, it gets broadcasted.
Try switching the ATO float switch from off to on and vice versa.
R is the state of the main relay box ports, but RA* doesn't have main relay box.
You should look for R1.
ROFF is the override off state, RON is the override on state.
You should convert to a binary number though. So let's say R1=9, in binary it is 00001001, which means port 1 and port 4 are on.
Roberto.

Posts: 24
Joined: Thu Sep 06, 2012 10:11 pm
PostPosted: Sun Jan 16, 2022 10:30 pm
This was extremely helpful... Though I did have to figure out the equation to convert int to binary.
rimai wrote:You should convert to a binary number though. So let's say R1=9, in binary it is 00001001, which means port 1 and port 4 are on.


When monitoring "wolfpack/out" and sending overrides to expansion box 1, port 8, here are the results:
override off: "ROFF1:119"
override on: "RON1: 128"
auto (on when in auto state): RON1:0

I'm trying to figure out how to use the override status to leave a value without overriding the auto value
Last edited by wolfpack on Mon Jan 17, 2022 1:29 am, edited 2 times in total.

Posts: 24
Joined: Thu Sep 06, 2012 10:11 pm
PostPosted: Sun Jan 16, 2022 11:29 pm
I also found out there are so many more things that get sent to out when you send "all:0"

Code: Select all
2022-01-16 21:50:18Topic: wolfpack/outQos: CEXP7:0
2022-01-16 21:50:18Topic: wolfpack/outQos: CEXP6:0
2022-01-16 21:50:18Topic: wolfpack/outQos: CEXP5:0
2022-01-16 21:50:18Topic: wolfpack/outQos: CEXP4:0
2022-01-16 21:50:18Topic: wolfpack/outQos: CEXP3:0
2022-01-16 21:50:18Topic: wolfpack/outQos: CEXP2:0
2022-01-16 21:50:18Topic: wolfpack/outQos: CEXP1:0
2022-01-16 21:50:18Topic: wolfpack/outQos: CEXP0:0
2022-01-16 21:50:18Topic: wolfpack/outQos: PAR:0
2022-01-16 21:50:18Topic: wolfpack/outQos: PHE:0
2022-01-16 21:50:18Topic: wolfpack/outQos: SAL:0
2022-01-16 21:50:18Topic: wolfpack/outQos: ORP:0
2022-01-16 21:50:18Topic: wolfpack/outQos: T6:0
2022-01-16 21:50:18Topic: wolfpack/outQos: T5:0
2022-01-16 21:50:18Topic: wolfpack/outQos: T4:0
2022-01-16 21:50:18Topic: wolfpack/outQos: PH:797
2022-01-16 21:50:18Topic: wolfpack/outQos: T2:707
2022-01-16 21:50:18Topic: wolfpack/outQos: T1:770
2022-01-16 21:50:18Topic: wolfpack/outQos: RON:0
2022-01-16 21:50:18Topic: wolfpack/outQos: ROFF:255
2022-01-16 21:50:17Topic: wolfpack/outQos: R:0
2022-01-16 21:50:17Topic: wolfpack/outQos: C7:0
2022-01-16 21:50:17Topic: wolfpack/outQos: C6:0
2022-01-16 21:50:17Topic: wolfpack/outQos: C5:0
2022-01-16 21:50:17Topic: wolfpack/outQos: C4:0
2022-01-16 21:50:17Topic: wolfpack/outQos: C3:0
2022-01-16 21:50:17Topic: wolfpack/outQos: C2:0
2022-01-16 21:50:17Topic: wolfpack/outQos: C1:0
2022-01-16 21:50:17Topic: wolfpack/outQos: C0:0
2022-01-16 21:50:17Topic: wolfpack/outQos: LEAK:0
2022-01-16 21:50:17Topic: wolfpack/outQos: IO:0
2022-01-16 21:50:17Topic: wolfpack/outQos: RFIO:0
2022-01-16 21:50:17Topic: wolfpack/outQos: RFBO:0
2022-01-16 21:50:17Topic: wolfpack/outQos: RFGO:0
2022-01-16 21:50:17Topic: wolfpack/outQos: RFRO:0
2022-01-16 21:50:17Topic: wolfpack/outQos: RFRBO:0
2022-01-16 21:50:17Topic: wolfpack/outQos: RFWO:0
2022-01-16 21:50:17Topic: wolfpack/outQos: RFI:0
2022-01-16 21:50:17Topic: wolfpack/outQos: RFB:0
2022-01-16 21:50:17Topic: wolfpack/outQos: RFG:0
2022-01-16 21:50:17Topic: wolfpack/outQos: RFR:0
2022-01-16 21:50:17Topic: wolfpack/outQos: RFRB:0
2022-01-16 21:50:17Topic: wolfpack/outQos: RFW:0
2022-01-16 21:50:17Topic: wolfpack/outQos: RFD:0
2022-01-16 21:50:17Topic: wolfpack/outQos: RFS:0
2022-01-16 21:50:17Topic: wolfpack/outQos: RFM:0
2022-01-16 21:50:17Topic: wolfpack/outQos: AIRB:0
2022-01-16 21:50:17Topic: wolfpack/outQos: AIB:0
2022-01-16 21:50:17Topic: wolfpack/outQos: AIW:0
2022-01-16 21:50:17Topic: wolfpack/outQos: PWME5O:255
2022-01-16 21:50:17Topic: wolfpack/outQos: PWME4O:255
2022-01-16 21:50:17Topic: wolfpack/outQos: PWME3O:255
2022-01-16 21:50:17Topic: wolfpack/outQos: PWME2O:255
2022-01-16 21:50:17Topic: wolfpack/outQos: PWME1O:255
2022-01-16 21:50:17Topic: wolfpack/outQos: PWME0O:255
2022-01-16 21:50:17Topic: wolfpack/outQos: PWME5:0
2022-01-16 21:50:17Topic: wolfpack/outQos: PWME4:0
2022-01-16 21:50:17Topic: wolfpack/outQos: PWME3:0
2022-01-16 21:50:17Topic: wolfpack/outQos: PWME2:0
2022-01-16 21:50:17Topic: wolfpack/outQos: PWME1:0
2022-01-16 21:50:17Topic: wolfpack/outQos: PWME0:0
2022-01-16 21:50:17Topic: wolfpack/outQos: DCT:0
2022-01-16 21:50:17Topic: wolfpack/outQos: DCD:0
2022-01-16 21:50:17Topic: wolfpack/outQos: DCS:0
2022-01-16 21:50:16Topic: wolfpack/outQos: DCM:0
2022-01-16 21:50:16Topic: wolfpack/outQos: HUM:0
2022-01-16 21:50:16Topic: wolfpack/outQos: WL4:0
2022-01-16 21:50:16Topic: wolfpack/outQos: WL3:0
2022-01-16 21:50:16Topic: wolfpack/outQos: WL2:0
2022-01-16 21:50:16Topic: wolfpack/outQos: WL1:0
2022-01-16 21:50:16Topic: wolfpack/outQos: WL:0
2022-01-16 21:50:16Topic: wolfpack/outQos: PWMA2O:255
2022-01-16 21:50:16Topic: wolfpack/outQos: PWMD2O:255
2022-01-16 21:50:16Topic: wolfpack/outQos: PWMA2:92
2022-01-16 21:50:16Topic: wolfpack/outQos: PWMD2:0
2022-01-16 21:50:16Topic: wolfpack/outQos: ALARM:0
2022-01-16 21:50:16Topic: wolfpack/outQos: RON8:0
2022-01-16 21:50:16Topic: wolfpack/outQos: ROFF8:255
2022-01-16 21:50:16Topic: wolfpack/outQos: R8:0
2022-01-16 21:50:16Topic: wolfpack/outQos: RON7:0
2022-01-16 21:50:16Topic: wolfpack/outQos: ROFF7:255
2022-01-16 21:50:16Topic: wolfpack/outQos: R7:0
2022-01-16 21:50:16Topic: wolfpack/outQos: RON6:0
2022-01-16 21:50:16Topic: wolfpack/outQos: ROFF6:255
2022-01-16 21:50:16Topic: wolfpack/outQos: R6:0
2022-01-16 21:50:16Topic: wolfpack/outQos: RON5:0
2022-01-16 21:50:16Topic: wolfpack/outQos: ROFF5:255
2022-01-16 21:50:16Topic: wolfpack/outQos: R5:0
2022-01-16 21:50:16Topic: wolfpack/outQos: RON4:0
2022-01-16 21:50:16Topic: wolfpack/outQos: ROFF4:255
2022-01-16 21:50:16Topic: wolfpack/outQos: R4:0
2022-01-16 21:50:16Topic: wolfpack/outQos: RON3:0
2022-01-16 21:50:16Topic: wolfpack/outQos: ROFF3:255
2022-01-16 21:50:16Topic: wolfpack/outQos: R3:0
2022-01-16 21:50:16Topic: wolfpack/outQos: RON2:0
2022-01-16 21:50:16Topic: wolfpack/outQos: ROFF2:255
2022-01-16 21:50:16Topic: wolfpack/outQos: R2:0
2022-01-16 21:50:16Topic: wolfpack/outQos: RON1:0
2022-01-16 21:50:16Topic: wolfpack/outQos: ROFF1:255
2022-01-16 21:50:16Topic: wolfpack/outQos: R1:212
2022-01-16 21:50:16Topic: wolfpack/outQos: PWMAO:255
2022-01-16 21:50:16Topic: wolfpack/outQos: PWMDO:255
2022-01-16 21:50:16Topic: wolfpack/outQos: PWMA:92
2022-01-16 21:50:16Topic: wolfpack/outQos: PWMD:0
2022-01-16 21:50:16Topic: wolfpack/outQos: SF:0
2022-01-16 21:50:16Topic: wolfpack/outQos: AF:0
2022-01-16 21:50:16Topic: wolfpack/outQos: BID:4
2022-01-16 21:50:16Topic: wolfpack/outQos: REM:1
2022-01-16 21:50:16Topic: wolfpack/outQos: EM1:4
2022-01-16 21:50:16Topic: wolfpack/outQos: EM:65
2022-01-16 21:50:16Topic: wolfpack/outQos: ATOHIGH:1
2022-01-16 21:50:16Topic: wolfpack/outQos: ATOLOW:0
2022-01-16 21:50:15Topic: wolfpack/inQos: all:0

Posts: 12865
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Mon Jan 17, 2022 10:30 am
all:0 requests all variables.
Usually when you initially connect so you can grab the latest data. Then you just need to keep watching for changes.
Roberto.

Posts: 24
Joined: Thu Sep 06, 2012 10:11 pm
PostPosted: Mon Jan 17, 2022 9:04 pm
Thanks Roberto! I see it now. Amazing how many messages I missed before. Now I am monitoring R1, R1ON1, ROFF2, ATOLOW, and ATOHIGH. The Rs needed a little bit of math to break out the values, but I think I've just about got it and will send those values to helper variables in Home Assistant for visibility.
Previous

Return to Portal

Who is online

Users browsing this forum: No registered users and 4 guests