Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    ildar
    @ildar:matrix.org
    [m]
    Two tree merge is discussed for quite a time. But i doubt think it's a good way to go anymore
    *I don't think
    I want to know what you think
    Terry and others, for sure
    Terry Ellison
    @TerryE
    eLua hasn't had a commit for 18 months. We are still ticking along. I personally have had a house project going and then some health issues over the last few months so haven't been doing much on NodeMCU, but I am getting past those and now in catch up mode. I want to get the on-ESP version of LFS up and running, and then hope to switch to a common Lua core for ESP32 and ES8266. Hopefully Johnny will be able to support this.
    ildar
    @ildar:matrix.org
    [m]
    I see
    I'm quite sure the problem should be approached from the other end
    get a proper source tree that builds fine.
    then add core Lua
    and other core things
    then modules
    after that having other platforms added (ESP32)
    And proper source tree is a tree that is already multi-platform, I mean
    that's why looking at uPython, Espruino, whatnot
    1 reply
    Terry Ellison
    @TerryE
    NodeMCU allows you to run with ~ 256Kb code + constant in Flash and leaves ~44Kb for program data. uPython has the same RAM-only constraints and NodeMCU 1.x
    Read the LFS papers for discussions on this.
    Terri Prifti
    @tprifti
    Hello, recently I am working on building modules and it is working fine. I compile all modules into LFS image. By reading LFS Example I assume that I can access modules by LFS.{modulename}. I have also seen examples that executes LFS modules by using dofile method (by replacing the built in dofile to load module from LFS if present). My question is, which is the suggested way?
    Gregor Hartmann
    @HHHartmann
    In the end it depends on your preference. I tend to use the dofile (or require) method because they prefer SPIFFS over LFS, so that I can upload lua files for testing and development and don't have to flash the whole LFS on every dev cycle. It also allows to use the code without LFS (as long as memory allows). But others prefer to reflash on every cycle. So it's up to you.
    Terri Prifti
    @tprifti
    During development, I also use dofile which speeds up development process. When implementation in finished and let's say everything is working fine, both ways that I described, are modules being read from LFS and not from RAM?
    M.K.
    @mk-pmb
    @tprifti when you have the final version, flash it to LFS, remove modules from SPIFFS, and reboot. then LFS is the only possible source where they could be loaded from. and when they're loaded from LFS, they'll inflict minimal RAM cost.
    Terri Prifti
    @tprifti
    @mk-pmb That's really helpful, thank you!
    Thomas Jakober
    @tjakober
    Hello, since a while i get very rare error messages about bugs on my NodeMCU. First I thought ist a parameter in my firmware builds. So I made a cloud build but it‘s the same. Could it be somewhere in context with LFS handling? Is there some parameter which suppresses error messages? Its very annoying to find bugs in my programs without error messages.
    Thomas Jakober
    @tjakober
    edit: the errors just lead into a reboot without any message. Boot message is wdt reset.
    Thomas Jakober
    @tjakober
    edit: I found the cause: I „banned“ the LFS routines ex init.lua from the samples to the LFS itself. In turn I use node.LFS.get to load it. However this suppresses all error messages therafter. Perhaps you have a clue why this is the case?
    Thomas Jakober
    @tjakober
    edit again: problem solved. I had a global „debug = true“ statement to switch my own error logging on and off. This caused to suppress all error messages.
    Arye Shalev
    @pantchox
    Hi everyone, how do you get real time push notification from your devices? I am asking for development research - ANY input will be great! thanks
    flux
    @flux:matrix.org
    [m]
    @pantchox: I've used Matrix. it's basically one HTTP POST after setting up the stuff is enough to send me a message to a client on mobile and desktop.
    flux
    @flux:matrix.org
    [m]

    ..though my project has been a bit on hold due to filesystem corruption (on nodeMCU), but maybe I'll dig it back up some day ;)

    here's the code anyway:

    function post(message)
        local message_id = generate_id()
        local url = ENDPOINT_URL_BASE .. 
                    "/client/r0/rooms/" .. ROOM_ID .. 
                    "/send/m.room.message/" .. message_id
        local header = 'Content-Type: application/json\r\n' ..
                       'Authorization: Bearer ' .. ACCESS_TOKEN .. '\r\n'
        local message_json = { msgtype = "m.notice", body = message }
        http.put(url, header, sjson.encode(message_json), function(code, data)
            if (code < 0) then
              print("HTTP request failed")
            else
              print(code, data)
            end
          end)
    end

    Perhaps other chat servers can be as easy to use.

    Arye Shalev
    @pantchox
    @flux:matrix.org thanks! it looks really good! i can't find the matrix documentation - I will private message you
    (I wonder if private messaging will even work over the bridge)
    Arye Shalev
    @pantchox
    does not work
    so this is a bridge ahh
    cool
    flux
    @flux:matrix.org
    [m]

    so steps are as follows:
    1) create account on some matrix server, such as in one of the servers in https://www.hello-matrix.net/public_servers.php or failing that at the biggest (and slowest) server at matrix.org.

    you might use app.element.io for interacting with the server to create the account

    2) log in with app.element.io to the server. make a copy of the access token from settings/help/access token to some file

    3) create room for your bot. invite your personal user account to said room. make a copy of the room id, you can see the token with /devtools

    4) I guess you're pretty much done at this point 🤔

    Arye Shalev
    @pantchox
    i am trying via element and sending you message there
    Thomas Jakober
    @tjakober
    I am using websockets. One can have a websocket server using nodejs on any windows/linux/raspberry pi at home and be independently. Websockets work fine on ESP8266 and NodeMCU however there is no driver available on ESP32
    Thomas Jakober
    @tjakober
    I made all myself. The server works like a broker. It routs json messages to the web terminals wich are programmed in javascript / html. The server uses nodejs and the "ws" Websocket server which is available under npm. On Nodemcu everything is programmed under Lua using the available modules for the sensors and for the websocket client.
    Patrick Dorion
    @poorandunlucky
    anyone ever tried to make nodemcu-firmware in FreeBSD?
    it's using LLVM/CLANG, not GCC, but they're aliased properly to cc cpp etc... it's the Makefile that is giving me errors...
    This may sound pretentious, but I don't know Linux, and only know Windows because it forces me to fix it from time to time... You haven't heard about me in a while because I lost a shitton of files that were on my OneDrive, I backed-up my Windows subsustem for Linux on my OneDrive, and Microsoft decided to ban my account, with thousands of dollars of Xbox games like that, like 5 hours after I got a virus alert on my system. They won't talk to me, sent 20 e-mails over 6 months, nothing...
    Patrick Dorion
    @poorandunlucky
    So I got a new laptop, turned my old one in a FreeBSD fileserver, and I've got SMB shares, but the Ubuntu that comes for Windows doesn't have the CIFS module loaded in the kernel, uname -r yields 4.4.0-19041-Microsoft, not 4.4.0-19041-generic
    I wish I could get rid of Windows, but OpenDesktop and all the other desktop initiatives are just MESSES, and with all the updates, I can't be arsed to cleanup every damn source tree every time...
    FreeBSD is cool, nodemcu-firmware is cool, Linux is garbage, Windows is necessary evil, Apple are thieves with no conscience they gave us a printer driver, for us to print our license and shove it up our asses no doubt.
    apple
    bursts info flames
    i'm not a programmer, I don't know Makefiles and compilers all that well, I'm just a script kiddie who can run servers and do systems admin stuff...
    Terry Ellison
    @TerryE
    Why not just use docker? Even if the container is natively hosted on FreeBSD, it should still work fine.
    mehulddj
    @mehulddj

    @mehulddj
    Hi
    I am currently making an AC light dimmer. I have used an arduino example and change it to esp idf c code. As per dimming the code is working fine but my light is showing some flickering. I am not able to verify whether I have missed any thing in the code or not.

    The link for the code is below:
    https://www.dropbox.com/s/kdw0v0vifg8xqra/arduino_code.txt?dl=0
    https://www.dropbox.com/s/ipjmsfsp5n3nhxj/esp32_code.txt?dl=0

    Please check both the files and let me know if there is anything missing or anything that is only specific to arduino and that can not work in esp32.
    The arduino code is working fine without any flickering.

    Marcel Stör
    @marcelstoer

    @mehulddj
    I am currently making an AC light dimmer.

    Wrong channel - this is the NodeMCU Lua firmware group here.