Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bailejor

Pages: [1]
1
mc-Gateway / Re: Updated gateway now connection problems
« on: June 26, 2017, 07:15:16 pm »
Thanks again for your reply. I was using SSID and that was working fine. After the update I was only able to connect using WPS. The SSID did not work.

2
mc-Gateway / Re: Unable to connect to Losant via gateway
« on: June 26, 2017, 07:14:09 pm »
Thanks for your reply. I did so a number of times. I also just attempted to get MQTT to work and I cannot get the android client to connect to the server. The process seems straightforward enough. I have no idea what is going on.

3
mc-Gateway / Updated gateway now connection problems
« on: June 19, 2017, 08:19:45 pm »
I just updated the gateway to v0.9 (both host and app) and now the gateway will not connect via wifi (it was prior to the update). It will, however work over ethernet.

It's been a pretty frustrating experience between Losant not functioning and now this...

4
mc-Gateway / Unable to connect to Losant via gateway
« on: June 18, 2017, 09:24:03 pm »
Hello,

I've had some serious difficulties with connecting to Losant and running the following code

Code: [Select]
Class LosantDoor
 
 
    // Device ID of Peripheral in Losant
    Const LosantDeivceId As String = "594445eb57dcc600060018d5"
    // MQTT topic in Losant
    Const LosantTopic As String = "losant/" + LosantDeivceId + "/state"
 
    Shared _doorState As String
    Shared _doorcount As Integer
 
    Shared Event Boot()
        _doorState = "Open"
        _doorcount = 0
    End Event
 
    Shared Event ReedSwitchChanged()
        'debounce interrupt
        Thread.Sleep(100000)
        Thread.ClearHardwareEvent()
        LedRed = True
        If ReedSwitch = True Then
            _doorState = "Open"   
            _doorcount = _doorcount + 1
        Else
            _doorState = "Closed"
        End If
        sendMQTTData()
        LedRed = False
    End Event
 
    Shared Event CheckSensors() RaiseEvent Every 60 Seconds
        sendMQTTData()
    End Event
 
    Private Sub sendMQTTData()
        Dim tempTMP102string As String = TempSensor.GetTemp().ToString()
        Dim battShort As Short = Device.BatteryVoltage()
        Dim battFloat As Float = battShort / 1000
        Dim battString As String = battFloat.ToString()
 
 
        // Create data JSON object
        Dim dataJson As Json = New Json
        dataJson.Add("battery", battString)
        dataJson.Add("temperature", tempTMP102string)
        dataJson.Add("doorState", _doorState)
        dataJson.Add("doorCount", _doorcount)
 
 
        // Create Losant preferred JSON object
        Dim losantPayload As Json = New Json
        losantPayload.Add("data", dataJson)
 
        // Publish to Losant MQTT
        Lplan.Publish(LosantTopic, losantPayload.ToListOfByte)
 
    End Sub
 
End Class

I did everything listed in the "Getting started with MC-Things and Losant" guide and could not get the gateway or mc-module to connect to Losant. I tried it on both my home network and mobile hotspot. For both the gateway and module it says "Awaiting first connection to Losant".

Any tips?

5
mc-Module / Re: Firmware update broke connection
« on: May 02, 2017, 04:21:51 pm »
The Gateway version is 0.6-367 and the LPLan is 0.7-403.

I was able to update the application processor with a flash drive, but I can't use Mc-OTA to update the other processor because the mcdongle will not detect the mcgateway.

Thanks for your time by the way. It is much appreciated.

6
mc-Module / Firmware update broke connection
« on: April 28, 2017, 06:30:17 pm »
I just updated my firmware to v.8-415 and I can no longer connect to the module via the gateway (Tried probably 50 times and waited as long as 300 seconds). I also can no longer find the gateway nor the module with the Mcdongle. Anyone have any suggestions?

7
mc-Things General Discussion / Accelerometer Code Issue
« on: April 28, 2017, 03:43:21 pm »
Hello,

I'm attempting to get accelerometer code from the examples of Github working, but whenever I attempt to use it I get "DataType LIS2DH12 is not defined"

I guess it's not clear to me how to make use of the accelerometer library. Here is the code I was attempting to run:

Code: [Select]
Class LISDH12_Test
    Shared accel As LIS2DH12
   
    Shared Event Boot()
        accel = New LIS2DH12
       
        'set accelerometer to cause interrupt if accelation is > 1.15Gs for longer than 2ms (any axis)
        accel.ConfigureShockInterrupt(1.15, 2.0)
    End Event
   
    Shared Event AccelerometerInt1()
        'debounce interrupt
        Thread.Sleep(100000)
        Thread.ClearHardwareEvent()
       
        'Read Int source register to clear interrupt
        If ((accel.GetINT1ActiveInterrupt() & LIS2DH12.INT_ACTIVE) = LIS2DH12.INT_ACTIVE) Then
            'interrupt generated
           
            LedRed = Not LedRed
           
        End If
       
        'restart interrupt       
        accel.SetINT1ActiveInterrupt(LIS2DH12.INT_SRC_XH | LIS2DH12.INT_SRC_YH | LIS2DH12.INT_SRC_ZH)
    End Event
End Class   

Pages: [1]