Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. ToSa
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by ToSa

    • RE: Porting MySensors to work with the RadioHead library

      @Yveaux said:

      So, anyone still developing on RadioHead integration, or did all of you just give up? 😉

      no progress on my end - but that's rather related to the fact that this was my first week back in the office after vacation...

      I think we should do one thing first: decouple the "network layer" from the "application layer" in MySensors:

      • not having MySensors derived from RF24
      • have a "generic" interface between MySensors and the radio

      That way it would be rather easy to make use of other radios and other network topologies - could be RH or something else. I've taken a shot at that (a lot of this based on what Kolaf and Yveaux did adjusting MySensors to RH) and will provide a link once it compiles and is tested and I hope I can keep the overhead small enough to be acceptable for the gained flexibility.

      posted in Development
      ToSa
      ToSa
    • RE: Gateway-less sensors

      Independent from z-wave I like the idea to abstract the RF hardware layer - similar to a device driver that is picked at build time. The interface should be relatively simple (init / send / check if received / receive).

      posted in Hardware
      ToSa
      ToSa
    • Over the air updates

      Really really nice project !!!

      I worked on a similar setup about two years ago with different RF modules but didn't finish. Now I was about to restart and realized that the nRF24 modules are waaaaay less expensive. I just started adjusting the old code for the nRF24 modules I ordered when I found this great project. The raspberry PI for me is the way to go as I own two sitting almost idle and don't own a Vera.

      The one feature I'm missing after reading through the majority of the available documentation is over the air updates of the sensor node software. As this is one of the features I completed for my old design, I'll go ahead and try to port the bootloader and the RPi based state-less firmware server to work with the protocol and routing implemented here... if successful I'll post the results.

      If you worked already on over the air updates or you know somebody who did, please let me know and I'll focus my efforts on something else 🙂

      Tobias

      posted in General Discussion
      ToSa
      ToSa
    • RE: 2.0 Discussion: Units, sensor types and protocol

      @Zeph said:

      But suppose we DO want to go further and determine accumulation time for all nodes, even the above.
      ...
      System Time approach 1: Master Clock Broadcast to nodes
      ...
      System Time approach 2: Track accumulation times in the hub

      I'm in favor of approach 1 as well - and an optional addition to the MySensors class to keep track of time. Only specific sensor types would use this feature - interesting mainly for actuators rather than sensors:

      Let's assume you use a relay to turn on/off your garden watering while you are on vacation. The network breaks (controller or gateway or whatever node needed to relay messages).

      • If the sensor node itself knows about the time and the schedule for watering, it can turn on and off the watering itself. If there is an issue with the communication, the time would not be 100% accurate over time but still good enough.
      • If the sensor node relies completely on the controller for time and (worst case) the communication breaks just between the start watering and stop watering command you can imagine what happens...

      Knowing about the time heavily reduces the single points of failure. The protocol already covers the "request time" communication so this should be relatively easy to implement...

      • controller sends a time broadcast every e.g. 15 minutes
      • only the nodes interested in time care about it and update their internal time
      • when a node needs the current time it calculates it based on the last timestamp received, the millis() when it was received and the current millis...

      Doesn't solve the sleep issue (as long as you don't want to submit a separate "get time request" every time you wake up) but at least for sensors that are not battery powered (relay nodes in most cases are not) it's a feasible approach.

      This is probably worth a separate thread 🙂

      posted in Announcements
      ToSa
      ToSa
    • RE: Porting MySensors to work with the RadioHead library

      @Zeph said:

      I do not think it makes sense to move type (V_code) or command into the RH FLAGs. Typically when such space is reserved for the protocol in the header but not yet fully used, it's subject to change as the protocal evolves. If part of the goal is to take advantage of the maintenance and ongoing development of RH, we don't want to set up a conflict - because other users are not going to use those FLAGs our way anyway.

      From the RH documentation / the source code:

      • for Datagram FLAGS:
        A bitmask of flags. The most significant 4 bits are reserved for use by RadioHead. The least significant 4 bits are reserved for applications.
      • for Router/Mesh FLAGS:
        Optional flags for use by subclasses or application layer

      Not setting up a conflict with the RH code will be the biggest issue: the two benefits of RH are the multi radio support and the more advanced Mesh topology - which would be worth a couple of additional bytes in flash and ram - but the other reason for the big overhead is that several advanced features of the nRF24 chip are not used because they are not available in all supported chips.

      Two examples:

      • the multi-pipe capability of nRF24 would allow to filter traffic to only current address and broadcast and avoid that any other traffic ever reaches the MCU (only slightly less code but wondering if that helps with battery powered nodes).
      • the ReliableDiagram processing in code essentially duplicates capabilities that are build into the chipset as well (auto-acknowledge / autoresubmit)

      I know you are interested in getting RF69 supported but the question is how much negative impact for all the other users (with current nRF24 setup) is acceptable. That's like using the RF69 and implementing an AES encryption in code rather than using the build-in capabilities of the chip...

      posted in Development
      ToSa
      ToSa
    • RE: Over the air updates

      @Damme said:

      @ToSa I've been looking through the ota bootloader and noticed there are alot of uint16_t wich can be replaced with uint8_t.. saves 128bytes of code. Still needs ~900bytes less until 1024 words bootloader though but is makes more space for other stuff 🙂

      I'll have a look. I've taken the code from an earlier project and adjusted to MySensors - didn't review the variable types that much. I'm using CRC16 as well where CRC8 might be sufficient...

      EDIT: got it down a little from 0x0E18 to 0x0DD0 (72 bytes) changing a few loop counters from uint16 to uint8. I don't want to change type to 8bit looking at the large amount of sensors people are asking for / working on. FOr version I'm planning to keep some of these running for a long time with as little maintenance as possible. With some software improvements over time and minor version changes during development 16bit for version seems to be the better fit as well.

      posted in General Discussion
      ToSa
      ToSa
    • RE: Over the air updates

      @tekka
      That sounds great! Can you post your code (or share a pull request)? This would either allow us to free up the remaining space or to add encryption 🙂
      The only neck-breaker would be if any of the size reduction increases the risk for a bricked node that needs manual intervention (e.g. reset / power cycle etc.).

      posted in General Discussion
      ToSa
      ToSa