Navigation

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

    Yveaux

    @Yveaux

    Mod

    874
    Reputation
    2492
    Posts
    9573
    Profile views
    10
    Followers
    0
    Following
    Joined Last Online
    Website yveaux.blogspot.nl Location Netherlands

    Yveaux Follow
    Mod Code Contributor MySensors

    Best posts made by Yveaux

    • ESP8266 WiFi gateway port for MySensors

      UPDATE: The official build guide for the ESP8266 gateway can now be found here.
      The description in this post is for reference only!


      Please find an early release of ESP8266 gateway support in my MySensors 1.5 branch:
      https://github.com/Yveaux/Arduino

      It has not been tested heavily, but seems to run stable at least with one sensor.
      Great feature of this setup is you can run a WiFi gateway with just an ESP8266 and nRF24L01+ radio, no further Arduino (ATMega328) is required!

      I'm releasing this now, hoping you can start experimenting with it and help development to get to a stable, official release asap.

      2015-08-26 12.22.13.jpg
      Setting things up:

      • Install Arduino IDE 1.6.5
      • Add support for ESP8266 to Arduino, see https://github.com/esp8266/Arduino (Installing with Boards Manager)
      • Get the code form my fork https://github.com/Yveaux/Arduino/archive/master.zip and extract the zip
      • Edit libraries/MySensors/MyConfig.h when you use e.g. a different datarate, channel or base radio ID.
      • Point your Arduino configuration to the extracted dir (File -> Preferences -> Sketchbook location)
      • Restart the Arduino IDE

      Compiling the gateway:

      • Open the WiFi gateway in the Arduino IDE (File -> Sketchbook -> Libraries -> MySensors -> Esp8266Gateway
      • Save it, to allow editing
      • Enter your SSID and WiFi password in the 'ssid' and 'pass' variables
      • Select the ESP8266 board you're targeting in Tools -> Board. I use an ESP12 module, which is a 'Generic ESP8266 Module' board target
      • Verify your sketch. It should compile without errors.

      Connecting the radio:

      • Make sure to use an ESP8266 module which breaks out pins GPIO 4, 12, 13, 14, 15 (e.g. ESP12 module)
      • Connect the radio as described in the header of the gateway code.
      • Connect the other signals as described in the header of the gateway code.
      • I mounted two switches (for reset & bootload) which your ESP8266 may already be equipped with (e.g. the NodeMCU boards have them most of the time)
      • I use an FTDI USB->Serial converter to connect the ESP8266 to my PC, which outputs levels at 3.3V. This is very important as the ESP8266 cannot officially handle 5V signals, and cheap USB->Serial converters often output at 5V levels. When in doubt, please check before connecting!
      • Power both the ESP8266 and the nRF24L01+ from a separate 3.3V power supply. The 3.3V supply from many USB->Serial converters is often too weak.
      • Decouple the power supply with a large capacitor (e.g. 1000uF) and 100nF, to buffer the input and suppress any noise.

      Downloading your sketch:

      • Start wit a low upload speed (e.g. 9600baud). It will take ages to download, but I sometimes have issues downloading at high speeds.

      • Press reset + bootload buttons.

      • Keep bootload pressed while releasing reset

      • After a few seconds release bootload.

      • The ESP8266 is now in bootload mode, and ready to download your code.

      • Choose Upload in the Arduino IDE

      • After some time (a lot of dots) upload should finish and your code starts. The serial monitor (115200 baud) shows the progress:

          ESP8266 MySensors Gateway
          Connecting to SSID
          ...........Connected!
          IP: 192.168.1.119
          0;0;3;0;9;gateway started, id=0, parent=0, distance=0
          0;0;3;0;9;read: 123-123-0 s=1,c=1,t=24,pt=5,l=4,sg=0:2810347
          123;1;1;0;24;2810347
        
      • This text will be preceded by some garbage from the bootloader (it outputs at a lower baudrate)

      • The IP address of the WiFI gateway will currently be obtained from a DHCP server.

      Now connect a telnet session (e.g. putty) to the IP address mentioned in the serial output (192.168.1.119 in this case), port 5003 and send some serial commands!

      posted in Development
      Yveaux
      Yveaux
    • MySensors booth at Eindhoven Maker Faire!

      The MySensors core team is proud to announce our participation in the Eindhoven Maker Faire 2017!

      The event will take place September 2-3 2017, in Eindhoven, The Netherlands and we will be hosting a full size booth.

      We plan to have a static setup, showing MySensors enabled hardware (from Sensebenders to breadboard) and a live scale model of a MySensorized house.
      Any wild ideas or help are very welcome.

      We hope to meet you all in person and have a fun time!

      Update: We devoted a full page on the Faire!

      posted in Announcements
      Yveaux
      Yveaux
    • RE: What did you build today (Pictures) ?

      Battery powered MySensors Washing machine & dryer monitor, using LDR's to monitor LEDs on front of the appliances.
      Each time a LED toggles, the node wakes from interrupt and sends a message. Easy peasy!
      When a device is ready, I'll get a message on my mobile phone 😄

      0_1511607742913_upload-656fdf4c-6707-4a8b-a58c-ef7e74fe1b9f

      0_1511607798459_upload-0183f0a1-571d-45e6-8ecc-b4a33fd9c4e9

      Still need to stuff it in an enclosure...

      posted in General Discussion
      Yveaux
      Yveaux
    • Windows PopCom tool shows which USB serial ports are available

      I bumped into this handy Windows tool which shows a notification when USB Serial ports are connected or disconnected:

      https://github.com/avishorp/PopCom

      "PopCom is a COM port plug-in/plug-out notifier. Whenever a USB device that emulates a COM port is connected to the computer, a pop-up will be displayed, describing the device that has been plugged in and the COM number assigned to it. This pop-up helps determinig the COM number assigned to each device, a number that is required for communicating with it."

      0_1534241461629_2bd3169b-943b-4611-b04f-6718576760b0-image.png

      As we are plugging serial devices all the time it can be of use to you too!

      Enjoy!

      posted in General Discussion
      Yveaux
      Yveaux
    • RE: 💬 MySensors @Eindhoven Maker Fair 2017 2-3 September

      Hey guys!

      Just a quick update on the Eindhoven Maker Faire !
      Yesterday we had the first day. @hek, @tbowmo, @scalz, @sincze , @marceltrapman and myself were present at our booth:

      0_1504423218280_upload-382f9719-745f-4791-be51-acbf7d061575

      We had a huge amount of visitors! Many were already familiar with MySensors and we convinced the others to at least have a look a out site 😄
      The kids loved the automated dollhouse we have on display!

      0_1504423594968_upload-5288f931-5610-4c38-88f9-27bfbd64dae0
      Today we continue with the second day, so you still have one more change to meet us IRL!

      Eindhoven Maker Faire
      11:00 - 18:00
      Klokgebouw 50
      5617 AB Eindhoven
      The Netherlands

      See you there!

      posted in Announcements
      Yveaux
      Yveaux
    • RE: Good-looking way to control dimmer?

      @mfalkvidd How about a capacitve touch dimmer (rotary, on/off or linear, whatever you like) ?
      Most electricity wall mount systems (e.g. Busch Jaeger, Gira) have 'blind covers' which you can easily fit a capacitive touch pcb behind:

      0_1460356031337_blindafdek.PNG

      Use a chip like MPR121 to readout the capacitive touch PCB and translate it into roraty movements, clicks, whatevers...

      posted in General Discussion
      Yveaux
      Yveaux
    • RE: 💬 MySensors @Eindhoven Maker Fair 2017 2-3 September

      @gohan I'll probably do a writeup of the house anywhere soon. Please give me some time to process and recover from the Faire 😁

      posted in Announcements
      Yveaux
      Yveaux
    • RE: What did you build today (Pictures) ?

      A temperature controlled PWM fan controller for my DPS5005 power supply!

      0_1513282712833_b39ad537-771a-4175-bb65-07a980b2b734-image.png

      The original 2-wire fan that came with the power supply casing made an incredible amount of noise.
      Using PWM to reduce its velocity made it even more noisy 👿

      So, I made a fresh start and ordered a quality fan (almost as expensive as the whole casing...)

      Using nothing more than a 5V pro mini, piezo speaker, DS18B20 temperature sensor and a resistor I made a full fledged fan controller 😉

      It takes the current temp from the DS18B20 (which will be mounted on the heatsink) and ramps up the fan linearly in the 30..60 C range. Below 30 C, the fan is off.
      If RPM readback indicates a stalled fan, or DS18B20 returns wrong values the buzzer will force me to invest what's wrong 💪

      posted in General Discussion
      Yveaux
      Yveaux
    • RE: Fun with magnetometer / digital compass sensors

      Attached the HMC5883L to my water meter using some putty (just stuck it on the edge near the metal magnet on the big red arrow):

      0_1458070009000_2016-03-15 20.11.11.jpg

      I let the water run for a while and spilled around 20 litres (0.02m3). You can see the magnet has moved from the 5-digit to the 7-digit:

      0_1458070013698_2016-03-15 20.14.20.jpg

      Next is the chart of the HMC5883L's X/Y/Z readings (Range 8_1GA, average over 8 samples, 1 sample (horizontal pixel) per second):

      0_1458070295145_Naamloos.png

      You can clearly see the sensor readings starting to change when the valve opens and stop changing when it's close again!
      I didn't want to spill 100 litres just for a quick test, but I expect the curves to be sinusodial, and certainly periodic with the turning of the magnet.
      The position of the sensor isn't critical at all (in contrast to all other water meter sensors I've seen), you could even stick it on the closed lid of the water meter!
      Every position will generate a different swing of the X/Y/Z signals, so some clever software is required to translate this into (partial)rotations of the magnet.

      BTW I used this library and modified HMC5883L_simple.ino to output the data for the Arduino plotter.

      posted in Hardware
      Yveaux
      Yveaux
    • RE: [SOLVED] Sleep dont run

      This information is outdated. An error in the ATMega328P datasheet has been confirmed. See https://forum.mysensors.org/topic/6572/sleep-with-interrupt-only-works-with-level-low

      @AWI Ok, last reply :simple_smile:

      I'll have to dwell a little to explain how the AVR works and what its limitations are regarding sleeping, and how the MySensors library handles it.

      For AVR architecture, the MySensors library uses the 'Power-Down mode' when sleeping.
      I'll focus on ATMega328P here, for which the datasheet states the possible wake-up sources:

      0_1490722068118_upload-b2cbd80d-2c88-4e52-8bae-c46adb341c4f

      So in our case that's INT and WDT (TWI Address match is for i2c slave implementations).
      When a timeout parameter is passed to a sleep() function of the MySensors library the watchdog (WDT) will be used to wake after the specified timeout. If timeout is set to 0 (and wake-up from interrupts is specified) the watchdog will be completely disabled to save some more power.
      When an interrupt source is passed to a sleep() function of the library it will configure INT0 and/or INT1 to wake up the ATMega328.
      Note point 3, as only level interrupts (more precise LOW in case of ATMega328, thanks @AWI for reminding me) can be used as a wake-up source.
      Many posts here use RISING/FALLING/CHANGE as wake-up source for ATMega328 which is not supported by the ATMega328P and thus not supported by the MySensors library. Although people claim it is working for them you are on your own when using the chip out of spec and can expect strange behavior!

      The datasheet continues in detail on the power-down mode:

      0_1490721842267_upload-e4216667-02ab-4505-989f-e2b14c8edfaf

      The MySensors library disables brown-out to save some power. Serial interface address match and pin change interrupt are not used by the library.
      Pay special attention to the note: Waking the AVR from a INT0/INT1 interrupt will require the LOW level to remain for the startup-time, or the interrupt will not trigger. This means that only when the level is held long enough the library will be able to detect it woke from the external interrupt. If the level is not held at least the startup-time, it will assume it woke because of the total sleep time expired, and return MY_WAKE_UP_BY_TIMER (value -1).

      This start-up time depends on the clock frequency and fuse bits, which for e.g. an 8MHz Arduino Pro Mini comes down to 2ms.

      So just remember: In the MySensors library, only use LOW level interrupts to wake an ATMega328 from sleep and assure the interrupt level remains constant for at least the start-up time!

      @AWI Your third example is out-of spec (CHANGE interrupt) and behavior is therefore undefined. If it seems to work, you're lucky...

      This information is outdated. An error in the ATMega328P datasheet has been confirmed. See https://forum.mysensors.org/topic/6572/sleep-with-interrupt-only-works-with-level-low

      posted in Troubleshooting
      Yveaux
      Yveaux

    Latest posts made by Yveaux

    • RE: My rPi gateway suddenly stopped working, no idea what else to try...

      @frapell did you replace the power supply of the gateway?

      posted in Troubleshooting
      Yveaux
      Yveaux
    • RE: isMetric incorrect on new 2.3.2 serial gateway with HomeAssistant

      @Dave-Myers iirc nodes are supposed to perform the conversion themselves. I know at least the gateway does not take care of this.

      posted in Home Assistant
      Yveaux
      Yveaux
    • RE: Ethernet Gateway Using PCBWAY board Fifisoft57

      @Newzwaver said in Ethernet Gateway Using PCBWAY board Fifisoft57:

      !TSM:INIT:TSP FAIL

      This indicates there's a communication issue with the radio module. Start your debugging there.

      posted in General Discussion
      Yveaux
      Yveaux
    • RE: Is there a timing issue with "faster" platforms?

      @Njwyborn sorry, I don't know. If the stack is called recursively, something is seriously wrong and behavior is undefined I guess.

      posted in Troubleshooting
      Yveaux
      Yveaux
    • RE: Is there a timing issue with "faster" platforms?

      @Njwyborn judging from the logs, i would suspect that you're at least suffering from this issue https://github.com/mysensors/MySensors/issues/1458, which unfortunately is still open.

      tobof created this issue in mysensors/MySensors

      open Recursive call of process() and wait() when using signing #1458

      posted in Troubleshooting
      Yveaux
      Yveaux
    • RE: 💬 Building a WiFi Gateway using ESP8266

      @Serj-Sam there is a pull request included in that pr. Once this is merged it will be available in development, later in the next release.
      If you just downgraded the core, that is persistent until you upgrade the core to 3.x again.

      posted in Announcements
      Yveaux
      Yveaux
    • RE: 💬 Building a WiFi Gateway using ESP8266

      @Serj-Sam you could very well have run into the incompatibility of mysensors with the latest esp arduino core 3.x (see eg https://github.com/mysensors/MySensors/issues/1496)
      Easiest solution is to downgrade the esp arduino core to 2.x

      Yveaux created this issue in mysensors/MySensors

      open Incompatible with Arduino core for ESP8266 version 3 #1496

      posted in Announcements
      Yveaux
      Yveaux
    • RE: 2021 EU customs regulatory changes — where should I buy now?

      @benhub some sellers indeed have EU warehouses, which are now the preferred ordering locations for EU citizens. I also don't know how to easily find them on eg aliexpress. I kind of run into them by accident...
      Additional benefit is shorter shipping times, but products stocked are limited in general.

      posted in General Discussion
      Yveaux
      Yveaux
    • RE: WeMos D1 Mini Gateway + Relay

      @anderBAKE said in WeMos D1 Mini Gateway + Relay:

      #define RELAY_PIN 1

      That should be

      #define RELAY_PIN D1
      

      When something doesn't work it's best to strip a sketch to the bare minimum and get that to work first, eg setup the pin, then switch the relay on and off from the main loop(), without including mysensors or anything else.

      posted in Troubleshooting
      Yveaux
      Yveaux
    • RE: WeMos D1 Mini Gateway + Relay

      @anderBAKE are you sure the code to actually toggle the relay gets executed? You could add some debug statements or toggle the led instead.
      Btw. I would prefer

      if (message.getBool() == true)
      

      Or even

      if (message.getBool())
      
      posted in Troubleshooting
      Yveaux
      Yveaux