About read serial data need help!!!
Moderators: grovkillen, Stuntteam, TD-er
-
- Normal user
- Posts: 13
- Joined: 08 May 2017, 22:50
About read serial data need help!!!
My English is so bad don't laugh at me Please!!!Thanks!
The problem is this
I got a voice recognition module
I want to connect this module with espeasy
What I want to do is to read the data from the module, and then transfer it to domoticz via espeasy
There are two options
1, through the espeasy to do judgment, and then send the HTTP command directly to the json.htm control switch (the best solution)
2, the espeasy will be passed to the domoticz value of a IDX device, and then write the Lua script control switch in the domoticz (alternative)
The module is output through the serial, I do not know how to transfer data to Espeasy, I tried to write plug-ins, but it is too difficult for me, please forgive me for a beginner.
So I'm asking for the right thing to do!
As far as possible to describe in detail!!!
Esteem it a favor! Thanks very much!!!
The problem is this
I got a voice recognition module
I want to connect this module with espeasy
What I want to do is to read the data from the module, and then transfer it to domoticz via espeasy
There are two options
1, through the espeasy to do judgment, and then send the HTTP command directly to the json.htm control switch (the best solution)
2, the espeasy will be passed to the domoticz value of a IDX device, and then write the Lua script control switch in the domoticz (alternative)
The module is output through the serial, I do not know how to transfer data to Espeasy, I tried to write plug-ins, but it is too difficult for me, please forgive me for a beginner.
So I'm asking for the right thing to do!
As far as possible to describe in detail!!!
Esteem it a favor! Thanks very much!!!
Re: About read serial data need help!!!
Have you seen the ser2net plugin? It should be the one for your application. I think it will require lua scripts on the domoticz side as it just maps the serial to a TCP port.livebelive wrote: ↑08 May 2017, 23:18 My English is so bad don't laugh at me Please!!!Thanks!
The problem is this
I got a voice recognition module
I want to connect this module with espeasy
What I want to do is to read the data from the module, and then transfer it to domoticz via espeasy
There are two options
1, through the espeasy to do judgment, and then send the HTTP command directly to the json.htm control switch (the best solution)
2, the espeasy will be passed to the domoticz value of a IDX device, and then write the Lua script control switch in the domoticz (alternative)
The module is output through the serial, I do not know how to transfer data to Espeasy, I tried to write plug-ins, but it is too difficult for me, please forgive me for a beginner.
So I'm asking for the right thing to do!
As far as possible to describe in detail!!!
Esteem it a favor! Thanks very much!!!
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8
-
- Normal user
- Posts: 13
- Joined: 08 May 2017, 22:50
Re: About read serial data need help!!!
Yes, see the ser2net plug-in, set to complete, do not know how to send or receive data. Can you teach me how to do it?
Re: About read serial data need help!!!
No, I think you would need to take it to the domoticz forum from there.livebelive wrote: ↑08 May 2017, 23:44Yes, see the ser2net plug-in, set to complete, do not know how to send or receive data. Can you teach me how to do it?
Maybe another starting point is the nextion display plugin. AFAIK it also uses serial command. You would need to take it from there or hope someone else will. Maybe post some more details on the speech recognition device, so people get a better idea of what you trying to do.
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8
-
- Normal user
- Posts: 13
- Joined: 08 May 2017, 22:50
Re: About read serial data need help!!!
Code: Select all
int val;
void setup()
{
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);
Serial.begin(115200);
digitalWrite(13, 0);
digitalWrite(13, 0);
delay(2000);
Serial.print("@PlayFlashText#007$");
}
void loop()
{
val = Serial.read();
if (val != -1)
{
if (val == 1)
{
digitalWrite(12, HIGH);
}
if (val == 2)
{
digitalWrite(12, LOW);
}
if (val == 3)
{
digitalWrite(13, HIGH);
}
if (val == 4)
{
digitalWrite(13, LOW);
}
}
}
I tried to add it to espeasy's void (loop), which can be read and executed successfully,
But I don't know how to change the action to send to domoticz!
-
- Normal user
- Posts: 13
- Joined: 08 May 2017, 22:50
Re: About read serial data need help!!!
somebody help me!!!
Re: About read serial data need help!!!
First of all, stop stressing!
If you want to get help here, you need to be patient and polite.
Then checkout the CO2-Sensor on the wiki. It also uses serial communication. You will have to develop a plugin from there. It uses the softserial library to provide serial communication to two GPIO pins.
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8
-
- Normal user
- Posts: 13
- Joined: 08 May 2017, 22:50
Re: About read serial data need help!!!
Thank you very much!toffel969 wrote: ↑09 May 2017, 11:25 First of all, stop stressing!
If you want to get help here, you need to be patient and polite.
Then checkout the CO2-Sensor on the wiki. It also uses serial communication. You will have to develop a plugin from there. It uses the softserial library to provide serial communication to two GPIO pins.
Re: About read serial data need help!!!
If you don't mind, please share the plugin and the information on the device (not the code, maybe a link to ali/ebay so that we know what it looks like)livebelive wrote: ↑09 May 2017, 22:36Thank you very much!toffel969 wrote: ↑09 May 2017, 11:25 First of all, stop stressing!
If you want to get help here, you need to be patient and polite.
Then checkout the CO2-Sensor on the wiki. It also uses serial communication. You will have to develop a plugin from there. It uses the softserial library to provide serial communication to two GPIO pins.
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8
-
- Normal user
- Posts: 13
- Joined: 08 May 2017, 22:50
Re: About read serial data need help!!!
I do not mind, I am glad that the current knowledge is limited, even if you say where to find, how to describe it is not quite understand, and so I know some of the more comprehensive post!
Thanks again!
Thanks again!
Who is online
Users browsing this forum: No registered users and 16 guests