GithubHelp home page GithubHelp logo

megadesk_companion's Introduction

megadesk companion

This board expands the megadesk to allow for additional functionality - notably esphome/homeassistant integration.

Tindie store

This is available for purchase at https://www.tindie.com/products/gcormier/megadesk-companion/

Features

  • For newer 5-pin megadesks, plug and play!
  • Older 3-pin megadesks require soldering 2 wires to SCK/MISO
    • Serial firmware is required. All units after December 2022 were flashed with the serial firmware.
  • Built-in logic-level shifting between megadesk (5V) and the ESP32 (3.3V)

Using

  • Pay attention to the warning on the PCB. It is imperative the RED+ on both sides represents the 24V power source.
  • The esphome files are located at the main megadesk repository
  • Using the USB-C port will use the ESP32-C3's native USB interface to support the first uploading of code
  • Connecting USB-C while the device is powered from the main cable will not cause damage. However, it is recommended to only use the USB-C port while flashing. The device can be flashed over WiFi after the first time.
  • Youtube Video - 3-pin hookup
  • Youtube Video - 5-pin hookup
  • CP210x drivers for Windows (linux supports this natively)

Additional Information

  • The megadesk repository is the main location for all discussion and issues. There is a popular discussion relating to esphome usage.
  • GPIO4/GPIO3/GND have been broken out to solder pads for those with other ideas.
    • They should only be used with 3.3V logic
    • They go directly to the ESP32 with no protection. Use logic signals only, do not power anything.
  • There is an additional 3 pin area that can be soldered to power RGB style LED strips.
    • The total power limit of the board is 500mA. The ESP32 will use up some of that, so it is recommended to avoid pulling excessive current and limit it to 200mA. If more power is needed, use an external power supply for the LEDs. The switching regulator powering the companion has a thermal shutdown if too much current is drawn.
    • The LED signal is 3.3V, the power is 5V

Why an addon board?

When designing I considered a brand new megadesk PCB with all of this functionality integrated, or an addon board.

With the addon, it achieves

  1. People who do NOT want any of this extra functionality do not need to pay the extra costs for this board. The ESP32 is pricy.
  2. We still respect the initial design goal of using the same enclosure.
  3. It provides an upgrade path for the many existing owners of megadesk to add-on this functionality without wasting their initial controller.
  4. It keeps the code base for megadesk isolated, and avoids refactoring the code to ESP32 and requiring me to support esphome changes over time.

Remote Control via REST-API

The megadesk-companion's default setup is done using esphome and can be found in the megadesk's respository under esphome/megadesk-companion.yaml. This setup includes an HTTP server that allows controlling the megadesk via the esphome REST-API.

By default, the megadesk-companion hosts a server at http://megadesk.local/ which listens on port 80. For example, to set the height, one can simply send a POST request:

curl -X POST 'http://megadesk.local/number/megadesk_height__cm_/set?value=<height>' # for height in cm
curl -X POST 'http://megadesk.local/number/megadesk_height__inches_/set?value=25' # for height in inches

megadesk_companion's People

Contributors

gcormier avatar mimre25 avatar

Stargazers

Jelle Hockx avatar Tomáš Kuchta avatar Ryan Foote avatar Jason Harrison avatar Richard Green avatar Andrew Ortiz avatar Martin Friedrich avatar  avatar Evgeny Bondarenko avatar Milan Dzuriš avatar

Watchers

 avatar  avatar

megadesk_companion's Issues

Unable to flash device on Mac

Hi,
I am unsure how to flash the device on Mac in terminal. When compiling it says:

INFO ESPHome 2023.11.6
INFO Reading configuration megadesk-companion.yaml...
ERROR Error while reading config: Invalid YAML syntax:

Error reading file secrets.yaml: [Errno 2] No such file or directory: 'secrets.yaml'

Any idea how to fix?

Also how do I know what serial the device is on?

STL casing for Megadesk and Megadesk Companion

Hi, I've installed the Megadesk and Megadesk Companion on my Bekant and it's great. However, at the moment the Companion PCB is hanging outside of the original casing where the Megadesk PCB sits.

Is there a way to make the Companion PCB fit in there or any other suggestions? Has anyone made a STL for a casing that would fit the two PCBs and the button board?

WiFi seems to have stopped working

Have had Megadesk for about a month, quickly got up and running on HomeAssistant and wowing my friends and family with my app driven Megadesk.

Something has changed recently where the device no longer shows on Home Assistant or ESPHome via WiFi, but does show if I connect via the USB-C connector (assume it is communicating via serial?). Seems to have changed after rebooting my Home Assistant host machine.

Device flashes ok via Wifi from Home Assistant ESPHome add-in (via HACS), and USB-C with the ESPHome Web flashing tool (serial connection from Chrome).

Chimes work on boot. LED's light.

But cannot see the device from in Home Assistant Lovelace Card, or "Visit" via ESPHome Add In.

The Device can be Ping'ed via Fing... and has an IP address on my LAN.

Any suggestions?

Instructions on how to flash?

I just received my Megadesk companion and Megadesk board. How do I perform an initial flash of the device via the USB-c port?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.