Author Topic: Overload resolution failed  (Read 2335 times)

hnugter

  • Newbie
  • *
  • Posts: 12
    • View Profile
Overload resolution failed
« on: August 10, 2016, 02:21:07 pm »
I'm just starting with Mcthings and I successfully loaded the blink script on one of my modules.
Now I'm trying the temperature script but I get an error which says Overload resolution failed because IFTTT does not  accept the specific data types....etc

This is my script, what goes wrong.
The word IFTTT is underlined like in Word and gives an error message.

Regards
Henk

Class temperatuur
    Shared Event GetTemp() RaiseEvent Every 1 Minutes
        LedGreen = True
       
        Dim TempC As Float = TempSensor.GetTemp()
        Dim TempF As Float = TempSensor.ToFarenheit(TempC)
       
        If TempC > 25.0 Then
            LedRed = True
        Else
            LedRed = False
        End If
       
        LedGreen = False
        Lplan.IFTTT("d8cAVjNUjBr1S9aUB70Wvc", "TempCE", temperatuur, "", "")
    End Event   
End Class

[ Guests cannot view attachments ]
« Last Edit: August 23, 2016, 12:22:01 pm by mc-T2 »

Share on Facebook Share on Twitter


kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Overload resolution failed
« Reply #1 on: August 10, 2016, 03:20:54 pm »
Hello.
You have included your class name temperatuur in you IFTTT command. That is not an valid string.
If you just want to send the name then put it inside ""

hnugter

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Overload resolution failed
« Reply #2 on: August 10, 2016, 03:47:59 pm »
Thanks for your fast reply.
I changed the script and is seems working now, however, i do not see a spreadsheet yet... but i keep on puzzling.

Regards
Henk

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Overload resolution failed
« Reply #3 on: August 10, 2016, 04:05:36 pm »
That's great.
Let us know if you need any help.

hnugter

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Overload resolution failed
« Reply #4 on: August 11, 2016, 06:23:29 am »
Hello Mcthings, My module is now running for a day but no data has been written to my spreadsheet.
I have tried several things but no success.
One of the things I noticed is that when I use the device maintenance and when I click on Gateway config, I get  an error like in the attached screenshot. Does that cause the gateway fot not working properly?

regards
Henk

[ Guests cannot view attachments ]
« Last Edit: August 23, 2016, 12:22:20 pm by mc-T2 »

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Overload resolution failed
« Reply #5 on: August 11, 2016, 06:28:57 am »
Hello.
You need to upgrade your mcGateway to the latest version with USB memory stick.

hnugter

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Overload resolution failed
« Reply #6 on: August 11, 2016, 01:09:54 pm »
Thanks again for your reply.
I think that all my modules and gateway are updated, see attached pictures.
The gateway has a red led and the amber led continuing on and the green led flashing.
The module is blinking every minute.
When I go to my recipes in IFTTT is says never run but I did turn it on. I recreated the recipe, in case I made a mistake
Still no spreadsheet. I have the feeling I am close but still missing something.
It would be very helpful if you can give me another hint.
Regards
henk

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Overload resolution failed
« Reply #7 on: August 11, 2016, 01:15:08 pm »
Yes, now your mcGateway has the correct firmware.

Could you post the IFTTT command that you currently use in the code?

hnugter

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Overload resolution failed
« Reply #8 on: August 11, 2016, 01:17:38 pm »
This is the complete script i use.

Henk

Class temperatuur
    Shared Event GetTemp() RaiseEvent Every 1 Minutes
        LedGreen = True
       
        Dim TempC As Float = TempSensor.GetTemp()
        Dim TempF As Float = TempSensor.ToFarenheit(TempC)
       
        If TempC > 25.0 Then
            LedRed = True
        Else
            LedRed = False
        End If
       
        LedGreen = False
        Lplan.IFTTT("d8cAVjNUjBr1S9aUB70Wvc", "TempCE", "temperatuur", "", "")
    End Event   
End Class

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Overload resolution failed
« Reply #9 on: August 11, 2016, 01:25:57 pm »
Okey, that is not correct.
Change to something like this.

Code: [Select]
Class temperatuur
    Shared Event GetTemp() RaiseEvent Every 1 Minutes
        LedGreen = True
       
        Dim TempC As Float = TempSensor.GetTemp()
        Dim TempF As Float = TempSensor.ToFarenheit(TempC)

        Dim tempstring As String = TempC.ToString()
       
        If TempC > 25.0 Then
            LedRed = True
        Else
            LedRed = False
        End If
       
        LedGreen = False
        Lplan.IFTTT("d8cAVjNUjBr1S9aUB70Wvc", "temperatuur", tempstring, "", "")
    End Event   
End Class

hnugter

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Overload resolution failed
« Reply #10 on: August 12, 2016, 03:12:25 am »
Hello,
Thanks for your help
I have changed the script but is does not seems to work.
I have put some breakpoints in the code and run it. When debug stopped at the line Dim temp As Float = TempSensor.GetTemp() the value stays ) (zero) and then the tempstring also contains nothing and as a result nothing is sent to IFTTT
Then at the end I get an runtime error. (see picture)

This is my script now.
It would be very helpful if I could started with a working script. From that point I can move on.

Regards
henk

Class temperatuur
    Shared Event GetTemp() RaiseEvent Every 1 Minutes
        LedGreen = True
       
        Dim temp As Float = TempSensor.GetTemp()
       
        Dim tempstring As String = temp.ToString()
       
        Lplan.IFTTT("d8cAVjNUjBr1S9aUB70Wvc", "Temperatuur", tempstring, "", "")
       
        If temp > 25.0 Then
            LedRed = True
        Else
            LedRed = False
        End If
       
        LedGreen = False
       
    End Event   
End Class

[ Guests cannot view attachments ]
« Last Edit: August 23, 2016, 12:23:42 pm by mc-T2 »

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Overload resolution failed
« Reply #11 on: August 12, 2016, 05:03:15 am »
When it stops at a breakpoint then that row is not yet executed.
What is the value of temp and tempstring when the debugger stops at the breakpoint with the IFTTT command?

hnugter

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Overload resolution failed
« Reply #12 on: August 12, 2016, 07:00:42 am »
Hello mcthings Team,

The value is 0, (zero)
See attached picture.
I think that this is not good?

Henk

[ Guests cannot view attachments ]
« Last Edit: August 23, 2016, 12:22:45 pm by mc-T2 »

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Overload resolution failed
« Reply #13 on: August 12, 2016, 09:43:53 am »
Ahh I see what's wrong now.
You have not connected to your mcModules.
Please read the mcStudio instructions or take a look at YouTube at mcThings channel and you will find a video that describes the procedure to connect to a mcModule.

hnugter

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Overload resolution failed
« Reply #14 on: August 12, 2016, 09:47:01 am »
Hello Mcthings team
I have just tried to connect the gateway via lan. when I started debug again i got a reading. It gives a temp reading
for the first time the green led stays on while debugging and it stops after debugging. Is that good?
I'm curious if Y will get results in my spreadsheet, so far not yet.

Regards
henk