missing .h file Arduino IDE

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
zamzon37
Normal user
Posts: 12
Joined: 06 Aug 2017, 19:38

missing .h file Arduino IDE

#1 Post by zamzon37 » 14 Sep 2017, 21:41

Hi

I am trying to use a Sonoff Pow, and a have found out that ESPEasyPluginPlayground has the _P170_HLW8012.ino file.
When I try to export to a binary file, it says I need a HLW8012.h file.

how do I get this file.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: missing .h file Arduino IDE

#2 Post by papperone » 14 Sep 2017, 21:45

please serch first as there's a thread about this device where I'm collecting feedback and input if any bugs
your question has been already answered --> http://www.letscontrolit.com/forum/view ... =50#p17163
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

zamzon37
Normal user
Posts: 12
Joined: 06 Aug 2017, 19:38

Re: missing .h file Arduino IDE

#3 Post by zamzon37 » 14 Sep 2017, 22:21

thanks

now I get some new errors, could you me help again?

Code: Select all

Arduino: 1.8.3 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 115200, 4M (3M SPIFFS)"

WARNING: Category 'LED' in library CHT16K33 LED Matrix Library is not valid. Setting to 'Uncategorized'
WARNING: Category 'Input' in library MechInputs is not valid. Setting to 'Uncategorized'
WARNING: Category 'LED' in library CHT16K33 LED Matrix Library is not valid. Setting to 'Uncategorized'
WARNING: Category 'Input' in library MechInputs is not valid. Setting to 'Uncategorized'
C:\Program Files (x86)\Arduino\libraries\_P170_HLW8012\_P170_HLW8012.ino: In function 'boolean Plugin_170(byte, EventStruct*, String&)':

_P170_HLW8012:49: error: 'PLUGIN_DEVICE_ADD' was not declared in this scope

     case PLUGIN_DEVICE_ADD:

          ^

_P170_HLW8012:51: error: 'Device' was not declared in this scope

         Device[++deviceCount].Number = PLUGIN_ID_170;

         ^

_P170_HLW8012:51: error: 'deviceCount' was not declared in this scope

         Device[++deviceCount].Number = PLUGIN_ID_170;

                  ^

_P170_HLW8012:52: error: 'DEVICE_TYPE_TRIPLE' was not declared in this scope

         Device[deviceCount].Type = DEVICE_TYPE_TRIPLE;

                                    ^

_P170_HLW8012:53: error: 'SENSOR_TYPE_QUAD' was not declared in this scope

         Device[deviceCount].VType = SENSOR_TYPE_QUAD;

                                     ^

_P170_HLW8012:65: error: 'PLUGIN_GET_DEVICENAME' was not declared in this scope

     case PLUGIN_GET_DEVICENAME:

          ^

_P170_HLW8012:71: error: 'PLUGIN_GET_DEVICEVALUENAMES' was not declared in this scope

     case PLUGIN_GET_DEVICEVALUENAMES:

          ^

In file included from C:\Users\Mads\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/Arduino.h:240:0,

                 from sketch\_P170_HLW8012.ino.cpp:1:

_P170_HLW8012:73: error: 'ExtraTaskSettings' was not declared in this scope

         strcpy_P(ExtraTaskSettings.TaskDeviceValueNames[0], PSTR(PLUGIN_VALUENAME1_170));

                  ^

C:\Users\Mads\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/pgmspace.h:61:49: note: in definition of macro 'strcpy_P'

 #define strcpy_P(dest, src)          strncpy_P((dest), (src), SIZE_IRRELEVANT)

                                                 ^

_P170_HLW8012:80: error: 'PLUGIN_WEBFORM_LOAD' was not declared in this scope

     case PLUGIN_WEBFORM_LOAD:

          ^

_P170_HLW8012:82: error: 'addFormNote' was not declared in this scope

         addFormNote(string, F("Sonoff POW: 1st(SEL)=GPIO-5, 2nd(CF1)=GPIO-13, 3rd(CF)=GPIO-14"));

                                                                                                ^

_P170_HLW8012:83: error: 'addFormSubHeader' was not declared in this scope

         addFormSubHeader(string, F("Calibration Values"));

                                                         ^

_P170_HLW8012:85: error: invalid use of incomplete type 'struct EventStruct'

         LoadCustomTaskSettings(event->TaskIndex, (byte*)&hlwMultipliers, sizeof(hlwMultipliers));

                                     ^

_P170_HLW8012:43: error: forward declaration of 'struct EventStruct'

 boolean Plugin_170(byte function, struct EventStruct *event, String& string)

                                          ^

_P170_HLW8012:85: error: 'LoadCustomTaskSettings' was not declared in this scope

         LoadCustomTaskSettings(event->TaskIndex, (byte*)&hlwMultipliers, sizeof(hlwMultipliers));

                                                                                                ^

_P170_HLW8012:86: error: 'addFormTextBox' was not declared in this scope

         addFormTextBox(string, F("Current Multiplier"), F("plugin_170_currmult"), String(hlwMultipliers[0], 2), 25);

                                                                                                                   ^

_P170_HLW8012:93: error: 'PLUGIN_WEBFORM_SAVE' was not declared in this scope

     case PLUGIN_WEBFORM_SAVE:

          ^

_P170_HLW8012:97: error: 'WebServer' was not declared in this scope

           arg1 = F("plugin_170_currmult"); tmpString = WebServer.arg(arg1);

                                                        ^

_P170_HLW8012:103: error: invalid use of incomplete type 'struct EventStruct'

         SaveCustomTaskSettings(event->TaskIndex, (byte*)&hlwMultipliers, sizeof(hlwMultipliers));

                                     ^

_P170_HLW8012:43: error: forward declaration of 'struct EventStruct'

 boolean Plugin_170(byte function, struct EventStruct *event, String& string)

                                          ^

_P170_HLW8012:103: error: 'SaveCustomTaskSettings' was not declared in this scope

         SaveCustomTaskSettings(event->TaskIndex, (byte*)&hlwMultipliers, sizeof(hlwMultipliers));

                                                                                                ^

_P170_HLW8012:106: error: 'LOG_LEVEL_INFO' was not declared in this scope

           addLog(LOG_LEVEL_INFO, log);

                  ^

_P170_HLW8012:106: error: 'addLog' was not declared in this scope

           addLog(LOG_LEVEL_INFO, log);

                                     ^

_P170_HLW8012:115: error: 'LOG_LEVEL_INFO' was not declared in this scope

           addLog(LOG_LEVEL_INFO, log);

                  ^

_P170_HLW8012:115: error: 'addLog' was not declared in this scope

           addLog(LOG_LEVEL_INFO, log);

                                     ^

_P170_HLW8012:122: error: 'PLUGIN_READ' was not declared in this scope

     case PLUGIN_READ:

          ^

_P170_HLW8012:135: error: 'LOG_LEVEL_INFO' was not declared in this scope

           addLog(LOG_LEVEL_INFO, log);

                  ^

_P170_HLW8012:135: error: 'addLog' was not declared in this scope

           addLog(LOG_LEVEL_INFO, log);

                                     ^

_P170_HLW8012:137: error: 'UserVar' was not declared in this scope

         UserVar[event->BaseVarIndex]     = hvoltage;

         ^

_P170_HLW8012:137: error: invalid use of incomplete type 'struct EventStruct'

         UserVar[event->BaseVarIndex]     = hvoltage;

                      ^

_P170_HLW8012:43: error: forward declaration of 'struct EventStruct'

 boolean Plugin_170(byte function, struct EventStruct *event, String& string)

                                          ^

_P170_HLW8012:138: error: invalid use of incomplete type 'struct EventStruct'

         UserVar[event->BaseVarIndex + 1] = hcurrent;

                      ^

_P170_HLW8012:43: error: forward declaration of 'struct EventStruct'

 boolean Plugin_170(byte function, struct EventStruct *event, String& string)

                                          ^

_P170_HLW8012:139: error: invalid use of incomplete type 'struct EventStruct'

         UserVar[event->BaseVarIndex + 2] = hpower;

                      ^

_P170_HLW8012:43: error: forward declaration of 'struct EventStruct'

 boolean Plugin_170(byte function, struct EventStruct *event, String& string)

                                          ^

