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
-
[ESPimatic]ESPimatic : ESP8266 modular sensor for Pimatic [v0.1.26]
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=FSrbHQzGACcLike 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
-
just another idea (im working on):
using esp module as RGB controller over wifi… so you are able to send RGB Codes via Pimatic to ESP Module… and get the colorfull light that you want… whereever the ESP is installed
problem here still is: https://github.com/esp8266/Arduino/issues/836
(the mentioned workarounds do not work) -
All HTML is finished now, should not change anymore.
Polish the ‘api’ some more, clean up some weird code jumps and remove debugging to serial. Hop to publish tommorowLike my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
@koffienl said:
All HTML is finished now, should not change anymore.
-
As it looks now, code will be released tommorow. To speed up some things I took some time to write a few things down.
A little info / manual about ESPimatic.
What started as ‘hey, I want to build a ESP8266 that will send the temperature of a DS18B20 to pimatic’ lead to the current project ESPimatic.
What can you do with ESPimatic?
You can get temperature (and/or humidity) from a DS18B20 and/or a DHTxx sensor. The value is send to pimatic on a interval. To see the value of the sensor you can connect a dual 8x8 LED Matrix. Further you can connect up to 4 relays, controlled from pimatic.How to install ?
Download all the files from GitHub, compile the sketch and upload to your ESP. It is HIGHLY RECOMMENDED to have a ESP with 4mb flash size. If you plan to update future versions through webinterface, do no forget to correctly configure your board in Arduino
After flashing the ESP will boot up in Acces Point modus, and format a virtual drive in flash. Connect to ssid ESPimatic with password espimatic. Open http://192.168.4.1 in your browser.
You will see a very simple page with the option to upload files. Upload all the HTML files (one by one) you downloaded from GitHub. When finished, reboot your ESP! This can be done with the url http://esp-ip//api?action=reboot&value=true (or simply plug the power )After uploading and rebooting it is time to configure ESPimatic.
First you have to tell what available GPIO’s you have. In the ‘configure’ menu select System -> GPIO
Select the GPIO’s you have/want available for ESPimatic, leave unusable unchecked.Next thing to do is configure pimatic. In the ‘configure’ menu select System -> Pimatic and fill in the the information to contact your pimatic system.
Your ESPimatic is now ready to use.
Short info about all the menu options:
Hardware -> DS18B20
Here you can configure a DS18B20 sensor. Only one sensor is supported. You can only choose free GPIO’s. Don’t forget to tell the name of the variable in pimatic for updating.
Hardware -> LED Matrix
Here you can configure a LED Matrix (MAX7219). You can only choose free GPIO’s. The LED Matrix has 5 wires:
VCC
GND
DIN
CS
CLK
You should connect CLK to GPIO14 and DIN to GPIO13 , CS is free to configure. When enabling LED Matrix, GPIO 14 and GPIO13 are automaticly set is used. Select what you want to see on the matrix. Nothing will keep the matrix displaying “OK” or “AP” after startup. When the matrix is enabled, it will fill up the rows during wifi connecting.
Hardware -> IR LED
Here you can configure a IR LED. You can only choose free GPIO’s. To use this, you have to use pimatic. Create a random variable and set it with the IR value of your desired device/function. The create a rule with the following command:
execute "sudo curl --silent --data ‘action=ir&value=$ir’ http://esp-ip/api > /dev/null"
This will pass the IR value to the ‘api’ and will drive the IR Led. For more info about obtaining IR commands see this lib : http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html
Hardware -> Relay
Here you can configure up to 4 relays. You can only choose free GPIO’s. To turn a relay on or off, use the api command.
Hardware -> DHT
Here you can configure a DHT sensor. You can only choose free GPIO’s. You should configure what DHT type you have. I only have a DHT11 and have not test this very much, I find DHT unreliable. Don’t forget to configure your pimatic variable.
System -> WifI
Configure / change your WiFi settings here. When ESPimatic can’t connect to your configured network, it will fall back to access point modus (ESPimatic / espimatic).
System -> Firmware
Use this to upload a compiled BIN file to your ESP. If you alter the code yourself, don’t forget to keep everything for uploading and writing a BIN or you will loose this function. Also make sure you compile with correct board settings (flash size) or it will fail to update!
System -> Reset
Caution : This will delete every save option in EEPROM (including wifi)!
System -> Filemanager
A more GUI based page to upload and delete files on the ESP. Files you will delete will be los forever. Files you upload with the same name will be overwritten without warning.
Saving the follwoing settings will cause a mandatory reboot:
- DS18B20
- LED Matrix
- IR LED
- Relay
- DHT
- WiFi
- Reset
Every page has a Refresh and a Reboot button on the navbar. Refresh will reload the save settings from the ESP. Reboot will ask you to confirm and send a reboot to the ESP.
API
It is not realy a API, just some simple URL’s to do some stuff. Supported actions:
action = ir , value = 3420,1592,500,1128, … this will blast the IR code in the aire
action = reboot , value = true This will reboot the ESP
action = matrix_brightness value=[0-8] change the brightness of the LED Matrix
action = matrix_display , value = [on-off[ turn the LED Matrix on or off
action = relay[1-4] , value = [on-off[ turn the relay x on or off
action = clearerror , value wifi,ds18b20,eeprom,upgrade] This will clear a error. Should be done automaticly by the website(s).
action = reset , value=true This will clear all EEPROM settings, including wifi!By default you can access the page http://esp-ip/format , this will format the SPIFFS filesystem without asking or warning! You can disable this in the code if you like.
Known issues:
- DHT could be buggy. Not tested very well because I rarely use one. Only tested with DHT11
- No mDNS support. This sucks and should never be used. Useless thing that I won’t support
- JS/CSS for bootstrap and jquery are loaded from internet. For now it takes to much SPIFFS space and slows down the pages to much.
- Relays are shortly tested but should work without any issues.
Bugs/problems
Please report in THIS TOPIC and I will try to take a lookForking/commting to Git etc
I’m not a developper, my code is rubbish. I have not very much knowledge of the GitHub system. For now please accept that I won’t merge codes or something like that with github. If you have any ideas or bugfixes report in this topicLike my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
*takes his hat off and bows…
Looks great! Too bad i will be going on Holiday soon so no time to test…
One thing i’m missing though…no PIR input?? Or is there a workaround using a DHT sensor input and basing rules tot that value??
-
@koffienl Please put this on post #1
-
Forgot some info about the LED Matrix and the sensors.
When the sensors produce garbage data (example -127 on a DS18B20 because it’s not connected) the matrix will display garbage by random turning dots on or off (looks like a QR Code ). There is a assumption the value to display is allways between 0 and 99 , could be fixed in future version but for now it works.Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
See updated startpost for the code
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
Dutch post about ESPimatic : http://koffie.tweakblogs.net/blog/12540/diy-draadloze-temperatuursensor-voor-pimatic-en-meer!
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
could i get it work on a ESP-01??
I don’t know how much flash size they have, but it stops on uploading the the html-files at firmware.html…
-
esp01 has usually either 512kb or 1024kb
you can do a memory upgrade on your chip https://www.youtube.com/watch?v=xyc1gCjguRU
but i guess it’s easier and cheaper to buy an esp with 4MB rampimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
@xCite86 Since you allready have filemanager.html uploaded, goto http://esp-ip/filemanagr.html and delete a other file. Upload root.html this page will tell you how much flash (SPIFFS) space you have used.
I’m affraid the BIN file and the seperate HTML files might be to much for a ESP-01Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
What are you planning to do with the ESP? As long as you have the filemanager.html on the flash you could try some tricks.
Make sure you upload pimatic.html for the pimatic credentials. Then delete pimatic.html and upload gpio.html to select available GPIO’s. Delete it again and upload the HTML file for the desired sensor.
A lot of work , but this way you could test some things. Meanwhile you can order a other ESPLike my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm