Community
OpenEnergyMonitor

OpenEnergyMonitor Community

Upgrades to WiFi Relay

Tags: #<Tag:0x00007f88cc291c40>

Hi guys,

I have some doubts regarding to the MQTT Wi-Fi relay. I will be as brief as possible:

  1. Firmware upgrade OTA failed. I had Firmware version 2949 working fine and the web uploader failed while burning the latest firmware. Now the LED is always ON (not blinking anymore) and the relay is not showing AP SSID. (resetting doesn’t work). I tried to use esptool but it doesn’t connect. I would like to get it back. ¿Any suggestions?
$ esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x1000 oem.v3361.bin 
WARNING: Flash size arguments in megabits like '16m-c1' are deprecated.
Please use the equivalent size '2MB-c1'.
Megabit arguments may be removed in a future release.
esptool.py v3.0
Serial port /dev/ttyUSB0
Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header
  1. Thermostat Settings has many inputs to select, but I understand that the only one that’s currently working is DS18B20 sensor #1, right? (“currently only DS18B20 sensor is implemented”). What about the other inputs? Are you going to add this features? DHT22 temperature, DHT22 humidity, ADC, MQTT, Serial input, Fixed value (10).

  2. NodeRED. I know that I control the relay through NodeRED. Is it through MQTT Settings? What is the difference with the input MQTT in the previous item?

  3. Licence CC BY-NC-SA 3.0. Can I resell the product? What if I want to help develop the project for commercial purposes? Let’s say a client wants an adaptation of the web interface so I had to use a custom firmware. Commercial restriction still applies? What can I do and not do?

Thank you.

I think this, particularly the licensing question, needs to be answered by @TrystanLea or @glyn.hudson

Sorry to miss your post @negrope, this is a question for @glyn.hudson I’ve sent him a message to ask him to take a look.

I’ve been using the EmonESP firmware with these units https://github.com/openenergymonitor/EmonEsp its licence is GPL V3, which allows commercial use.

Your unit must be an old unit, we have been shipping V3190 as default FW since 2017. Upgrading to V3190 via the web UI updater should work fine, this update process has been tested extensively for the past 3 years, we update all devices before shipping.

As mentioned in the documentation the correct esptool command is as follows. Your command seems to be missing the memory locations
esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x1000 oem_v3190.bin

Correct, I’m afraid only the physically connected DS180B20 can be used as a thermostat input. There are no plans to add other inputs. I would recommend sending an MQTT control signal to control the relay if you require mode advanced function.

You can control the relay via MQTT, NodRED is an easy way to send MQTT messages based on other inputs e.g external temperature, room occupancy, energy price etc.

I’m not sure where you have seen this licence, there is no licence mentioned on the WiFi Relay Gtihub Repo, this is because I’m afraid this Wifi relay is closed source hardware and firmware. The hardware schematic is available, and you can optionally load open-source firmware, just like a Sonoff plug. We would have no problem with you reselling the unit and or loading your own firmware. After you have purchased the hardware it’s yours to do as you wish .

Hello, sorry for the late response. I had notifications turned off.

Thank you all for your answers. Here’s the update:

  1. Firmware upgrade OTA successful. I bought some units back in 2016. I test 2 more units with OTA and it worked fine! The other unit is still “bricked”. Tried several times to revive it but I couldn’t. I tried your code @glyn.hudson but the output is the same (even with the 2MB-c1 or 16m-c1 options). Lets turn the page with this, it’s an exceptional case.

  2. Thermostat Settings. Are you maintaining or upgrading the relay HW in some way? What about the three phase relay?

  3. NodeRED. OK, I need some time to study and test. Let’s mark this as solved.

  4. Licence CC BY-NC-SA 3.0. I found this in Martin’s GitHub page. I really do not understand the licenses involved. My doubt is about what licence applies (legal implications) for making a “fork” of the Relay. For example, what if a need to add another relay to open both phases for sensitive loads? Or client’s specific cases that needs another sensor?

Hope you can guide me.