thinger IOT project

Intel or AMD? nVidia or ATI? Lenovo or ASUS? All things computing hardware go here

thinger IOT project

Post by pretentious on Sun Apr 23, 2017 12:09 am
([msg=93625]see thinger IOT project[/msg])

For anyone interested in this area, I'm playing around with my own home IOT(internet of things) set up. I'm using http://thinger.io as my server. Basically it allows you to hook up hardware to the main system via most networking methods and expose an arbitrary restful interface to the server using C/C++. Documentation seems pretty scarce but I've only gone in ankle deep. I've got 2 web servers running at my house at the moment, using raspberry pi's that I'm gonna hook up(raspberry toggle is feeding me light states every hour which I'm graphing woohoo :lol: (hopefully I can do alerts or something) and the other has a light sensor I can harvest data from) and I'm getting some blue tooth and wifi modules and relays which is where the real magic is gonna happen. I'll keep you guys posted 8-)
Goatboy wrote:Oh, that's simple. All you need to do is dedicate many years of your life to studying security.

IF you feel like exchanging ASCII arrays, let me know ;)
Can you say brainwashing It's a non stop disco
User avatar
pretentious
Addict
Addict
 
Posts: 1141
Joined: Wed Mar 03, 2010 12:48 am
Blog: View Blog (0)


Re: thinger IOT project

Post by boriz666 on Wed Apr 26, 2017 7:03 am
([msg=93635]see Re: thinger IOT project[/msg])

Hey pretentious ,
sick good to hear that you are tinkering with IOT stuff, its an amazing field
that i am quite into myself.

I use a rapberry pi as the main hub to get censor information from my other
home made devices through CAN bus, which i like a lot due to the robustness
of the protocol and hw.

I have started to make a LCARS gui in QT, on my main linux box, and the idea
is that it will interface with the raspberry pi (via http) and get the sensor data from there
and also it can send commands to the rpi, which lights it should turn on / off etc.

The server part on the rpi, i use a embedded webserver project called mongoose,
which i am pretty happy about, its been running for a year now without a problem.

All the sensors i make are homemade aswell as the control circuitry for the light
switches etc.

Will be loooking forward to progress updates on this, its very very interesting to
work with stuff like this, that can control the real world.
boriz666
Experienced User
Experienced User
 
Posts: 93
Joined: Tue Mar 24, 2015 11:53 am
Blog: View Blog (0)


Re: thinger IOT project

Post by pretentious on Tue May 02, 2017 4:14 am
([msg=93658]see Re: thinger IOT project[/msg])

So I got a raspberry pi 3, which comes with bluetooth and wifi out of the box. It was pretty easy to install thinger.io on a ubuntu machine but raspian was a massive headache. thinger uses snap which is a modern replacement for aptitude which I tried to get installed on my pi, and gave up. I ended up rage quitting after to days of tying and bought the thinger.io raspberry pi image https://thinger.io/product/raspberry-pi ... io-server/

I hooked up both of my raspberry pi web servers with thinger_client daemons and got some graphing going on
http://stumay.net/wp-content/uploads/20 ... g_1335.jpg
Something that I'm disappointed by(not a super big deal) is that documentation is pretty scarce/non existant it seems for linux clients. I mean embedded tutorials have you covered but I'd love to run background daemons on my local hosts and fire off emails and sms's when interesting things happen.

I got a WeMos D1 wifi enabled arduino compatible board from ebay which, with a bit of intitial set up got it connecting to my wifi
Super psyched about this. I was really surprised how easy it was. Just ran some example code and boom.
http://stumay.net/wp-content/uploads/20 ... g_1344.jpg

aaand about 3 seconds later, got it connected to my thinger.io server and exposed a 'relay' interface and my relay is controllable
http://stumay.net/wp-content/uploads/20 ... g_1347.jpg

Next thing to do is to wire the relay into my desk lamp and control it via the arduino.(gonna buy some gear to make this not a fire hazard first)
boriz666 wrote:home made devices through CAN bus, which i like a lot due to the robustness
of the protocol and hw.

One of my colleagues suggested this :) , I'm gonna look into it, but I think most of this stuff is taken care of in my case
boriz666 wrote:All the sensors i make are homemade aswell as the control circuitry for the light
switches etc.

I envision myself making stuff internet ready by voltage dividing the cricuit to power my IC on the side and using the GPIO's to interface with the circuitry inside. Have you tried this? pros cons and pitfalls?
boriz666 wrote:Will be looking forward to progress updates on this, its very very interesting to
work with stuff like this, that can control the real world.

Right now, It's winter in Aus, so I'm getting a temperature/humidity sensor and will try and hack my room heater :P
I want to make my circuits as small as possible and glue them into the appliances that I hack but I've found that I'm probably gonna save time, money and effort to just use premade boards like the D1
Goatboy wrote:Oh, that's simple. All you need to do is dedicate many years of your life to studying security.

IF you feel like exchanging ASCII arrays, let me know ;)
Can you say brainwashing It's a non stop disco
User avatar
pretentious
Addict
Addict
 
Posts: 1141
Joined: Wed Mar 03, 2010 12:48 am
Blog: View Blog (0)


Re: thinger IOT project

Post by boriz666 on Wed May 03, 2017 3:59 am
([msg=93664]see Re: thinger IOT project[/msg])

I envision myself making stuff internet ready by voltage dividing the cricuit to power my IC on the side and using the GPIO's to interface with the circuitry inside. Have you tried this? pros cons and pitfalls?


