Avatar for user130485

user130485

Member since Jun 2021 • Last active Sep 2021
  • 10 conversations
  • 41 comments

Most recent activity

  • in Puck.js, Pixl.js and MDBT42
    Avatar for user130485

    thank you again @Gordon!
    I will try both. I think its the watchdog that may kick in.
    Again, I dont think another device would be able to connect to it. Currently I have the button set to change the status LED between on/off. When it gets stuck it does not work either.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for user130485

    was not meant to be a production code =) just something I was putting together for myself
    Prints are just for debugging. I was under the impression that unless you actually connect to the console it will make no difference. Device is usually just passively sending the data via BLE and I only connect to it to see if all ok or to flash an update
    When LED was getting stuck, it was draining the battery quickly. I was adding the code to minimize the drain.
    clearWatch - as per API, if no parameter is supplied, all watches will be removed. This is just in the onInit stage and not used anywhere else. I think it was in the original code, so I just left it there
    Did not understand the state part

  • in Puck.js, Pixl.js and MDBT42
    Avatar for user130485

    Thank you @Gordon for helping me out =)
    When it disappears from the air, I cannot see it with anything. Plus it's not sending anything out.
    Can you elaborate on the watchdog timer?
    Power draw is not important as I am currently running it via mains power (over esp32 3.3v output)
    May have to solder the wires for TTL output to use when goes off-line again

  • in Puck.js, Pixl.js and MDBT42
    Avatar for user130485

    I have uploaded the full code to pastebin, if someone interested
    https://pastebin.com/rQuaKiKd

  • in Puck.js, Pixl.js and MDBT42
    Avatar for user130485

    Yes, it was based on the Smart Meter but with a heap of extra code to optimise it for my situation. ESP32 is just a BLE receiver that sends the data to Home Assistant.
    It's suppose to get unstuck. I have already implemented some routines with Gordon's help to get past the stuck LED state plus I am restarting it nightly in a hope to clear whatever issues happen during the day. So far 2 days gone ok without issues
    @Gordon Highly unlikely. Its in a metal box where smartmeter is. I could not connect to it from the room, so had to get my ESP32 board in the same cabinet as the smartmeter. But agree, it was a plausible suggestion. Problem is that I cannot connect to it with anything - it no longer sends the data and not visible in BT devices to connect via IDE
    I just don't know how to debug it so that I know what when the issue happens

  • in Puck.js, Pixl.js and MDBT42
    Avatar for user130485

    I am giving up on Puck =(
    When it works, it is reliable (apart from the battery drain, but that could be due to the LED stuck on)
    But after some time it just goes off the air and no way to connect/restart it remotely. The only fix is to yank the battery out. Gave up on the battery option and using a cable to 3.3v out on the ESP32 board that sits in the same box (as BT was not powerful enough to be read from outside the metal box, though WIFI on ESP32 is ok, which uses the same frequency). But still no luck - works for a few days and then just dies.
    I have added nightly reboot already, just to clear any RAM/cache issue it may have. So running out of options. Given that I have ESP32 by the meter box anyway, I will just have to modify the code and use ESP32 as a main device

  • in Puck.js, Pixl.js and MDBT42
    Avatar for user130485

    thought so too but it's only 2 days since I put a fresh battery in. After I removed puck from the meter box and stuck LED (which was not really stuck and went off after about 10 sec) puck started working again and I was able to see/connect to it without removing the battery. When I could connect, battery was showing 50% and went up to 60% a bit later on

  • in Puck.js, Pixl.js and MDBT42
    Avatar for user130485

    it does not seem to be RAM related. I set it to reboot every night but having an issue with it getting stuck due to the stupid LED light on the meter staying on and somehow making LDR to cause the puck to hang after a while
    Currently, it is checking (as you have suggested) for stuck LED and sets the PIN mode for D2 to either input_pullup or input.
    Are any of the PIN modes more useful to reset it? like pin.toggle() or something?
    It works for some time, but eventually somehow gets stuck in the state that stops everything.
    If I remove puck from the light source, thus causing it to "unstuck", it reboots the puck and then works fine

  • in Puck.js, Pixl.js and MDBT42
    Avatar for user130485

    Tried various things - none help. Only hard reset is working.
    I have also tried to play with E.reboot() to clear the RAM (reload the code) but as soon as it reboots I can no longer connect to it as well

    PS: OK, worked out the part where I cannot connect to it. It must have done a reboot or whatever, which has caused this to kick in:

    NRF.setSecurity({display : 1, mitm : 1, bond : 1, passkey : '123456'});

Actions