Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Electronics : Cloud based (Remote) Home Automation
Author | Message | ||||
mackoffgrid Guru Joined: 13/03/2017 Location: AustraliaPosts: 460 |
I need to bite the bullet and implement remote Monitoring and Home Automation of the solar power infrastructure including hot water. My equipment can remain unattended for months at a time so remote access to logging and control is required. Browser based not smart phone (I don't have one). I have satellite NBN and a few spare raspPis. So I can interface to all my gear via serial, I'll probably make one arduino device be a master to interface to everything else. I have a VPS or can set up a new Digital Ocean VPS, but I'm looking for low / no cost cloud infrastrucure. I'd rather simple drop and drag software but I'm willing to go to the next level if I should or need to. I guess my starting point is this thread home automation and solar Cheers Andrew |
||||
davef Guru Joined: 14/05/2006 Location: New ZealandPosts: 499 |
Hi Andrew, Have you got any cell coverage? $4/month from Warehouse Mobile (NZ) and a $30 Wingle from Aliexpress. I have two, with one as a backup, for remote monitoring. I send data once a day in .csv format. You might need a cellphone to set up the account, but using their Dashboard at home to monitor your usage and topping up the account is relatively painless. I could control stuff by specific messages in Gmail's subject line using Python and having the RaspberryPi check your Gmail account every so often. Tested this but not using as I try to keep all the control local. I played around with Hologram cloud, the developer version for 1MB free/month. Small problem with that is that unless you really know your way around using it is that data can be quite expensive. Like, 1-4KB just to send a few bytes of real information. I use email2sms.ausiie.co.au to send me alarm messages to my cellphone and Gmail. Now, I will read the linked thread :) Dave |
||||
davef Guru Joined: 14/05/2006 Location: New ZealandPosts: 499 |
A lot has happened in two years! Edited 2019-08-18 14:33 by davef |
||||
poida Guru Joined: 02/02/2017 Location: AustraliaPosts: 1418 |
I have some logging and control function with my solar power system. It uses an RPi and a Nano, which is connected via a USB cable. There are two charge controllers, both Morningstar, one a MPPT and one a PWM. Logged data is stored on the SD card of the RPi, which is dodgy long term due to finite life of SD card memory. The structure has the RPi load and run a program at boot time, which every 2 minutes - via MODBUS over TCP/IP obtains all the running data from the MPPT charge controller - via MODBUS over RS-232 obtains all the running data from the PWM controller - via Linux USB serial port, obtains some data from the Nano. - creates a new row of data in the MYSQL database stored on the RPi SD card. As the RPi is handling all this, it can run a web server, to provide a view of the logged data. And I can log in via SSH at any time to maintain or restart things. And I can synchronise the data with other databases located at work or remotely hosted anywhere. I do this so I can play with the data in a fast responding environment. To make this system function I had to program in C, HTML, PHP, PYTHON and JAVASCRIPT. Not a problem for me. The advantage of doing it all myself in particular storing my data locally is that there are no API call rate limiting, no costs, and my data will never be held ransom. I highly recommend the Digital Ocean $6/month services where you get a linux box and SSH. This is cheap for what it is and it gives complete control over data ownership. The linux running on the RPi is quite similar to Ubuntu v16 or v18 which is on offer at D.O. so there is not a lot of problems caused by having two systems. If building it again, I would probably do it the same way (RPi data collection and storage, with sync to remote hosts for backup when the SD card dies) Take a look at my system? remote, fast web server smtp.bqdesign.com.au:81/mppt/czoomg.php RPi, located at home, slow cpu, poidapie.chickenkiller.com/mppt/c19d.php As for control, I have 2 optocoupler isolated outputs, driven by the RPi GPIO. I use one pin to control the inverter (Run it or stop it). I have found the GPIO outputs are not reliable long term. I need to restart the logging/control program once in 14 days to permit the pins to be driven again sometimes. As an alternative, I could drive things via the Nano. That would just work. wronger than a phone book full of wrong phone numbers |
||||
mackoffgrid Guru Joined: 13/03/2017 Location: AustraliaPosts: 460 |
Dave, I do have cell coverage. I don't need it for this job but eventually I need to remote diesel water pump control and maybe security. (although I have no idea on how reliable the NBN satelite modem + router is.) Your method of sending data once a day, SMS alerts and Gmail for control is certainly a reliable system. I would hazard a guess that the ESP32 could handle all of that as well. Peter, I sense what you are saying is right about using propriety APIs, and Dave also mentioned, is fraught with future problems. Peter, both urls seem quite responsive, so no problem there. I am starting to wonder if I should avoid the RPI and stick to microcontrollers to shift the data off site, since the site can be unmanned for up to several months and is a 3+ hour drive to hit the Reset button. Cheers Andrew Edited 2019-08-18 19:25 by mackoffgrid |
||||
mackoffgrid Guru Joined: 13/03/2017 Location: AustraliaPosts: 460 |
There is so much IOT stuff out there, most of it probably not really suited to my needs. I've decided to take a leaf out of Dave's and Peter's ideas as a first stage but may well progress on to using a more glitzy platform at a later stage. I've pared down my first objectives: - The system to run without the main batteries. - Control Hot Water Inverter (no battery required) Second Stage: - Switch the main batteries, inverter in. I'll be using relays etc to do this so the power capacity will be reduced, which won't be a problem. Just needs to be able to run a fridge, slow charger etc. Some interesting links: OpenHab Sonoff wifi switches etc Ebay Sonoff - cheap Cheers Andrew |
||||
yahoo2 Guru Joined: 05/04/2011 Location: AustraliaPosts: 1166 |
Hi Andrew, i cant show you any of my stuff cos i have pulled it all to pieces getting ready for a rebuild. I have been playing with home assistant and nabu casa for my remote. Nabu casa costs money but i am paranoid about retaining control of all my gear inside my local network if I can. i could point you in the right direction if you want to run ESPhome or Tasmota on your sensors and controls. it is far easier than it was even 4 months ago. I'm confused, no wait... maybe I'm not... |
||||
mackoffgrid Guru Joined: 13/03/2017 Location: AustraliaPosts: 460 |
Thanks for the references. There is just so much IOT / Home automation out there - I feel I'm just scratching the surface. The ESP products including Sonoff / Tasmota are very well placed to take a large role in home automation. Apart from doing our own home brew, the open source field seems to come down to home assistant and OpenHab. I found a review of these two here: Best of open source smart home: Home Assistant vs OpenHAB While my mind is still swimming around with the various ideas I feel I will go with the primitive approach initially similar to what Dave has done just to get the basics going. I see no reason why I cant run dual interfaces and build up to running one of the Home assitant or OpenHab. Yahoo2, since you have experience with Home assistant I'll probably look there for the fancier IF Just for reference sake; Free remote DNS duck DNS Cheers Andrew Edited 2019-08-26 08:15 by mackoffgrid |
||||
yahoo2 Guru Joined: 05/04/2011 Location: AustraliaPosts: 1166 |
while my system is down I am using some (unflashed) tp-link switches with energy monitoring and the Kasa app they provide on my phone. ikea's tuya, shelly and sonoff and a dozen others will do the same thing. it will do some basic time based logic and I can use IFFT (if this then that) for some automation. plus its cheap! the downside is that I cant set a local "last will and testament" so that the device reverts to a known state when it gets isolated (cloud server down or phone is down) the upgrade is happening because I am not happy running a pi3 on a SD card, I'm moving to something with some proper memory. I dont know if it is getting stuck in a loop and continuously writing to the card or I was having voltage problems. I am also going to try some zigbee stuff with this conbee hub to see what I can do without relying on wifi. I'm confused, no wait... maybe I'm not... |
||||
mackoffgrid Guru Joined: 13/03/2017 Location: AustraliaPosts: 460 |
Yes, I'm a little suspect of the reliability of the Rpis for remote access. I'm going to try to use stm32F1 with ethernet to provide primitive access to the system. What do you plan to use instead of the RPI? |
||||
yahoo2 Guru Joined: 05/04/2011 Location: AustraliaPosts: 1166 |
intel NUC or a scrapped laptop or a single board computer with eMMC (ram memory). I'm confused, no wait... maybe I'm not... |
||||
davef Guru Joined: 14/05/2006 Location: New ZealandPosts: 499 |
Hi Andrew, I came unstuck trying to use NoIP (DNS) on my cell-based system. I have heard that there are probably ways around it, but couldn't find a helpful HowTo. My RPi has been running for 2-3 years without reliability issues. The support for that product is streets-ahead of any other platform |
||||
mackoffgrid Guru Joined: 13/03/2017 Location: AustraliaPosts: 460 |
Mmm, I don't know why NoIP wouldn't work? I have used a RPI program in the past that emailed the change of IP. |
||||
davef Guru Joined: 14/05/2006 Location: New ZealandPosts: 499 |
What is the name of the program? Thanks, Dave |
||||
mackoffgrid Guru Joined: 13/03/2017 Location: AustraliaPosts: 460 |
It was a couple of years ago so my memory was a bit off. I had a bash script that worked on the RPI #!/bin/bash NOWIP=$(curl ipecho.net/plain 2>/dev/null) OLDIP=$(cat /usr/ip/myoldip 2>/dev/null) if [ "$NOWIP" = "$OLDIP" ]; then exit else echo $NOWIP > /usr/ip/myoldip echo "$NOWIP" | mail -s "Cabin has new IP $NOWIP" andrew@myfavoriteemail.com fi I had a Windows program called MrIP which emailed the change of IP address. I did a google and found MrIP from CNET Cheers Andrew |
||||
mackoffgrid Guru Joined: 13/03/2017 Location: AustraliaPosts: 460 |
I've not used this but it seems the RPi has the facility built in. Configure Raspberry Pi Hardware to Mail IP Address Changes Cheers Andrew |
||||
poida Guru Joined: 02/02/2017 Location: AustraliaPosts: 1418 |
Duck DNS is simple to use. Instructions for RPi https://www.duckdns.org/install.jsp#pi A one line cron job. wronger than a phone book full of wrong phone numbers |
||||
davef Guru Joined: 14/05/2006 Location: New ZealandPosts: 499 |
Thanks guys for posting the links. Andrew, how did you connect the Rpi to the cell provider? I was using a smartphone operating as a hotspot, but currently I am using a Huawei Wingle (3G USB dongle). Thanks, Dave |
||||
mackoffgrid Guru Joined: 13/03/2017 Location: AustraliaPosts: 460 |
Hi Dave Sorry for my delayed response, I didn't see it. Not unusual for me that I got distracted; I haven't tried anything yet. Btw, are you able to access SMS received by the wingle (on the wingle number) ? Cheers Andrew |
||||
davef Guru Joined: 14/05/2006 Location: New ZealandPosts: 499 |
Hi Andrew, Me too, just noticed this! The Pi, at the remote location running Python, sends a message via Google's SMTP server to AussieSMS who in turn sends a SMS message to my cellphone. The Wingle just sends the alarm message to AussieSMS. $20 for 100 texts. I have played with a Python program that looks at an email's subject line but that means you have to be connected to the internet either all the time or at set times so you can send a message to control something at the remote end. Cheers, Dave |
||||
Print this page |