IOT_Made_Easy - or not?
-
- Valued Contributor
- Posts: 1320
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 321 times
- Been thanked: 462 times
Re: IOT_Made_Easy - or not?
Thought I'd save some for tomorrow. Now on Talisker which never disappoints
-
- Valued Contributor
- Posts: 1320
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 321 times
- Been thanked: 462 times
Re: IOT_Made_Easy - or not?
Hi
As you might have guessed, the Talisker did an astounding job and I highly recommend it (although Highland Park may be more geographically suited ). Today was more theory than practical. I thought about doing stuff but the chances of that happening were practically zero....
How did you get on with IME?
Found the old drive that may contain using mqtt to update TS. If it does I'll post.
Regards
As you might have guessed, the Talisker did an astounding job and I highly recommend it (although Highland Park may be more geographically suited ). Today was more theory than practical. I thought about doing stuff but the chances of that happening were practically zero....
How did you get on with IME?
Found the old drive that may contain using mqtt to update TS. If it does I'll post.
Regards
-
- Valued Contributor
- Posts: 1320
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 321 times
- Been thanked: 462 times
Re: IOT_Made_Easy - or not?
Hi
Simulating my mqtt chart updated TS however I think it is corrupted somehow as it displays variables not used in the project at all. I need to look at it in daylight before posting.
Regards
Simulating my mqtt chart updated TS however I think it is corrupted somehow as it displays variables not used in the project at all. I need to look at it in daylight before posting.
Regards
-
- Valued Contributor
- Posts: 1224
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 119 times
- Been thanked: 628 times
Re: IOT_Made_Easy - or not?
I haven't tried this evening - bad day at work (no rest for the wicked?)
Something not right - FC running very slowly (and lots of crashes in sim).
So wrote a brainf**k compiler - for a much more frustrating language. It sort of works - just got to get around the wdt on esp32 (it is slow! - though hello world works pretty quickly) and do the input.
The program to print 'A' (----[---->+<]>++.) works. Just attempting 'Hello world' - which also works !!!!
(++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>++.>+.+++++++..+++.<<++++++++++++++.------------.>+++++++++++++++.>.+++.------.--------.<<+.)
Then to try mandelbrot.bf (someone has done it)
See https://en.wikipedia.org/wiki/Brainfuck
Martin
Something not right - FC running very slowly (and lots of crashes in sim).
So wrote a brainf**k compiler - for a much more frustrating language. It sort of works - just got to get around the wdt on esp32 (it is slow! - though hello world works pretty quickly) and do the input.
The program to print 'A' (----[---->+<]>++.) works. Just attempting 'Hello world' - which also works !!!!
(++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>++.>+.+++++++..+++.<<++++++++++++++.------------.>+++++++++++++++.>.+++.------.--------.<<+.)
Then to try mandelbrot.bf (someone has done it)
See https://en.wikipedia.org/wiki/Brainfuck
Martin
-
- Valued Contributor
- Posts: 1224
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 119 times
- Been thanked: 628 times
Re: IOT_Made_Easy - or not?
After a bit more 'fiddling':
I couldn't get IOT_MadeEasy to work, nor the MQTT component.
So - back to basics with the NetworkComms component. And finally - a working MQTT update from a esp32 (phew)
One issue - I had SSID and Password as constants in main - Wifi fails to connect (an issue with string constants?) You'll need to change these to match your router's details (in the ConnectToSSID macro).
I call the user agent 'LoftMonitor' - you 'might' need to change this (I changed this to the thingspeak mqtt devices ClientID - though this may not be necessary)
You'll need to set key (a local in main) to your WriteAPIKey.
Here - it sends an integer to field1 (increases by 10 (% 100)) every 20s
It actually works !!! With the value changing on the thingspeak display in (almost) real time.....
It also outputs the data written to thingspeak to the UART (for debug purposes). There is a complete lack of error checking (connection / anywhere)
Martin
I couldn't get IOT_MadeEasy to work, nor the MQTT component.
So - back to basics with the NetworkComms component. And finally - a working MQTT update from a esp32 (phew)
One issue - I had SSID and Password as constants in main - Wifi fails to connect (an issue with string constants?) You'll need to change these to match your router's details (in the ConnectToSSID macro).
I call the user agent 'LoftMonitor' - you 'might' need to change this (I changed this to the thingspeak mqtt devices ClientID - though this may not be necessary)
You'll need to set key (a local in main) to your WriteAPIKey.
Here - it sends an integer to field1 (increases by 10 (% 100)) every 20s
It actually works !!! With the value changing on the thingspeak display in (almost) real time.....
It also outputs the data written to thingspeak to the UART (for debug purposes). There is a complete lack of error checking (connection / anywhere)
Martin
-
- Valued Contributor
- Posts: 1320
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 321 times
- Been thanked: 462 times
Re: IOT_Made_Easy - or not?
Hi
Sorry, a little busy this week and I've not had time to post my TS mqtt file. If using the "free" version of TS then you are limited to how many posts you can make and also frequency too. I could only reliably post every 12 - 15 seconds or so.
Regards
Sorry, a little busy this week and I've not had time to post my TS mqtt file. If using the "free" version of TS then you are limited to how many posts you can make and also frequency too. I could only reliably post every 12 - 15 seconds or so.
Regards
-
- Valued Contributor
- Posts: 1224
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 119 times
- Been thanked: 628 times
Re: IOT_Made_Easy - or not?
Yes - seems to be limited in some way. Just reached 60 samples and it's stopped ?
Will play some more tomorrow.
I used the thing speak code from the Arduimo which gave a 'POST' command of:
I'm not sure how the Channel ID fits in to it all though. The (Arduino) code has a channel id but never seems to use it. I just used the WriteAPI code - but the ' GET ...." on the thingspeak site seemed to work when used as an URL in a browser but I couldn't make it work on MCU.
Hope the work is going smoothly!
Martin
Will play some more tomorrow.
I used the thing speak code from the Arduimo which gave a 'POST' command of:
Code: Select all
POST /update HTTP/1.1
Host: api.thingspeak.com
User-Agent: LoftMonitor
X-THINGSPEAKAPIKEY: MyAPIKey
Content-Type: application/x-www-form-urlencoded
Content-Length:23
field1=30&headers=false
Hope the work is going smoothly!
Martin
-
- Valued Contributor
- Posts: 1320
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 321 times
- Been thanked: 462 times
Re: IOT_Made_Easy - or not?
Hi
I've been down South (or up North depending on viewpoint) for a few days this week in the Lake District. I've not been there since childhood and I'd forgotten how beautiful it is. Day trips, so long days and I'm just heading off there again today. No hardship with the scenery I pass through
As a bonus (if needed) Cumbria has loads of craft breweries so I'm thinking of renting a dreyhorse instead of a car
Regards
I've been down South (or up North depending on viewpoint) for a few days this week in the Lake District. I've not been there since childhood and I'd forgotten how beautiful it is. Day trips, so long days and I'm just heading off there again today. No hardship with the scenery I pass through
As a bonus (if needed) Cumbria has loads of craft breweries so I'm thinking of renting a dreyhorse instead of a car
Regards