The ExternalNotification Plugin will allow you to connect a speaker, LED, strobe light, fame thrower or other device to notify you when a message has been received from the mesh network.
This was requested by @Lure.Exciting.Salads about a week ago and it was such a good idea, I thought it’d be good to make it available sooner than later.
The plugin will be available in the next version of the device firmware (and tomorrow’s nightly build). To configure it, we’ll also need a new version of the Python API.
ext_notification_plugin_output
What GPIO is your external circuit attached?
GPIO of the output. (Default = 13)
But according to another thread GPIO 13 is used as a button to cycle through displays. Do we have a spot where we could start mapping GPIOs to some predetermined IOs. Obviously we are able to change them in code, but if we knew that GPIO13 was to cycle screens, GPIO15 is a notification LED etc we can solder according to docs and not have to change settings on firmware updates.
I’m with you on this. I’m using TTGO LoRa32 V2 1.6 board and on those GPIO12 is used to cycle screen while GPIO13 is used to connect external GPS module.
I understand all this can be edited but I’m not at that point yet.
GPIO 13 is only used for that purpose on the tbeam. There are not many pins that are commonly unused across boards, this is why the output pin for this plugin is a configuration option – to make it work for the largest number of possible devices.
I’m happy to change this if you have a better idea of where it could go as a default.
So you know, I use the tlora32 v1 as my main development platform. A pin mapping chart across different boards would be useful
I can’t wait to try it. I’m setting this up as a small pager type device (and tracker) for my kids when they are playing in the neighborhood. This LoRa32 V2 1.6 board allows me to package everything into approximately half the size as t-beam, using a small project box as enclosure.
This is what it sounds like when you have a passive buzzer instead of an active buzzer (Clicks very quietly. I put an LED in so that SOMETHING would work)
Also what a strange video, there’s such a dramatic/ominous noise at the beginning haha
Thanks to @mc-hamster I managed to add support for passive speakers using PWM. Going to clean up the code this week and pull request. (Nice little two-tone attention grabber)
Anyone interested in this feature being expanded? Flashing LED until acknowledged with button press?
Flash LED/Tone to confirm button press?
Power/reset tone?
Different “ring tones?”, or call it done at a single beep.
Good job, I’m very interested in this feature. I’m waiting for active speakers, should be here in a week or two.
Flashing LED until acknowledged but also buzzer buzzing once every 30sec until acknowledged. Buzzer can even have hardware toggle so it can be turned off or on as needed.
Different ring tones would be great also. For example if there ever is SOS button implemented, then that can activate special SOS tone.
I just received my active speakers today, surprisingly fast for AliExpress order. Right away I tried to build this in platformIO and enable the new plugin. However, tbeam booted up with rev 1.1.34 firmware and after a few seconds it shut off. It actually has screen contrast intensity indicator on the screen right from start, as if user button is pushed in.
These are the steps I took to flash new firmware:
Clone GitHub project
Modify external notification plugin .cpp file by uncommenting six lines, keeping default values
Save external notification plugin .cpp file
Build under env:tbeam
Upload under env:tbeam
Both build and upload showed success. Can anyone tell me if I missed something or what could be the issue?
Did you wire the speaker to pin 13? It is also used as an alternative for the user button by default.
You’ll have to change either the button pin or the speaker pin. @mc-hamster and I chatted about this a bit, and the hard part is choosing a pin that is universally open on all boards. I think I chose 2 as my new user button.
Depending on your active speaker, you may want either an active low or active high output. If active low, you can leave the default as is. If active high, you will want to set: