Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
Z

zurajm

@zurajm
About
Posts
3
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Rpi MQTT Gateway on Docker
    Z zurajm

    @magpern SPI access in Docker container is possible, you have to use --privileged switch when creating container and some other switches when compiling. I ended up with the following Dockerfile:

    FROM raspbian/stretch AS build
    
    WORKDIR /root
    RUN apt-get update && apt-get install -y --no-install-recommends git bash make g++ \
      && git clone https://github.com/mysensors/MySensors.git --branch development 
    WORKDIR MySensors
    RUN echo "##### Building version: $(cat library.properties | grep version | cut -d= -f2)-$(git describe --tags)"
    RUN LDFLAGS="-static" ./configure --my-transport=rfm69 --my-rfm69-frequency=433 --my-is-rfm69hw --my-gateway=mqtt --my-controller-ip-address=<ip of the mqtt server> --my-mqtt-user=<user> --my-mqtt-password=<password> --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in  --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18 --my-config-file=/data/mysensors.conf --spi-driver=BCM --soc=BCM2836 --cpu-flags="-mcpu=cortex-a53 -mfloat-abi=hard -mfpu=neon-fp-armv8 -mneon-for-64bits -mtune=cortex-a53" \
      && make
    
    FROM hypriot/rpi-alpine-scratch
    RUN mkdir /data
    WORKDIR /root
    COPY --from=build /root/MySensors/bin/mysgw .
    
    EXPOSE 5003
    ENTRYPOINT ["./mysgw"]
    

    I couldn't get ethernet mode to work (I got core dump as soon as client connected to gateway) so I'm using MQTT mode which works great. Here is the relevant run command:

    docker run --privileged --volume /opt/mysensors:/data --restart unless-stopped --name mysgw zurajm/mysgw-mqtt-alpine:latest
    

    the mysensors.conf resides in /opt/mysensors:

    # Logging
    # Verbosity: debug,info,notice,warn,err
    verbose=debug
    
    # Enable logging to a file.
    log_file=0
    # Log file path.
    log_filepath=/tmp/mysgw.log
    
    # Enable logging to a named pipe.
    # Use this option to view your gateway's log messages
    # from the log_pipe_file defined bellow.
    # To do so, run the following command on another terminal:
    #   cat "log_pipe_file"
    log_pipe=0
    log_pipe_file=/tmp/mysgw.pipe
    
    # Enable logging to syslog.
    syslog=0
    
    # EEPROM settings
    eeprom_file=/data/mysensors.eeprom
    eeprom_size=1024
    
    # Software signing settings
    # Note: The gateway must have been built with signing
    #       support to use the options below.
    #
    # To generate a HMAC key run mysgw with: --gen-soft-hmac-key
    # copy the new key in the line below and uncomment it.
    #soft_hmac_key=
    # To generate a serial key run mysgw with: --gen-soft-serial-key
    # copy the new key in the line below and uncomment it.
    #soft_serial_key=
    
    # Encryption settings
    # Note: The gateway must have been built with encryption
    #       support to use the options below.
    #
    # To generate a AES key run mysgw with: --gen-aes-key
    # copy the new key in the line below and uncomment it.
    #aes_key=
    

    I only modified eeprom_file location to /data folder.

    I hope someone can benefit from it.

    BR, Miha

    Troubleshooting

  • 💬 RFM69 2 relay board
    Z zurajm

    Hi, did you assembled the board and tested it? I am thinkiing of making some of them, is there something I should watch out for?
    Thanks!

    OpenHardware.io rfm69 relay

  • 💬 Wall Socket Insertable Node
    Z zurajm

    @koresh Hi, I'm interested in the transformers. Do you have some to spare? I like your design very much because is so low profile. I will try to assemble some on my own to test the design but I have no idea where to find/order adequate transformer for it (you mentioned that you order them custom made). Thank you very much for the answer.

    OpenHardware.io rfm69 atsha204a mysensors relay power supply
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular