martin-ger / esp_wifi_repeater

A full functional WiFi Repeater (correctly: a WiFi NAT Router)
MIT License
4.82k stars 908 forks source link

examples for use with mqtt suscribe for commands and qio_out #200

Open spereg53 opened 6 years ago

spereg53 commented 6 years ago

can you tellme how to work with mqtt command and output ,i try with node-red and do not recieve nothing on a telnet;the mode publish,work well,thanks

martin-ger commented 6 years ago

Just publish a command (any line you can also enter on the console) to the command topic (default: "/WiFi/ESPRouter_xxxxxx/command"). You can set the command topic to any value using: set mqtt_command_topic <command_topic>

spereg53 commented 6 years ago

i did this on node-red: [image: image.png] in the button i put as payload "scan"but i don´s see nothing on a telenet session;i can see on node-red the vdd and Uptime as suscriber from publish of repeater: [image: image.png] and please tellme how to control an output on the gpio of esp8266,i am using esp8266-12,thanks a lot and sorry by my english ING.SERGIO M.PEREZ GORDILLO CALLE DE CHAMULA #21 COL.LA LOMITA;C.P.29060 TUXTLA GTZ.CHIAPAS,MEXICO TEL:019612640373 y 019611214526 CELULAR:9612015537 Email:spereg53@gmail.com Email:spereg_53@hotmail.com

El dom., 10 de jun. de 2018 a la(s) 00:36, martin-ger ( notifications@github.com) escribió:

Just publish a command (any line you can also enter on the console) to the command topic (default: "/WiFi/ESPRouter_xxxxxx/command"). You can set the command topic to any value using: set mqtt_command_topic

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/martin-ger/esp_wifi_repeater/issues/200#issuecomment-396022222, or mute the thread https://github.com/notifications/unsubscribe-auth/AFVQBWJYp_OmJ5EKd88IQQhJMhzR3vlvks5t7LBxgaJpZM4UhYZN .

martin-ger commented 6 years ago

Sorry, cannot see the images. But this is how to execute commands via mqtt: Publish a command to: /WiFi/ESPRouter_xxxxxx/command (as you did) and subscribe to /WiFi/ESPRouter_xxxxxx/system/response where you will get the response.

In order to get GPIO output and input running, recompile the sources with those to defines in user_config.h defined:

// Define this if you want to get messages about GPIO pin status changes
//#define USER_GPIO_IN   0

// Define this if you want to set an output signal
//#define USER_GPIO_OUT  12
spereg53 commented 6 years ago

i recompile the sources and put like suscriber on node-red this topic /WiFi/ESPRouter_XXXX/switch/0 and nothing to see ,when i change state on the pin "0";how is the sintaxis??? thanks ING.SERGIO M.PEREZ GORDILLO CALLE DE CHAMULA #21 COL.LA LOMITA;C.P.29060 TUXTLA GTZ.CHIAPAS,MEXICO TEL:019612640373 y 019611214526 CELULAR:9612015537 Email:spereg53@gmail.com Email:spereg_53@hotmail.com

El dom., 10 de jun. de 2018 a la(s) 15:06, martin-ger ( notifications@github.com) escribió:

Sorry, cannot see the images. But this is how to execute commands via mqtt: Publish a command to: /WiFi/ESPRouter_xxxxxx/command (as you did) and subscribe to /WiFi/ESPRouter_xxxxxx/system/response where you will get the response.

In order to get GPIO output and input running, recompile the sources with those to defines in user_config.h defined:

// Define this if you want to get messages about GPIO pin status changes //#define USER_GPIO_IN 0

// Define this if you want to set an output signal //#define USER_GPIO_OUT 12

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/martin-ger/esp_wifi_repeater/issues/200#issuecomment-396078119, or mute the thread https://github.com/notifications/unsubscribe-auth/AFVQBdGpnETh4aNnfETuEtksIh6zak2Xks5t7XxGgaJpZM4UhYZN .

martin-ger commented 6 years ago

The XXXXXX is just a placeholder for the devive Id. Type "show mqtt" on the CLI and you will See the real prefix.

Am 12. Juni 2018 10:54:22 nachm. schrieb spereg53 notifications@github.com:

i recompile the sources and put like suscriber on node-red this topic /WiFi/ESPRouter_XXXX/switch/0 and nothing to see ,when i change state on the pin "0";how is the sintaxis??? thanks ING.SERGIO M.PEREZ GORDILLO CALLE DE CHAMULA #21 COL.LA LOMITA;C.P.29060 TUXTLA GTZ.CHIAPAS,MEXICO TEL:019612640373 y 019611214526 CELULAR:9612015537 Email:spereg53@gmail.com Email:spereg_53@hotmail.com

El dom., 10 de jun. de 2018 a la(s) 15:06, martin-ger ( notifications@github.com) escribió:

Sorry, cannot see the images. But this is how to execute commands via mqtt: Publish a command to: /WiFi/ESPRouter_xxxxxx/command (as you did) and subscribe to /WiFi/ESPRouter_xxxxxx/system/response where you will get the response.

In order to get GPIO output and input running, recompile the sources with those to defines in user_config.h defined:

// Define this if you want to get messages about GPIO pin status changes //#define USER_GPIO_IN 0

// Define this if you want to set an output signal //#define USER_GPIO_OUT 12

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/martin-ger/esp_wifi_repeater/issues/200#issuecomment-396078119, or mute the thread https://github.com/notifications/unsubscribe-auth/AFVQBdGpnETh4aNnfETuEtksIh6zak2Xks5t7XxGgaJpZM4UhYZN .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

spereg53 commented 6 years ago

thanks

spereg53 commented 6 years ago

is a good idea to use the repeater but now i want to use for monitoring energy with a pulse to an input logic on pin 2 of esp8266-01 ,so i want to use the same repeater and each of esp8266 can give me the pulse from another sketch; can you helpme????dou speak englis or spanish?? ING.SERGIO M.PEREZ GORDILLO CALLE DE CHAMULA #21 COL.LA LOMITA;C.P.29060 TUXTLA GTZ.CHIAPAS,MEXICO TEL:019612640373 y 019611214526 CELULAR:9612015537 Email:spereg53@gmail.com Email:spereg_53@hotmail.com

El mar., 12 de jun. de 2018 a la(s) 23:19, martin-ger ( notifications@github.com) escribió:

The XXXXXX is just a placeholder for the devive Id. Type "show mqtt" on the CLI and you will See the real prefix.

Am 12. Juni 2018 10:54:22 nachm. schrieb spereg53 < notifications@github.com>:

i recompile the sources and put like suscriber on node-red this topic /WiFi/ESPRouter_XXXX/switch/0 and nothing to see ,when i change state on the pin "0";how is the sintaxis??? thanks ING.SERGIO M.PEREZ GORDILLO CALLE DE CHAMULA #21 COL.LA LOMITA;C.P.29060 TUXTLA GTZ.CHIAPAS,MEXICO TEL:019612640373 y 019611214526 CELULAR:9612015537 Email:spereg53@gmail.com Email:spereg_53@hotmail.com

El dom., 10 de jun. de 2018 a la(s) 15:06, martin-ger ( notifications@github.com) escribió:

Sorry, cannot see the images. But this is how to execute commands via mqtt: Publish a command to: /WiFi/ESPRouter_xxxxxx/command (as you did) and subscribe to /WiFi/ESPRouter_xxxxxx/system/response where you will get the response.

In order to get GPIO output and input running, recompile the sources with those to defines in user_config.h defined:

// Define this if you want to get messages about GPIO pin status changes //#define USER_GPIO_IN 0

// Define this if you want to set an output signal //#define USER_GPIO_OUT 12

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/martin-ger/esp_wifi_repeater/issues/200#issuecomment-396078119 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AFVQBdGpnETh4aNnfETuEtksIh6zak2Xks5t7XxGgaJpZM4UhYZN

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/martin-ger/esp_wifi_repeater/issues/200#issuecomment-396808546, or mute the thread https://github.com/notifications/unsubscribe-auth/AFVQBUtRdpdHbpWzYCzqn2L_SsfjBhSdks5t8JK_gaJpZM4UhYZN .

martin-ger commented 6 years ago

If you define USER_GPIO_IN in user_config.h and recompile it, you will get an MQTT message on any state change of GPIO 0 on the toppic prefix/GpioIn.

// Define this if you want to get messages about GPIO pin status changes
//#define USER_GPIO_IN   0
spereg53 commented 5 years ago

i can not get to work gpioin ,i recompile with gpioin on pin 4 and gpioout on pin 5,but i don´t see on my node-red, mqtt subscribe to /prefi/#;can you tell me how, with a example,thanks