Supla Button 4 direct links

miko1282
Posts: 363
Joined: Wed Dec 06, 2017 10:15 pm
Location: Brodnica

Sat Feb 16, 2019 12:41 pm

elmaya wrote:
Fri Feb 15, 2019 11:00 pm
PuteR wrote:
Fri Feb 15, 2019 10:52 pm
Normal monstable buttons, module cleaned each time with a blank file, possibly erase.

The server is on raspberry.
try this Bin that I made for the friend niko

D_Link_Config_5_s_x6_miko.ino.generic.rar
this file works on 100% does not work on one nodemcu, but it's a fake and probably its memory is too small
PuteR
Posts: 526
Joined: Wed Dec 06, 2017 10:07 am

Sat Feb 16, 2019 12:57 pm

I'm not saying that the file is not good, I rather have something mixed up. After pressing the button it looks like it would be ok, the blinking diode twice (it probably should be) but the action does not take place. In the browser, the links perform correctly, I did not change anything in the ports. In the env port 443 file, I have # I use a docker so it works behind a proxy. I do not know if it matters.

How to enter the configuration mode in this software? Holds the d1 5s button and the blinking LED 2 times but the network does not broadcast? I manage to enter this mode only after uploading the software.
elmaya
Posts: 194
Joined: Wed Jun 27, 2018 5:48 pm
Location: Sevilla

Sat Feb 16, 2019 1:13 pm

if diode blinking twice it's mean that the server response is "true".
so it's reach the server and get answer
are your training to toggle,switch on, off ?
it will be better if you connect to serial monitor and see whats happen

to enter config hold down until it's quickly flashes (0,2 s)
PuteR
Posts: 526
Joined: Wed Dec 06, 2017 10:07 am

Sat Feb 16, 2019 8:32 pm

elmaya can you write exactly what pint to do to connect to this serial monitor ??

I do not know what it depends on but after pressing the button sometimes the LED blinks once and twice. Holding the button though and 5 minutes will not give anything after releasing the diode will blink once and nothing will happen.
elmaya
Posts: 194
Joined: Wed Jun 27, 2018 5:48 pm
Location: Sevilla

Sun Feb 17, 2019 9:41 am

Image

Code: Select all

mounting FS...
mounted file system
reading config file
opened config file
280
{"Supla_server":"svr7.supla.org",
"D_Link_1":"/direct/xx/xxxxxxxxxxxx/turn-on",
"D_Link_2":"/direct/xx/xxxxxxxxxxxx/turn-off",
"D_Link_3":"/direct/xx/xxxxxxxxxxxx/turn-on",
"D_Link_4":"/direct/xx/xxxxxxxxxxxx/turn-off",
"D_Link_5":"/direct/xx/xxxxxxxxxxxx/turn-on",
"D_Link_6":"/direct/xx/xxxxxxxxxxxx/turn-off",
parsed json
..
Connected
Adres IP:
192.168.1.104 / 255.255.255.0 / 192.168.1.1
(RSSI): -24 dBm

connecting to svr7.supla.org
requesting URL: /direct/xxx/xxxxxxxxxxxxx/turn-off
request sent
headers received
successfull!
reply was:
==========
{"success":true}
==========
closing connection
PuteR
Posts: 526
Joined: Wed Dec 06, 2017 10:07 am

Sun Feb 17, 2019 1:31 pm

Ok, so that's how it looks with me

Code: Select all

*WM: SET AP STA
*WM:
*WM: Configuring access point...
*WM: DirectLink4
*WM: AP IP address:
*WM: 192.168.4.1
*WM: HTTP server started
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Sent config page
*WM: WiFi save
*WM: Parameter
*WM: server
*WM: xxxxx.noip.pl
*WM: Parameter
*WM: Link 1
*WM: /direct/xxxx/xxxxxxxxx/toggle
*WM: Parameter
*WM: Link 2
*WM: /direct/xxxx/xxxxxxxxx/turn-on
*WM: Parameter
*WM: Link 3
*WM: /direct//xxxx/xxxxxxxxx/turn-off
*WM: Parameter
*WM: Link 4
*WM: /direct/xxxx/xxxxxxxxx/turn-on
*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Already connected. Bailing out.
Should save config
connected...yeey :)
*WM: freeing allocated params!
saving config
{
  "Supla_server": "xxxxx.noip.pl",
  "D_Link_1": "/direct/xxxx/xxxxxxxxx/toggle",
  "D_Link_2": "/direct/xxxx/xxxxxxxxx/turn-on",
  "D_Link_3": "/direct/xxxx/xxxxxxxxx/turn-off",
  "D_Link_4": "/direct/xxxx/xxxxxxxxx/turn-on"
}config saved
connecting to xxxxx.noip.pl
requesting URL: /direct/xxxx/xxxxxxxxx/toggle
request sent
headers received
reply was:
==========
58
<html><head><title>Not Found</title></head><body><h1>404 - Not Found</h1></body></html>

0

}
==========
closing connection



I will add that everything on the public supla server works without a problem.
elmaya
Posts: 194
Joined: Wed Jun 27, 2018 5:48 pm
Location: Sevilla

Sun Feb 17, 2019 2:28 pm

finally we know what happens

https://www.noip.com/support/knowledgeb ... ps-domain/

if you have your own server use your ip to connect and not the ulr

192.168.x.x instead of xxxx.noip.pl
PuteR
Posts: 526
Joined: Wed Dec 06, 2017 10:07 am

Sun Feb 17, 2019 3:30 pm

: D kind of a simple thing, and I lost a few days for it :D Thanks to everything works.
elmaya
Posts: 194
Joined: Wed Jun 27, 2018 5:48 pm
Location: Sevilla

Sun Feb 17, 2019 3:32 pm

I'm glad everything is fine :)
PuteR
Posts: 526
Joined: Wed Dec 06, 2017 10:07 am

Sun Feb 17, 2019 5:32 pm

elmaya do you need to connect resistors to the softkey for six links too? You only show such a diagram at eight, so is it the same with the six connections?rnrnCurrently I have connected the button to GND and D5 only and sometimes it happens that the link will be executed automatically. I am not sure if it is a question of these resistors or maybe it is too tight in the case and something is closed somewhere
Post Reply