Interesting, didn’t know that
Can you post some screenshots of your project ?
[ESPimatic]ESPimatic : ESP8266 modular sensor for Pimatic [v0.1.26]
Interesting, didn’t know that
Can you post some screenshots of your project ?
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
When it is ready, then i will make a little blog entry about this.
It is a WordClock full with features and Wlan :bowtie: .
At the moment i build the Web Server and my dad build the Hardware.
But at moment i have nothing done in the Ajax stuff. Wait for my esp with 4MByte Flash.
Would you share some code? I will publish my code too, later (mid February).
pimatic rocks!!!
Code will be posted on github as soon as I have a functional project
Your project sounds nice!
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
@Icesory said:
The problem is, when your ESP runs in AP mode an your device has not cached all the jquery stuff. You got a problem. Because your device thinks that the ESP provides the Internet connection and cant download the necessary files. You should put all core elements on the ESP. And it is not so extreme.
In my case i need these files.jquer-1.11.3.min.js = 94kByte
jquery.mobile-1.4.5.min.js = 196kByte
jquery.mobile.structure-1.4.5.min.css = 68kByte
jquery.mobile.icons.min.css = 125kByte
jquery.mobile.theme.min.css = 11kByteAnd i can reduce the icons files down to only used ones.
I tried loading those to the spifs but found it to be horribly slow at serving all the files, even as gzipped. For that to work well the webserver woululd need to send 302 unmodified responses.
Did you find it being usable with perhaps a later release of the esp/arduino stuff?
@beikeland said:
@Icesory said:
The problem is, when your ESP runs in AP mode an your device has not cached all the jquery stuff. You got a problem. Because your device thinks that the ESP provides the Internet connection and cant download the necessary files. You should put all core elements on the ESP. And it is not so extreme.
In my case i need these files.jquer-1.11.3.min.js = 94kByte
jquery.mobile-1.4.5.min.js = 196kByte
jquery.mobile.structure-1.4.5.min.css = 68kByte
jquery.mobile.icons.min.css = 125kByte
jquery.mobile.theme.min.css = 11kByteAnd i can reduce the icons files down to only used ones.
I tried loading those to the spifs but found it to be horribly slow at serving all the files, even as gzipped. For that to work well the webserver woululd need to send 302 unmodified responses.
Did you find it being usable with perhaps a later release of the esp/arduino stuff?
Did you server 1 HTML with several JS/CSS files included? When I build several seperated HTML functions (build from strings) to serve a HTML and include a second CSS it was a bit slower because the webserver was getting more requests. Perhaps it is the webserver that get a bit slow on multiple requests?
Other question : are there some small feature requests / idea’s to implement in my project?
For now I have added :
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
@koffienl My additional requirements/feature requests are
@Heizelmann said:
@koffienl My additional requirements/feature requests are
- no internet requried (fancy UI is not necessary)
- running on esp8266-01 with small flash memory
- deep sleep option (for battery powered sensors) with internal timer or external interrupt
No internet depends on the SPIFFS speed in next version
How mush mem has the ESP-01 ? Current BIN file is a little under 400 kb
Deep sleep is alos on the long list, have not played with it. Perhaps next version
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
The flash mem of the esp01 is usually 512kb to 1 MB.
the newer version is 1MB
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebook
make it so !
@koffienl said:
@beikeland said:
@Icesory said:
The problem is, when your ESP runs in AP mode an your device has not cached all the jquery stuff. You got a problem. Because your device thinks that the ESP provides the Internet connection and cant download the necessary files. You should put all core elements on the ESP. And it is not so extreme.
In my case i need these files.jquer-1.11.3.min.js = 94kByte
jquery.mobile-1.4.5.min.js = 196kByte
jquery.mobile.structure-1.4.5.min.css = 68kByte
jquery.mobile.icons.min.css = 125kByte
jquery.mobile.theme.min.css = 11kByteAnd i can reduce the icons files down to only used ones.
I tried loading those to the spifs but found it to be horribly slow at serving all the files, even as gzipped. For that to work well the webserver woululd need to send 302 unmodified responses.
Did you find it being usable with perhaps a later release of the esp/arduino stuff?
Did you server 1 HTML with several JS/CSS files included? When I build several seperated HTML functions (build from strings) to serve a HTML and include a second CSS it was a bit slower because the webserver was getting more requests. Perhaps it is the webserver that get a bit slow on multiple requests?
I had html with external css and js; total 6 requests i believe. Took several seconds to load. But if the esp webserver parsed the incommong request and replied 304 not modified for subsequent requests for static content it should be significantly faster. But I just kinda gave up on it tbh.
edit; corrected 302 to 304 as the http code
Need this not for pimatic but i need to switch 2 floorheatings so they can remotely turn on the heating.
Any info when something will be released?
I came accross this project - https://github.com/SmingHub/Sming
This project includes lots of samples code. Have a look at https://github.com/SmingHub/Sming/wiki/examples for an overview, the MeteoControl in particular.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
Help needed
All settings are stored in EEPROM, so the used GPIO’s are also stored in EEPROM. You can’t read from EEPROM until the setup() loop.
For the DS18B20 I ahve solve this:
#include <OneWire.h>
#include <DallasTemperature.h>
uint8_t ONE_WIRE_BUS;
OneWire oneWire = OneWire(ONE_WIRE_BUS); // Setup a oneWire instance
DallasTemperature sensors(&oneWire); // Pass our oneWire reference to Dallas Temperature
DeviceAddress insideThermometer;
void setup()
{
String busStored = HandleEeprom(ds18b20pin_Address, "read");
String resoStored = HandleEeprom(ds18b20resolution_Address, "read");
ONE_WIRE_BUS = busStored.toInt();
oneWire = OneWire(ONE_WIRE_BUS);
sensors.begin();
sensors.getAddress(insideThermometer, 0);
}
So, I tried the following code:
#include "DHT.h"
uint8_t DHTPIN;
uint8_t DHTTYPE;
DHT dht = DHT(DHTPIN, DHTTYPE);
void setup()
{
dht = DHT(dhtpin.toInt(), DHT11);
dht.begin();
}
But this give me ‘nan’ as answer to reading the temp. Changing it back to normale code works.
Can somone help me to solve the puzzle to assign a pin to the DHT after setup ?
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
@koffienl Reading from EEPROM during setup is possible in general. May be it is an issue with your library.
Solved.
the input of the pin should be as uint8_t , not as int. Didn’t gave a error but also didn’t work
edit : no it wasn’t … just stupid user error, reading the wrong infro from EEPROM. Feeling stupid now
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
The way I was serving the HTML was drving my crazy. Allthough all the HTML was in progmem it did gave me a lot of crashes upon loading.
Moving to SPIFFS right now. I can upload a BIN for flashing and write HTML to the SPIFFS, and can serve HTLM from SPIFFS.
So again some delay in publication, but I want some things to work perfect before publishing on github
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
First page is old, pushing bursts of data with progmem, second page is same page but directly from flash :o
https://www.youtube.com/watch?v=FSrbHQzGACc
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
Did a test with all the bootstrap and jquery CSS/JS files on the ESP but it’s getting slugish for every reboot. Had some chat with @beikeland about sending unmodified headers. For now I keep laoding them from online resources, other stuff to do first.
Meanwhile I created a filemanager for uploading and deleting files to the flash:
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
@koffienl said:
So again some delay in publication, but I want some things to work perfect before publishing on github
Nice job! Waiting for the day when you publish it
+1 waiting for some sweet relaeses!
I have a ESP laying around here somewhere, doing nothing…for now!
Polishing the rough ends right now
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm