Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
den har
@denman0000_gitlab
@moose4621 Hi Moose :-) hope all's well .. and you enjoyed your power nap
Chris Dalby
@moose4621
@denman0000_gitlab Thanks, yeah all good woke up at midnight and went to bed. Another wasted evening. Ha ha.
So, why won't websockets do what you want?
@denman0000_gitlab I mean, are it's shortcoming a show stopper for you?
den har
@denman0000_gitlab
@moose4621 Sleep is never a waste
@moose4621 .. not a showstopper ..
Chris Dalby
@moose4621
@skorokithakis @denman0000_gitlab I should be at work by now. :-( Better sign off and get out of here. See you in about 8 hours.
Stavros Korokithakis
@skorokithakis
same here, later everyone
den har
@denman0000_gitlab
@moose4621 .. re websockets seems you may have to have port 81 open if coming in from outside router ..damn ...will feedback results tomorrow
@skorokithakis Goodnig Stavros And Have a good day @moose4621
chat later :-)
den har
@denman0000_gitlab
Does anyone here know how to get WEBSOCKETS working from outside a router ? Specifically what NAT or PAT must be made ,for a custom port apart from 81 on client side .. what must be changed ?
den har
@denman0000_gitlab
@moose4621 See here for ping pong sort of thing under websockets heading https://github.com/israellot/esp-ginx
den har
@denman0000_gitlab
Chris Dalby
@moose4621
@denman0000_gitlab I finished up modifying this for the ping pong or heart beat monitor. http://django-websocket-redis.readthedocs.io/en/latest/heartbeats.html
Chris Dalby
@moose4621
@moose4621 .. re websockets seems you may have to have port 81 open if coming in from outside router ..damn ...will feedback results tomorrow
Are you trying to access it from another network or the same network?
Chris Dalby
@moose4621
@ashthespy I am still trying to come to grips with the uint casting. Can you tell me why I get this error? invalid conversion from 'uint8_t {aka unsigned char}' to 'uint8_t {aka unsigned char}' [-fpermissive]
den har
@denman0000_gitlab
@moose4621 good day Moose .. How are you ? I too have problems there casting and conversion
@moose4621 Iam just tring to save the Payload 8 uint8_t to a file on spiffs ..I spent 3 hours trying to figure out how to convert it to the correct format :-(
Chris Dalby
@moose4621
@denman0000_gitlab I have been looking at this example and wondering if I can get it to do what you want. https://tttapa.github.io/ESP8266/Chap16%20-%20Data%20Logging.html
@denman0000_gitlab Some stuff you don't need but I think maybe the concept is usable.
den har
@denman0000_gitlab
@moose4621 how are you today :-)
@moose4621 cool will have a look there
Chris Dalby
@moose4621
@denman0000_gitlab Hey, we finally are awake at the same time. Great how about you?
den har
@denman0000_gitlab
@moose4621 why is it sooo difficult just to get data into the right format aaargh
@moose4621 yaaaay yes indeed I'm great too thanks .. Gl;ad you're great too
Chris Dalby
@moose4621
Yeah, just another frustration you don't need.
den har
@denman0000_gitlab
@moose4621 was thinking about your ping pong issue .. I sent a few links for you and you could somehow set the javascript client side to react to the pong from server :-) I tried a ping png last night and saw the message appear in the client browser console log (F12)
Chris Dalby
@moose4621
@denman0000_gitlab So when you are writing these events to spiffs, are they indexed in some way for later identification?
den har
@denman0000_gitlab
@moose4621 not a specific index yet but can assign a field in the table for that (something I thought about) the closest to inded so far is a device ID
Chris Dalby
@moose4621
Yeah thanks very much for those links. I finally went with http://django-websocket-redis.readthedocs.io/en/latest/heartbeats.html and although the javascript needed adapting I managed to get it to work and now a warning popup appears to alert the operator. All done!
den har
@denman0000_gitlab
I have managed to assemble (collect) the string on button click on client side and javascript now sends it to server and I used the examplle you sent to PRINTF in the console ... All I'm trying to do now is take that output and send it to SPIFFS
@moose4621 WOW man you are rocking this rice paddy :-) well done
Chris Dalby
@moose4621
@denman0000_gitlab Lol, yeah I'm feeling good atm. Can you give my an idea of whats in the message at the server end?
den har
@denman0000_gitlab
@moose4621 that's awesome :-) glad to hear it .. yes re data
standbuy
standby
Chris Dalby
@moose4621
@denman0000_gitlab kml file might be next for me which is in parrallel with your projct but kml formatting is a killer.
@denman0000_gitlab Just found a library for writing kml files in arduino. Yay.
den har
@denman0000_gitlab
@moose motor,outside,2018-06-18 12:00,1529316000,2018-06-19 12:00,1529402400,Normal,0001,0001
Chris Dalby
@moose4621
@denman0000_gitlab Ok, thanks. I might have a play with it tonight after work if you haven't already soughted it out. Do you have your code on github?
den har
@denman0000_gitlab
@moose4621 Negative re github .. its all over the place at the mo .. will see how to get it on git and then go from there and structure it ...it's spaghetti code at the mo LOL
@moose4621 wow ok re KML .. you did mention the geolocation stuff too .. very cool
Chris Dalby
@moose4621
@denman0000_gitlab Only cool if it works. :-)
den har
@denman0000_gitlab
@moose4621 haha i know it will work :-)
@moose4621 you're on a roll
Chris Dalby
@moose4621
@denman0000_gitlab Ha ha, can't last forever!
den har
@denman0000_gitlab
@moose4621 believe in yourself :-) and it will
den har
@denman0000_gitlab
@moose4621 how did you get alerting to work in broweser ? Just ALERT "whatever " in .js ?
Chris Dalby
@moose4621
@denman0000_gitlab if (heartbeat_interval === null) {
missed_heartbeats = 0;
heartbeat_interval = setInterval(function() {
try {
missed_heartbeats++;
if (missed_heartbeats >= 3){
alert("Signal to seeder lost! Check WIFI connection and reload page to continue");
throw new Error("Too many missed heartbeats.");
}
            connection.send(heartbeat_msg);
        } catch(e) {
            clearInterval(heartbeat_interval);
            heartbeat_interval = null;
            console.warn("Closing connection. Reason: " + e.message);
            connection.close();
        }
    }, 5000);
}