So Obvious.......

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.
chipfryer27
Valued Contributor
Posts: 2055
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 451 times
Been thanked: 675 times

Re: So Obvious.......

Post by chipfryer27 »

Hi Steve

Will do.

At present though, providing a way for the FC MQTT component to option "Clean Start" and QoS would be great, as would, what I believe is much needed, an alternative to espressif. To that extent I have been looking at the RNWF02 board from Microchip which would / should allow any PIC or uC internet connectivity. Of course Pico 2W would be very welcomed :)

It was a few months back that I last used WD and after "re-figuring it out" as it had been a while since I previously played, I found it to be quite easy to use for whatever it was I was doing then (I think I was grabbing time from my server). I will probably use it to also grab and display pertinent info from my database too.

Regards

BenR
Matrix Staff
Posts: 2263
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 623 times
Been thanked: 827 times

Re: So Obvious.......

Post by BenR »

I've had a go at the MQTT upgrades and have something here but want it to be tested a bit more before we release it to the update system.

I've implemented the QoS and Clean Start as well as a number of other things.

Have a play and let us know how you get on. I'll try and find some time for some testing too :D


MQTT_Client.fcpx
(16.56 KiB) Downloaded 15 times

chipfryer27
Valued Contributor
Posts: 2055
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 451 times
Been thanked: 675 times

Re: So Obvious.......

Post by chipfryer27 »

Hi Ben

Many thanks for taking the time to update.

Ordinarily I'd be testing it as I type, but last night I "accidentally" opened a few quality bottles of rum, bourbon and Islay's finest with my neighbour, and for the life of me can't remember too much other than watching a fox and deer stroll past together. I'm as certain as I possibly can be that this did happen and wasn't some AI generated hallucination (AI = Alcohol Induced <s>). I will look through my CCTV as a sanity check once I find out where I left the remote control... :)

My plans for today are now written off...... so I should get time this afternoon to test.

Ardbeg Corryvreckan..... Making the best of bad decisions..... :lol:

Regards

chipfryer27
Valued Contributor
Posts: 2055
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 451 times
Been thanked: 675 times

Re: So Obvious.......

Post by chipfryer27 »

Hi Ben

I'm still not firing on all cylinders but did manage a quick QoS test and it seems to be working fine. I had my chart send messages to my broker, then disconnected my PC client, sent another message and reconnected PC client. It then obtained the message.

Thanks again for the updated component.

Regards

chipfryer27
Valued Contributor
Posts: 2055
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 451 times
Been thanked: 675 times

Re: So Obvious.......

Post by chipfryer27 »

Hi

I thought rather than monitor the Bell output to signal the alarm is triggered I would monitor the Strobe output instead. Reason being that the Bell output is only active when the Bell is actually active, and has a cut-off timer set for x-minutes. The Strobe output however stays active if triggered until the panel is reset. This I thought would be better if I was checking in remotely and requested a Status update. Testing Strobe rather than Bell would inform if the alarm had triggered.

All seemed well however checking the databases I saw I was getting a "Triggered" alert too when Set (quickly clearing), and I would get a transient alert via MQTT too.

Strange I thought and went about investigating. Initial thoughts were perhaps an inducement in the cable as the wires are consecutive. Note I am using a simple resistor based level shifter on the Strobe / Set+ wires to safely interface with the WROOM-32.

Connecting a scope soon showed the problem. Set+ (on Ch1) goes from 0v to 12v when set and I used this as the trigger, capturing Strobe on Ch2. Ideally Strobe would remain at 12v. It didn't. It dropped to zero volts and remained there for six seconds before returning to 12v. My Tektronix Scopemeter may be old but it's still good :)

This completely ruled out any inducements / bounce or anything along those lines as it was clear the panel itself was doing this. I had forgotten that the default Strobe setting on this panel is to trigger for six seconds upon set, as a visual indication of such. A quick change to the panel programming resolved.

Next is to update to include QoS when sending MQTT messages and it can be put aside until the next update / upgrade. It is quite interesting looking at my captured activity and see that last night I must have been really tired as it didn't log any movement for around seven hours. Other nights it was detecting me every ninety minutes or so as I moved in my sleep.

Regards

Post Reply