News

moodlite - Coming soon


moodlite software [2.0] Release

spigot · 3549

spigot

  • Global Moderator
  • Full Member
  • *****
    • Posts: 112
    • Likes: +24/-0
  • There's no place like 127.0.0.1
    • View Profile
on: January 27, 2019, 09:24:08 AM
« Last Edit: January 27, 2019, 09:46:10 AM by spigot »



CdRsKuLL

  • The Fat Dude
  • Administrator
  • Full Member
  • *****
    • Posts: 113
    • Likes: +15/-0
  • Lighting the way...
    • View Profile
Reply #1 on: January 27, 2019, 09:31:13 AM
Great trying now... O btw.. the D6 is now not the LED pin, might confuse a few people :-)

Moodlite is a completely free open source project.
If however you would like to say thanks and help contribute to this site, or just buy me a beer then please donate below. :-)



spigot

  • Global Moderator
  • Full Member
  • *****
    • Posts: 112
    • Likes: +24/-0
  • There's no place like 127.0.0.1
    • View Profile
Reply #2 on: January 27, 2019, 09:34:07 AM
Going to correct it.



Psycho_Mantis

  • Newbie
  • *
    • Posts: 7
    • Likes: +1/-0
    • View Profile
Reply #3 on: January 27, 2019, 11:48:17 AM
Thanks for the hard work!

Unfortunately I'm unable to compile it. :(
I'm uploading it to a Wemos D1 mini with Arduino 1.8.5

Moodlite:289: error: 'fullColor' was not declared in this scope
 SimplePatternList gPatterns = { fullColor, standard, confetti, sinelon, juggle, bpm, kitt, plasma, blendwave, inoise8_fire, rainbow_beat, rainbow, rainbowWithGlitter};

                                 ^
Moodlite:289: error: 'standard' was not declared in this scope
 SimplePatternList gPatterns = { fullColor, standard, confetti, sinelon, juggle, bpm, kitt, plasma, blendwave, inoise8_fire, rainbow_beat, rainbow, rainbowWithGlitter};

                                            ^
Moodlite:289: error: 'confetti' was not declared in this scope
 SimplePatternList gPatterns = { fullColor, standard, confetti, sinelon, juggle, bpm, kitt, plasma, blendwave, inoise8_fire, rainbow_beat, rainbow, rainbowWithGlitter};



spigot

  • Global Moderator
  • Full Member
  • *****
    • Posts: 112
    • Likes: +24/-0
  • There's no place like 127.0.0.1
    • View Profile
Reply #4 on: January 27, 2019, 01:05:36 PM
It looks like Arduino IDE has a problem with the declaration (Visual studio doesn't). Arduino IDE should creates prototypes for the functions.

Replace line 289 with:

Code: [Select]
SimplePatternList gPatterns = { &fullColor, &standard, &confetti, &sinelon, &juggle, &bpm, &kitt, &plasma, &blendwave, &inoise8_fire, &rainbow_beat, &rainbow, &rainbowWithGlitter };

This should help.



SULTAN

  • Newbie
  • *
    • Posts: 18
    • Likes: +0/-0
    • View Profile
Reply #5 on: January 27, 2019, 04:51:21 PM
spigot

Hello. How not trying to change the number of LEDs and frames, nothing comes out.
Constantly gives an error!


EO|t`MM⸮<C8I⸮⸮--- initEEPROMData - Start ---
Manual Display On: 0
Automatic Display On: 0
Display On: 0
Display Off: 0
Pir sensor enabled: 0
Nr. of LEDs: 3
Nr. of LEDs per corner: 1
Brightness: 2
Speed: 30
Pattern: 255
Pattern color: 255
LED color: FFFFFF
NTP Server:
MQTT Hostname: ⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮
MQTT port: ⸮⸮⸮⸮⸮⸮⸮⸮⸮
MQTT User name: ⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮
MQTT User password: ⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮
MQTT Client ID: ⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮
--- initEEPROMData - End ---
--- initWiFi - Start ---
Connecting to Wifi. Please wait.
Wifi status: 3
Wifi network started succesfully.
--- initWiFi - End ---
--- mainHandler - Start ---
--- mainHandler - End ---
WS connected
WS data
WS text data
--- handleWSMsg - Start ---
2:
--- sendSettingsValues - Start ---
--- sendSettingsValues - End ---
--- handleWSMsg - End ---
WS error
Invalid UTF-8 in text framerneJ⸮⸮⸮d_strip_nr_of_leds":3,"mqtt_host_name":"⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮","mqtt_port":"⸮⸮⸮⸮⸮⸮⸮⸮⸮","mqtt_user_name":"⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮","mqtt_user_password":"⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮","mqtt_client_id":"⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮"}}
WS disconnected
--- mainHandler - Start ---
--- mainHandler - End ---
WS connected
WS data
WS text data
--- handleWSMsg - Start ---
3:
--- sendLedValues - Start ---
--- sendLedValues - End ---
--- handleWSMsg - End ---
WS data
WS text data
--- handleWSMsg - Start ---
2:
--- sendSettingsValues - Start ---
--- sendSettingsValues - End ---
--- handleWSMsg - End ---
WS error
Invalid UTF-8 in text frame"",⸮⸮s⸮⸮e_time":"0 : 0 : 25
WS disconnected
--- mainHandler - Start ---
--- mainHandler - End ---
WS connected
WS data
WS text data
--- handleWSMsg - Start ---
2:
--- sendSettingsValues - Start ---
--- sendSettingsValues - End ---
--- handleWSMsg - End ---
WS error
Invalid UTF-8 in text frame
WS disconnected



Psycho_Mantis

  • Newbie
  • *
    • Posts: 7
    • Likes: +1/-0
    • View Profile
Reply #6 on: January 27, 2019, 04:53:54 PM
It looks like Arduino IDE has a problem with the declaration (Visual studio doesn't). Arduino IDE should creates prototypes for the functions.

Replace line 289 with:

Code: [Select]
SimplePatternList gPatterns = { &fullColor, &standard, &confetti, &sinelon, &juggle, &bpm, &kitt, &plasma, &blendwave, &inoise8_fire, &rainbow_beat, &rainbow, &rainbowWithGlitter };

This should help.

Seems to work for the pattern code.
Same issue is there for the network settings:

/Users/glenn/Downloads/Moodlite_2019_01_27-V2/Arduino/Moodlite/Moodlite.ino: In function 'void setup()':
Moodlite:563: error: 'cWifiSsid' was not declared in this scope
  if (strlen(cWifiSsid) > 0) {
             ^
/Users/glenn/Downloads/Moodlite_2019_01_27-V2/Arduino/Moodlite/Moodlite.ino: In function 'void initWiFi()':
Moodlite:768: error: 'cHostName' was not declared in this scope
  MDNS.begin(cHostName);
             ^
Moodlite:771: error: 'cWifiSsid' was not declared in this scope
   if (strlen(cWifiSsid) > 0) {
              ^
Moodlite:814: error: 'cWifiPassword' was not declared in this scope
     if (strlen(cWifiPassword) > 0) {
                ^
/Users/glenn/Downloads/Moodlite_2019_01_27-V2/Arduino/Moodlite/Moodlite.ino: In function 'void initEEPROMData()':
Moodlite:1081: error: 'cWifiSsid' was not declared in this scope
  if (strlen(cWifiSsid) > 0) {
             ^
/Users/glenn/Downloads/Moodlite_2019_01_27-V2/Arduino/Moodlite/Moodlite.ino: In function 'void sendWifiValues(AsyncWebSocketClient*)':
Moodlite:1252: error: 'cWifiSsid' was not declared in this scope
  json += cWifiSsid;
          ^
Moodlite:1254: error: 'cWifiPassword' was not declared in this scope
  json += cWifiPassword;
          ^
Moodlite:1256: error: 'cHostName' was not declared in this scope
  json += cHostName;
          ^

I'm getting the same issue in VS code as in Arduino IDE. Are you using the Windows version of Visual Studio?



spigot

  • Global Moderator
  • Full Member
  • *****
    • Posts: 112
    • Likes: +24/-0
  • There's no place like 127.0.0.1
    • View Profile
Reply #7 on: January 27, 2019, 05:36:10 PM
spigot

Hello. How not trying to change the number of LEDs and frames, nothing comes out.
Constantly gives an error!
.....

Just tested it with NodeMCU. Cleared EEPROM. And it's working fine.

After first setup (Wifi pass, ssid, hostname)
Code: [Select]
--- initEEPROMData - Start ---
Hostname loaded from memory.
Wifi Hostname: Moodtest
Wifi ssid: *****
Wifi password: ******
Manual Display On: 1
Automatic Display On: 0
Display On: 0
Display Off: 0
Pir sensor enabled: 0
Nr. of LEDs: 3
Nr. of LEDs per corner: 1
Brightness: 20
Speed: 50
Pattern: 0
Pattern color: 0
LED color: FFFFFF
NTP Server:
MQTT Hostname:
MQTT port:
MQTT User name:
MQTT User password:
MQTT Client ID:
--- initEEPROMData - End ---
--- initWiFi - Start ---
Connecting to Wifi. Please wait.
Wifi status: 3
Wifi network started succesfully.
--- initWiFi - End ---
--- mainHandler - Start ---
--- mainHandler - End ---

After settings LEDs to LEDs per corner: 3  and Total number of LEDs: 27
Code: [Select]
WS connected
WS data
WS text data
--- handleWSMsg - Start ---
3:
--- sendLedValues - Start ---
--- sendLedValues - End ---
--- handleWSMsg - End ---
WS data
WS text data
--- handleWSMsg - Start ---
2:
--- sendSettingsValues - Start ---
--- sendSettingsValues - End ---
--- handleWSMsg - End ---
WS data
WS text data
--- handleWSMsg - Start ---
5:setNtpServer:
--- updateValue - Start ---
setNtpServer:

--- updateValue - End ---
--- handleWSMsg - End ---
WS data
WS text data
--- handleWSMsg - Start ---
5:setNrOfLedsCorner:3
--- updateValue - Start ---
setNrOfLedsCorner: 3
3
--- updateValue - End ---
--- handleWSMsg - End ---
WS data
WS text data
--- handleWSMsg - Start ---
5:setNrOfLeds:27
--- updateValue - Start ---
setNrOfLeds: 27
27
--- updateValue - End ---
--- handleWSMsg - End ---
WS data
WS text data
--- handleWSMsg - Start ---
5:saveLedsSettings:1
--- updateValue - Start ---
saveLedsSettings: 1
--- updateValue - End ---
--- handleWSMsg - End ---
WS data
WS text data
--- handleWSMsg - Start ---
5:restart:1
--- updateValue - Start ---
restart: 1
99
--- updateValue - End ---
--- handleWSMsg - End ---�18���1H1��--- initEEPROMData - Start ---
Hostname loaded from memory.
Wifi Hostname: Moodtest
Wifi ssid: *****
Wifi password: ******
Manual Display On: 1
Automatic Display On: 0
Display On: 0
Display Off: 0
Pir sensor enabled: 0
Nr. of LEDs: 27
Nr. of LEDs per corner: 3
Brightness: 20
Speed: 50
Pattern: 0
Pattern color: 0
LED color: FFFFFF
NTP Server:
MQTT Hostname:
MQTT port:
MQTT User name:
MQTT User password:
MQTT Client ID:
--- initEEPROMData - End ---
--- initWiFi - Start ---
Connecting to Wifi. Please wait.
Wifi status: 3
Wifi network started succesfully.
--- initWiFi - End ---
--- mainHandler - Start ---
--- mainHandler - End ---
WS connected
WS data
WS text data
--- handleWSMsg - Start ---
2:
--- sendSettingsValues - Start ---
--- sendSettingsValues - End ---
--- handleWSMsg - End ---

This line is strange:

Code: [Select]
Invalid UTF-8 in text framerneJ⸮d_strip_nr_of_leds":3,"mqtt_host_name":"⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮","mqtt_port":"⸮⸮⸮⸮⸮⸮⸮⸮⸮","mqtt_user_name":"⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮","mqtt_user_password":"⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮","mqtt_client_id":"⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮"}}

Something with your web browser?
« Last Edit: January 27, 2019, 05:40:38 PM by spigot »



spigot

  • Global Moderator
  • Full Member
  • *****
    • Posts: 112
    • Likes: +24/-0
  • There's no place like 127.0.0.1
    • View Profile
Reply #8 on: January 27, 2019, 05:39:05 PM
I'm getting the same issue in VS code as in Arduino IDE. Are you using the Windows version of Visual Studio?
[/quote]

VS code? Are you using PaltformIO?

I using Visual studio 2017 + vMicro. But after I fixed the line 289, problem with Arduino IDE is gone.

« Last Edit: January 27, 2019, 05:54:22 PM by spigot »



shiryou

  • moodlite Developer
  • Newbie
  • *****
    • Posts: 45
    • Likes: +4/-0
    • View Profile
Reply #9 on: January 27, 2019, 06:27:52 PM
Using arduino IDE on windows and nodeMCU with the original 2.0 version code im not getting those errors.

maybe some missconfiguration? version of your ide?



Psycho_Mantis

  • Newbie
  • *
    • Posts: 7
    • Likes: +1/-0
    • View Profile
Reply #10 on: January 27, 2019, 06:30:25 PM
Found the issue:

If you set STATIC_IP to true, it won't compile.

On false, everything seems fine.



spigot

  • Global Moderator
  • Full Member
  • *****
    • Posts: 112
    • Likes: +24/-0
  • There's no place like 127.0.0.1
    • View Profile
Reply #11 on: January 27, 2019, 06:42:17 PM
No problem here.



SULTAN

  • Newbie
  • *
    • Posts: 18
    • Likes: +0/-0
    • View Profile
Reply #12 on: January 27, 2019, 07:00:07 PM
spigot

Hello. How not trying to change the number of LEDs and frames, nothing comes out.
Constantly gives an error!
.....

Just tested it with NodeMCU. Cleared EEPROM. And it's working fine.

After first setup (Wifi pass, ssid, hostname)
Code: [Select]
--- initEEPROMData - Start ---
Hostname loaded from memory.
Wifi Hostname: Moodtest
Wifi ssid: *****
Wifi password: ******
Manual Display On: 1
Automatic Display On: 0
Display On: 0
Display Off: 0
Pir sensor enabled: 0
Nr. of LEDs: 3
Nr. of LEDs per corner: 1
Brightness: 20
Speed: 50
Pattern: 0
Pattern color: 0
LED color: FFFFFF
NTP Server:
MQTT Hostname:
MQTT port:
MQTT User name:
MQTT User password:
MQTT Client ID:
--- initEEPROMData - End ---
--- initWiFi - Start ---
Connecting to Wifi. Please wait.
Wifi status: 3
Wifi network started succesfully.
--- initWiFi - End ---
--- mainHandler - Start ---
--- mainHandler - End ---

After settings LEDs to LEDs per corner: 3  and Total number of LEDs: 27
Code: [Select]
WS connected
WS data
WS text data
--- handleWSMsg - Start ---
3:
--- sendLedValues - Start ---
--- sendLedValues - End ---
--- handleWSMsg - End ---
WS data
WS text data
--- handleWSMsg - Start ---
2:
--- sendSettingsValues - Start ---
--- sendSettingsValues - End ---
--- handleWSMsg - End ---
WS data
WS text data
--- handleWSMsg - Start ---
5:setNtpServer:
--- updateValue - Start ---
setNtpServer:

--- updateValue - End ---
--- handleWSMsg - End ---
WS data
WS text data
--- handleWSMsg - Start ---
5:setNrOfLedsCorner:3
--- updateValue - Start ---
setNrOfLedsCorner: 3
3
--- updateValue - End ---
--- handleWSMsg - End ---
WS data
WS text data
--- handleWSMsg - Start ---
5:setNrOfLeds:27
--- updateValue - Start ---
setNrOfLeds: 27
27
--- updateValue - End ---
--- handleWSMsg - End ---
WS data
WS text data
--- handleWSMsg - Start ---
5:saveLedsSettings:1
--- updateValue - Start ---
saveLedsSettings: 1
--- updateValue - End ---
--- handleWSMsg - End ---
WS data
WS text data
--- handleWSMsg - Start ---
5:restart:1
--- updateValue - Start ---
restart: 1
99
--- updateValue - End ---
--- handleWSMsg - End ---�18���1H1��--- initEEPROMData - Start ---
Hostname loaded from memory.
Wifi Hostname: Moodtest
Wifi ssid: *****
Wifi password: ******
Manual Display On: 1
Automatic Display On: 0
Display On: 0
Display Off: 0
Pir sensor enabled: 0
Nr. of LEDs: 27
Nr. of LEDs per corner: 3
Brightness: 20
Speed: 50
Pattern: 0
Pattern color: 0
LED color: FFFFFF
NTP Server:
MQTT Hostname:
MQTT port:
MQTT User name:
MQTT User password:
MQTT Client ID:
--- initEEPROMData - End ---
--- initWiFi - Start ---
Connecting to Wifi. Please wait.
Wifi status: 3
Wifi network started succesfully.
--- initWiFi - End ---
--- mainHandler - Start ---
--- mainHandler - End ---
WS connected
WS data
WS text data
--- handleWSMsg - Start ---
2:
--- sendSettingsValues - Start ---
--- sendSettingsValues - End ---
--- handleWSMsg - End ---

This line is strange:

Code: [Select]
Invalid UTF-8 in text framerneJ⸮d_strip_nr_of_leds":3,"mqtt_host_name":"⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮","mqtt_port":"⸮⸮⸮⸮⸮⸮⸮⸮⸮","mqtt_user_name":"⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮","mqtt_user_password":"⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮","mqtt_client_id":"⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮"}}

Something with your web browser?

I tried everything. Version 1.1.3 works fine, but the 2.0 does not change the number of LEDs.
Everything is fine with the web browser. Also tried everything.
« Last Edit: January 27, 2019, 07:02:23 PM by SULTAN »



spigot

  • Global Moderator
  • Full Member
  • *****
    • Posts: 112
    • Likes: +24/-0
  • There's no place like 127.0.0.1
    • View Profile
Reply #13 on: January 27, 2019, 07:09:16 PM
How long is your SSID/Password/Hostname?

It's limited to 20 chars now.



SULTAN

  • Newbie
  • *
    • Posts: 18
    • Likes: +0/-0
    • View Profile
Reply #14 on: January 27, 2019, 07:11:25 PM
How long is your SSID/Password/Hostname?

It's limited to 20 chars now.

String sHostName = "Moodlite";
   String sWifiSsd = "16 chars";
   String sWifiPassword = "20 chars";



 


SMF spam blocked by CleanTalk