Giter Club home page Giter Club logo

Comments (8)

Olli69 avatar Olli69 commented on June 22, 2024 2

Thanks @joe-ave for the info about Preferences.h ! After first look, it seems to be very promising, but replacing current Arduino-based storage functions requires some planning and testing.

I pushed the first version with Shelly Gen 1 support to devel branch (no binaries published yet). Requires still more testing but it seemed to work in the first tests with Shelly 3EM relay, which should have exactly the same (relay) API with Shelly Plug(S). Now there are 4 channel (switch) types defined:

  1. Undefined
  2. GPIO (fix gpio number from firmware, like in previous versions)
  3. GPIO, user defined - gpio relay, but gpio number can be defined in the user interface (new type)
  4. Shelly Gen 1 - Shelly 1 generation API relay (new type)

Edit 24.9.8.2022:
The new development version firmware is now published on the installation page.

from arska-node.

joe-ave avatar joe-ave commented on June 22, 2024 1

I think the eeprom of the esp32 is just emulated and actualy stored in the flash, probably because Arduino specific code should work more easily without the need of rewriting it so much.
Preferences.h for the esp32 could maybe be a better alternative, looks like it books 20kb of the flash size by default.

from arska-node.

joe-ave avatar joe-ave commented on June 22, 2024 1

Great!, I´ll try to poke in Tasmota to a Nedis plugg ( localy avaliable ) this weekend and try it out.

from arska-node.

Olli69 avatar Olli69 commented on June 22, 2024 1

Version 0.92.latest (on the installation page) has initial support for Shelly Gen 1 and Gen 2 relays as well as Tasmota relays. We have tested them with a very limited number of devices, so please (re)open the issue if any problems or issues. See the release notes.

from arska-node.

Olli69 avatar Olli69 commented on June 22, 2024

Thanks for the request. That is a really good point!

It seems that e.g. Shelly Plug can handle 16A, which is enough for smaller scale heaters and possibly chargers. Maybe first to test with could be Shelly generation 1 devices, covering Shelly Plug/Shelly Plug S . The same API specs are also used in Shelly 3EM relay, which is supported already by Arska .

Calling a HTTP get for relay switching is basically simple but we must plan also how to keep the UI and system simple and flexible - to add possibly additional relay types. The first 3 digits (e.g. 192.168.0) of the relay IP address could be taken from wifi address/subnet and only the last digit would be defined in channel definitions - so you would set channel type (e.g. Shelly Gen 1) and IP address (e.g. 77).

We will keep the list of supported switch types short, to keep the system simple. I ordered Shelly Plug for tests and will look at this in more detail.

from arska-node.

joe-ave avatar joe-ave commented on June 22, 2024

Thank you for your effort!

Maybe the channel type should just be defined as ”Smart plug 1, 2...” and then the actual string to send for turning on and off should have an inputfield in the setup page?, then it would be more generic and could probably work with other brands and software like Tasmota for instance.
And then you don’t need to create new channel types every time a new HTTP-get equipment pops up.

from arska-node.

Olli69 avatar Olli69 commented on June 22, 2024

Thanks for your comment, much ideas appreciated!

That would be flexible (was also in my mind at some point) but on the other side possibly a long url in the settings requires more non-volatile memory. The configuration is stored in EEPROM memory of ESP32, which has 4kb limit (at least in a typical setup ESP32?). We are not yet very close to that limit (even with 8 channels), but that is one reason I'm (over) cautious about adding new strings to settings. It is hard to know how much you have to reserve space for URLs of future devices and space reservation is required for all channels .

If the channel type functionality is now rewritten, it is easier to add additional types later (needs a firmware upgrade though), maybe also Modbus relays and GPIO relays with editable GPIO numbers. But that flexible URL channel type could still be a future option if the memory consumption can be handled.

from arska-node.

Olli69 avatar Olli69 commented on June 22, 2024

The new devel branch version on the installation page has initial support for Shelly (gen1 & gen2) relays and Tasmota relays.

from arska-node.

Related Issues (20)

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.