Automated Window Blinds - Spark Core

The Core is now $39 and the Photon is $19. Can I use this project using the Photon?

Yes, the cloud layer from Particle remains the same for both devices.

1 Like

When adding a device in the IDE, what is the difference between the Device ID and the Device Network ID?

I think I’ve done everything correctly. Flashed Spark Core, added new ST device type, added a device. Pasted in Device ID/Access token. Attached Futaba 3003 to A7 and power and ground to breadboard. Thing shows up in the ST app but servo doesn’t move.

Odd, glad somebody else is working on this now, I ordered my photons so they should be shipping this month. I typically don’t touch Device network ID. I think that fills in automatically if it’s a zigbee or sometimes wifi devices. My Wemo’s show their MAC address in there. Perhaps try that if you can find it somewhere.

Hi @Pete and @keithcroshaw,
Device ID is a short address, usually used by zigbee to address a device. This is not mandatory so you can skip this one when creating a virtual device. Device Network ID is the unique identifier of each device connected to SmartThings, this is required and has to be unique, that’s why some times we use MAC address for LAN devices. You can enter anything here, the only requirement is to be and remain unique.
Hope this helps!

2 Likes

Good to know. I’m trying not figure out which part I’m getting wrong as I believe it might something really obvious. When I toggle the switch in the app, it gets stuck “Turning Off” and then always reverts to an On state.

If you share the code here I can take a look :smile:

1 Like

I’m following the exact same steps as the OP (https://github.com/jjhtpc/Spark-Blinds)

I feel like I’m so close…

1 Like

Try removing line 45 and 46, it make no sense there since is not checking for an OK message from the device.
state “turningOn”, label:’${name}’, icon:“st.switches.switch.on”, backgroundColor:"#79b821"
state “turningOff”, label:’${name}’, icon:“st.switches.switch.off”, backgroundColor:"#ffffff"

That made the “turning off” state of the switch disappear and it goes straight to “off” but upon refresh it always reverts to an always On state

Hi @Pete,
Try replacing this 2 functions:

def on() {
sendEvent(name: “switch”, value: “on”);
put ‘1’

}

def off() {
sendEvent(name: “switch”, value: “off”);
put ‘0’
}

2 Likes

:open_mouth: This might have done it. The event’s state now registers in “List Events”, as does “Current States” whereas before they didn’t. The slider bar doesn’t seem to work but I don’t care about that yet…

However, I am at work and my servo is connected at home. I will check when I get back!

Servo is rotating! Such a magical moment for me :smiley: Thanks @juano2310!!! However, it only rotates 90 degrees. I think the fix would be in the Core’s firmware code.

Edit: Oops, I’m dumb. 180-degree rotation would go from completely closed to completely closed again. So 90 is right :slight_smile:

Congratulations! Glad it worked!

Has anyone integrated solar power options?

Hi @Pete,
Maybe this can give you an idea https://community.particle.io/t/battery-powered-weather-station-with-solar-charging/6835/6

1 Like

Thanks @juano2310. I am looking into building a charger but also considering some commercial options for cost/time effectiveness. A search yielded some options, such as:

Wondering what you guys think. I may buy one to test it out but not sure if the the battery will hold up over time or what it means by “1800mAH can be used circularly for 500 times”

Just FYI I purchased one like that connected to my Adafruit Trinket blind controller and it did not charge enough to keep the battery full enough to power the board alone. Results may vary based on solar exposure. I had about 40% shade where it was.

Some kind of translation/transcription error. (“Serially”? “Sequentially”? “Repeatedly”?)

Most likely means you can fully charge the battery 500 times before it may no longer hold a charge. 500 cycles is the typical warranty for a NiMH battery.

I’m done university in 2 days, I will get my code posted at that point, and do some work on it :slight_smile: