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 - Labmaster

Pages: [1]
1
mc-Studio / Re: Where are the McStudio Logs
« on: December 01, 2017, 11:08:45 am »
Thanks, I'll try that the next time I have the problem.  It is working for me right now.

2
MQTT / Re: Cayenne My Devices
« on: December 01, 2017, 11:06:10 am »
I actually got it working last night.  It turns out that I had 2 devices defined in MyDevices.com, and I was using the correct client ID in the gateway, and the wrong clientID in the code.

This is the most recent version of my working code:
Code: [Select]
    // MQTT topic in MyDevices.com - v1/username/things/clientID/data/channel
    Const mdTopic As String = "v1/" + mdUserId + "/things/" + mdClientId + "/data/" + mdChannel
    //Const mdTopic As String = "kevin/MyDevicesCom/test"
    Shared Event CheckTemp() RaiseEvent Every 3600 Seconds
        Dim temp As Float = TempSensor.GetTemp() // Get Temp from sensor
        Dim tempString As String = temp.ToString()
        // Create temp JSON object - { "temperature" : "23.06" }
        Dim tempJson As Json = New Json
        //tempJson.Add("temperature", tempString)
        tempJson.Add("temp,c=", "99")
        // Create Wia preferred JSON object - { "data" : {"temperature" : "23.06"}}
        Dim wiaPayload As Json = New Json
        //wiaPayload.Add("data", tempJson)
        wiaPayload.Add("temp,c=99")
        Dim mdPayload As ListOfByte = New ListOfByte
        Dim mdData As String = "temp,c=" + tempString
        //mdData = "temp,c=99"
        mdPayload.Add(mdData)
        // Publish to wia MQTT
        Lplan.Publish(mdTopic, mdPayload)

3
mc-Studio / Re: Where are the McStudio Logs
« on: November 29, 2017, 09:24:41 pm »
BTW... v0.9.534.0 of McStudio

4
mc-Studio / Re: Where are the McStudio Logs
« on: November 29, 2017, 09:23:52 pm »
Interesting... Reboot, no McDongle connected, and McStudio opens now.

5
mc-Studio / Re: Where are the McStudio Logs
« on: November 29, 2017, 08:56:43 pm »
Thank you.  I found the logs in the location that you mentioned.

I tried to start the application to look up the version (and tweak the code) (it is the latest version, or maybe one version back), but it won't open now.  I can see the McScript.exe running in the process list, but there is no Window for the application.

I had this problem a few days ago, and it I fixed it by plugging in the McDongle.  I'm not sure if that is required, I didn't read anything that said I have to have McDongle attached in order to run McStudio.

Anyway, McDongle is plugged in now, and I still can't get McStudio to open window (the process is running).  I tried removing McDongle, same problem.  Plug McDongle in again, same problem.

I'm running Windows 10.  The last thing I remember doing that is odd is connecting to a wireless hotspot.  I'm not connected to it now.  Main wired connection has always been plugged in.

Any thoughts?  Anyone know a trick how to open a window from a running EXE?

6
mc-Studio / Where are the McStudio Logs
« on: November 28, 2017, 10:48:32 am »
I turned on logging for my Gateway in McStudio, but I can't find the logs.

7
IFTTT webhooks is not working for me either, through McGateway.  I know that I have webhooks setup correctly because I can send a trigger to IFTTT using a powershell module from the Powershell Gallery.

Install-Module -Name PSTriggerIfttt
PS C:\WINDOWS\system32> Import-Module PSTriggerIfttt
PS C:\WINDOWS\system32> Send-IftttMakerEvent -EventName 'HelloWorld' -secretKey 'SecretKey' -Value1 'Hello' -Value2 'World'
Congratulations! You've fired the HelloWorld event
PS C:\WINDOWS\system32>

8
MQTT / Re: Cayenne My Devices
« on: November 27, 2017, 11:41:42 pm »
My Devices has MQTT support now.  I'm trying to send temperature, but I can't figure out correct lplan.publish stuff.

Code: [Select]
// MQTT topic in MyDevices.com - v1/username/things/clientID/data/channel
    Const mdTopic As String = "v1/" + mdUserId + "/things/" + mdClientId + "/data/" + mdChannel
    Shared Event CheckTemp() RaiseEvent Every 10 Seconds
        Dim temp As Float = TempSensor.GetTemp() // Get Temp from sensor
        Dim tempString As String = temp.ToString()
        // Create temp JSON object - { "temperature" : "23.06" }
        Dim tempJson As Json = New Json
        //tempJson.Add("temperature", tempString)
        tempJson.Add("temp,c=", "99")
        // Create Wia preferred JSON object - { "data" : {"temperature" : "23.06"}}
        Dim wiaPayload As Json = New Json
        //wiaPayload.Add("data", tempJson)
        wiaPayload.Add("temp,c=99")
        Dim mdData As String = "temp,c=99"
        // Publish to wia MQTT
        Lplan.Publish(mdTopic, mdData.ToListOfByte)
        Lplan.
       
        // Blink Red LED after publish to MyDevices.com
        LedRed = True
        Thread.Sleep(100000)
        LedRed = False
    End Event   

9
I can see it now.  I had to update the application host portion of the gateway.  That was painful because I had to try 4 USB sticks to find one with low power requirements.

10
I am trying to work through the temperature project on hackster that connects to WAI.io.  (https://www.hackster.io/mc-Things/temperature-monitoring-using-mcthings-and-wia-io-3ba7da).

The first thing I did was enter the Gateway config, and now I can't connect to the Gateway in McStudio.

I have the latest version of everything (Except maybe application host on the Gateway).  I can connect to the Gateway with OTA updater, but not McStudio.  I updated the firmware (to the same version, the latest).  I erased scripts and data store.

Tried Wifi and wired network (again, I can see it in OTA udpater, so I am on the right network).

Still can't see it in McStudio.

How can I do a factory reset on the Gateway

Kickstarted bundle with gateway 100 and 5 modules.

Pages: [1]