_P170_HLW8012:140: error: invalid use of incomplete type 'struct EventStruct'

         UserVar[event->BaseVarIndex + 3] = hpowfact;

                      ^

_P170_HLW8012:43: error: forward declaration of 'struct EventStruct'

 boolean Plugin_170(byte function, struct EventStruct *event, String& string)

                                          ^

_P170_HLW8012:146: error: 'PLUGIN_INIT' was not declared in this scope

     case PLUGIN_INIT:

          ^

_P170_HLW8012:152: error: 'Settings' was not declared in this scope

           Plugin_170_hlw->begin(Settings.TaskDevicePin3[event->TaskIndex], Settings.TaskDevicePin2[event->TaskIndex], Settings.TaskDevicePin1[event->TaskIndex], HLW_CURRENT_MODE, false, 1000000);     

                                 ^

_P170_HLW8012:152: error: invalid use of incomplete type 'struct EventStruct'

           Plugin_170_hlw->begin(Settings.TaskDevicePin3[event->TaskIndex], Settings.TaskDevicePin2[event->TaskIndex], Settings.TaskDevicePin1[event->TaskIndex], HLW_CURRENT_MODE, false, 1000000);     

                                                              ^

_P170_HLW8012:43: error: forward declaration of 'struct EventStruct'

 boolean Plugin_170(byte function, struct EventStruct *event, String& string)

                                          ^

_P170_HLW8012:152: error: invalid use of incomplete type 'struct EventStruct'

           Plugin_170_hlw->begin(Settings.TaskDevicePin3[event->TaskIndex], Settings.TaskDevicePin2[event->TaskIndex], Settings.TaskDevicePin1[event->TaskIndex], HLW_CURRENT_MODE, false, 1000000);     

                                                                                                         ^

_P170_HLW8012:43: error: forward declaration of 'struct EventStruct'

 boolean Plugin_170(byte function, struct EventStruct *event, String& string)

                                          ^

_P170_HLW8012:152: error: invalid use of incomplete type 'struct EventStruct'

           Plugin_170_hlw->begin(Settings.TaskDevicePin3[event->TaskIndex], Settings.TaskDevicePin2[event->TaskIndex], Settings.TaskDevicePin1[event->TaskIndex], HLW_CURRENT_MODE, false, 1000000);     

                                                                                                                                                    ^

_P170_HLW8012:43: error: forward declaration of 'struct EventStruct'

 boolean Plugin_170(byte function, struct EventStruct *event, String& string)

                                          ^

_P170_HLW8012:153: error: 'LOG_LEVEL_INFO' was not declared in this scope

           if (PLUGIN_170_DEBUG) addLog(LOG_LEVEL_INFO, F("HLW8012: Init object done"));

                                        ^

_P170_HLW8012:153: error: 'addLog' was not declared in this scope

           if (PLUGIN_170_DEBUG) addLog(LOG_LEVEL_INFO, F("HLW8012: Init object done"));

                                                                                      ^

_P170_HLW8012:155: error: 'LOG_LEVEL_INFO' was not declared in this scope

           if (PLUGIN_170_DEBUG) addLog(LOG_LEVEL_INFO, F("HLW8012: Init Basic Resistor Values done"));

                                        ^

_P170_HLW8012:155: error: 'addLog' was not declared in this scope

           if (PLUGIN_170_DEBUG) addLog(LOG_LEVEL_INFO, F("HLW8012: Init Basic Resistor Values done"));

                                                                                                     ^

_P170_HLW8012:158: error: invalid use of incomplete type 'struct EventStruct'

           LoadCustomTaskSettings(event->TaskIndex, (byte*)&hlwMultipliers, sizeof(hlwMultipliers));

                                       ^

_P170_HLW8012:43: error: forward declaration of 'struct EventStruct'

 boolean Plugin_170(byte function, struct EventStruct *event, String& string)

                                          ^

_P170_HLW8012:158: error: 'LoadCustomTaskSettings' was not declared in this scope

           LoadCustomTaskSettings(event->TaskIndex, (byte*)&hlwMultipliers, sizeof(hlwMultipliers));

                                                                                                  ^

_P170_HLW8012:162: error: invalid use of incomplete type 'struct EventStruct'

           SaveCustomTaskSettings(event->TaskIndex, (byte*)&hlwMultipliers, sizeof(hlwMultipliers));

                                       ^

_P170_HLW8012:43: error: forward declaration of 'struct EventStruct'

 boolean Plugin_170(byte function, struct EventStruct *event, String& string)

                                          ^

_P170_HLW8012:162: error: 'SaveCustomTaskSettings' was not declared in this scope

           SaveCustomTaskSettings(event->TaskIndex, (byte*)&hlwMultipliers, sizeof(hlwMultipliers));

                                                                                                  ^

_P170_HLW8012:163: error: 'LOG_LEVEL_INFO' was not declared in this scope

           if (PLUGIN_170_DEBUG) addLog(LOG_LEVEL_INFO, F("HLW8012: Saved Calibration after INIT"));

                                        ^

_P170_HLW8012:163: error: 'addLog' was not declared in this scope

           if (PLUGIN_170_DEBUG) addLog(LOG_LEVEL_INFO, F("HLW8012: Saved Calibration after INIT"));

                                                                                                  ^

_P170_HLW8012:164: error: invalid use of incomplete type 'struct EventStruct'

           StoredTaskIndex = event->TaskIndex; // store task index value in order to use it in the PLUGIN_WRITE routine

                                  ^

_P170_HLW8012:43: error: forward declaration of 'struct EventStruct'

 boolean Plugin_170(byte function, struct EventStruct *event, String& string)

                                          ^

_P170_HLW8012:170: error: 'PLUGIN_WRITE' was not declared in this scope

     case PLUGIN_WRITE:

          ^

_P170_HLW8012:183: error: 'LOG_LEVEL_INFO' was not declared in this scope

             if (PLUGIN_170_DEBUG) addLog(LOG_LEVEL_INFO, F("HLW8012: Reset Multipliers to DEFAULT"));

                                          ^

_P170_HLW8012:183: error: 'addLog' was not declared in this scope

             if (PLUGIN_170_DEBUG) addLog(LOG_LEVEL_INFO, F("HLW8012: Reset Multipliers to DEFAULT"));

                                                                                                    ^

_P170_HLW8012:213: error: 'LOG_LEVEL_INFO' was not declared in this scope

               addLog(LOG_LEVEL_INFO, log);

                      ^

_P170_HLW8012:213: error: 'addLog' was not declared in this scope

               addLog(LOG_LEVEL_INFO, log);

                                         ^

C:\Program Files (x86)\Arduino\libraries\_P170_HLW8012\_P170_HLW8012.ino: In function 'void Plugin170_SaveMultipliers()':

_P170_HLW8012:235: error: 'SaveCustomTaskSettings' was not declared in this scope

     SaveCustomTaskSettings(StoredTaskIndex, (byte*)&hlwMultipliers, sizeof(hlwMultipliers));  

                                                                                           ^

Multiple libraries were found for "HLW8012.h"
 Used: C:\Users\Mads\Documents\Arduino\libraries\_P170_HLW8012
 Not used: C:\Users\Mads\Documents\Arduino\libraries\_P170_HLW8012_2
 Not used: C:\Program Files (x86)\Arduino\libraries\_P170_HLW8012
exit status 1
'PLUGIN_DEVICE_ADD' was not declared in this scope


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: missing .h file Arduino IDE

#4 Post by papperone » 14 Sep 2017, 22:52

I am not sure you are compiling the ESPEasy in the right way... Why the plugin was installed under the library folder?
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

zamzon37
Normal user
Posts: 12
Joined: 06 Aug 2017, 19:38

Re: missing .h file Arduino IDE

#5 Post by zamzon37 » 15 Sep 2017, 09:18

Is there a guide on how to install plugins in to the ESP Easy

I am trying to follow this guide,
https://diyprojects.io/esp-easy-install ... brFc8hJZPY

elizabethwhite
New user
Posts: 1
Joined: 12 Oct 2017, 14:12

Re: missing .h file Arduino IDE

#6 Post by elizabethwhite » 12 Oct 2017, 15:28

Thanx for that reply
I know a lot of useful services but the best service is cheap insurance quotes online. It helped me a lot!

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests