Any guide for setting up Nodemcu as device type?


(Casper) #1

Is there anyone in the forum already done this before? I’m trying to create a device type for Nodemcu to control a continuous servo from ST.

I actually found this threadAutomated Window Blinds - Spark Core, but the code isn’t for Nodemcu.


Any device handler that can pull data from an API and display as a single tile?
(Justin Wurth) #2

If this is arduino and has a 5v vin you should be able to mirror this project replacing the photon functions with whatever interface this provides


(Casper) #3

Thanks for reply @jjhtpc, yes I was able to connect a servo to nodemcu board and was able to control the servo using some LUA script, but I’m not sure how to build this code to it…

I only have experience on the RPi (was able to create device type and connect to ST) but Adruino board is all new to me, the reason I wasn’t purchase the Spark device/another RPi is cost.


(Chris) #4

I would look into using UPNP since ST can discover them and subscribe to UPNP events (WeMo and Sonos work this way) then use http requests to control it. A simple example is here (not the best, but I am on my phone and getting ready for work).

Check out the WeMo connect smartapp on the ST public github for how to discover and add them as devices.

I have a few of these modules but haven’t had chance to play :confused:


(Casper) #5

Thanks a lot, the code looks promising but I need to play a little more