Giter Club home page Giter Club logo

hugo-esp8266's Introduction

Hugo-ESP8266

Hugo is a 4-button ESP8266 Wi-Fi Remote, Arduino compatible and simple to use.

alt text

Archived

This project is archived now, don't expect any updates. Hardware and firmware are to be considered final. If you want to make this, you can use pre-compiled binaries in the Releases section.

UPDATES

RELEASE 1.4.1 bugfix (16/11/2019)

  • Fixes an issue with input values not being saved in config portal

RELEASE 1.4 (3/11/2019)

  • All sketches: Config AP name change
  • MQTT Sketch: Battery is now automatically registered in Home Assistant
  • HTTP Sketch: Added support for HTTPS, binary size optimizations

RELEASE 1.3 MQTT (24/8/2019):

  • Major MQTT firmware update, it's now fully compatible with home assistant incl. auto discovery

RELEASE 1.3 (14/7/2019):

  • Button combinations added, that means 3 additional "virtual" buttons to use.
  • MQTT firmware added

Useful links

3D printable case available here:
https://www.thingiverse.com/thing:3641618

Want to make your own? Head over to Schematic directory for schematic and a list of compontents.

If you use diyHue emulator, just head to Firmwares directory for diyHueTapSwitch sketch!
diyHue github: https://github.com/diyhue/diyHue

Wiki

hugo-esp8266's People

Contributors

bartvz avatar jerobins avatar magicfab avatar mcer12 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hugo-esp8266's Issues

Button press issue

Hey, just got Hugo today and I entered the config details normaly.
I got the mqtt working, but since I was just trying I didnt know which button is which, so I decided I will upload the code again, to add diffrent button topics and such.
Code uploads normaly, and I can enter the config screen and set the information, but when remote reboots, its only registering combo button presses, even if 1 button is pressed.
Any ideas how can I solve this?

Here is the debug code I get, if I press the buttons from 1-4 in slow sequence, no combo button presses.
https://pastebin.com/wYSQja4F

Hugo_MqttTrigger Access Point connection error

Hello,

I am a fan of your work and i'm testing your Hugo_MqttTrigger code on an esp12e module i own. Unfortunately i have the following problem. The access point appears only for some seconds and i'm not able to connect to it. After that it disappears from the available networks. Any ideas on the cause of this?

Thank you in advance.

Small mistake in diyHUE pairing documentation

The diyHUE documentation mentions in the "Registering the remote in Hue app" section :

This will register the remote in diyHue and it will pop up in Hue app, in Accessories section.

It should be

This will register the remote in diyHue and it will pop up in the Philips Hue app, under Settings > Accesory setup, or under Devices > Smart Controls in the Hue Essentials app.

Configure without ConfigPortal

Hello,
I have a few of your devices.
Is there a way to program the configuration info without using the config portal? i.e. directly into the Sketch?
I saw some code to write to the SPIFFS, but that seems to need the portal do things.

As one idea, do you have some documentation on the format of the image that the Hugo saves to SPIFSS?
I could build the file and upload it directly without using the portal?

ESPHome Support

I just converted a bunch of my Tasmota devices to ESPHome, which looks like a great platform for managing all your ESP devices and OTA updates. Is there any way we could get firmware support there for our switches?

RFE : include printed MAC address on devices, web config interface

It would be very useful to know the MAC address in order to be able to assign a static IP address before the first connection.
I'd like to suggest including the MAC address of each device in printed documentation or sticker on the device/static bag it comes in. This should also be displayed in the Hugo web configuration.

MQTT_MAX_PACKET_SIZE error when compiling / sending MQTT firmware

I am fairly new to Arduino.

I am using Debian 10 with Arduino IDE setup for ESP8255 module upload, I've added PubSubClient and EspMQTTClient libraires. I am trying to upload the latest MQTT firmware on a Hugo remote I recenly got.

I've connected the remote via USB, loaded the MQTT firmware files in Arduino IDE, when using "Verify/Compile", I get this error:
#error "MQTT_MAX_PACKET_SIZE is too small in libraries/PubSubClient/src/PubSubClient.h, increase it to 512"

Uploading the diyHUE firmware works fine on the same remote.

Am I missing a particular library or requirement ? Thanks in advance.

Is this product available anymore

First of all sorry to spam in GitHub issues, but I had no choice as tindie wouldn't send an email to activate my account to contact seller.

I just ordered 3 from tindie, but it ran out of stock. I wanted to buy 2 more. Also, how would I replace the battery? Any link to buy similar battery

Thanks,
Ravi R

Trouble registering Hugo to diyHUE/Hue app - docs refers to "Sensors" section but there isn't any in the Hue app

The documentation for pairing a Hugo remote with diyHue indicates:

Push and hold buttons 2 + 4 until the led lights up, and release. This will register the remote in diyHue and it will pop up in Hue app, in Sensors section.

When I push and hold buttons 2 + 4 (assuming button "2" is under "O" and "4" is "I"), the led starts flashing fast. Is this indicating a registration attempt ?

The diyHue IP is properly configured in the Hugo remote. I was able to import lights into it from an existing Philips Hue bridge. I am not sure what is meant by "This will register the remote in diyHue", it doesn't show up anywhere I can see in the web UI. Can you provide more details ?

Regarding the Pillips Hue app, there isn't a "Sensors" section, only "Your rooms" in the Home section and "Accessory setup" under Settings. Could you please confirm where this is supposed to show up on the latest version of the app ? I tried 3.20.1.7162 and 3.31.0.7477.

change firmware from URL to MQTT

Hello,

We have been using the HUGO with the URL triggering and is working fine.
When we now want to change the firmware to the MQTT version, we get the following output, if we flash the URL version, all works fine. I'm quiet new to this, any direction where to go for finding a solution?

--------------- CUT HERE FOR EXCEPTION DECODER ---------------#LF#CR#LF ets Jan 8 2013,rst cause:2, boot mode:(3,7)#CR#LF#CR#LFload 0x4010f000, len 3584, room 16 #CR#LFtail 0#CR#LFchksum 0xb0#CR#LFcsum 0xb0#CR#LFv2843a5ac#CR#LFld#LF#CR#LFFW: MqttTrigger#CR#LFButton: 0#CR#LF#LF--------------- CUT HERE FOR EXCEPTION DECODER ---------------#LF#CR#LFException (28):#CR#LFepc1=0x4020554a epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000#CR#LF#CR#LF>>>stack>>>#CR#LF#CR#LFctx: cont#CR#LFsp: 3ffffd80 end: 3fffffc0 offset: 0190#CR#LF3fffff10: 3fffdad0 3fff0618 3fff06f8 40205539 #CR#LF3fffff20: feefeffe feefeffe feefeffe feefeffe #CR#LF3fffff30: feefeffe feefeffe feefeffe feefeffe #CR#LF3fffff40: feefeffe feefeffe feefeffe feefeffe #CR#LF3fffff50: feefeffe feefeffe feefeffe feefeffe #CR#LF3fffff60: feefeffe feefeffe feefeffe feefeffe #CR#LF3fffff70: 00000000 00000000 3fff185f 3fff185f #CR#LF3fffff80: 00000000 feefeffe feefeffe feefeffe #CR#LF3fffff90: feefeffe feefeffe feefeffe 3fff0828 #CR#LF3fffffa0: 3fffdad0 00000000 3fff07e8 4020defc #CR#LF3fffffb0: feefeffe feefeffe 3ffe84f4 40100da9 #CR#LF<<<stack<<<#CR#LF#LF--------------- CUT HERE FOR EXCEPTION DECODER ---------------#LF#CR#LF ets Jan 8 2013,rst cause:2, boot mode:(3,7)#CR#LF#CR#LFload 0x4010f000, len 3584, room 16 #CR#LFtail 0#CR#LFchksum 0xb0#CR#LFcsum 0xb0#CR#LFv2843a5ac#CR#LFld#LF#CR#LFFW: MqttTrigger#CR#LFButton: 0#CR#LF#LF--------------- CUT HERE FOR EXCEPTION DECODER ---------------

image

regards,

patrick

MQTT client ID should unique/random

Duplicate MQTT client IDs are against specifications. Each device should have its own unique ID. When multiple Hugos are in use this may cause conflicts. Possible conflicts are mitigated since a Hugo is connected to the broker only for a short while but it would be better if the ID would be randomized (as it is done in other projects) and not hardcoded.

Edit:
PS.: I would also consider randomizing OTA names. In OTA names this seems to already be implemented.

MQTT Retain on Home Assistant registration

Just did an OTA update to the latest MQTT code in repo. Worked fine. Really appreciate the ease of registering with 2+4 for Home Assistant. It only needs one tweak, adding the retain flag to the MQTT publish for the configuration topics so that the device config isn't lost on Home Assistant restarts.
Thanks so much.

configuration webpage doesn't show complete payload

Issue:
I have set the value of "{"siteId": "hugo1"}" in the payload value. The setting is saved in Hugo. It sends the correct payload to Matt server. But it doesn't show up when I open the configuration page again.

Actual:
Screen Shot 2020-06-30 at 7 41 55 AM

Expected:
The complete string "{"siteId": "hugo1"}" should show up in the configuration page

Battery reporting topics

Great soft- and hardware! Apparently, a Hugo reports its battery level under two topics, is this on purpose? Also, 0x3e is 62 not 90, what does it stand for?

esp/hugh/battery 3e
esp/hugo/battery 90

I use two Hugos. It would make sense to have the status topics configurable through the web interface.

MQTT TLS support

First of all, thanks for this nifty little gadget, I really like mine. I'm using it with the MQTT firmware 1.3b which added username and password support.

My only desiderata at this point would be support to connect to a secure MQTT broker (with optional client verification).

Would it be hard to implement this? more importantly, would it fit in the maximum space/memory constraints?

Thank you again for your time and effort spent on the project.

HTTP (Basic URL trigger)

Hello,
we have inserted an URL into the Hugo, but the request is executed as a TCP message and not as an http request (seen in wireshark)
Whats wrong?

URL set to this http://172.20.20.153:8080/#/Main/Acknowledge?Sendkey=T1_S1_G
when executing this URL from an phone on the same network (just past it into the browser), it works fine.
so no issue on firewall.
172.20.20.122 is the phone, TCP connection OK, http OK
172.20.20.170 is the Hugo ==> TCP NOK and thus no http transfer possible
image

thanks,

Patrick

DHCP does not wait long enough

Dear Mcer12,

I am using 4 of your Hugos (firmware 1.4.1) on a regular basis and it works mostly fine, but -

While using it (over time) with two different Wifi routers from the same manufacturer (AVM, Fritzbox 7430 and 7530 - the last is very modern) the device seems to not wait long enough for the DHCP reply so it blinks instead of sending data. This happens every 1 in 5 times, no matter how distant I am.

I have seen that the timeout is hardcoded in your main code (4 and 8 seconds?) I am not proficient enough to write a pull request but you might figure this out in seconds.

I understand that you don't want to wait for too long because it affects battery life. However, I would really appreciate if this timeout could be configurable in the webfrontend or at least could be set as global variable in the code.

I hope that makes sense for you, too :-)

Thank you for your product and for taking your time..
Andreas

MQTT / Home Assistant / button topics

Hello,

just got 2 Hugos in the mail! I'm really chuffed, they feel like great little devices.

I flashed the MQTT firmware, made sure HA MQTT is configured for discovery (which it wasn't), and the Hugo device shows up under Integrations/MQTT in HA Configuration.
There's 2 entities , one for the status of the Hugo and one for the Battery.

I do have a couple of questions though:

Aren't all configured buttons supposed to show up in there ?
Why is the sensor for battery not showing any value ?

Trouble flashing OTA

Hi,
I realize this might be a generic Arduino question; most of my experience is with platformio, and I'm not completely comfortable in the Arduino GUI.

I've made a small change to the code, compiled it, put the Hugo into OTA mode by pressing buttons 1+3 (rapid flashing), selected the network port, and selected Upload in the GUI. It says it's uploading, the LED becomes solidly lit, and then the Arduino GUI reports upload complete, but the LED stays lit and it seems like it did not accept the new .bin. If I push a button, any button, it seems to restart, but it does not appear to have loaded the new SW (tested by updating #define FW_VERSION and pressing buttons 2+4 to send the config string.

Any idea what I might be missing?

Suggestion

Hi
It would be a very nice feature if you could implement "multi click" on the buttons, like the Shelly i3.

2020-07-20_1423

Wiki suggestion: a script to make bulk configuration easier

It's tedious to configure multiple remotes. I wrote a simple script that makes it a little easier.

REMOTES = {
    "12:23:34:45:56:67": 100,
    "12:23:34:45:56:68": 101,
    "12:23:34:45:56:69": 102,
}

PARAMS = {
    "ssid": "myssid",
    "pass": "mypass",
    "ip": "192.168.2.",
    "gw": "192.168.2.1",
    "sn": "255.255.255.0",
    "broker": "192.168.2.100",
    "port": "1883",
    "mqttusr": "mqttusername",
    "mqttpass": "mqttpass",
    "b1t": "homeassistant/sensor/hugo_[id]/state",
    "b1p": "payload1",
    "b2t": "homeassistant/sensor/hugo_[id]/state",
    "b2p": "payload2",
    "b3t": "homeassistant/sensor/hugo_[id]/state",
    "b3p": "payload3",
    "b4t": "homeassistant/sensor/hugo_[id]/state",
    "b4p": "payload4",
    "b5t": "homeassistant/sensor/hugo_[id]/state",
    "b5p": "payload5",
    "b6t": "homeassistant/sensor/hugo_[id]/state",
    "b6p": "payload6",
    "b7t": "homeassistant/sensor/hugo_[id]/state",
    "b7p": "payload7",
    "batt": "homeassistant/sensor/hugo_[id]/battery",
}

import copy
from urllib.parse import urlencode

for mac, ip in REMOTES.items():
    p = copy.deepcopy(PARAMS)
    p["ip"] += str(ip)
    print("%s: curl -d \"%s\" 10.10.10.1\n\n" % (mac, urlencode(p)))

This will spit out a bunch of curl commands you can execute on the command line when you're connected to a remote in configuration mode. The curl command is the same as filling out the web form and hitting submit. As you can see, my remotes are flashed with the MQTT firmware. Modify the script for other kinds.

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.