Current News

Moderator: Mmiscool

User avatar
By forlotto
#49766 Outside of your local network you mean using your WAN IP or using the device as a separate intranet device such as AP mode?

Obvious things to look for would be code yes sure. Other things would be the browser you are using the connection you are making etc...

Funny thing though I guess a better explanation would likely help.

It may just be a bug if it is a wan ip that you are using make sure your port 80 is being forwarded for your device in your router under port forwarding settings for your device. So if your device's IP is 192.168.1.23 you will want to setup port forwarding to external port 80 . Once forwarded things should work if you request things from your external IP find that by googling what is my ip or look at your routers status page wan IP should be listed somewhere on your router.

I am curious I think there is some important information on your setup being missed here share as much info as you can if needed maybe tomorrow you can PM me your IP and I can check it out for myself and verify that there are no text boxes indeed.

Anyhow take care as I said it may just be a bug I don't recall what version you said you are using if you are using ap and station mode both this may be causing issues as stated.
User avatar
By joeygbsn
#49769 I'll post my code later today but yes I have forwarded the port and am using the wan ip through a dns service. The textbox is on the page, but if you click on it and try to change the value nothing happens. Then if I log back in to my network and instead use the local ip 192.168.0.104 everything works as it should. I should note the reason I posted in this thread is because when I did this with v 2 it worked.
User avatar
By forlotto
#49772 It is a rather strange issues we are having in version 3.0 with html and if true now this suggests there is something majorly wrong with html acceptance and usage. There is something that is not easily traceable that was done along the way from v2.x to v3.x even version 1.x to version 2.x had some odd changes in v1.x to v3.x the print command allowed me to print background color in 1.x however in v2.x it did not allow me to do so any longer. In v1.x I could set up my own variable tracking that would track my variable during the entire flow of the program but in v2.x it tracks the variable once and then it stops tracking so it stays locked at the first value.

CSS no longer works in version 3.x either. I feel there is a lot of things being missed it almost seems as if there is a trail of bugs left behind from 1.x to 3.x imho but the root cause of the problem is not known.

I am about ready to offer a cash value award to someone who can figure out these bugs and provide the code to fix the issues as they seem to be very pesky bugs that are popping up making things that once were possible now impossible taking the steam out of espbasic's sail so to speak.

But to ensure this is not user based due to different network configurations, hardware configurations, and etc... I think it is important that you share your full code on this one and let others test this as well!
User avatar
By joeygbsn
#49773 Ok this is not the exact code that I was using when I first noticed the problem, but this is the thermostat program that I converted for use with V3 and it also will create these errors. With this test I have confirmed that the buttons also do nothing when connected from outside of my network. To test just run this code and then forward the port and use your cellphone dataplan to connect. I have been using chrome for all my testing, as well as the nodemcu board for my hardware. Clicking the buttons has no effect, and also any values changed in the textbox will revert when the page is refreshed.

Code: Select allmemclear
SERIALPRINTLN "restart page"
cls

let curr = 0
let setp = 30
let stat = On

Print "ESP8266 WiFi Thermostat "
print
Button "Setpoint", [setpt]
textbox setp
wprint "<br>"
wprint "CurrTemp="
wprint htmlvar(curr)
wprint "<br>"
wprint "Heater="
wprint htmlvar(stat)
wprint "<br>"
button "Exit", [quit]
timer 8000, [refresh]
wait

[on2]
io(po,16,1)
SERIALPRINTLN "PIN 2 ON"
let stat = "On"
returngui
Wait

[off2]
io(po,16,0)
SERIALPRINTLN "PIN 2 OFF"
let stat = "Off"
returngui
Wait

[setpt]
returngui
Wait

[refresh]
curr = temp(0)
SERIALPRINTLN curr
if curr < setp then goto [on2] else goto [off2]
Wait

[quit]
timer 0
wprint "<a href='/'>Menu</a>"
end


You could also test easier with just a textbox and a button.