Navigation

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

    Posts made by ghiglie

    • RE: Just found a pair of "old" NRF51822-04 ... any good?

      @monte said in Just found a pair of "old" NRF51822-04 ... any good?:

      Though the power bug @Nca78 mentioned is easily bypassed with proper software settings. Just don't rely on built in sleep function, because in case of nfr51822 it doesn't disable all hardware and drains power.

      Sorry @monte, I'm totally n00b . Any link about this?

      @monte said in Just found a pair of "old" NRF51822-04 ... any good?:

      Though the power bug @Nca78 mentioned is easily bypassed with proper software settings. Just don't rely on built in sleep function, because in case of nfr51822 it doesn't disable all hardware and drains power.

      Oh, I know! But I lack time to tinker that much. 😕 I've just started on learning on Black Magic Probe and STLink differences and use cases... Maybe I just started the hard way, with a DK it would be, at least, less "pioneeristic".

      posted in Hardware
      ghiglie
      ghiglie
    • RE: Just found a pair of "old" NRF51822-04 ... any good?

      @monte said in Just found a pair of "old" NRF51822-04 ... any good?:

      @ghiglie you can try this from my old post: https://forum.mysensors.org/post/92044
      I will need to write a firmware for 51822 in few weeks, so maybe I'll have something more polished. The most usefull information you can find on Nordic's forum, you can use snippets of code with arduino and it should work, because NRF5 port contains Nordic's SDK, and thus all functions and macroses, that are mentioned on that forum.

      Thanks @monte! Very intesting. This nRF5 journey is getting quite difficult, programming for Nordic's chips is way harder than what I'm used to. Maybe I'll wait for your sketch! 😆

      posted in Hardware
      ghiglie
      ghiglie
    • RE: Just found a pair of "old" NRF51822-04 ... any good?

      Resuming my old thread. After killing some 328p (but I still spare one!), I got a fully working "multisensor" . Now it's nRF51 turn:

      I'm using a Black Magic Probe, made from a Blue Pill - it has May2020 code, "git pull" shows quite a lots of updates, but I'll keep like that. { Just a note: compile it with "make && make PROBE_HOST=swlink" so you'll be able to use the header! } . I have STLinkV2 clone for backup.

      My "setup": imgur.com/a/acT6iOZ

      @monte said in Just found a pair of "old" NRF51822-04 ... any good?:

      Though the power bug @Nca78 mentioned is easily bypassed with proper software settings. Just don't rely on built in sleep function, because in case of nfr51822 it doesn't disable all hardware and drains power.

      Sorry @monte, I'm totally n00b . Any link about this?

      posted in Hardware
      ghiglie
      ghiglie
    • RE: BME280 node not sleeping

      @bbastos said in BME280 node not sleeping:

      @ghiglie said in BME280 node not sleeping:

      That's not a bad test bed!

      I'm having some "headaches" still. The PIR isn't sending the V_TRIPPED 0 , so I know when there's moving but not when it stops - I can manage it via HomeAssistant anyway.

      I'm afraid I'll not be helpful now. Have you tried to update nodemanager library? I'm using the development branch from github.

      No probs, it's the PIR itself, not reporting back the "0" status. I'll manage it via HA!

      posted in NodeManager
      ghiglie
      ghiglie
    • RE: BME280 node not sleeping

      That's not a bad test bed!

      I'm having some "headaches" still. The PIR isn't sending the V_TRIPPED 0 , so I know when there's moving but not when it stops - I can manage it via HomeAssistant anyway.

      posted in NodeManager
      ghiglie
      ghiglie
    • RE: BME280 node not sleeping

      Here it is:
      asd asd

      I'm using NModule with SMD nRF module - I was planning to use a CR2023 to downsize it, but I ended using this 2xAA battery holder.

      I'm a n00b too - I can say I started learning with MySensors' building motivation.
      I had a respectable cemetery:
      asd
      Mostly have corrupt booloader (update via programmer with antenna still powered) or incorrect fuses (batch production done wrong way!), but a pair got a nice polarity inversion on VCC... 😄 😄 😄 😄

      posted in NodeManager
      ghiglie
      ghiglie
    • RE: BME280 node not sleeping

      So, new message to get up a notification with my full working sketch. I'm so satisfied!
      Putting a BME280 in a garage is an overkill, but I couldn't get a decent measure from the DHTs I have. I added a PIR to it, just for a minor convenience.
      With next node I'll explore OTA features - flash and configuration.

      // General settings
      #define SKETCH_NAME "GarageLibrary"
      #define SKETCH_VERSION "2.0"
      #define MY_BAUD_RATE 9600
      #define MY_NODE_ID 2
      
      #define MY_RADIO_NRF24
      #define MY_SIGNAL_REPORT_ENABLED
      
      #define MY_SPLASH_SCREEN_DISABLED
      
      //#define MY_TRANSPORT_UPLINK_CHECK_DISABLED
      #define MY_TRANSPORT_WAIT_READY_MS  5000
      #define MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS 2000
      //#define MY_PARENT_NODE_ID 0
      //#define MY_PARENT_NODE_IS_STATIC
      
      #define NODEMANAGER_DEBUG ON //
      #define NODEMANAGER_DEBUG_VERBOSE OFF
      #define NODEMANAGER_SLEEP ON //
      #define NODEMANAGER_RECEIVE OFF
      #define NODEMANAGER_POWER_MANAGER OFF
      #define NODEMANAGER_CONDITIONAL_REPORT ON //
      #define NODEMANAGER_INTERRUPTS ON //
      #define NODEMANAGER_EEPROM OFF
      #define NODEMANAGER_TIME OFF
      #define NODEMANAGER_RTC OFF
      #define NODEMANAGER_SD OFF
      #define NODEMANAGER_HOOKING OFF
      #define NODEMANAGER_OTA_CONFIGURATION OFF
      #define NODEMANAGER_SERIAL_INPUT OFF
      
      // disable Forecast on BME280 - not working with OTA conf Off!
      #define NODEMANAGER_SENSOR_BOSCH_LITE ON
      
      #include <MySensors_NodeManager.h>
      
      // BME280
      #include <sensors/SensorBME280.h>
      #define BME280_ADDRESS (0x77)
      //#define CHILD_ID_AMBIENT 1
      SensorBME280 ambient;
      
      // PIR on D3 (optional build, PIN_PD3 is defined in MiniCore)
      #include <sensors/SensorMotion.h>
      SensorMotion pir(PIN_PD3);
      
      // Battery Level (default child_id 201)
      #include <sensors/SensorBattery.h>
      SensorBattery battery;
      
      // Radio Signal Quality (default child_id 202)
      #include <sensors/SensorSignal.h>
      SensorSignal signal;
      
      // before
      void before() {
        
        // let controller know ambient pressure sensor reports in hPa
        ambient.children.get(3)->setUnitPrefix("hPa");
         
        // send unit prefixes to controller (i.e. V, A, hPa, %, etc.)
        nodeManager.setSendUnitPrefix(true);
      
        // battery level - BOD set to 1.8V, 2xAA = 3V max
        battery.setMinVoltage(1.8);
        battery.setMaxVoltage(3.0);
      
        // sleep cycle
        nodeManager.setSleepMinutes(60);
        // 500ms to let the transport send all buffer before sleeping.
        nodeManager.setSleepBetweenSend(500);
        
        // report freq for ambient measurements
        ambient.setReportIntervalMinutes(60);
      
        // report freq for battery
        battery.setReportIntervalDays(1);
      
        // report freq for radio signal - pseudo SR_TX_RSSI and SR_UPLINK_QUALITY are available for NRF24
        signal.setReportIntervalDays(1);
        signal.setSignalCommand(SR_UPLINK_QUALITY);
      
        // call NodeManager before routine
        nodeManager.before();
      }
      
      // presentation
      void presentation() {
        // call NodeManager presentation routine
        nodeManager.presentation();
      }
      
      // setup
      void setup() {
        // call NodeManager setup routine
        nodeManager.setup();
      }
      
      // loop
      void loop() {
        // call NodeManager loop routine
        nodeManager.loop();
      }
      
      #if NODEMANAGER_RECEIVE == ON
      // receive
      void receive(const MyMessage &message) {
        // call NodeManager receive routine
        nodeManager.receive(message);
      }
      #endif
      
      #if NODEMANAGER_TIME == ON
      // receiveTime
      void receiveTime(unsigned long ts) {
        // call NodeManager receiveTime routine
        nodeManager.receiveTime(ts);
      }
      #endif
      
      posted in NodeManager
      ghiglie
      ghiglie
    • RE: BME280 node not sleeping

      @bbastos said in BME280 node not sleeping:

      Hi @ghiglie I'm still beginning in all this, but I think you need to call nodeManager.setSleepMinutes(minutes) otherwise the node will still awake.

      Oh... I feel so dumb! Thanks @bbastos , I didn't ... know it. I don't know why, maybe on the solder/flash/test/upload frenzy I read that part of documentation. So, as usual, I'll RTFM and report back. Thanks again!!!

      posted in NodeManager
      ghiglie
      ghiglie
    • BME280 node not sleeping

      Hello,
      I've build my first node with NodeManager, code is at end of post; it looks like it's not sleeping, it worn out a pair of AA in 24h.
      There's a strange half-lit LED on it: what did I do wrong? Same node with a standard hand-written sketch is working as usual.
      Thanks all!

      // General settings
      #define SKETCH_NAME "GarageLibrarySensor"
      #define SKETCH_VERSION "0.1"
      #define MY_BAUD_RATE 9600
      #define MY_NODE_ID 2
      
      #define MY_SPLASH_SCREEN_DISABLED
      #define MY_SIGNAL_REPORT_ENABLED
      
      // NRF24 radio settings
      #define MY_RADIO_NRF24
      //set how long to wait for transport ready in milliseconds
      
      // Optimizations when running on 2032 Coin Cell. Also set nodeManager.setSleepBetweenSend(500) and run the board at 1Mhz
      #define MY_TRANSPORT_UPLINK_CHECK_DISABLED
      #define MY_TRANSPORT_WAIT_READY_MS  5000
      #define MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS 2000
      //#define MY_PARENT_NODE_ID 0
      //#define MY_PARENT_NODE_IS_STATIC
      
      #define NODEMANAGER_DEBUG ON
      
      #define NODEMANAGER_SLEEP ON
      #define NODEMANAGER_OTA_CONFIGURATION OFF
      #define NODEMANAGER_CONDITIONAL_REPORT ON
      #define NODEMANAGER_POWER_MANAGER ON  
      
      #define NODEMANAGER_SENSOR_BOSCH_LITE ON
      
      #include <MySensors_NodeManager.h>
      
      // Sensors
      // Battery Level (default child_id 201)
      #include <sensors/SensorBattery.h>
      SensorBattery battery;
      
      // Radio Signal Quality (default child_id 202)
      #include <sensors/SensorSignal.h>
      SensorSignal signal;
      
      
      #include <sensors/SensorBME280.h>
      //#define CHILD_ID_AMBIENT 1
      SensorBME280 ambient;
      
      // before
      void before() {
        /**********************************
           Configure your sensors
         **********************************/
        // let controller know ambient pressure sensor reports in hPa
        ambient.children.get(3)->setUnitPrefix("hPa");
         
        // send unit prefixes to controller (i.e. V, A, hPa, %, etc.)
        nodeManager.setSendUnitPrefix(true);
      
        // report ambient measurements every 1h
        ambient.setReportIntervalMinutes(60);
      
        // report battery level every 60 minutes
        battery.setReportIntervalMinutes(720);
      
        // report radio signal level every 4h
        signal.setReportIntervalMinutes(1440);
      
        // only a pseudo SR_TX_RSSI and SR_UPLINK_QUALITY are available for NRF24
        // radio. All other methods return as INVALID.
        signal.setSignalCommand(SR_UPLINK_QUALITY);
      
        // call NodeManager before routine
        nodeManager.before();
      }
      
      // presentation
      void presentation() {
        // call NodeManager presentation routine
        nodeManager.presentation();
      }
      
      // setup
      void setup() {
        // call NodeManager setup routine
        nodeManager.setup();
      }
      
      // loop
      void loop() {
        // call NodeManager loop routine
        nodeManager.loop();
      }
      
      #if NODEMANAGER_RECEIVE == ON
      // receive
      void receive(const MyMessage &message) {
        // call NodeManager receive routine
        nodeManager.receive(message);
      }
      #endif
      
      #if NODEMANAGER_TIME == ON
      // receiveTime
      void receiveTime(unsigned long ts) {
        // call NodeManager receiveTime routine
        nodeManager.receiveTime(ts);
      }
      #endif
      
      
      posted in NodeManager
      ghiglie
      ghiglie
    • RE: Just found a pair of "old" NRF51822-04 ... any good?

      Yes, I'm with @Puneit-Thukral . As soon I get more comfortable I'll buy some new parts: for now, I'm too much n00b ! I still reverse polarities, short circuit solder pads... 😆

      posted in Hardware
      ghiglie
      ghiglie
    • RE: 💬 NModule

      Ok, just for record: be very very very very very carefull when desoldering the regulator+led+resistance. Do it before soldering the ping legs on module: I had a pair of nodes, correctly running, beatyfully soldered, legs trimmed... and darn, dunno what I did on tracks, they are not powering up anymore.
      Luckily I could desolder the antenna from under the PCB and stick on another (the first I told) and put the other as spare.

      Oh, I love DIY when I fix my errors! 😆

      {update: one sensor died yesterday. Maybe my Minis are too cheap? }

      posted in OpenHardware.io
      ghiglie
      ghiglie
    • RE: Just found a pair of "old" NRF51822-04 ... any good?

      Well, for now, no updates! Working with pro-minis is still much more fun with my humble skills. I'm a good soldering-pad destroyer when it comes to SMD.

      In the while, I can't find a sort of adapter for SMD versione of NRF5 boards, like the flasher for ESP8266. Is there something like that out there?

      posted in Hardware
      ghiglie
      ghiglie
    • RE: 💬 NModule

      @Nca78 said in 💬 NModule:

      Haha that's a lot of boards. May I know what the accident was ? There was a case of a nmodule having a shortcut when manipulated, is it something similar ?

      Oh, easy! I already had soldered TX/RX pins and the angled ones (towards the atmega). I decide to take them off and reverse the angled... Iron's temperature was quite high... Some tracks got as bright as old 100W bulbs filament! 😄

      The radio SPI pins can handle 5V but not it's power supply. So as you have no regulator on radio for these boards, I see 3 choices :

      1. best one = use a programmer running at 3.3V and you can power the board & radio with it. 100% safe. You can do this with the ArduinoISP sketch, a 3.3V pro mini and a ftdi adapter.
      2. if you only have a 5V powered programmer, power the board separately and connect only the SPI pins with the 5V programmer. But this is out of spec as the voltage on SPI pins will be higher than VCC + 0.5V
      3. open the JRDIO jumper so that the radio is not connected to VCC and use 5V programmer for SPI pins + power supply of the board. In that case to respect the datasheet of NRF24 you need to supply separately at least 3V to VCC radio, else you are in the same situation than point 2, but with the radio and that is I think a worse situation so in that case solution 2. is safer.

      I'm yet programming it with ArduinoISP on a genuine UNO, so I'm safe. I'll solder the SMD antenna ASAP, the TH one isn't bearable once you see how slim the node gets with your PCB!

      posted in OpenHardware.io
      ghiglie
      ghiglie
    • RE: 💬 NModule

      Hi there! In these days I got some boards from my drawer - I spare quite a lot, I ordered 10 panelized one, so I have 40 NModules! 😮 😃
      4 sensors are yet running on battery (2 on CR2032 and 2 with with 2xAA). The fifth module had an accident and I need to program it via SPI. is it safe to flash it with the antenna still soldered?

      posted in OpenHardware.io
      ghiglie
      ghiglie
    • RE: NodeManager: plugin for a rapid development of battery-powered sensors

      Oh, I hate saying I've noticed this great piece of software just now! 😞 It would have saved me countless hours of software tinkering, giving more eyecare for better soldering...!

      posted in NodeManager
      ghiglie
      ghiglie
    • RE: Just found a pair of "old" NRF51822-04 ... any good?

      Well, I'm sorry I'm sooo late, but I had to stop all my testing.
      I'll definitely be back after ordering some new tools during Chinese New Yes sales...!

      posted in Hardware
      ghiglie
      ghiglie
    • RE: Just found a pair of "old" NRF51822-04 ... any good?

      Hi all,
      sorry for being so late, again... 😄

      @nca78 said in Just found a pair of "old" NRF51822-04 ... any good?:

      Hello, @ghiglie yes you can use them with MySensors but they are not great for battery-powered sensors due to a hardware bug. If you use them as main-powered sensors they are fine, and range is decent with those.
      @monte said in Just found a pair of "old" NRF51822-04 ... any good?:
      Though the power bug @Nca78 mentioned is easily bypassed with proper software settings. Just don't rely on built in sleep function, because in case of nfr51822 it doesn't disable all hardware and drains power.

      Oh, ok, I'll keep it in mind. I'm a good copy'n'paste-r , so as soon as I get to work on a chip, I'll look for the sleep code. Thanks for pointing that!
      I'm really look for battery powered sensors, as for mains powered ones I use "easier" chips as ESPs, mainly on bigger dev modules (such as NodeMCU) since I have more space.

      @petewill said in Just found a pair of "old" NRF51822-04 ... any good?:

      @ghiglie Check out these links if you haven't used NRF5 before. They should help you get started.
      https://forum.mysensors.org/topic/9266/guide-nrf5-nrf51-nrf52-for-beginners
      https://www.openhardware.io/view/376/MySensors-NRF5-Platform

      I found the ST-LINK programmer to be easier to work with (using Windows) that the J-LINK

      I have a ST-LINK I bought since I saw this chips mentioned in @NeverDie 's threads , but then I tried some STM32 blue pills and finally got a working Black Magic Probe.
      Now I just have to deal with the soldering, but I saw something like an adapter with pushpins...

      I'll keep you updated!

      posted in Hardware
      ghiglie
      ghiglie
    • Just found a pair of "old" NRF51822-04 ... any good?

      Hi there! It's been a long time, I've been away from this forum for a while, tinkering with Zigbee and HomeAssistant... but I'm planning my new garage, so here I am.

      I've found, as title says, three stamp-sized Nordic chips: are they still any good? I don't need much coverage, but I'd try something newer than the 328p's I have on MyNode PCBs.

      Thanks to all!

      Marco

      posted in Hardware
      ghiglie
      ghiglie
    • RE: Gateway Addon for Hass.io

      @hautomate Thanks! I didn't notice it at all.
      EDIT: A quick look:
      @pantomax in config.json "only" has:

          "devices": ["/dev/mem:/dev/mem:rw"],
          "privileged": ["SYS_RAWIO"],
          "gpio": "true",
      

      ...while I put an overpowered:

        "devices": [ "/dev/mem:/dev/mem:rw" ],
        "privileged": [ "SYS_RAWIO", "SYS_ADMIN", "NET_ADMIN" ],
        "gpio": "true",
      

      so... it should work 😞

      posted in Home Assistant
      ghiglie
      ghiglie
    • RE: Gateway Addon for Hass.io

      Hi @kwek, sorry for taking so much to reply. We've been taking the same path!

      @kwek said in Gateway Addon for Hass.io:

      I'm also trying to make a hassio addon for the mysensors gateway which is connected on the same raspberry pi 2.

      If I run the docker image with --privileged then it runs correctly: it manages to read from the nrf2401, it connects to the MQTT server and publishes incoming messages.

      However, if I run the container without --privileged (like hassio does), the mysgw program does not output anything else after:

      Same here. I've been trying some time ago, if I get to start the container in privileged mode it runs without any problems!

      So, I've been looking to how enable the GPIO on the board to the container, using the ResinOS guide: https://docs.resin.io/learn/develop/hardware/gpio/

      ...but I got nothing of use. You see anyway that the GPIO definitions are under the /sys/class/gpio/ device tree...

      I hope to have some more spare time to test this.

      posted in Home Assistant
      ghiglie
      ghiglie
    • RE: 💬 NModule

      @nca78 said in 💬 NModule:

      @ghiglie said in 💬 NModule:

      or have battery measurements

      You will have battery measurement, because you will power the atmega with the battery directly so it's possible to read Vcc.
      When you use a booster Vcc is always the same so you need a voltage divider on the battery to know it's voltage.

      Sorry, n00b here! 😞 Thanks again, nca!

      posted in OpenHardware.io
      ghiglie
      ghiglie
    • RE: 💬 NModule

      Thanks @Nca78 ! I'll order some a lot of 10. Just in case...

      @nca78 said in 💬 NModule:

      EasyPCB

      You'r right. Thanks for this clarification - really don't need to use the boosters or have battery measurements, so I'll keep the sensors small as you designed.

      posted in OpenHardware.io
      ghiglie
      ghiglie
    • RE: 💬 NModule

      Hi there!
      I've ordered 10 PCBs from iTEAD, so now... I'm plenty of them to do some tests.
      Can you confirm these Minis are ok?
      https://www.aliexpress.com/item/10pcs-ATMEGA328P-Pro-Mini-328-Mini-ATMEGA328-3-3V-16-MHz-for-Arduino-3-3V-16/32784455996.html?spm=a2g0s.13010208.99999999.271.swhWGM

      Btw, I have some battery boosters, I have used them already with success on breadboard. Have you got any experience about it? Do you think the PCB is hackable to integrate it?

      https://www.aliexpress.com/item/Low-Quiescent-Current-1-5V-1-8V-3V-to-3-3V-Boost-DC-DC-Converter-Board/32802383877.html?spm=a2g0s.9042311.0.0.HOilhS

      Thanks!

      posted in OpenHardware.io
      ghiglie
      ghiglie
    • RE: Gateway Addon for Hass.io

      @hautomate said in Gateway Addon for Hass.io:

      @ghiglie It shows the last commit as 14 days ago...

      git-noob mistake! updated!

      posted in Home Assistant
      ghiglie
      ghiglie
    • RE: Gateway Addon for Hass.io

      @hautomate said in Gateway Addon for Hass.io:

      @ghiglie hmm, not sure. Would you please update your repo with the latest and I'll try a reinstall and have a closer look?

      sorry, I'm out for work 😞 I'll do ASAP tomorrow!

      EDIT: Updated!

      posted in Home Assistant
      ghiglie
      ghiglie
    • RE: Gateway Addon for Hass.io

      @hautomate said in Gateway Addon for Hass.io:

      Add...

      "host_network": true,

      and for port 5003, what about this?

      "ports": {
      "5003/tcp": 5003
      },

      Or put the port as an option so it could be configured by the user. I'm not sure what else would be needed for this to work.

      "options": {
      "port": 5003,

      I've added it locally, since it's primaly a MQTT image.

      I'm stopping here now:

      mysgw: Starting gateway...
      mysgw: Protocol version - 2.2.0-rc.2
      mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0-rc.2
      mysgw: TSF:LRT:OK
      mysgw: TSM:INIT
      mysgw: TSF:WUR:MS=0

      so it's not starting the transport.
      Any idea on what I shoudl enable?

      posted in Home Assistant
      ghiglie
      ghiglie
    • RE: Gateway Addon for Hass.io

      oops, sorry, I've fixed that locally after I pushed the code to git. I see just now I'm not exposing the 5003 port... 😐

      I'll add the RUN command.

      I mean, mysgw hangs on activating the transport.

      @hautomate said in Gateway Addon for Hass.io:

      @ghiglie I presume you've seen this. Tried them all?

      Privilege for access to hardware/system. Available access: NET_ADMIN, SYS_ADMIN, SYS_RAWIO, SYS_TIME, SYS_NICE

      Yes, tried all, even with gpio set to true.

      posted in Home Assistant
      ghiglie
      ghiglie
    • RE: Arduino mini pro 3.3 battery optimization code

      @sundberg84 said in Arduino mini pro 3.3 battery optimization code:

      @tommas - "my" batterycode is due to a booster and a voltage divider. Its not possible to compare this to @Yveaux Vcc library which uses the internal vcc to measure battery level. This is not possible to use since you boost your VCC on the arduino. I think my code works great though for a voltage divider setup.

      Sorry, I'm revisiting a temp/hum sensor running on battery, I lost my code so I'm back to work with this (and signing/encryption, doh!)
      I think I have something similar to yours- I'm boosting the arduino and DHT voltage to 3,3v, while the antenna is directly connected. I have a voltage divider where I get the Voltage measure. Can I borrow directly your code, you think?

      posted in Development
      ghiglie
      ghiglie
    • Gateway Addon for Hass.io

      Hi there,
      in these days I've been trying to get the Gateway working as an add-on for Hass.io, running on RaspberryPi3.
      You can find all my work (well, tons of hours for just some lines! :D) here on GitHub. Even it's the master branch, it's totally in development...
      So, now, I'm stuck.

      It looks like that if I start the Docker container as privileged, it works! But not when it start with the configuration you see, and neither I can give the privileged capability to the container.
      Any ideas on what on the host I should expose?

      posted in Home Assistant
      ghiglie
      ghiglie
    • RE: Is ARM the future of MySensors?

      Well, last week I couldn't realize how my garage temp was so high.... I noticed my neighboor started autoproducing some sensors too... 😄 So it's time for signing/encryption.

      posted in General Discussion
      ghiglie
      ghiglie
    • RE: 💬 Building a Raspberry Pi Gateway

      @mfalkvidd I'm trying today, but to compile correctly the Docker image I'll have to clone to my github account 😞 or at least locally. My Dockerfile for the "Alpine edition" for Hass.io is simply:

      ARG BUILD_FROM
      ARG BUILD_ARCH
      ARG BUILD_DATE
      ARG BUILD_REF
      ARG BUILD_VERSION
      
      FROM ${BUILD_FROM}
      
      ENV CONFIG_PATH=/data/options.json
      ENV APPDIR=/opt/MySensors
      
      RUN apt-get update && apt-get install -y --force-yes \
          make \
      	 g++ \
      	 git \
      	 && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache \
      	 && git clone https://github.com/mysensors/MySensors.git --branch development $APPDIR
      
      
      # Copy root filesystem
      COPY rootfs /
      
      #CMD [ "/run.sh" ]
      

      I deleted the LABELS 'cause... the data is still too rawly "buried" from others. 👅

      The Configure and Make is in run.sh.

      BTW, I still need to figure out how to start mysgw as service... Mainlyt I'd like to redirect the log: how can I do this safely?

      And... can I use the rx/tx/err led feature on Raspi too (aside being in a Docker) ?

      EDIT: the code add works!
      Another question: I'm not getting far from this... what is it trying to do?

      : Starting gateway...
      : Protocol version - 2.2.0-rc.2
      : MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0-rc.2
      : TSF:LRT:OK
      : TSM:INIT
      : TSF:WUR:MS=0
      
      posted in Announcements
      ghiglie
      ghiglie
    • RE: 💬 Building a Raspberry Pi Gateway

      @sineverba said in 💬 Building a Raspberry Pi Gateway:

      Hi to all,
      I'm testing an ethernet gateway on RPI3, with nrf24 + 1 node with a relay.

      I want introduce security and signing. On Arduino gateway / node no problem at all, but, how to do on the RPI3 as gateway?

      I would get / create / set a software serial on PI itself and whitelisting it on the node, after I will introduce the AES Key and signing.

      Cannot find in documentation how do it on PI3. Thank you very much!

      Earlier in this forum... https://forum.mysensors.org/topic/4803/building-a-raspberry-pi-gateway/350

      posted in Announcements
      ghiglie
      ghiglie
    • RE: 💬 Building a Raspberry Pi Gateway

      Hello!
      I'm trying to "make" on Alpine Linux in a Docker (ok, maybe it's useless, but way interesting!).

      With a Debian image it's ok, but I'd like to use Alpine.

      I get this error:

      g++ -MT build/drivers/Linux/SPIDEV.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DSPI_SPIDEV_DEVICE=\"/dev/spidev0.0\"  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/SPIDEV.cpp -o build/drivers/Linux/SPIDEV.o
      In file included from /usr/include/sys/ioctl.h:7:0,
                       from drivers/Linux/SPIDEV.cpp:27:
      drivers/Linux/SPIDEV.cpp: In static member function 'static uint8_t SPIDEVClass::transfer(uint8_t)':
      drivers/Linux/SPIDEV.cpp:153:18: error: '_IOC_SIZEBITS' was not declared in this scope
        ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
                        ^
      drivers/Linux/SPIDEV.cpp: In static member function 'static void SPIDEVClass::transfernb(char*, char*, uint32_t)':
      drivers/Linux/SPIDEV.cpp:175:18: error: '_IOC_SIZEBITS' was not declared in this scope
        ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
                        ^
      make: *** [Makefile:99: build/drivers/Linux/SPIDEV.o] Error 1
      root@local-mysgw-alpine:/opt/MySensors3$ make
      g++ -MT build/drivers/Linux/SPIDEV.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DSPI_SPIDEV_DEVICE=\"/dev/spidev0.0\"  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/SPIDEV.cpp -o build/drivers/Linux/SPIDEV.o
      eIn file included from /usr/include/sys/ioctl.h:7:0,
                       from drivers/Linux/SPIDEV.cpp:27:
      drivers/Linux/SPIDEV.cpp: In static member function 'static uint8_t SPIDEVClass::transfer(uint8_t)':
      drivers/Linux/SPIDEV.cpp:153:18: error: '_IOC_SIZEBITS' was not declared in this scope
        ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
                        ^
      drivers/Linux/SPIDEV.cpp: In static member function 'static void SPIDEVClass::transfernb(char*, char*, uint32_t)':
      drivers/Linux/SPIDEV.cpp:175:18: error: '_IOC_SIZEBITS' was not declared in this scope
        ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
                        ^
      make: *** [Makefile:99: build/drivers/Linux/SPIDEV.o] Error 1
      

      I'm surely missing a package... but can't state one. Any help?

      @macvictor thanks for your post, it will help me a lot, I'm trying the same way.

      posted in Announcements
      ghiglie
      ghiglie
    • RE: Hass.io and Ethernet Gateway on PI

      Hi there,
      I'm resuming this old topic 'cause I'm trying to make a dockerized version of MySensors gateway, built on a debian image. It compiles easily, but I'm stuck on transport initialization. No one tried it?
      Since I'm quite new to this, I can't give now a github link, but I'll do ASAP, so we can collaborate on this.

      posted in Home Assistant
      ghiglie
      ghiglie
    • RE: 💬 Multi-Sensor: Temp/Humidity/PIR/ Leak/Magnet/Light/Accel

      Great!
      A bit OT: how are you programming the nRF?

      posted in OpenHardware.io
      ghiglie
      ghiglie
    • RE: 💬 Multi-Sensor: Temp/Humidity/PIR/ Leak/Magnet/Light/Accel

      @NeverDie Thanks! Here in Italy they's sold with another name, but it's still a 3M branded one. I'll look for a pack! 🙂

      posted in OpenHardware.io
      ghiglie
      ghiglie
    • RE: 💬 Multi-Sensor: Temp/Humidity/PIR/ Leak/Magnet/Light/Accel

      @NeverDie said in 💬 Multi-Sensor: Temp/Humidity Leak/Magnet/Light/Accel:

      @ghiglie What is it that you'd want to screw it to? It might be easier to just tape it or glue it in place. It's light enough that it wouldn't need much holding strength. Screwing may be overkill.

      I was thinking about the top of a door... You'r right, I overestimated its weight.

      posted in OpenHardware.io
      ghiglie
      ghiglie
    • RE: 💬 Multi-Sensor: Temp/Humidity/PIR/ Leak/Magnet/Light/Accel

      @NeverDie Thanks! I'll ask the fab if they can do it without charging extra costs. Or I'll "square" it - maybe with a hole in the angles to screw it. Really like this design.

      posted in OpenHardware.io
      ghiglie
      ghiglie
    • RE: 💬 Multi-Sensor: Temp/Humidity/PIR/ Leak/Magnet/Light/Accel

      ...another n00b question: what are the PCB dimensions?

      posted in OpenHardware.io
      ghiglie
      ghiglie
    • RE: 💬 Multi-Sensor: Temp/Humidity/PIR/ Leak/Magnet/Light/Accel

      I'm quite a noob, but totally with the NRF. Interesting PCB, I'll try asap to put a sensor together!

      posted in OpenHardware.io
      ghiglie
      ghiglie
    • RE: Genuino/Arduino 101

      Hi there! I'm upping this old thread to avoid duplication.
      I got a UDOO-x86 (this board: https://www.udoo.org/udoo-x86/)
      Very powerfull, capable of running Docker without a hitch, and it has an Arduino 101 onboard. It could be a great MySensors gateway!
      So, anyone tried it?

      Thanks all,
      Marco

      posted in Development
      ghiglie
      ghiglie
    • RE: My Node doesn't talk to Gateway!

      A small update. well, uploaded the mockmysensor sketch and gateway and nodes are talking flawlessly!
      I should take note: first, power the antennas directly from source. 2. upload mockmysensors

      Thanks @gohan !

      posted in Troubleshooting
      ghiglie
      ghiglie
    • RE: My Node doesn't talk to Gateway!

      Uh, no! I didn't read about it. Gosh, I could have tried the sensors net much sooner! 😞 😄

      I'll try it... hopely tonite.

      TIA!

      posted in Troubleshooting
      ghiglie
      ghiglie
    • My Node doesn't talk to Gateway!

      Hi all,
      I've just jumped in, so I'm starting to build some gateways and nodes. The first pair I'm bauilding is nRF based, an NodeMCU w/ MQTT gateway, and a ProMini with an easy DHT11. Both sketches are "vanilla" from Examples; the nRFs are socketed to an adapter with an AMS for 5->3v with a 10uF capacitor, each no more that 20cm far from each other.

      So, they pairing - the node finds its parent, but they get stuck during communication:
      gateway:

      0;255;3;0;9;TSF:CKU:OK
      0;255;3;0;9;TSF:MSG:GWL OK
      0;255;3;0;9;TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
      0;255;3;0;9;TSF:MSG:READ,255-255-255,s=255,c=7,t=255,pt=7,l=25,sg=1: 0
      0;255;3;0;9;!TSF:MSG:LEN,7!=32
      0;255;3;0;9;TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
      0;255;3;0;9;TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
      0;255;3;0;9;TSF:MSG:READ,255-255-255,s=255,c=7,t=255,pt=7,l=25,sg=1: 0
      0;255;3;0;9;!TSF:MSG:LEN,7!=32
      0;255;3;0;9;TSF:MSG:READ,255-255-255,s=255,c=7,t=255,pt=7,l=25,sg=1: 0
      0;255;3;0;9;!TSF:MSG:LEN,7!=32
      0;255;3;0;9;TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
      0;255;3;0;9;TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
      0;255;3;0;9;TSF:MSG:READ,255-255-255,s=255,c=7,t=255,pt=7,l=25,sg=1: 0
      0;255;3;0;9;!TSF:MSG:LEN,7!=32
      0;255;3;0;9;TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      0;255;3;0;9;TSF:MSG:BC
      0;255;3;0;9;TSF:MSG:FPAR REQ,ID=255
      0;255;3;0;9;TSF:PNG:SEND,TO=0
      0;255;3;0;9;TSF:CKU:OK
      0;255;3;0;9;TSF:MSG:GWL OK ```
      

      and node:

      693319 TSM:FAIL:PDT
      753324 TSM:FAIL:RE-INIT
      753326 TSM:INIT
      753334 TSM:INIT:TSP OK
      753336 TSM:FPAR
      753338 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      754536 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      754542 TSF:MSG:FPAR OK,ID=0,D=1
      755347 TSM:FPAR:OK
      755349 TSM:ID
      755349 TSM:ID:REQ
      755353 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      757362 TSM:ID
      757362 TSM:ID:REQ
      757366 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      759375 TSM:ID
      759375 TSM:ID:REQ
      759379 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      761389 TSM:ID
      761389 TSM:ID:REQ
      761393 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      763402 !TSM:ID:FAIL
      763404 TSM:FAIL:CNT=7
      763406 TSM:FAIL:PDT 693319 TSM:FAIL:PDT
      753324 TSM:FAIL:RE-INIT
      753326 TSM:INIT
      753334 TSM:INIT:TSP OK
      753336 TSM:FPAR
      753338 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      754536 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      754542 TSF:MSG:FPAR OK,ID=0,D=1
      755347 TSM:FPAR:OK
      755349 TSM:ID
      755349 TSM:ID:REQ
      755353 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      757362 TSM:ID
      757362 TSM:ID:REQ
      757366 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      759375 TSM:ID
      759375 TSM:ID:REQ
      759379 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      761389 TSM:ID
      761389 TSM:ID:REQ
      761393 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      763402 !TSM:ID:FAIL
      763404 TSM:FAIL:CNT=7
      763406 TSM:FAIL:PDT 693319 TSM:FAIL:PDT
      753324 TSM:FAIL:RE-INIT
      753326 TSM:INIT
      753334 TSM:INIT:TSP OK
      753336 TSM:FPAR
      753338 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      754536 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      754542 TSF:MSG:FPAR OK,ID=0,D=1
      755347 TSM:FPAR:OK
      755349 TSM:ID
      755349 TSM:ID:REQ
      755353 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      757362 TSM:ID
      757362 TSM:ID:REQ
      757366 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      759375 TSM:ID
      759375 TSM:ID:REQ
      759379 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      761389 TSM:ID
      761389 TSM:ID:REQ
      761393 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      763402 !TSM:ID:FAIL
      763404 TSM:FAIL:CNT=7
      763406 TSM:FAIL:PDT ```
      

      I've added some extra debug switches found here on the forum, but it's not adding nothing interesting o readable.

      I've tried switching some nFR, I have some more at home (I'm a traveller!) I could try this weekend....
      Maybe the DHT is not reading, so the payload is shorter - 7 chars instead of 32 ?

      Any other suggestions to debug this?

      Thanks all!

      Marco

      posted in Troubleshooting
      ghiglie
      ghiglie
    • RE: How to build an overridable MySensors relay based device (e.g. lamp with manual switch)

      @dbemowsk I was reading your thread... very inspirational. My main problem is can't change (for now!) the in-wall switches, so trying to figure out how to "decline" them.

      posted in Hardware
      ghiglie
      ghiglie
    • RE: How to build an overridable MySensors relay based device (e.g. lamp with manual switch)

      @anonymouslemming I understand. I'll track this topic! 😉

      posted in Hardware
      ghiglie
      ghiglie
    • RE: How to build an overridable MySensors relay based device (e.g. lamp with manual switch)

      Hi! How did it end?
      Obtaining the WAF is the most part of my tinkering... I'm going for Sonoff ESP-based products to drive lights, mixing up the actuators via Home Assistant.

      posted in Hardware
      ghiglie
      ghiglie