smaho-engineering / esptouch_flutter

ESP-Touch Dart API for Flutter. Platform-specific implementation for Android (Java) and iOS (Objective-C).
https://pub.dev/packages/esptouch_flutter
MIT License
100 stars 34 forks source link

Can this package get converted to native dart #27

Closed guyluz11 closed 2 years ago

guyluz11 commented 2 years ago

I was wondering if this package or part of it can get converted to native dart and thus work on all platforms, and can get executed from server side as well?.

What part of this library require the flutter framework and what part of it only required native dart code.

max-koehler commented 2 years ago

Someone already ported it to dart but we haven't tested it and therefore can't recommend it.

The underlying native code is open source and published by Espressif itself.

Our focus is a setup of Devices by a Mobile-App. As we haven't had the requirement to support another platform, we also didn't see the need to rewrite the underlying code in dart.

If you would like to contribute by porting the underlying library please let us know.

At the moment there isn't any plan from our side to port it.

max-koehler commented 2 years ago

What are the other use cases you are looking for?

Regarding the server side question I can't follow. ESPTouch/Smartconfig is a Wi-Fi based protocol to provide new Wi-Fi clients in the network with a SSID/PSK to establish a connection.

indrablake commented 2 years ago

@max-koehler I usually connect using wifi with a password, smart config works perfectly, is it possible to connect to wifi without a password? i mean the wifi router didnt set using password

guyluz11 commented 2 years ago

What are the other use cases you are looking for?

Regarding the server side question I can't follow. ESPTouch/Smartconfig is a Wi-Fi based protocol to provide new Wi-Fi clients in the network with a SSID/PSK to establish a connection.

I am creating smart Hub and wanted to use this package to connect ESPTouch/Smartconfig devices to the WiFi directly from the Hub.

max-koehler commented 2 years ago

@indrablake you should be able to send an empty password. Didn't that work in your case? @guyluz11 and I assume the smart hub is running on some embedded hardware? Would you be interested in contributing a port to native dart?

guyluz11 commented 2 years ago

The hub runs on raspberry pi. Currently I have other priorities working on the Hub, will update here when I find a time.

I see that you have developed the package to android and iOS and here you are importing the native package to the selected platform. Will be interesting to take a look at the native implementation. I have more knowledge in android development (java). It will be nice if you can link the android package code here.

max-koehler commented 2 years ago

@guyluz11 those are directly from Espressif. You can take a look here and here, which are the example apps.

Out of curiosity, what are your plans for the hub?

guyluz11 commented 2 years ago

Thanks

Currently learning more about DHCP Discovery for better recognizing smart devices connected to the home network. Also slowly working on adding support for more features and sonoff devices support. And working on an app demo video to upload to youtube, will help more people understand what is the platform all about.

You are welcome to try CyBear Jinni out or join the discord server.

I have created CyBear Jinni to help the world and this is the first goal of it, I am doing that by creating an open-source smart home platform that will be plug and forget. Hoping to reach a level that will help the user be more productive without any effort on his part.

If you have open API for SMAHO maybe one day I will add support for it, or one of your users will add support for it as CyBear Jinni is open-source 😁.

vincevargadev commented 2 years ago

Hey @guyluz11. I don't think it's planned to convert this package to native Dart in the near future. Is that correct, @max-koehler? If it's not planned, should we close this issue for now?

There is another package that aimed to do that, esp_smartconfig. I didn't try it, so I'm not sure how it works, but based on the package's README, it should work on non-web platforms, so it should/could work on desktop mac, win and linux, and mobile (but mobile is covered by this package, too).

max-koehler commented 2 years ago

@vincevargadev can be closed then. We don't plan to port it at the moment.