Avatar for Jean-Philippe_Rey


Member since Apr 2015 • Last active Apr 2020
  • 32 conversations

Developping IoT @ http://www.novaccess.ch , Switzerland

80% Hardware
15% Firmware

Linkedin: linkedin.com/in/jprey
Twitter: https://twitter.com/yerpj

Most recent activity

  • in Bangle.js
    Avatar for Jean-Philippe_Rey

    It could be another electrical component inside the watch that generates a disturbing magnetic field ?

  • in Bangle.js
    Avatar for Jean-Philippe_Rey

    I am in love with this "Try in Emulator" button!!! I look forward to emulate the Beer app as well ;-)

  • in Bangle.js
    Avatar for Jean-Philippe_Rey

    shortening the triangle would make it less noticeable...

    From line 169:


    And the pacman trajectory radius could be increased also:
    line 162: var r = 109;

  • in News
    Avatar for Jean-Philippe_Rey

    I wondered when Hackaday would write about it :-)

  • in Projects
    Avatar for Jean-Philippe_Rey

    It seems that HTTP2HTTPS does not work. I couldn't figure out exactly why. However, many people in Arduino world is using the HTTPSRedirect library to call a Google Apps Script ( https://github.com/electronicsguy/ESP826­6/tree/master/HTTPSRedirect)

    Unfortunately this mechanisms is running on the embedded side and is not compatible with Espruino. I searched for similar mechanism in Espruino but did not find anything. Just to be sure, I am asking here: Does anyone ever implemented such a redirection mechanism?

    Thanks for any help :-)

  • in Projects
    Avatar for Jean-Philippe_Rey

    Thanks @Ollie and @DamianMontero for your answers, I appreciate!

    Do you think I could use a Google Apps Script function to get the daily calendar (as shown here https://www.youtube.com/watch?v=sm1-l5-z­3ag

    ) and then call the script from Espruino?

    I tried this:

    var WIFI_NAME = "WIFI_NAME";
    var WIFI_OPTIONS = { password : "WIFI_PASSWORD" };
    var wifi;
    function getCalendar()
      var options = {
        host: 'https://script.google.com',
        port: '443',
        protocol: "https:",
        headers: {
      console.log("Connecting to Google");
      require("http").request(options, function(res)  {
        console.log("Connected to Google");
        var nRecv = 0;
        res.on('data', function(data) { nRecv += data.length; });
        res.on('close', function(data) {
          console.log("Google connection closed, "+nRecv+" bytes received");
          setTimeout(getCalendar, 10000); // once every 10 seconds
    function onConnected(err) {
      if (err) throw err;
      wifi.getIP(function(e,ip) {
    var Inited=false;
    function Init()
        wifi = require("Wifi");
        wifi.connect(WIFI_NAME, WIFI_OPTIONS, onConnected);
    function onInit() {

    The console output is

     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v04 (c) 2019 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    Flash map 512KB:256/256, manuf 0xef chip 0x4015
      "ip": "",
      "netmask": "",
      "gw": "",
      "mac": "18:fe:34:f5:6a:a9"
    Connecting to Google

    Then nothing happens. I think I am pretty close to have a solution not based on a third party service, but, well, it doesn't work as is... I don't know if ESP8266 can do https requests directly or if I need to use some kind of HTTPSRedirect library, used on the Arduino world...
    If anyone has any hints to help me go a step further, that would be awesome :-)

  • in Projects
    Avatar for Jean-Philippe_Rey

    Dear all,

    I just realized that I would love to make an Espruino project aimed at printing on a display my daily agenda. I have not yet thought about how I would implement it, but my first question is related to how to get the calendar content from Google. Does anyone ever tried to implement an integration with the Google Calendar API?

    Thanks for your feedback.
    Have a nice day.

  • in JavaScript
    Avatar for Jean-Philippe_Rey

    Thanks for the details.
    As a first try you can use the setWatch function. When the given callback is called, the parameters lastTime and time are passed to it. by doing 1/(time-lastTime) you get the frequency value.
    The limitation could be the processing time of the callback, but you can go up to 1kHz easily as far as I remember. Then you can maybe adjust the RC constant of your 555 circuit in order to decrease the maximal output frequency.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for Jean-Philippe_Rey

    OK, thanks for your feedback.
    I didn't realize that a BLE mesh relay had to be always on. I tried to look for the Bluetooth SIG roadmap of the mesh feature but it seems not to be published. I hope they will improve the mesh mechanisms in order to support routing packet in low power mode (bluetooth seems to have good capabilities in term of node synchronization , however..)
    I'll try to use advertising instead. Again, thanks for your feedback.