I'd not recommend using a voltage divider circuit to power your ic, its not very stable
and its very load dependant on providing the correct voltage.

Instead use a voltage regulator like http://ww1.microchip.com/downloads/en/D ... 22008E.pdf.
(MCP1702)

When interfacing with circuitry from your micro controller, always be sure that its logic level is the same
as your micro, a 3.3v micro will be fried if the thing you wanna controll is 5v logic level.

For working with 220v ac mains, i always buy some cheap relay boards on ebay, they are controllable directly
from a raspberry pi, or a microcontroller.
http://www.ebay.com/itm/3V-10A-1-Channe ... SwX61ZB-Sr

I had a 8 channel relay board running for several years, controlled by a rpi, with no problem at all, just make
sure that you dont plug in more stuff than your fuse can handle. I am controlling mostly lamps with mine,
so its not even close.

I am soon going to make my newish microwave oven connected to the lan, via wifi, so it can be controlled
from the local lan, I think I am gonna make some kind of tutorial for it so people possible can learn
something about it.

The microwave has a lot of buttons, each of which need a gpio pin. I'd normaly use a ESP8266 wifi solution,
but I need more gpio pins, both for keys and to read the status of the microwave.
If its finished or not and idealy how much time is left.

So I'll make a combination of a PIC18F2480 and a ESP8266 wifi module, that way i can also make it CAN ready
cause the pic has a can controller build in.
boriz666
Experienced User
Experienced User
 
Posts: 93
Joined: Tue Mar 24, 2015 11:53 am
Blog: View Blog (0)


Re: thinger IOT project

Post by pretentious on Tue May 16, 2017 9:16 pm
([msg=93701]see Re: thinger IOT project[/msg])

this project has been a little 1 step forward 2 steps back in the last few weeks.
I got my d1 to toggle a relay and turn my desk lamp on but got some strange issues when resetting the arduino.
I ran this by my embedded engineer colleague and he's like where is your flyback diode and I'm like, my flyback what? lol so it hasn't been quiet plug and play. My thinger server also crapped itself and wouldn't even boot at about the exact time i was looking for alternative iot solutions and found thingsboard, which has a lot more documentation and provides several networking standards built in(mqtt http) which means i can build custom apps which just need to send the right http messages and they can be part of my network. An issue I'm having with thingsboard is that its heavy. The instructions to install it on my pi are to cripple cassandra so that it doesn't turn my pi into a silicon puddle. I'm exaggerating lol but it does feel resource heavy, was build for aws after all i guess. So at this point I have a temperature/ humidity sensor that I'm trying to connect to my server. It gets an ip and pushes data at the server but I'm still working on the servers back end config
Goatboy wrote:Oh, that's simple. All you need to do is dedicate many years of your life to studying security.

IF you feel like exchanging ASCII arrays, let me know ;)
Can you say brainwashing It's a non stop disco
User avatar
pretentious
Addict
Addict
 
Posts: 1141
Joined: Wed Mar 03, 2010 12:48 am
Blog: View Blog (0)


Re: thinger IOT project

Post by boriz666 on Thu May 18, 2017 3:32 am
([msg=93705]see Re: thinger IOT project[/msg])

Greetings Sir,
I thought you was using a relay board like:
http://www.ebay.com/sch/i.html?_from=R4 ... d&_sacat=0

But it seems you are using your own relay, to control it.
Because there is a coil in the relay, when current flows a magnetic field is generated which
turns the relay on, thats good and dandy, but when the relay turns off the field collapses and
current stops flowing fast which means that the voltage will spike, and that can damage your
circuitry.

To "lead" the voltage spike away you place a diode across the coil of the relay as pr this
https://electronics.stackexchange.com/q ... and-relays, a single
diode is normaly sufficient.

Also, how do you turn on the relay? Do you use the microcontroller pin directly (which is not
preferred as turning on a relay takes a lot of current, compared to what a mcu can handle),
or do you use a mosfet?

I made a small schematic of how to connect and controll the relay.
Image

The mosfet you wanna use is whats called a logic level mosfet, that is, its "opened" with a
low voltage,at around 3.3v.

PS.
Everything with an inductor in it should have a flyback diode in it, that is relays, motors,
actuators etc.
boriz666
Experienced User
Experienced User
 
Posts: 93
Joined: Tue Mar 24, 2015 11:53 am
Blog: View Blog (0)


Re: thinger IOT project

Post by pretentious on Tue May 23, 2017 9:31 pm
([msg=93721]see Re: thinger IOT project[/msg])

Disregard my last post speculating about the circuitry of my relay. I'm using an srd-05vdc-sl-c like the ones you linked. These use 5v logic and my dev board has 3.3v gpios which i think caused unexpected results and i am way out of my depth, academically here, so i went down some weird rabbit hole lol. Ahh well, this is how mastery works, I'll buy 5 and break 4.
Making a mental note to update you guys with some progress and pics after work.
Goatboy wrote:Oh, that's simple. All you need to do is dedicate many years of your life to studying security.

IF you feel like exchanging ASCII arrays, let me know ;)
Can you say brainwashing It's a non stop disco
User avatar
pretentious
Addict
Addict
 
Posts: 1141
Joined: Wed Mar 03, 2010 12:48 am
Blog: View Blog (0)



Return to Hardware

Who is online

Users browsing this forum: No registered users and 0 guests