Smart Power 2 firmware with wifi client

Post Reply
palich2000
Posts: 18
Joined: Tue Jan 03, 2017 10:30 pm
languages_spoken: ukrainian, english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Smart Power 2 firmware with wifi client

Unread post by palich2000 » Fri Oct 20, 2017 6:03 am

Hello
After a little bit of distraction, I made a firmware version which can be both a client there and a WiFi server.
The algorithm is such that if at the moment of starting SmartPower2 the network with the same name as specified in the settings is found and the password is approached then the client wifi mode is started. If no SSID is found while searching, the AP mode is started. If the SSID was found but could not connect, then the AP mode is started, but the SSID is changed, ESP.getChipId () is added to it in hexadecimal.
Attachments
smartpower2.tar.gz
(121.22 KiB) Downloaded 144 times

lsc1117
Posts: 121
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Smart Power 2 firmware with wifi client

Unread post by lsc1117 » Fri Nov 24, 2017 2:23 pm

Hello palich2000,

I have uploaded your firmware to my SmartPower2.
But, the webserver didn't work.

I checked my network using the ping and it works well.
I don't know why the webpage doesn't show up.

Thank you.

palich2000
Posts: 18
Joined: Tue Jan 03, 2017 10:30 pm
languages_spoken: ukrainian, english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Smart Power 2 firmware with wifi client

Unread post by palich2000 » Fri Nov 24, 2017 3:47 pm

Hello.
There is not enough information to help you.
Did you connect to SmartPower as an access point or connect it to your wireless network?

lsc1117
Posts: 121
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Smart Power 2 firmware with wifi client

Unread post by lsc1117 » Mon Nov 27, 2017 10:11 am

Hi,
I connected the SmartPower to my AP.
Then, I tried to see the web page of SmartPower.

Thank you.

palich2000
Posts: 18
Joined: Tue Jan 03, 2017 10:30 pm
languages_spoken: ukrainian, english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Smart Power 2 firmware with wifi client

Unread post by palich2000 » Mon Nov 27, 2017 9:26 pm

Hi
This should help.

sudo platformio run -t uploadfs

lsc1117
Posts: 121
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Smart Power 2 firmware with wifi client

Unread post by lsc1117 » Tue Nov 28, 2017 3:06 pm

Hi,

I executed the instruction normally.
The SmartPower2 works well as AP.
And also The STA mode works well with another AP.
I can show the web page using my phone when I connect directly to SmartPower of AP mode.
So, I tried to access the web page via another AP When the Smartpower connects to the another AP as STA mode.
But, I can't access the web page.
I don't understand why I can't access.

Thank you.

palich2000
Posts: 18
Joined: Tue Jan 03, 2017 10:30 pm
languages_spoken: ukrainian, english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Smart Power 2 firmware with wifi client

Unread post by palich2000 » Wed Nov 29, 2017 5:04 pm

Hi
The Web interface is built using websockets.
The websockets respond at port 81 and the web site at port 80.
Both these ports must be available for the correct operation. If you use nat, you need to use dnat for 80 and 81 ports on the router.

WBR Palich.

palich2000
Posts: 18
Joined: Tue Jan 03, 2017 10:30 pm
languages_spoken: ukrainian, english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Smart Power 2 firmware with wifi client

Unread post by palich2000 » Wed Nov 29, 2017 5:51 pm

Hi

I forked the repository, and it shows what and where I changed in the project.

https://github.com/palich2000/smartpower2

WBR Palich

Raymond Day
Posts: 500
Joined: Tue Jun 04, 2013 8:18 pm
languages_spoken: english
ODROIDs: Odroid-U2, XU4, C1+,
Location: Belleville MI
Has thanked: 0
Been thanked: 0
Contact:

Re: Smart Power 2 firmware with wifi client

Unread post by Raymond Day » Mon Feb 12, 2018 9:06 pm

You say "client" But is there a Server F/W for it?

It be nice if could connect it to your WiFi and not just a cell phone. That way could get it's data on your LAN not just the cell phone.

I see you said "can be both a client there and a WiFi server"

OK how to I get this firmware to the smartpower2?

I installed it on my Ubuntu and plug in the micro USB to Ubuntu and it sees it with a lsusb can tell.

You smartpower2.tar.gz has in it:

Folder:
Data
Src

File:
platformio.ini

So do you copy them over to the smartpower2-master and just over wright them folders and file it has of them?

Then run the commands?

cd smartpower2
platformio run
platformio run --target upload
platformio run --target uploadfs

I been doing that and the only time I don't get red coler errors if I leave the smartpower2-master the way it was. But I guess that just does the same firmware it came with.

Not sure if I am doing this firmware change right. Or how I do it.

-Raymond Day

User avatar
rooted
Posts: 6515
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 37 times
Been thanked: 13 times
Contact:

Re: Smart Power 2 firmware with wifi client

Unread post by rooted » Mon Feb 12, 2018 9:32 pm

That's what client is, it connects to your wifi as a client and makes itself available to the network.

palich2000
Posts: 18
Joined: Tue Jan 03, 2017 10:30 pm
languages_spoken: ukrainian, english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Smart Power 2 firmware with wifi client

