Page 1 of 1
Re: Speaker function ?
Posted: 02 Oct 2016, 10:44
by moelski
Hi tozett !
can it go into the main development branch?
(or someone good in coding make a plugin? moelski?
)
Working on my Candle Plugin
But this is more an Actor and not a Sensor ...
But anyway ... Making a stand alone "tone" plugin should be straight forward ...
Re: Speaker function ?
Posted: 02 Oct 2016, 14:37
by rol-rider
Great idea,
I wanted to test,
_P001_Switch.rar
it does not compile.
Code: Select all
296 log = String(F("SW : GPIO ")) + String(event->Par1) + String(F(" Set PWM to ")) + String(webreq);
exit status 1
'webreq' was not declared in this scope
thank.
sorry I do not speak English!
Re: Speaker function ?
Posted: 02 Oct 2016, 15:35
by Marteln
rol-rider wrote:Great idea,
I wanted to test,
_P001_Switch.rar
it does not compile.
Code: Select all
296 log = String(F("SW : GPIO ")) + String(event->Par1) + String(F(" Set PWM to ")) + String(webreq);
exit status 1
'webreq' was not declared in this scope
thank.
sorry I do not speak English!
Oh, sorry!
I sent older version
This is the correct.
Re: Speaker function ?
Posted: 02 Oct 2016, 16:43
by rol-rider
Thanks,
I still managed to use "tone"
in rules:
Code: Select all
On BP#BP do
tone,14,435,600
tone,14,580,600
tone,14,435,600
tone,14,580,600
tone,14,435,600
tone,14,580,600
tone,14,435,600
tone,14,580,600
endon
French police siren
but "rtttl" ???
I test the new file.
Re: Speaker function ?
Posted: 02 Oct 2016, 17:10
by Marteln
rol-rider,
you have to replace "#" with "-" or urlencode string.
Re: Speaker function ?
Posted: 02 Oct 2016, 18:20
by rol-rider
Great ! it works !
this is the ":" I forgot!
Code: Select all
http://192.168.0.3/control?cmd=rtttl,14:d=8,o=5,b=180,c6,b,c6,p,g,g-,p,f,b,c6,p,d6,p,g,p,c6,b,c6,p,d6,p,f,g,g-,4p,g,f,4d-
beautiful melody
Re: Speaker function ?
Posted: 02 Oct 2016, 20:55
by Marteln
rol-rider wrote:Great ! it works !
this is the ":" I forgot!
Code: Select all
http://192.168.0.3/control?cmd=rtttl,14:d=8,o=5,b=180,c6,b,c6,p,g,g-,p,f,b,c6,p,d6,p,g,p,c6,b,c6,p,d6,p,f,g,g-,4p,g,f,4d-
beautiful melody
Correct syntax is : rtttl, pin,name_of_melody:duration,octave,beat,notes..........
Somewhere use ":" after beat, somewhere ","... I didnt try ":", maybe work, maybe not.
https://en.wikipedia.org/wiki/Ring_Tone ... r_Language
Re: Speaker function ?
Posted: 03 Oct 2016, 00:16
by rol-rider
ok, thank you for the clarification.
Re: Speaker function ?
Posted: 03 Oct 2016, 14:03
by tozett
hope this doku finds it way to the wiki ...
Re: Speaker function ?
Posted: 13 Feb 2017, 09:23
by psy0rz
is this in the dev branch yet? or should someone make a pull request?
Re: Speaker function ?
Posted: 17 Feb 2017, 00:33
by psy0rz
I needed speaker support myself to build an Alarm system for my home. Needed the alarm to give audio feedback. (e.g. alarm enable/disable tones, window-open notification sounds etc)
I cleaned up the code (identation), and moved the functions to Misc.ino
Its avaiable in v1.1.0-beta7 in the testing plugin-set.
Edwin
Re: Speaker function ?
Posted: 13 Mar 2017, 19:08
by kniazio
I have uploaded version dev6
https://github.com/letscontrolit/ESPEasy/releases
It is written in the description
I get the message
Unknown or restricted command!
Re: Speaker function ?
Posted: 14 Mar 2017, 00:07
by psy0rz
Its in the testing plugin set. So you need the test or dev firmware version.
I just updated the wiki:
https://www.letscontrolit.com/wiki/index.php/GPIO
Re: Speaker function ?
Posted: 14 Mar 2017, 07:00
by kniazio
After being exchanged plugin _P001_Switch forum
https://www.letscontrolit.com/forum/vie ... ?f=4&t=343
melodies work
It seems that in the dev version 6 is a mistake
Re: Speaker function ?
Posted: 14 Mar 2017, 10:34
by psy0rz
uuuhh ...what do you mean?
Re: Speaker function ?
Posted: 14 Mar 2017, 11:17
by kniazio
psy0rz wrote: ↑14 Mar 2017, 10:34
uuuhh ...what do you mean?
I mean that with version dev6 wrote melodies that have been added.
These tunes do not work
I see that RTTTL code is added to the plugin misc.ino but it did not work.
I swapped the old plugin _P001_Switch.ino and melodies work
I did it according to the description of the forum
https://www.letscontrolit.com/forum/vie ... ?f=4&t=343
post 7
Re: Speaker function ?
Posted: 14 Mar 2017, 12:24
by kniazio
After sending the command:
Code: Select all
http://192.168.0.3/control?cmd=rtttl,14:d=8,o=5,b=180,c6,b,c6,p,g,g-,p,f,b,c6,p,d6,p,g,p,c6,b,c6,p,d6,p,f,g,g-,4p,g,f,4d-
I get the answer:
In contrast, using a modified plugin _P001_Switch.ino
After sending the command:
Code: Select all
http://192.168.0.3/control?cmd=rtttl,14:d=8,o=5,b=180,c6,b,c6,p,g,g-,p,f,b,c6,p,d6,p,g,p,c6,b,c6,p,d6,p,f,g,g-,4p,g,f,4d-
I get the answer:
Code: Select all
{
"log": "rtttl,14:d=8,o=5,b=180,c6",
"plugin": 1,
"pin": 14,
"mode": "output",
"state": 0
}
Re: Speaker function ?
Posted: 14 Mar 2017, 13:24
by psy0rz
You have to use the correct binary.
If you have 4096Mb flash use: ESPEasy_v2.0.0-dev6_dev_4096.bin
If you have 1024MB flash use: ESPEasy_v2.0.0-dev6_dev_1024.bin
Notice the _dev_ at the end, that means: All the plugins that are in testing and development state.
Re: Speaker function ?
Posted: 14 Mar 2017, 17:56
by kniazio
psy0rz wrote: ↑14 Mar 2017, 13:24
You have to use the correct binary.
If you have 4096Mb flash use: ESPEasy_v2.0.0-dev6_dev_4096.bin
If you have 1024MB flash use: ESPEasy_v2.0.0-dev6_dev_1024.bin
Notice the _dev_ at the end, that means: All the plugins that are in testing and development state.
I do not use ready .bin file alone compile
In the previous post I explained to guess exactly what's going on
Re: Speaker function ?
Posted: 14 Mar 2017, 18:01
by psy0rz
ah you compiled it yourself. what did you use to compile it, Arduino IDE or platformio?
Edwin
Re: Speaker function ?
Posted: 14 Mar 2017, 19:36
by kniazio
psy0rz wrote: ↑14 Mar 2017, 18:01
ah you compiled it yourself. what did you use to compile it, Arduino IDE or platformio?
Edwin
Arduino IDE
Re: Speaker function ?
Posted: 14 Mar 2017, 21:20
by psy0rz
I still have to adjust the tutorials for that.
If you compile it now, it will not comile the TEST and DEV plugins.
if you add this to ESPEasy.ino it will work, without the other adjustments you made:
#define PLUGIN_BUILD_DEV
#define PLUGIN_BUILD_TESTING
Re: Speaker function ?
Posted: 15 Mar 2017, 06:39
by kniazio
I do not understand what you mean.
I believe that in the file Misc.ino is an error, and therefore tunes do not work.
Why work with a file _P001_Switch.ino?
Re: Speaker function ?
Posted: 15 Mar 2017, 09:37
by psy0rz
I fixed the tutorial and source code.
Use v2.0.0-dev7 , follow this tutorial:
https://www.letscontrolit.com/wiki/inde ... are_Upload
make sure you enable the testing plugin set. (in espeasy.ino)
Edwin
Re: Speaker function ?
Posted: 15 Mar 2017, 11:05
by kniazio
Unknown or restricted command!
Re: Speaker function ?
Posted: 15 Mar 2017, 11:26
by psy0rz
strange..i'm using that version and it works here.