Today I've worked on documenting everything and cleaning the office. Seeing through that all passwords can be found and so on.
It's been an adventure working here and I've learned so much.
CAN
SPI
Linux
Raspberry pi
PHP
Troubleshooting
Python
SMS
Email
MySQL
Leadership
Communication
Fika
Cars, Snowbikes and motors
Blogging
Thank you Kivo
Andreas, Anton, Magnus, Maria, Ida, Erik, Katomen and the rest I've met. You are seriously amazing people!
LIA Kivo AB (finished)
Almost every working day I've written a summation of the work as an intern at Kivo in Örnsköldsvik, Sweden. The work I've done is a marketinganalysis about IoT, Systemdesign of a general IoT-surveillence system and troubleshooting the electronics of Kivos homealarm. Python, Linux, Raspberry pi, CAN, SPI, MySQL, PHP, Agile and workflows.
fredag 3 februari 2017
torsdag 2 februari 2017
Documentation and polishing and autostart and ssh is a bit to learn
Today I've documented most of the classes so it's easy to understand and applicable to other programs. I also polished and made so that the alarm connects to a webcam and saves a picture on the r-pi. I didn't have time to add it to the email.
ssh with passwords and autossh is a bit tricky, there are a lot of small things to learn. I guess calling someone who knows would save time!
Tried to make the alarm start automatically when r-pi boots up, but can only do linux-commands and not start the pythonprogram... Hmm.
Tomorrow I'll do a transfer of the work to Anton so he knows the system. Maybe I'll have time to make the alarm startup automatically when booted, then it feels like a running prototype that kivo actually can use.
ssh with passwords and autossh is a bit tricky, there are a lot of small things to learn. I guess calling someone who knows would save time!
Tried to make the alarm start automatically when r-pi boots up, but can only do linux-commands and not start the pythonprogram... Hmm.
Tomorrow I'll do a transfer of the work to Anton so he knows the system. Maybe I'll have time to make the alarm startup automatically when booted, then it feels like a running prototype that kivo actually can use.
onsdag 1 februari 2017
Email solved? SMS solved. left is autossh.
Today I worked on getting an SMS from a site when it notices that the raspberry pi hasn't uploaded data to a database at the expected time.
I also fixed the email, but not wil really logging into Bineros account (i think), but just usting a few lines from here. So extremely simple.
So now, if the r-pi now lose connection, in five minutes I will get an SMS and Email telling me it got offline. I'm turning it on now before I go home for today and I expect the SSH-tunnel to break in 12 hours, so in the middle of the night I will get an SMS. (I allways put my phone on silent during the night, so I can sleep).
Feels kinda good, tomorrow I'll try fixing the autossh so that the tunnel goes on and make the r-pi start everything up when it's started. After that I'll focus on documentation for the rest of the LIA. I haven't got any mail from Binero about fixing an autossh-tunnel, have they forgotten me?
There is still much I haven't done and can be improved. I have learned sooo much. Especially about SMS, Email, PHP, Linux, r-pi and electronic.
I also fixed the email, but not wil really logging into Bineros account (i think), but just usting a few lines from here. So extremely simple.
So now, if the r-pi now lose connection, in five minutes I will get an SMS and Email telling me it got offline. I'm turning it on now before I go home for today and I expect the SSH-tunnel to break in 12 hours, so in the middle of the night I will get an SMS. (I allways put my phone on silent during the night, so I can sleep).
Feels kinda good, tomorrow I'll try fixing the autossh so that the tunnel goes on and make the r-pi start everything up when it's started. After that I'll focus on documentation for the rest of the LIA. I haven't got any mail from Binero about fixing an autossh-tunnel, have they forgotten me?
There is still much I haven't done and can be improved. I have learned sooo much. Especially about SMS, Email, PHP, Linux, r-pi and electronic.
tisdag 31 januari 2017
Still email-problems with Binero, focused on PHP and MySQLi
I've made a simple website now that shows:
Raspberry pi last upload: 2017-01-31 14:21:12
Raspberry pi has been offline: 48.37 minutes
Offline warning
sending SMS...
sending mail...
Uploading alarmtime...
If the raspberry pi doesnt upload data within 1 minute, it reacts.
I have not yet fixed the mail-sending, sms-sending or uploading alarmtime. But it calculates a correct deltatime since the r-pi been up and reacts.
Tomorrow I'll focus on making the SMS part and uploading alarmtime done. The alarmtime is the time when this site sends the Offline warning. If that isn't saved somehow, the site will continually send sms. We just want one sms.
Raspberry pi last upload: 2017-01-31 14:21:12
Raspberry pi has been offline: 48.37 minutes
Offline warning
sending SMS...
sending mail...
Uploading alarmtime...
If the raspberry pi doesnt upload data within 1 minute, it reacts.
I have not yet fixed the mail-sending, sms-sending or uploading alarmtime. But it calculates a correct deltatime since the r-pi been up and reacts.
Tomorrow I'll focus on making the SMS part and uploading alarmtime done. The alarmtime is the time when this site sends the Offline warning. If that isn't saved somehow, the site will continually send sms. We just want one sms.
måndag 30 januari 2017
Binero, SMTP and an image from webcam
I couldn't fix the TLS error by myself and I thought I'd buy some time by calling Binero about the problem. We talked and then he started looking at my uploaded code, he said he was going to mail me about the problem so I don't have to wait in the phone. 2 hours later nothing, so I'll check tomorrow.
In the mean time I focused on writing the rapport for school and connected r-pi to the webcam to get an image, this image is going to be sent by email if there is an alarm. Neat?
And I learned some about TLS STARTTL and SSL.
In the mean time I focused on writing the rapport for school and connected r-pi to the webcam to get an image, this image is going to be sent by email if there is an alarm. Neat?
And I learned some about TLS STARTTL and SSL.
fredag 27 januari 2017
SSH tunneling magically works
Somehow when I tried to connect and try what I tried yesterday, it worked. Instead of getting:
_mysql_exceptions.OperationalError: (2013, "Lost connection to MySQL server at 'reading initial communication packet', system error: 0")
I got the name of the database version used (I sent the SQL "SELECT VERSION()")
I checked the connections with netstat and ps aux and it seemed like yesterday.
I tried to replicate the error but it allways worked now. So I went to upload some mysql.
I got stuck like half an hour because I forgot commit()... But then I got it to work so now the database is updated every 10 min with sensordata. So now I can fully focus on the server-part. (I'm going to have problems in the future with SSH and if I have time I'll look into autossh to fix this)
Then I started to look at sending email from the server again. No significant progress but I narrowed it down to that TLS seems not to be started by my PHP-script. So Tomorrow I'll be checkin' if that's the solution to the error:
authentication failure [SMTP: STARTTLS failed (code: 220, response: 2.0.0 Ready to start TLS)]
I am also VERY happy of my troubleshooting documenting system I talked about in a previous post. This helps SO much to have all the relevant history. I also think it helps me focus about the right concepts and remember to forget about things that is not important. Get it?
_mysql_exceptions.OperationalError: (2013, "Lost connection to MySQL server at 'reading initial communication packet', system error: 0")
I got the name of the database version used (I sent the SQL "SELECT VERSION()")
I checked the connections with netstat and ps aux and it seemed like yesterday.
I tried to replicate the error but it allways worked now. So I went to upload some mysql.
I got stuck like half an hour because I forgot commit()... But then I got it to work so now the database is updated every 10 min with sensordata. So now I can fully focus on the server-part. (I'm going to have problems in the future with SSH and if I have time I'll look into autossh to fix this)
Then I started to look at sending email from the server again. No significant progress but I narrowed it down to that TLS seems not to be started by my PHP-script. So Tomorrow I'll be checkin' if that's the solution to the error:
authentication failure [SMTP: STARTTLS failed (code: 220, response: 2.0.0 Ready to start TLS)]
I am also VERY happy of my troubleshooting documenting system I talked about in a previous post. This helps SO much to have all the relevant history. I also think it helps me focus about the right concepts and remember to forget about things that is not important. Get it?
torsdag 26 januari 2017
SSH tunneling is so hard
Made MySQL program in python and it works with my windows laptop. I use putty to make the SSH-tunnel. But on my r-pi with linux i need to write stuff like:
ssh -fNg -L 3306:xxxxxxxxx.mysql.binero.se:xxxxxxxx@ssh.binero.se
And it makes me so confused. I managed to understand a lot but I think I have to learn a lot more before I get this to work... Going to continue with it tomorrow anyhow. Maybe I'll post on stack overflow for this one.
ssh -fNg -L 3306:xxxxxxxxx.mysql.binero.se:xxxxxxxx@ssh.binero.se
And it makes me so confused. I managed to understand a lot but I think I have to learn a lot more before I get this to work... Going to continue with it tomorrow anyhow. Maybe I'll post on stack overflow for this one.
Prenumerera på:
Inlägg (Atom)