SmartPower2 alt firmware

Post Reply
ytrikoz
Posts: 14
Joined: Mon Jun 17, 2019 9:06 pm
languages_spoken: russian, english
ODROIDs: XU-4, CloudShell2, SmartPower2
Has thanked: 0
Been thanked: 0
Contact:

SmartPower2 alt firmware

Unread post by ytrikoz » Wed Jun 19, 2019 8:03 pm

Hi! I am finishing my home project - firmware for smartpower2, it is based on v1.5 with several new function sta mode, captiva, ndns, ssdp, ntp, logging to flash or rsyslog, and CLI for telnet, serial console and http connection.
For example, this is a serial console log with some of them executed:

Code: Select all

[lcd] + [boot] wait 4 3 2 1 
[spiffs] 571.12KB / 934.88KB [config] wifi:1, ssid:SmartPower2, passwd:12345678, dhcp:1, ipaddr:192.168.4.1, netmask:255.255.255.0, gateway:192.168.4.1, dns:192.168.4.1, voltage:5.0, pwrmode:0, login:, webpass: 
[ap] success [
[system] service +[web] +[telnet] +[captive] +[mdns] +[ntp] +[cli] 
[http] 192.168.4.1:80 
[telnet] 192.168.4.1:23 
[boot] 00:00:08 
[system] power off 
system uptime 
> 00:00:29 
system status
> loop: 48ms 9925/sec, heap: 39.70KB 0.33% 
config passwd 87654321 
> passwd changed 
show config passwd
> 87654321 
system restart
> restart in 5 4 3 2 1
At this moment, available commands are:
help
show [item]
system [command] [param]
config [param] [value]
To change configuration, do some system stuff, save config to flash, restart, power on, off, etc.
If you interested and want some features for yours smartpower2, you are welcome to share your request in this topic. Or you could flash yours smartpower2 with this firmware for some beta testing.
Also needs help with english terms in UI.

PS sorry for broken english
Attachments
1.png
1.png (191.98 KiB) Viewed 1269 times
3.png
3.png (174.89 KiB) Viewed 1271 times
2.png
2.png (153.54 KiB) Viewed 1271 times

User avatar
odroid
Site Admin
Posts: 32130
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 119 times
Been thanked: 292 times
Contact:

Re: SmartPower2 alt firmware

Unread post by odroid » Wed Jun 19, 2019 8:54 pm

Great improvement.
It looks much better than our official firmware. :oops:

Can you please share the firmware binary and source code?
We are willing to test it from early next week.

ytrikoz
Posts: 14
Joined: Mon Jun 17, 2019 9:06 pm
languages_spoken: russian, english
ODROIDs: XU-4, CloudShell2, SmartPower2
Has thanked: 0
Been thanked: 0
Contact:

Re: SmartPower2 alt firmware

Unread post by ytrikoz » Wed Jun 19, 2019 11:43 pm

odroid wrote:
Wed Jun 19, 2019 8:54 pm
Great improvement.
It looks much better than our official firmware. :oops:
Can you please share the firmware binary and source code?
We are willing to test it from early next week.
Yes of course, but i needs some more time to make code public (don't want to blush :)). if you send me (PM) some github account, i could add it to private repo, if you don't mind.
platformio + vscode.

User avatar
odroid
Site Admin
Posts: 32130
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 119 times
Been thanked: 292 times
Contact:

Re: SmartPower2 alt firmware

Unread post by odroid » Thu Jun 20, 2019 12:31 pm

Thanks!
My colleague's github account : leeseungcheol
In fact, he was one of key developers who made the SmartPower2 hardware as well as software. ;)

ytrikoz
Posts: 14
Joined: Mon Jun 17, 2019 9:06 pm
languages_spoken: russian, english
ODROIDs: XU-4, CloudShell2, SmartPower2
Has thanked: 0
Been thanked: 0
Contact:

Re: SmartPower2 alt firmware

Unread post by ytrikoz » Thu Jun 20, 2019 8:18 pm

odroid wrote:
Thu Jun 20, 2019 12:31 pm
Thanks!
My colleague's github account : leeseungcheol
In fact, he was one of key developers who made the SmartPower2 hardware as well as software. ;)
just added his account to https://github.com/ytrikoz/smartpower2

lsc1117
Posts: 156
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 2 times
Contact:

Re: SmartPower2 alt firmware

Unread post by lsc1117 » Mon Jun 24, 2019 10:36 am

Hi,
The smartpower2 you upgraded is awesome!
Improved UI and useful features!

I've added an issue to your smartpower2 repository.
I think there is no "consts.h" file in my environment.
Please check the issue.
https://github.com/ytrikoz/smartpower2/issues/1

Thank you.

