IFTTT > IFTTT

IFTTT Outside Temperature example - Still not working

<< < (5/5)

flookdigital:
I made the correction in the string

Still nothing.  I really think my Gateway is no good.  Is there a way to test it?

kristofferis:
One thing that you could verify is that your mcGateway is running the latest version. What version does it say in mcStudio when you see the gateway in devices?

Do you have any knowledge about MQTT? With MQTT then it's possible to verify that the gateway is communicating out on internet (with a broker on internet) I could let you use my broker for this test then I could check the logs.

mc-T2:
Hey guys,
one thing that I have seen happen sometimes with IFTTT is that you, on occasion, need to reconnect your maker channel. I can't seem to find the reason why the channel needs to be reconnected (maybe there is updates on the IFTTT side?). You can do this when you log into maker.ifttt.com (after you sign up for IFTTT service of course). If you do run into issues, attempt to re-connect your IFTTT maker channel. Re-connecting also will give you a new key if you need a new one for whatever reason.

Also, please note that IFTTT recipes are case-sensitive which may be a cause of some issues for some folks

flookdigital:
Hi guys

I'm just trying again to see if I can get the temperature to post to my IFTTT account/google drive

It's still not working?

Can someone send me the correct text so I can test.

I have two files running

First is 'Tony3'
Class TempSETUP
    Shared Event checktemp() RaiseEvent Every 30 Seconds
        Dim temp As Float = TempSensor.GetTemp()
        Dim tempstring As String = temp.ToString()
       
        Lplan.IFTTT("ixPSxhVnzVN2Fw-PZ5gkDdaGxToDLkLTtpMQ7axDQ7R", "Grinder", tempstring, "", "")
       
       
    End Event
   
    Shared Event blinkgreen() RaiseEvent Every 500 milliSeconds
        LedGreen = Not LedGreen
       
    End Event
   
End Class   


And the second is 'Temp Sensor'
Class TempSensor
    // Function returns the temperature in degree celcius or
    // Float.NaN if something is wrong
    Shared Function GetTemp() As Float
        // Define the properties of the I2C peripheral and device address
        Dim sensor As I2c
        sensor = I2c.Create(250000, Pin.SCL, Pin.SDA, 0x48)
       
        // Power up the sensor and give it some time to settle
        Device.EnableTempSensor()
        Thread.Sleep(40000) // See page 13 of the datasheet
       
        // Read the sensor (only 2 bytes to read
        Dim res As ListOfByte = sensor.Read(2)
       
        // See Tmp102 documentation how to interpret the data (page 8)
        Dim temp As Float = Float.NaN
        If res <> Nothing Then
            // Shift the partial part to the right nibble
            Dim part As Float = res(1) >> 4
            // Temperature partial is 1/16*n where n is between 0 and 15           
            part = part / 16
            // Sign extend the byte to an integer
            temp = res(0).SignExtend() + part
        End If
       
        // power off
        Device.DisableTempSensor()
        Return temp
    End Function
   
    Shared Function GetDieTemp() As Float
        // Just get the temperature and return
        Return Device.TempDie
    End Function
   
    Shared Function ToFarenheit(celcius As Float) As Float
        Return (celcius * 9) / 5 + 32
    End Function
   
    Shared Function ToCelcius(farenheit As Float) As Float
        Return (farenheit - 32) * 5 / 9
    End Function
   
End Class

Navigation

[0] Message Index

[*] Previous page

Go to full version