Jump to content

ESP8266 based "Smart" lighting contactor (or Laph's decent into madness)


Laphroaig

Recommended Posts

:rofl:...nowt wrong with decent madness bud, it's the obscene stuff you have to avoid.........:rofl:

  • Like 1
Link to comment
Share on other sites

Day Three

 

Well the sun is shining and it's a lovely day outside, after spending most of yesterday with my nose in a computer screen trying to make sense of how virtual pins work in Blynk I'm still utterly clueless as to what is going on and how to read/write On/Off values to/from my I2C pins (P0-7) to virtual Blynk pins.  It's obviously something basic as they don't mention it anywhere.  It's like I missed that lesson so I'm going to sit down and watch all the Arduino videos on YouTube until something clicks as I'm completely stumped right now.  

 

Similarly Blynk isn't all I expected it to be, I'm still trying to figure out how to create a timer that allows multiple timed on/off events, I've managed to create a control that I can use to specify an on and off time, but it won't allow me to create more than one daily on/off event per pin.  

 

I'm not feeling very positive right now, hopefully I'll find YouTube inspirational :) 

Edited by Laphroaig
Link to comment
Share on other sites

Keep plugging on, it's sure to click eventually.

Have you looked at cayenne as an alternative to blynk?  I have used it on a pi, and I think it works with Arduino too.

Link to comment
Share on other sites

3 hours ago, Laphroaig said:

Day Three

 

Well the sun is shining and it's a lovely day outside, after spending most of yesterday with my nose in a computer screen trying to make sense of how virtual pins work in Blynk I'm still utterly clueless as to what is going on and how to read/write On/Off values to/from my I2C pins (P0-7) to virtual Blynk pins.  It's obviously something basic as they don't mention it anywhere.  It's like I missed that lesson so I'm going to sit down and watch all the Arduino videos on YouTube until something clicks as I'm completely stumped right now.  

 

Similarly Blynk isn't all I expected it to be, I'm still trying to figure out how to create a timer that allows multiple timed on/off events, I've managed to create a control that I can use to specify an on and off time, but it won't allow me to create more than one daily on/off event per pin.  

 

I'm not feeling very positive right now, hopefully I'll find YouTube inspirational :) 

 

This Blynk looks like a layer of complexity alright, have you got I2C working without trying to control it through an app?

 

Like I keep banging on about I2C is a cunt but I am biased and I have only used raw C which is a lot more complicated than the Arduino method which simplifies everything to the point you never understand whats going on but for comms protocols you really need a scope, a scope is a life saver for everything electronics I dunno what funds you have available but scopes are a lot cheaper these days

 

All the n00bs on the net go for them Rigol scopes and I suppose they are good value for money but I am an Agilent (now Keysight) fanboy myself and I hated the Rigol scope I used look here

 

https://www.keysight.aspen-electronics.com/edux1002a?gclid=EAIaIQobChMIr-jjks3u2gIVsQrTCh1fYQDxEAkYASABEgI3r_D_BwE

 

£363 might sound a lot but it would save you a lot of time and headaches and give you insight into whats actually happening, its a bargain it wasnt that long ago those scopes started at £1000 minimum

 

I also have a Salea logic 16 which is a brilliant piece of kit for looking at I2C and SPI etc, the company is amazing the hardware and software really really top draw but they are really expenive and its just a data logger, I believe they do real time viewing now but I havent tried that I use mine almost everyday to pass data to Matlab and it works flawless

 

https://www.saleae.com/?gclid=EAIaIQobChMIj4DS-s3u2gIV7pztCh2JRwcaEAAYASAAEgLdS_D_BwE

 

It is expensive I think theres chinese copies available

 

I know this isnt what you wanted to hear but when things arent working you need to be able to see whats actually happening and a scope is the tool of choice

Link to comment
Share on other sites

lol I don’t even have a multimeter!  Regarding the I2C pins, they’re behaving as expected, I just need to add a “pcf8574.” prefix to pinMode and digitalWrite commands etc. and P0-7 behave just like the IO pins on the ESP8266 board.  Except of course they’re completely invisible to Blynk until I can find some way of tieing them into the Blynk virtual pins.

 

What there’s no Arduino sketch for an oscilloscope!   No oscilloscope shields available?  Of course if I wasn’t a stubborn idiot I’d grab one of those AT Mega boards with 50+ Digital IO pins and use the WeMos D1 board for something else.  Sadly even a few hundred on an oscilloscope right now is out of the question but I can just about justify £15-20 for another board and Wi-Fi shield if it’ll at least give me the ability to manage all the relays on GPIO pins and ditch the need for I2C.  Just wish I had the damn relays here so I cold see if there’s a power issue or not.

  • Like 1
Link to comment
Share on other sites

On 05/05/2018 at 0:11 PM, Mr blue said:

Keep plugging on, it's sure to click eventually.

Have you looked at cayenne as an alternative to blynk?  I have used it on a pi, and I think it works with Arduino too.

  

I just had a squint at this and it looks interesting, it could even be a better fit that Blynk, I'm going to take a closer look, thank-you for the heads-up :) 

Link to comment
Share on other sites

Day .... lost count

 

It looks like there aren’t going to be any short cuts, looking forward to more arduino lessons today.  Have ordered a atmega 2560 board for the IO pins and an ESP01 WiFi breakout board and I’m thinking about getting a Pi to run MQTT. 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use