ytrikoz
Posts: 14
Joined: Mon Jun 17, 2019 9:06 pm
languages_spoken: russian, english
ODROIDs: XU-4, CloudShell2, SmartPower2
Has thanked: 0
Been thanked: 0
Contact:

Re: SmartPower2 alt firmware

Unread post by ytrikoz » Sat Jun 29, 2019 4:54 am

If you are ready for alpha testing, you can try https://github.com/ytrikoz/smartpower2/tree/develop (develop branch is active) or upload prebuilt binaries https://github.com/ytrikoz/smartpower2/releases. Issues are welcome.

lsc1117
Posts: 156
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 2 times
Contact:

Re: SmartPower2 alt firmware

Unread post by lsc1117 » Fri Jul 26, 2019 10:01 am

Sorry, too late reply.

When I compile your smartpower2, I got the including errors.
Can you check this?
build_error.txt
(4.08 KiB) Downloaded 13 times
I tried to solve the error by renaming files but the other error occurred.

Thank you.

ytrikoz
Posts: 14
Joined: Mon Jun 17, 2019 9:06 pm
languages_spoken: russian, english
ODROIDs: XU-4, CloudShell2, SmartPower2
Has thanked: 0
Been thanked: 0
Contact:

Re: SmartPower2 alt firmware

Unread post by ytrikoz » Sat Jul 27, 2019 6:59 am

lsc1117 wrote:
Fri Jul 26, 2019 10:01 am
I tried to solve the error by renaming files but the other error occurred.
last prebuilt and sources, now there
https://github.com/ytrikoz/smartpower2/ ... /tag/0.6.2
if some one, needs some feature and can resist some bugs, as i said before, you are welcome - just write whats you need :)

Code: Select all

> Executing task in folder smartpower2: C:\Users\ytrikoz\.platformio\penv\Scripts\platformio.exe run <

Processing smartkernel2 (platform: espressif8266; framework: arduino; board: nodemcuv2)
--------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html
PLATFORM: Espressif 8266 2.2.2 > NodeMCU 1.0 (ESP-12E Module)
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES: toolchain-xtensa 2.40802.190218 (4.8.2), tool-esptool 1.413.0 (4.13), tool-esptoolpy 1.20600.0 (2.6.0), framework-arduinoespressif8266 2.20502.0 (2.5.2)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Looking for Simpletimer, library in registry
Found: https://platformio.org/lib/show/419/SimpleTimer
LibraryManager: Installing id=419
SimpleTimer @ b30890b8f7 is already installed
Looking for WebSockets, library in registry
Found: https://platformio.org/lib/show/549/WebSockets
LibraryManager: Installing id=549
WebSockets @ 2.2.0 is already installed
Looking for ArduinoJson, library in registry
Found: https://platformio.org/lib/show/64/ArduinoJson
LibraryManager: Installing id=64
ArduinoJson @ 6.11.3 is already installed
Found 36 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <LiquidCrystal_I2C>
|   |-- <Wire> 1.0
|-- <SimpleCLI> 1.0.3
|-- <ESP8266WebServer> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <ArduinoOTA> 1.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266mDNS> 1.2
|   |   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <ESP8266SSDP> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
|-- <Wire> 1.0
|-- <SimpleTimer>
|-- <ESP8266NetBIOS> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <mcp4652>
|   |-- <Wire> 1.0
|-- <ArduinoJson> 6.11.3
|-- <WebSockets> 2.2.0
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <Ethernet(esp8266)> 1.0.4
|   |   |-- <SPI> 1.0
|   |-- <SPI> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <mcurses>
Retrieving maximum program size .pio\build\smartkernel2\firmware.elf
Checking size .pio\build\smartkernel2\firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [====      ]  40.8% (used 33444 bytes from 81920 bytes)
PROGRAM: [====      ]  41.4% (used 432622 bytes from 1044464 bytes)
======================================================= [SUCCESS] Took 3.37 seconds =======================================================

Terminal will be reused by tasks, press any key to close it.

lsc1117
Posts: 156
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 2 times
Contact:

Re: SmartPower2 alt firmware

Unread post by lsc1117 » Wed Jul 31, 2019 4:59 pm

I have uploaded your firmware and spiffs.
And I need some example for AP or STA or AP+STA.
I think the default mode of SP2 is STA because I can't find my SP2's SSID.
How can I turn on AP mode?

Thank you.

ytrikoz
Posts: 14
Joined: Mon Jun 17, 2019 9:06 pm
languages_spoken: russian, english
ODROIDs: XU-4, CloudShell2, SmartPower2
Has thanked: 0
Been thanked: 0
Contact:

Re: SmartPower2 alt firmware

Unread post by ytrikoz » Thu Aug 01, 2019 1:00 am

Default mode is ap. I include prebuild hw binnaries (last sources at git) and erase, flash and first run logs. You should get same results or something strange happining.
https://github.com/ytrikoz/smartpower2/ ... o/prebuilt
esptool.py v2.6
Serial port COM15
Connecting....
Chip is ESP8266EX
Features: WiFi
MAC: 5c:cf:7f:1b:00:67
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 15.4s
Hard resetting via RTS pin...
...
Uploading .pio\build\smartkernel2\spiffs.bin
esptool.py v2.6
Serial port COM15
Connecting....
Chip is ESP8266EX
Features: WiFi
MAC: 5c:cf:7f:1b:00:67
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 1028096 bytes to 216395...
Wrote 1028096 bytes (216395 compressed) at 0x00300000 in 19.2 seconds (effective 428.0 kbit/s)...
Hash of data verified.
...
Linking .pio\build\smartkernel2\firmware.elf
Retrieving maximum program size .pio\build\smartkernel2\firmware.elf
Checking size .pio\build\smartkernel2\firmware.elf
Building .pio\build\smartkernel2\firmware.bin
Memory Usage -> http://bit.ly/pio-memory-usage
DATA: [==== ] 41.0% (used 33592 bytes from 81920 bytes)
PROGRAM: [==== ] 41.5% (used 433170 bytes from 1044464 bytes)
Creating BIN file ".pio\build\smartkernel2\firmware.bin" using ".pio\build\smartkernel2\firmware.elf"
Configuring upload protocol...
AVAILABLE: espota, esptool
CURRENT: upload_protocol = esptool
Looking for upload port...
Auto-detected: COM15
Uploading .pio\build\smartkernel2\firmware.bin
esptool.py v2.6
Serial port COM15
Connecting....
Chip is ESP8266EX
Features: WiFi
MAC: 5c:cf:7f:1b:00:67
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 437328 bytes to 304153...
Wrote 437328 bytes (304153 compressed) at 0x00000000 in 26.9 seconds (effective 130.2 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
==================================================================== [SUCCESS] Took 34.17 seconds ====================================================================
--- Miniterm on COM15 115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
rl␀l��|␀�l�|␂␌␌␌�␌l�␌b|��␂�␒�r�b�␌b��nn�lnn���␌b␜p��lrlrlp�n�␐␂␌␌�␌l␌��␌␌␌b␌n�|␂l�␌␌�b��nn�␀l��l`␂�␒␒nn␌l`␂␎␂nr���n␌␌b␌�␎l␎r��n␌␌b␌�␎l�␂�␂ll�␒�l`␂��n�␂
[wait] 3 2 1
[reset] reason: External System
[reset] info: Fatal exception:0 flag:6 (EXT_SYS_RST) epc1:0x00000000 epc2:0x00000000 epc3:0x00000000 excvaddr:0x00000000 depc:0x00000000
[lcd] ready
[clock] timezone 10800
[clock] backup interval 3600
[clock] restore failed
[clock] set 1564597338
[psu] output voltage 5.00
[psu] power is off
#######################################
SmartPower2 v0.6.3(Jul 31 2019)
#######################################
[wifi] network up
[telnet] port 23 success
[update] smartpower2:8266
[http] /www <- 192.168.4.1:80(81)
[dns] * -> 192.168.4.1:53
[mdns] ready
[netbios] ready

lsc1117
Posts: 156
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 2 times
Contact:

Re: SmartPower2 alt firmware

Unread post by lsc1117 » Fri Aug 02, 2019 3:01 pm

Thank you for the logs.

I have uploaded your latest firmware and spiffs.
I got the same serial logs as you.
log_sp2.png
log_sp2.png (51.81 KiB) Viewed 933 times
After connecting my Smartpower2 via WiFi, when I access the SmartPower2 via a web browser, I got the "File not found" error.
pic_ps2.png
pic_ps2.png (22.62 KiB) Viewed 933 times

ytrikoz
Posts: 14
Joined: Mon Jun 17, 2019 9:06 pm
languages_spoken: russian, english
ODROIDs: XU-4, CloudShell2, SmartPower2
Has thanked: 0
Been thanked: 0
Contact:

Re: SmartPower2 alt firmware

Unread post by ytrikoz » Sat Aug 03, 2019 4:04 am

lsc1117 wrote:
Fri Aug 02, 2019 3:01 pm
Thank you for the logs.
After connecting my Smartpower2 via WiFi, when I access the SmartPower2 via a web browser, I got the "File not found" error.
Just tried this scenario , everything seems to be correct.
Once more try, please, with 0.6.4? Also in last commit i include firmware064_debug.bin ( was builded with uncommented defines DEBUG_WIRELESS DEBUG_NTP DEBUG_TELNET DEBUG_WEBSOCKET in debug.h - to make log more verbose).
With debug build i get this output.
PS Thank you for your time.

Code: Select all

[wait] 3 2 1
[reset] reason: External System
[reset] info: Fatal exception:0 flag:6 (EXT_SYS_RST) epc1:0x00000000 epc2:0x00000000 epc3:0x00000000 excvaddr:0x00000000 depc:0x00000000
[lcd] ready
[clock] system time 20:12:24
[psu] output voltage 5.00
[psu] power is off
#######################################
    SmartPower2 v0.6.4(Aug  2 2019)
#######################################
[wifi] mode 2 tpw 82 hostname smartpower2
[wifi] ap ssid SmartPower2 ipaddr 192.168.4.1 success
[wifi] network up
[telnet] port 23 success
[update] smartpower2:8266
[http] /www <- 192.168.4.1:80(81)
[dns] * -> 192.168.4.1:53
[mdns] ready
[netbios] ready
[http] /www/index.html text/html 10.98KB
[http] #0 connected
[http] #0 unhandled 10
[http] #0 <- p1
[http] #0 -> o1
[http] #0 -> m0

lsc1117
Posts: 156
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 2 times
Contact:

Re: SmartPower2 alt firmware

Unread post by lsc1117 » Fri Aug 09, 2019 2:34 pm

Thank you for the debug firmware.
It works well. And how can I use the "AP+STA" mode?
I changed the wifi mode from AP to "AP + STA" in "Options" tab.
And I inputted the SSID and the password of my AP then, there is no other button about wifi. So I restarted my SP2. After that, I can't access my SP2 via the web page.
I think the other function is okay. But I don't know how to use the "AP+STA" mode.

And I create a PR on your repository. Please review it.
Thank you.

ytrikoz
Posts: 14
Joined: Mon Jun 17, 2019 9:06 pm
languages_spoken: russian, english
ODROIDs: XU-4, CloudShell2, SmartPower2
Has thanked: 0
Been thanked: 0
Contact:

Re: SmartPower2 alt firmware

Unread post by ytrikoz » Sat Aug 17, 2019 4:29 am

lsc1117 wrote:
Fri Aug 09, 2019 2:34 pm
And I create a PR on your repository. Please review it.
Thank you.
Thanks for RP, all files renamed with first capitals (except main.cpp), can you try to build last sources on linux platform for check?
In 0.6.5 (prebuilt available) you got power log and displaying graph-plot on lcd. Also can regulate ina231 averaging.
New shell commands power status, power log , power avg, plot.
AP+STA - will work in 0.6.6 (i hope), i'll write some tips how to setup this mode.

lsc1117
Posts: 156
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 2 times
Contact:

Re: SmartPower2 alt firmware

Unread post by lsc1117 » Mon Aug 19, 2019 12:22 pm

I have got the errors about "platformio.ini".
It occurred because of the following commit.
https://github.com/ytrikoz/smartpower2/ ... 6561c993b4

And still, the filename and the Included name do not match.
For example, the file name is "NTPClient.h" but including name is "NtpClient.h" in the "src/NTPClient.cpp".
A lot of files are like that...

And I hope that your commits merge to the hardkernel repository.
Many people will need those functions, logs, plots, AP+STA and etc.

Thanks.

ytrikoz
Posts: 14
Joined: Mon Jun 17, 2019 9:06 pm
languages_spoken: russian, english
ODROIDs: XU-4, CloudShell2, SmartPower2
Has thanked: 0
Been thanked: 0
Contact:

Re: SmartPower2 alt firmware

Unread post by ytrikoz » Mon Aug 19, 2019 8:29 pm

lsc1117 wrote:
Mon Aug 19, 2019 12:22 pm
I have got the errors about "platformio.ini".
https://github.com/ytrikoz/smartpower2/ ... 6561c993b4
What the error you got? I include build log for last commit (https://github.com/ytrikoz/smartpower2/ ... e467c0890b)/
This changes include stage and stable build options for trying use last arduino sdk wich more stable (even stage version). https://github.com/platformio/platform-espressif8266
Did you try to "clean" before building? Also i change one dependency (lcd library). The new one, much faster, 55ms vs 36ms on full screen redraw, when http transferring files on page loading it's substantially.
lsc1117 wrote:
Mon Aug 19, 2019 12:22 pm
And still, the filename and the Included name do not match.
I can "freeze" creating and renaming files for your new PR (if you don't mind, could you?), and apply it (last was "too late", i did too much refactoring at that moment and i could't merge it). The Windows environment is case insensitive :(
Waiting for your answer.
Thanks!

PS In near future my commits will be more focused, it's new lang, ide, sdk for me and i trying different styles and code patterns, so many modules got changes and renaming. But the structure of the projects is almost stabilized.

Code: Select all

> Executing task in folder smartpower2: platformio.exe run <

Processing stable (platform: espressif8266; board: nodemcuv2; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html
PLATFORM: Espressif 8266 2.2.2 > NodeMCU 1.0 (ESP-12E Module)
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES: toolchain-xtensa 2.40802.190218 (4.8.2), tool-esptool 1.413.0 (4.13), tool-esptoolpy 1.20600.0 (2.6.0), framework-arduinoespressif8266 2.20502.0 (2.5.2)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 34 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <SimpleTimer>
|-- <WebSockets> 2.2.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <SPI> 1.0
|   |-- <Hash> 1.0
|   |-- <Ethernet(esp8266)> 1.0.4
|   |   |-- <SPI> 1.0
|-- <LiquidCrystal> 1.5.0
|   |-- <Wire> 1.0
|-- <ArduinoJson> 6.11.4
|-- <SimpleCLI> 1.0.4
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266SSDP> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <ESP8266WebServer> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <Wire> 1.0
|-- <ESP8266NetBIOS> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <ArduinoOTA> 1.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266mDNS> 1.2
|   |   |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
|-- <mcurses>
Retrieving maximum program size .pio\build\stable\firmware.elf
Checking size .pio\build\stable\firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [====      ]  41.7% (used 34152 bytes from 81920 bytes)
PROGRAM: [====      ]  42.5% (used 443572 bytes from 1044464 bytes)
==================================================================== [SUCCESS] Took 3.42 seconds ====================================================================

Processing stage (platform: https://github.com/platformio/platform-espressif8266.git#feature/stage; board: nodemcuv2; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html
PLATFORM: Espressif 8266 (Stage) 2.3.0-alpha.1 #c2bae9e > NodeMCU 1.0 (ESP-12E Module)
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES: toolchain-xtensa 2.40802.190218 (4.8.2), tool-esptool 1.413.0 (4.13), tool-esptoolpy 1.20600.0 (2.6.0), framework-arduinoespressif8266 6dd8474
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 35 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <SimpleTimer>
|-- <WebSockets> 2.2.0
|   |-- <SPI> 1.0
|   |-- <Ethernet(esp8266)> 1.0.4
|   |   |-- <SPI> 1.0
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <LiquidCrystal> 1.5.0
|   |-- <Wire> 1.0
|-- <ArduinoJson> 6.11.4
|-- <SimpleCLI> 1.0.4
|-- <ESP8266NetBIOS> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WebServer> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <ArduinoOTA> 1.0
|   |-- <ESP8266mDNS> 1.2
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266SSDP> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <Wire> 1.0
|-- <mcurses>
Retrieving maximum program size .pio\build\stage\firmware.elf
Checking size .pio\build\stage\firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [====      ]  42.1% (used 34492 bytes from 81920 bytes)
PROGRAM: [====      ]  43.1% (used 450268 bytes from 1044464 bytes)
==================================================================== [SUCCESS] Took 3.48 seconds ====================================================================

Environment    Status    Time
-------------  --------  ---------
stable         SUCCESS   3 seconds
stage          SUCCESS   3 seconds
===================================================================== 2 succeeded in 7 seconds =====================================================================

ytrikoz
Posts: 14
Joined: Mon Jun 17, 2019 9:06 pm
languages_spoken: russian, english
ODROIDs: XU-4, CloudShell2, SmartPower2
Has thanked: 0
Been thanked: 0
Contact:

Re: SmartPower2 alt firmware

Unread post by ytrikoz » Wed Aug 21, 2019 8:27 am

Wifi "ap sta" mode now works, see release notes. After enabling it, you can connect to the device from both networks.
Prebuilt firmware included.
https://github.com/ytrikoz/smartpower2/ ... /tag/0.6.6

lsc1117
Posts: 156
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 2 times
Contact:

Re: SmartPower2 alt firmware

Unread post by lsc1117 » Fri Aug 23, 2019 5:56 pm

I attached a log when I build your source code v0.6.6.
Please review this log.

Code: Select all

Processing stable (platform: espressif8266; board: nodemcuv2; framework: arduino)
-----------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html
PLATFORM: Espressif 8266 > NodeMCU 1.0 (ESP-12E Module)
HARDWARE: ESP8266 80MHz 80KB RAM (4MB Flash)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 29 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ESP8266WiFi> 1.0
|-- <ArduinoOTA> 1.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266mDNS> 1.2
|   |   |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WebServer> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266SSDP> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266NetBIOS> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <mcurses>
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <Wire> 1.0
Compiling .pioenvs/stable/src/ConfigHelper.cpp.o
Compiling .pioenvs/stable/src/Display.cpp.o
In file included from src/ConfigHelper.cpp:1:0:
include/ConfigHelper.h:3:25: fatal error: ArduinoJson.h: No such file or directory

*********************************************************************
* Looking for ArduinoJson.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:ArduinoJson.h"
* Web  > https://platformio.org/lib/search?query=header:ArduinoJson.h
*
*********************************************************************

#include <ArduinoJson.h>
^
compilation terminated.
Compiling .pioenvs/stable/src/NTPClient.cpp.o
src/NTPClient.cpp:1:23: fatal error: NtpClient.h: No such file or directory

*******************************************************************
* Looking for NtpClient.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:NtpClient.h"
* Web  > https://platformio.org/lib/search?query=header:NtpClient.h
*
*******************************************************************

#include "NtpClient.h"
^
compilation terminated.
Compiling .pioenvs/stable/src/NetworkService.cpp.o
In file included from src/Display.cpp:1:0:
include/Display.h:5:17: fatal error: LCD.h: No such file or directory

*************************************************************
* Looking for LCD.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:LCD.h"
* Web  > https://platformio.org/lib/search?query=header:LCD.h
*
*************************************************************

#include <LCD.h>
^
compilation terminated.
Compiling .pioenvs/stable/src/PSU.cpp.o
src/PSU.cpp:1:17: fatal error: Psu.h: No such file or directory

*************************************************************
* Looking for Psu.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Psu.h"
* Web  > https://platformio.org/lib/search?query=header:Psu.h
*
*************************************************************

#include "Psu.h"
^
compilation terminated.
Compiling .pioenvs/stable/src/PsuLogger.cpp.o
In file included from src/PsuLogger.cpp:1:0:
include/PsuLogger.h:3:17: fatal error: Psu.h: No such file or directory

*************************************************************
* Looking for Psu.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Psu.h"
* Web  > https://platformio.org/lib/search?query=header:Psu.h
*
*************************************************************

#include "Psu.h"
^
compilation terminated.
Compiling .pioenvs/stable/src/Shell.cpp.o
*** [.pioenvs/stable/src/ConfigHelper.cpp.o] Error 1
*** [.pioenvs/stable/src/NTPClient.cpp.o] Error 1
Compiling .pioenvs/stable/src/StrUtils.cpp.o
*** [.pioenvs/stable/src/Display.cpp.o] Error 1
*** [.pioenvs/stable/src/PSU.cpp.o] Error 1
*** [.pioenvs/stable/src/PsuLogger.cpp.o] Error 1
In file included from src/Shell.cpp:1:0:
include/Shell.h:3:23: fatal error: SimpleCLI.h: No such file or directory

*******************************************************************
* Looking for SimpleCLI.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:SimpleCLI.h"
* Web  > https://platformio.org/lib/search?query=header:SimpleCLI.h
*
*******************************************************************

#include <SimpleCLI.h>
^
compilation terminated.
*** [.pioenvs/stable/src/Shell.cpp.o] Error 1
In file included from src/NetworkService.cpp:1:0:
include/NetworkService.h:11:22: fatal error: Wireless.h: No such file or directory

******************************************************************
* Looking for Wireless.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Wireless.h"
* Web  > https://platformio.org/lib/search?query=header:Wireless.h
*
******************************************************************

#include "Wireless.h"
^
compilation terminated.
*** [.pioenvs/stable/src/NetworkService.cpp.o] Error 1
===================================== [ERROR] Took 0.90 seconds =====================================

Processing stage (platform: https://github.com/platformio/platform-espressif8266.git#feature/stage; board: nodemcuv2; framework: arduino)
-----------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html
PLATFORM: Espressif 8266 (Stage) > NodeMCU 1.0 (ESP-12E Module)
HARDWARE: ESP8266 80MHz 80KB RAM (4MB Flash)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 30 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ESP8266NetBIOS> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <Wire> 1.0
|-- <ArduinoOTA> 1.0
|   |-- <ESP8266mDNS> 1.2
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WebServer> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266SSDP> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <mcurses>
Compiling .pioenvs/stage/src/ConfigHelper.cpp.o
Compiling .pioenvs/stage/src/Display.cpp.o
In file included from src/ConfigHelper.cpp:1:0:
include/ConfigHelper.h:3:25: fatal error: ArduinoJson.h: No such file or directory

*********************************************************************
* Looking for ArduinoJson.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:ArduinoJson.h"
* Web  > https://platformio.org/lib/search?query=header:ArduinoJson.h
*
*********************************************************************

#include <ArduinoJson.h>
^
compilation terminated.
Compiling .pioenvs/stage/src/NTPClient.cpp.o
src/NTPClient.cpp:1:23: fatal error: NtpClient.h: No such file or directory

*******************************************************************
* Looking for NtpClient.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:NtpClient.h"
* Web  > https://platformio.org/lib/search?query=header:NtpClient.h
*
*******************************************************************

#include "NtpClient.h"
^
compilation terminated.
Compiling .pioenvs/stage/src/NetworkService.cpp.o
In file included from src/Display.cpp:1:0:
include/Display.h:5:17: fatal error: LCD.h: No such file or directory

*************************************************************
* Looking for LCD.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:LCD.h"
* Web  > https://platformio.org/lib/search?query=header:LCD.h
*
*************************************************************

#include <LCD.h>
^
compilation terminated.
Compiling .pioenvs/stage/src/OTAUpdate.cpp.o
Compiling .pioenvs/stage/src/PSU.cpp.o
Compiling .pioenvs/stage/src/Plot,.cpp.o
src/PSU.cpp:1:17: fatal error: Psu.h: No such file or directory

*************************************************************
* Looking for Psu.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Psu.h"
* Web  > https://platformio.org/lib/search?query=header:Psu.h
*
*************************************************************

#include "Psu.h"
^
compilation terminated.
*** [.pioenvs/stage/src/ConfigHelper.cpp.o] Error 1
*** [.pioenvs/stage/src/NTPClient.cpp.o] Error 1
Compiling .pioenvs/stage/src/PsuLogger.cpp.o
*** [.pioenvs/stage/src/Display.cpp.o] Error 1
*** [.pioenvs/stage/src/PSU.cpp.o] Error 1
In file included from src/PsuLogger.cpp:1:0:
include/PsuLogger.h:3:17: fatal error: Psu.h: No such file or directory

*************************************************************
* Looking for Psu.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Psu.h"
* Web  > https://platformio.org/lib/search?query=header:Psu.h
*
*************************************************************

#include "Psu.h"
^
compilation terminated.
*** [.pioenvs/stage/src/PsuLogger.cpp.o] Error 1
In file included from src/NetworkService.cpp:1:0:
include/NetworkService.h:11:22: fatal error: Wireless.h: No such file or directory

******************************************************************
* Looking for Wireless.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Wireless.h"
* Web  > https://platformio.org/lib/search?query=header:Wireless.h
*
******************************************************************

#include "Wireless.h"
^
compilation terminated.
*** [.pioenvs/stage/src/NetworkService.cpp.o] Error 1
===================================== [ERROR] Took 1.00 seconds =====================================

============================================= [SUMMARY] =============================================
Environment stable	[ERROR]
Environment stage 	[ERROR]
===================================== [ERROR] Took 1.90 seconds =====================================

ytrikoz
Posts: 14
Joined: Mon Jun 17, 2019 9:06 pm
languages_spoken: russian, english
ODROIDs: XU-4, CloudShell2, SmartPower2
Has thanked: 0
Been thanked: 0
Contact:

Re: SmartPower2 alt firmware

Unread post by ytrikoz » Fri Aug 23, 2019 11:28 pm

It's misleading with my local file system and git (i try to solve this).

c:\Projects\smartpower2\src>dir *.cpp

23.08.2019 00:09 13 287 Cli.cpp
17.08.2019 06:41 3 930 Config.cpp
11.08.2019 22:16 7 333 ConfigHelper.cpp
22.08.2019 19:54 16 117 Display.cpp
19.07.2019 02:30 1 245 FileStorage.cpp
22.08.2019 16:33 7 782 Global.cpp
18.08.2019 04:30 2 717 ina231.cpp
15.08.2019 00:51 3 686 Led.cpp
20.08.2019 03:06 2 150 LoopWatchDog.cpp
22.08.2019 21:17 14 146 main.cpp
13.08.2019 02:08 469 mcp4652.cpp
21.08.2019 15:23 2 275 NetworkService.cpp
23.08.2019 17:14 3 425 NtpClient.cpp
21.08.2019 18:51 2 985 OTAUpdate.cpp
15.08.2019 23:53 1 617 Plot,.cpp
22.08.2019 23:37 6 725 Psu.cpp
23.08.2019 00:16 2 765 PsuLogger.cpp
22.08.2019 15:08 2 452 Shell.cpp
20.08.2019 19:47 3 556 StrUtils.cpp
21.08.2019 02:42 8 014 SysInfo.cpp
20.08.2019 17:27 4 229 SystemClock.cpp
21.08.2019 12:23 2 786 TelnetServer.cpp
10.08.2019 01:54 7 822 Termul.cpp
10.08.2019 04:35 6 656 TimeUtils.cpp
21.08.2019 19:02 11 988 WebService.cpp
21.08.2019 15:17 13 460 Wireless.cpp


Could you execute platformio library update task in project folder, and attach log that you get?

platformio lib update

You should get something like

Library Storage: c:\Projects\smartpower2\.pio\libdeps\stable
Updating ArduinoJson @ 6.11.4 [6.11.5]
Uninstalling ArduinoJson @ 6.11.4: [OK]
Looking for ArduinoJson library in registry
Found: https://platformio.org/lib/show/64/ArduinoJson
LibraryManager: Installing id=64 @ 6.11.5
Downloading [####################################] 100%
Unpacking [####################################] 100%
ArduinoJson @ 6.11.5 has been successfully installed!
Updating LiquidCrystal @ 1.5.0 [Up-to-date]
Updating SimpleCLI @ 1.0.4 [Up-to-date]
Updating SimpleTimer @ b30890b8f7 [Up-to-date]
Updating WebSockets @ 2.2.0 [Up-to-date]

ytrikoz
Posts: 14
Joined: Mon Jun 17, 2019 9:06 pm
languages_spoken: russian, english
ODROIDs: XU-4, CloudShell2, SmartPower2
Has thanked: 0
Been thanked: 0
Contact:

Re: SmartPower2 alt firmware

Unread post by ytrikoz » Fri Aug 23, 2019 11:38 pm

It's misleading with my local file system and git (i try to solve this). Looks like git client (windows 7) is case insensitive too :x
UPD: done

Could you execute platformio library update task in project folder, and attach log that you get?

platformio lib update

You should get something like

Code: Select all

Library Storage: c:\Projects\smartpower2\.pio\libdeps\stable
Updating ArduinoJson                     @ 6.11.4         [6.11.5]
Uninstalling ArduinoJson @ 6.11.4:      [OK]
Looking for ArduinoJson library in registry
Found: https://platformio.org/lib/show/64/ArduinoJson
LibraryManager: Installing id=64 @ 6.11.5
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
ArduinoJson @ 6.11.5 has been successfully installed!
Updating LiquidCrystal                   @ 1.5.0          [Up-to-date]
Updating SimpleCLI                       @ 1.0.4          [Up-to-date]
Updating SimpleTimer                     @ b30890b8f7     [Up-to-date]
Updating WebSockets                      @ 2.2.0          [Up-to-date]
[/quote]


lsc1117
Posts: 156
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 2 times
Contact:

Re: SmartPower2 alt firmware

Unread post by lsc1117 » Mon Aug 26, 2019 10:48 am

Thank you for your reply.

I have updated the renaming commit to my source code.
And it works well.
Can you create PR on hardkernel repository?

Thank you.

lsc1117
Posts: 156
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 2 times
Contact:

Re: SmartPower2 alt firmware

Unread post by lsc1117 » Mon Aug 26, 2019 11:53 am

And can you update a feature that when I press the power button the web page will be updated instantly?
Currently, when I press and release the power button to turn on or off, the web page doesn't update.
So when I press the power button to turn off the power, the webpage remains on.

I have tested it with chrome and firefox browser on my PC.

Thank you.

lsc1117
Posts: 156
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 2 times
Contact:

Re: SmartPower2 alt firmware

Unread post by lsc1117 » Mon Aug 26, 2019 8:17 pm

Actually we want to use your repository as SP2's main project.
I think it's better to use your repository than the hardkernel repository.
Can I link your project to our hardkernel wiki page?

ytrikoz
Posts: 14
Joined: Mon Jun 17, 2019 9:06 pm
languages_spoken: russian, english
ODROIDs: XU-4, CloudShell2, SmartPower2
Has thanked: 0
Been thanked: 0
Contact:

Re: SmartPower2 alt firmware

Unread post by ytrikoz » Mon Aug 26, 2019 9:14 pm

lsc1117 wrote:
Mon Aug 26, 2019 8:17 pm
Actually we want to use your repository as SP2's main project.
I think it's better to use your repository than the hardkernel repository.
Can I link your project to our hardkernel wiki page?
Yes of curse, i'll create PR when finish 0.6.7 and fix bugs that i already now (include that you have found).

lsc1117
Posts: 156
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 2 times
Contact:

Re: SmartPower2 alt firmware

Unread post by lsc1117 » Tue Aug 27, 2019 9:55 am

I think it is better to use your repository than the hardkernel repository for the maintenance.
And we can just link the SP2's source code to your repository on our wiki.
What do you think?

ytrikoz
Posts: 14
Joined: Mon Jun 17, 2019 9:06 pm
languages_spoken: russian, english
ODROIDs: XU-4, CloudShell2, SmartPower2
Has thanked: 0
Been thanked: 0
Contact:

Re: SmartPower2 alt firmware

Unread post by ytrikoz » Thu Aug 29, 2019 7:00 am

lsc1117 wrote:
Tue Aug 27, 2019 9:55 am
I think it is better to use your repository than the hardkernel repository for the maintenance.
And we can just link the SP2's source code to your repository on our wiki.
What do you think?
As you wish, i don't mind.

lsc1117
Posts: 156
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 2 times
Contact:

Re: SmartPower2 alt firmware

Unread post by lsc1117 » Fri Aug 30, 2019 11:25 am

@ytrikoz
Thank you very much.

And I want to check one. When I turn on the "Total consumption" in Log and stats, the watt overflow occurs quickly.
What is the unit of the "Total consumption"?

Post Reply

Return to “Smart Power”

Who is online

Users browsing this forum: No registered users and 1 guest