Feeding in Sensor Data from the MKR1000 to the gateway

I’d like to use an MKR1000 with some intputs (sensors) to control and monitor different things in the home such as temperature for example or use a potentiometer to control the brightness of the lights … I don’t have to use the MKR1000 but I’d like to so I can make individual sensors to be placed around the home (rather than attached physically to the raspberry pi).

Has anyone else worked on this kind of set up or could you point me to relevent code/tutorials that might help to get sensor data controlling other devices which are not connected to the raspberry pi?

Hi yes I have similar ideas in mind, you could try using websockets or HTTP rest (IoTivity could be handy too) you can also check the ESP8266 demos… or reuse my works using generic sensors.

https://s-opensource.org/2018/04/25/mozilla-iot-generic-sensors/

Hi, i’ve composed a small post about a BME280 on the MKR1000, with a REST API similar to the Web Thing API: https://thngstruction.online/blog/building-a-rest-api-on-arduino-mkr1000-platformio.md. Maybe it’s helpful to you.

@kgiori, @hobinjk - What have you got working with the MKR1000 so far?

I’ve only been showing off the basic built-in LED control via the Things Gateway. It’s sort of the “Arduino Blink” or “Hello World” example for showing off a Web of Things implementation. It gets people started for an intro workshop.

What might be interesting is to have a fairly “standardized” approach to converting existing sensor libraries into web things. There are SO many libraries though, and not necessarily a consistent way they are structured. Maybe we have to put forward some “process” ideas for how best to help developers convert legacy Arduino-framework sketches into web of things monitored and controlled devices.

What we want to do is convert the http-on-off-wifi101 example (in github) to a native web thing example, but I think we need more core web library support for that WINC1500 module first…

Thanks for all the replies and helpful info.

At the moment I have the built in LED on the MKR working using the http-on-off-adapter.
If I get anywhere I’ll let you know but it sounds like this might be one for a while down the road.

@kgiori I am also interested on “standardized approach to convert sensors into webthings” any suggestions ?

I can share some bits using analog sensors on arduino: