Giter Site home page Giter Site logo

ljalves / hfeasy Goto Github PK

View Code? Open in Web Editor NEW
45.0 8.0 14.0 25.61 MB

HFeasy - firmware for HF-LPx100/LPx30 based devices

C 92.23% C++ 7.48% Assembly 0.19% Makefile 0.11%
iot mqtt mqtt-client wifi ankuoo hfeasy home-automation homeassistant homeassistant-mqtt lpb100

hfeasy's Introduction

hfeasy

Firmware for devices using the HF-LPx100 or LPB130 modules.

You can contribute to this project by:

  • Developing code and submit PR's
  • Posting photos/info to support new devices
  • Sending beer money to Revolut tag @ljalves (or click)

Implemented Features:

  • MQTT client
  • HTTP config, control and status webpages

After flashing hfeasy, open web page:

  • http://<deviceip>/
  • HTTP control:
    • status: http://<deviceip>/state
    • on: http://<deviceip>/state?sw=1
    • off: http://<deviceip>/state?sw=0
  • Timers:
    • http://<deviceip>/timer

Recovery mode

  • The device will reset config options and change to AP mode so that you can re-configure it.
    • Module: Toggle the switch 6 or more times within 3 sec
    • Plug: Press and hold the switch for more than 3 sec

Known supported devices

Wifi Plug

  • US Wall Switch (AW51011) (#12)

  • G-Homa (#26)

  • Any LPB100/LPT100F/LPB130 device should be supported using the custom config option

Devices supported with manual config:

  • Orvibo S20 WiWo-S20-E2 (#21)

Firmware

  • Releases

  • Old download place

  • hfeasy 0v7

    • Changes:
      • MQTT fixes: Publish state when sub and pub topics are different
  • hfeasy 0v6

    • Changes:
      • Added WiFi LED config option (under /config)
      • US wall dimmer module is now supported
  • hfeasy 0v5

    • Changes:
      • Due to limited webpage size, config was split in 2 pages (/config and /config_mqtt)
      • Added "HTTP auth" config option (sets authentication ON for all webpages)
      • Increased switch debounce time (should fix random turn ons/offs)
      • /state webpage changed to JSON format - if your setup parses the previous webpage output, you need to change it.
  • hfeasy 0v4

    • Changes:
      • Added more status (hostname and uptime)
      • Fixed missing HTTP headers
      • More robust switch debouncer for on/off module
  • hfeasy 0v3

    • Changes:
      • Added MQTT QoS setting
      • Added module hostname setting
      • Added on/off countdown timers (http://<ip>/timer)
  • hfeasy 0v2

    • Changes:
      • Added MQTT authentication
      • Added recovery mode for both devices: press the switch 6 times withing 2 sec and the device enters AP mode and resets config
      • Added buzzer driver (for on/off module only). Right now just for fun, try: http://<ip>/state?tone=3 (dont go > 21)
  • haeasy 0v1

    • Initial release
  • Original firmware:

    • Also available on the gdrive folder + factory webpage .bin

Device info

All devices have a hard-coded firmware flash webpage at: http://<deviceip>/iweb.html

This webpage allows to configure the device wifi parameters and flash new firmware. No matter which firmware you flash, this webpage is always there (make the device almost "unbrickable").

There is another webpage at: http://<deviceip>/

In here you can setup the wifi parameters, change the access user/pass and flash new firmware too. The access to there webpages is password protected. The user/pass defaults to admin/admin. If you upgrade to the latest official firmware, the user/pass is changed to admin/Lumlink@100

TODO

  • Add dayly/weekly timers (configurable by webpage)
  • ... and suggestions are welcome (open an issue)

hfeasy's People

Contributors

ljalves 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hfeasy's Issues

JSON Arduino ESP8266

Bonjour et merci bien pour ce formidable projet,
je pilote les prises chacon avec un esp8266 via une esquisse de ce style grace à la librairie httpclient :

void chacon(String chacon_state, String chacon_ip)
{
WiFiClient client = server.available();
HTTPClient http;
String url = chacon_ip+"state?sw="+chacon_state;
http.begin(url);
//GET method
int httpCode = http.GET();
//String payload = http.getString();
//Serial.println(url);
//Serial.println(payload);
http.end();
}

je viens à vous pour savoir si vous savez comment récupérer le status de la prise avec un arduino,
et si éventuellement vous pourriez intégrer le moyen de récupérer le status de la prise via une page web en JSON, merci bien, bonne soirée

Chris-M

LED flickering

The blue LED on my wifi smart plug keeps going on and off. Can we disable it? Because that is really annoying and unnecessary in a bedroom.

Malmbergs
Wi-fi smart plug
Model: SW6201

Freeze

Occasionally the switch locks up and no buttons are useable, Power has to be physically turned off to restore functionality.

HTTP server closes connection

I've installed the v3 firmware on my Wifi plug. For whatever reason I can open the /status and /config web pages only in Chrome (on Mac). Neither Safari on Mac, nor Safari on iPhone nor Chrome on iPhone nor a generic HTTP client work. They all complain that the remote side has closed the connection.

However, setting the switch using /state?sw= works fine from all browsers (though a result page is shown in Chrome on Mac, only). Any idea?

Support for RGB Controllers (Feature request)

I own a few of these generic RGB LED strip controllers, little did I know when purchasing that not all of the other similar branded ones of this product don't all use the same chipsets. Other brands (LEDENET) use an ESP. The one I bought of course doesn't have that, but does have this chipset (LPB100-1).
I've lived with the built-in HomeAssistant integration, but reliability and responsiveness is usually 50/50.

Installation on LPT100F based Smart Plug

Hello,
I've been trying to install this on a LPT100F based SmartPlug, but either I'm doing something wrong or something isn't working as intended. First way I tried was using the webinterface by connecting to the IP of the device and going to Upgrade SW. I entered HFEASY_WEB_UPGRADE.bin file, hit upload and after a progress bar it showed the ip of the switch has send no data. Refreshing the page get's me back to the default web interface. I tried several browsers (including Chrome) and several PCs Afterwards I tried putting /iweb.html behind the IP. There I've got the option to update the application as well as the webpage. I've tried HFEASY_WEB_UPGRADE.bin as the application, but after doing so I'm just back at the default webpage. /state and /config just get me a 404 Error I also tried using it as an update for the webpage but that only gets me a 404 error on the device IP.
Before I'm heading down the serial route, is there something I'm doing wrong here? I couldn't find any instructions for installations so I assume this must be quite easy and I'm either doing something simple wrong or something isn't working.

HF-LPB130 - Upgrade

Hello, First of all, many thanks for your involvement,

I doing to try Chacon socket and I found your git to manage it via URL, I think to improve security it's so much better than manage directly by the cloud application..

I encoutered the problem related that I can't upgrade my socket with your bin,
What do you need to develop the fix ?

Build instructions

It would be nice to have some README file with build instructions.

How do I build it for HF-LPB100? When I run make it only creates LPB130 binaries...

-----------------make target:HFEASY.bin 1st-dep:HFEASY.elf -----------------
/opt/gcc-arm-none-eabi-7-2018-q2-update/bin/arm-none-eabi-objcopy -O binary ./projects/build_lpxx30/HFEASY.elf ./projects/build_lpxx30/HFEASY.bin
/opt/gcc-arm-none-eabi-7-2018-q2-update/bin/arm-none-eabi-objdump -h ./projects/build_lpxx30/HFEASY.elf > ./projects/build_lpxx30/dump.log

BUILD COMPLETE :: LPB130 serial upload binary at: ./projects/build_lpxx30/HFEASY.bin
BUILD COMPLETE :: LPB130 web upload binary at: ./projects/build_lpxx30/HFEASY_UPGRADE.bin

make[1]: Leaving directory '/home/andrius/repositories/orvibo/hfeasy'
./tools/gen_upgrade_bin ./projects/build_lpxx30/HFEASY.bin ./projects/build_lpxx30/HFEASY_UPGRADE.bin ./tools/imgpkt

MQTT wont connect

I've placed my mqtt information into the config page and double checked everything, all my information is correct. Same information that I use to connect other mqtt clients. But for some reason I can not get the /status page to change to connected. I'm trying to dig into this further by looking for some sort of a error log so I know what it is doing after I flash and restart for mqtt. Is there such a log?

Ankuoo LPB130-1 based plug

Dear all,
I am working on a ankuoo plug device based on LPB130. I am currently trying to work on:

  1. understand the schematic of PCB board;
  2. porting of hfeasy firmware to the new MCU.

About point 1, I see more GPIO connections than I expect. I see the following soldered pins:
9, 20 Vcc
2-NC
5-GPIO5 (I don't understand where it is used)
1, 17, 18, 36-GND
25-UARTtx
27-UARTrx
28-GPIO22 (connected to the button)
29-GPIO8 (connected to LED2)
30-GPIO24 (used by the relay, it is connected to the base of transistor driving the relay)
31-GPIO25 (I don't understand where it is used)
This is what I found with visual/electrical inspection.

About point 2 I am trying to understand how the pins/gpios are mapped inside the hfeasy source code. In gpio.c I find the array hf_gpio_fid_to_pid_map_table: where is that array used? I don't understand well what is the use of this variable?

Please, if you have any suggestion... In particular about the point 2.
Regards.
Livius
IMG20210905085306

Wifi-pilot

Hi,

I got one of Steffen Wifi-Pilot modules and I'm pretty sure it's the same as Ankuoo cause it's using the same HF-LPB100 chip, has the same web-config (same passwords etc) and even Android app, called Wifi-Pilot, is developed by Ankuoo.
Anyway, for some reason I can't upgrade to your firmware, Im getting timeout error and it stays with old firmware+config.
You can take a look at devices here, I have a "Wall Module" but I guess it's the same story with the Plug too https://www.steffen.ch/ProductContentPageServlet?key=GRUPPE&value=3977

Do you have idea what can cause problem ? Thanks!

Config Change for GHoma Plugs

Hi,

thans for the work. For G-Homa Style Wifi Sockets the GPIOs are changed.

The connections are the following:

18 key
12 relay
11 led

Please provide a firmware bin for these devices as they are widley used in FHEM community
and imho mqtt is a big benefit.

Thanks

Andreas

Missing Countdown menu

There used to be a Timer/Countdown menu
I see the function still available at http://<deviceip>/timer
But no menu available.
Countdown is a real good feature, Please dont remove it.
And if possible add it to menus again.

Thanks

Device reset to AP mode, how can i reconfigure it?

So, i had to reset the device like adviced:
"Plug: Press and hold the switch for more than 3 sec. The device will reset config options and change to AP mode so that you can re-configure it".
I see the device:
ip: 10.10.100.151
10.10.100.254

How do I reconfigure it?

Time and date is not updateing

Shanghai High-Flying Electronics Technology Co., Ltd	1970-01-01 00:20:05 UTC±00:00  Time client is not pulling a proper time and date

HF-LB100 in Lidl Silvercrest Wifi Plug

Thank you for great work!

I have Wifi Plug by Lidl brand Silvercrest. There is HF-LPB100 and I hope for upgrade by your firmware and connect it to the homebridge. Unfortunately I can not flash it. I did it by web browser - no sucess. I try special link as your advice: (http:///iweb.html)) - no sucess. After uloading browser gave me Error message: server IP_Adress no response. Firmware still the same.

Is your code working with this type of WiFi Plug even if HF-LPB100 is inside? Or does I do something wrong?

May thans for help.

Status screen from browser:
image

Ankuoo Rec on 1v1 goes offline

I have 11 Ankuoo REC (wall module) devices on HFeasy 1.1.
Randomly, some of them go offline and don't connect again until I plug them off.
I had the same issue also on the former version of the firmware.
I don't have any wifi issue (several Ubiquiti AP always running on UPS).

Plug sometimes immediately switches back to previous state

First of all: Thank you for your amazing work! It's great to have this kind of device to be controllable by home assistant!

Unfortunately I'm experiencing a strange problem

When I control the plug by MQTT or HTTP sometimes it switches immediately back to its previous state. For example:
If I send a 1 and the current state is 0 then it switches to 1 and immediately back to 0. And vice versa.
Strange enough this only happens sometimes.
I learned from some other issue on here that I can see the last trigger of status change on the /status page. So I did and when this problem occurs it reads the following:
Relay: Open(Off), last changed by: SWITCH, publish: 1, action: 2
So it seems to me that the plug magically overrides the input sometimes.

Any ideas on this one?

But thanks anyway for your project, I really like it! :)

Thank you in advance.

no function after 1.1 update and restart

After I updated to 1.1 my power switch kind of worked. It needed to be reconfigured but no problem. So I changed the gpio pin mapping, mqtt and switched the AP to client mode. Now after the restart my device wouldn’t connect to my wifi and stays unresponsible. I can’t trigger the switch with the button and resetting therefor does not work as well. Is there something I can do to maybe get it back in reconfig mode?

How to control dim value on Wall Dimmer (AW51011D) - HF-LPB100

Hello, First of all, many thanks for your involvement and development,

I am trying to update AW51011D and it seems to have no impact. I tried to upload HFEASY0v7_DIMMER_UPGRADE.bin and after upgrade goes through it present same web page again as if nothing changes. I also tried ORIGINAL_FW_DIMMER_1_5115.BIN.bin and it again had no effect on it.

Screen Shot 2020-04-06 at 8 51 38 PM
Screen Shot 2020-04-06 at 8 51 20 PM

Can't upgrade to v 1.1

I can't for the life of me get the upgrade to version 1.1.

I have hard reset the plug, restarted, tried to upload the serial_upgrade more than 20 times. It's says "success", but then i got back to the main page, and it is still version 1.0.

How in the world can i upgrade.

Mqtt Client formating

Thanks for your hard work first of all.

This may be more of I'm confused topic but here it goes.

I'm trying to make sense of how hfeasy handles MQTT. Using MQTT explorer I see the topic it creates but it's just a single value and I can't adjust the brightness via MQTT It's either on or off. Im fimular with how tasmota handles MQTT and its fairly easy to configure. but hfeasy it not laid out anything like I would expect and the messages it publishes are super simple. Is there any way to add auto-discovery a full topic entry. I have attached a screen shot of what i mean. http://image.xvxagaming.com/images/2020/04/15/mqtas.png

Orvibo S20 WiWo-S20-E2 suport

Hi Luís thank you for all your work on this project.

I have Fashed though UART//Seral and Orvibo S20 WiWo-S20-E2 with the original HF software since this module is based on a HF-LPB100.
Was able to configure the WF-Fi connectivity though the Http interface and connect it to my network. as was even able to install your firmware and i can see the configure and control pages. but when I send the command to change the sate or press it does not activate the relay. Also the led (blue/red) do not work (ever with the HF software) and the physical button on the plug resets the device and disconnectes it from the network.

I believe the relay, button and Leds on the Orvibo S20 might be connected to different GPIO pins on the HF-LPB100 when comparing to Ankuoo models. If you can tell me the GPIO used by your firmware I trace the lines on the S20 and find the differences.

In alternative maybe I'm missing some part of the S20 software to control the relay / led / button they have on-board.

any suggestion how to make Orvibo S20 work with HFeasy?

Ankuoo NEO keep rebooting

I have upgraded to 1v1 just few days ago my Ankuoo NEO with HFEASY_WEB_UPGRADE.bin

Apart having lost all my configuration, the device keeps rebooting every hour so the light keep turing off. I don't know if I am missing something in the device configuration but I am not able to make it working properly.

My configuration is the following + MQTT (that works fine)
Screenshot 2022-10-16 at 20 37 18

Way to reconnect to apps

Thanks for your excellent work here!
Is there a way (with the new firmware) to reconnect the device with the Rec Switch/Ankuo app?
I don't have a HomeBridge device (and I can't either), in addition to the fact that my family already installed the application, and they can control the plug outside the home (via 4G, etc)
Personally I use the http request to control it more quickly, but it works only on Wifi (obviously, local ip, but works very fine and fast with iOS Shortcuts)
Thanks for your help, and excuse my English, I speak Spanish and it costs a little bit! Greetings from Chile!

How to get the state

Hi, thank you for your solution, it works great with the http, I'm new to coding and I'm still trying to understand how to work with mqtt (I have openhab 2.5.2 now so the documentation is not so much and not so clear)

Would it be possible to explain how to get the actual state of the relay on an .items file? I can see the state by accessing http://ip/state but I would like the item to be updated when the state changes.

Thank you

hfeasy on rec plug startup mode

I just installed hfeasy firmware on rec plug but it boots with state 0 disconnected mode.
Is there any way to make it boot with state 1, connected mode?

Also tried to restore to factory and now the app not work.
Any ideas?

HF-LPT100F bricked

Hi,
i have upload the HFEASY0v7_MODULE_UPGRADE.bin on my Anuoo rec.
After that, it worked, for some sec and after that it is offline. I have tried to "factory reset" it (6/10 turn off/on in 3sec) and it only turn on the light with a flash and nothing else.
I tried to remove the 220v, but no wifi segnal or acustic sound.
How can i repare it?
photo_2020-04-12_11-17-15

Timer switches it on/off even though I hve no timers set-up

Hello,

Thanks a lot for the work you've done!

I have a HF-LPB100 plug.
I've installed the latest 1v1 version on it.

I haven't connected it to anything, I've only been using it from the web interface.

I noticed that after some time (approx 1 hour or 1.5 hours believe) it switches itself to the status set in Device section of the configuration. I only tested with putting the Device config state to 1 until now.

I checked the status after this behavior:
image

As you can see, it says it was changed by timer, but this is my timer configuration:
image

My suspicion is that is somehow restarts and puts the status from Device config, but I will do some more tests to confirm this.
I can provide more info if needed.

Thanks again.

Homeassistant integration

I flashed my Lidl Silvercrest SWS A1 power plug with your firmware without problems and everything works very well. Thank you for this!

With the original firmware I used FHEM and the "magic" paket to UDP 8530 to control power on/off.

Now I want to integrate the plugin using Homeassistant. However the new device is of course not automatically recognized in the integrations.

If I understand it correctly I can only perform the switching now using http calls to
http://<ip:8080>/state?sw=1 and ?sw=0 ?

There is no option to send it MQTT message to toggle the switch state? The MQTT integration is only one way? Is it possible to retrofit the old way of sending the UDP packet as well or is there not enough room in the firmware for this?

HTTP Auth: Where do I set the actual password? I can only (de)activate but do not see where the username/password can be specified?

I see the original webpages are still served at port 80. Do I need to use those for this configuration, i.e. is the complete configuration done as a combination of the legacy configuration and your addons?

Thanks!

Cannot see iweb.html

With my device connected to my wifi (I am able to use the orvibo integration in homeassistant as well as the cli tools elsewhere), I do not see a webpage at ip/iweb.html. I think I'm missing something!

Can't connect to mosquitto mqtt broker

Hi!
I have a RaspberryPi (OS: dietpi) with homebridge and mosquitto: both seem to work fine.
My problem is that I cannot get my Ankuoo rec modules to connect to the mqtt server...
Here are my configuration files:

MODULE
Screenshot 2019-11-02 at 00 17 37

HOMEBRIDGE
Screenshot 2019-11-02 at 00 18 44

mqtt settings seem to work - If I subscribe another mqtt client to those topics, I correcly see homebridge sending messages.
Anyway, in the status page of the ankuoo module I always get "MQTT server: Disconnected".
Any ideas on what I'm missing?

Thank you in advance, and congratulations for your excellent work on this firmware.

Turns itself on automatically

Hay thanks for the great fw!

I have the problem that the switch seems to turn itself on sometime when its off. It's strange since it only turns the thing on but never off. I monitored a bit of traffic and I couldn't find anything suspicious that sends a ON signal...

CORS header

Any way to easily add this http header?
Access-Control-Allow-Origin: *

This would allow a simple pretty html page to be built using ajax to toggle relay.

Flashing HFEASY and going back to original firmware

Hi,
I've been playing a bit with HFEASY and generating a few binaries which correctly deployed to an LPT230.

The thing is that when I wanted to go back to the original image fw by HF, the upgrade module refuses to upgrade it.

Deploying a custom fw made by the official SDK results in the same.

Any firmware created with HFEASY installs no problem.

Any idea?

Bests,

E

How to flash?

Any guidance? I can get to the HF-LPB100 and its pins but otherwise it is unclear how to proceed. I have a PI and maybe USB UART adaptor lying around.

/config and /state sending "ERROR:404 Not Found"

Hi everyone,

So, I have two HF-LPB100 (Chacon). The upload page is showing (iweb.html) but not the rest. I used that last page to update HFEASY_WEB_UPGRADE and then HFEASY_SERIAL_UPGRADE. But the url context /config, /state and /timer, all return a "ERROR:404 Not Found" exception. Did I do something wrong?

Some more details:
image

MQTT publish

Hello,

First thanks a lot for the good work with this switch! What is the command topic to turn on or off the switch with mqtt?

Thanks a lot.

Dump Original Firmware LBP-100

Hello,

how can I save / dump the original Firmware of the LPB-100?
Maybe could the Maintainer contact me on [email protected] ! Help would be very much appreciated !

I would tip something for it for sure !

Greetings !

Retrieve device MQTT state after broker reboot

Hi,
I am not able to retrieve the state of the devices after the restart of the broker (Mosquitto running on Home Assistant).
Is there a specific command I can publish to force the devices publish their state? (Like it happens for Tasmota firmware).
I tried like this:
cmnd/Topic/POWER
with empty payload, but it doesn't work.
Thanks!

Add support for Ankuoo/Lumitek/Basetech sw6811*

I'd like to add support for this wifi multi socket (available on amazon.de and obi.de)
image

I've already flashed the latest firmware and can successfully access the hfeasy web interface.

I have a multimeter but very litte knowledge about electronics, thta's why I need some help to find out the pin mapping,

front
back

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.