Unread post by palich2000 » Mon Feb 12, 2018 9:37 pm

If you specify the name of the access point that you do not have in the visibility zone, it will become an access point with this name and the password that you specify.

joerg
Posts: 882
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2
Location: Germany
Has thanked: 4 times
Been thanked: 11 times
Contact:

Re: Smart Power 2 firmware with wifi client

Unread post by joerg » Mon Feb 12, 2018 9:40 pm

Pls see here, I wrote already that it is working with this changes and updated today also how.
viewtopic.php?f=86&t=29990#p214537

Raymond Day
Posts: 500
Joined: Tue Jun 04, 2013 8:18 pm
languages_spoken: english
ODROIDs: Odroid-U2, XU4, C1+,
Location: Belleville MI
Has thanked: 0
Been thanked: 0
Contact:

Re: Smart Power 2 firmware with wifi client

Unread post by Raymond Day » Mon Feb 12, 2018 9:53 pm

It looks like it never sends the firmware to my SmartPower2.

I did a video of my screen of me doing commands just of the default smartpower and can see if still gets errors from this screen capture video I uploaded to my Google account.

https://photos.app.goo.gl/AOYkAfA8N6lSzmC43

Can some one tell me what I am doing wrong?

-Raymond Day

Raymond Day
Posts: 500
Joined: Tue Jun 04, 2013 8:18 pm
languages_spoken: english
ODROIDs: Odroid-U2, XU4, C1+,
Location: Belleville MI
Has thanked: 0
Been thanked: 0
Contact:

Re: Smart Power 2 firmware with wifi client

Unread post by Raymond Day » Wed Feb 14, 2018 12:47 am

I got it working.

Now it says "F/W Version 1.30"

But all else looks the same.

I thought there would be a way to have it scan WiFi and put in a password to connect to it with DHCP.

Is there a way to do this on the smartpower2 to just not connect to it's WiFi with a cellphone?

-Raymond Day

Raymond Day
Posts: 500
Joined: Tue Jun 04, 2013 8:18 pm
languages_spoken: english
ODROIDs: Odroid-U2, XU4, C1+,
Location: Belleville MI
Has thanked: 0
Been thanked: 0
Contact:

Re: Smart Power 2 firmware with wifi client

Unread post by Raymond Day » Wed Feb 14, 2018 1:05 am

Put my WiFi SSID in were it's name was and made a IP that is not being used on my LAN and put my Wifi PassWord in. Saved it and pulled the power and plug it back in.

The LCD shows the new settings but I can't connect to the IP I gave it. Not sure why. Could I be doing something wrong. Do I have to click the run hardware or something in that check box on the settings page?

Now is there a way to reset it to connect to it again? I guess upload the F/W again.

-Raymond Day

Raymond Day
Posts: 500
Joined: Tue Jun 04, 2013 8:18 pm
languages_spoken: english
ODROIDs: Odroid-U2, XU4, C1+,
Location: Belleville MI
Has thanked: 0
Been thanked: 0
Contact:

Re: Smart Power 2 firmware with wifi client

Unread post by Raymond Day » Thu Feb 15, 2018 4:01 pm

Don't know how you use that download here smartpower2.tar.gz it just don't have all the files you need and if you just replace the same files with the ones you get from the main... at lest I get errors. Just have to do a git or something to get all the files need so it will not error.
palich2000 wrote:Hello
After a little bit of distraction, I made a firmware version which can be both a client there and a WiFi server.
The algorithm is such that if at the moment of starting SmartPower2 the network with the same name as specified in the settings is found and the password is approached then the client wifi mode is started. If no SSID is found while searching, the AP mode is started. If the SSID was found but could not connect, then the AP mode is started, but the SSID is changed, ESP.getChipId () is added to it in hexadecimal.

palich2000
Posts: 18
Joined: Tue Jan 03, 2017 10:30 pm
languages_spoken: ukrainian, english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Smart Power 2 firmware with wifi client

Unread post by palich2000 » Thu Feb 15, 2018 4:04 pm


Raymond Day
Posts: 500
Joined: Tue Jun 04, 2013 8:18 pm
languages_spoken: english
ODROIDs: Odroid-U2, XU4, C1+,
Location: Belleville MI
Has thanked: 0
Been thanked: 0
Contact:

Re: Smart Power 2 firmware with wifi client

Unread post by Raymond Day » Thu Feb 15, 2018 4:13 pm

Right and thanks for posting the link. I got that github link and that's where I got it from. The one that works real good to get a IP over WiFi. Just had to put in the WiFi SSID name and it's password and save and unplug the power and back in and the LCD display will show it's new IP from your LAN.

My WiFi is Google Home WiFi the 1st gen ones were they are taller.

So the app on my cell phone can see the LAN computers.

It shows the Smart power 2 like this.
Screenshot_20180214-124542.jpg
Screenshot_20180214-124542.jpg (103.22 KiB) Viewed 1579 times
It be nice if it could display the max Volt's, Amp's, and Watt little letters right under the big red letters. I guess maybe just a edit of the html file not sure how you would add this but all most sure it can be done.

-Raymond Day

Post Reply

Return to “Smart Power”

Who is online

Users browsing this forum: No registered users and 1 guest