Page 1 of 1
Issue in Rules and sendtohttp
Posted: 13 Apr 2019, 03:33
by thegoldeneagleCT
Hi all first post! I just got into esp and 8366 programming. I plan on using them to report temperature and humidity to my vera controller. i got 2 working with a DHT22 and that part is working fine, but i cant seem to get the rules working. It looks like the request is being truncated into multiple parts. in the rules section i have the following:
Code: Select all
on System#Boot do
timerSet,1,10
endon
On Rules#Timer=1 do
SendToHTTP 192.168.3.109,3480,/data_request?id=variableset&DeviceNum=64&serviceId=urn:upnp-org:serviceId:TemperatureSensor1&Variable=CurrentTemperature&Value=[LRmedia#Temperature]
timerSet,1,60
endon
but it adds a few extra line breaks in the sendhttp seen here (this is in the rules editor)
on System#Boot do
timerSet,1,10
endon
On Rules#Timer=1 do
SendToHTTP 192.168.3.109,3480,/data_request?
id=variableset&DeviceNum=64&serviceId=urn:upnp-
org:serviceId:TemperatureSensor1&Variable=CurrentTemperature&Value=[LRmedia#Temperature]
timerSet,1,60
endon
Code: Select all
log shows as :
86983000 : EVENT: Rules#Timer=1
86983004 : ACT : SendToHTTP 192.168.3.109,3480,/data_request?
86983221 : ACT : id=variableset&DeviceNum=64&serviceId=urn:upnp-
86983230 : ACT : org:serviceId:TemperatureSensor1&Variable=CurrentTemperature&Value=71.24
86983253 : ACT : timerSet,1,60
Does anyone have an idea as to what this is? i tried to google it but i am not really sure why the extra line breaks are being added, is it something i am doing wrong?
Thanks
Re: Issue in Rules and sendhttp
Posted: 13 Apr 2019, 12:31
by Wiki
I don’t know if it works, but you can try.the following:
Download your rule to a.file
Open it using an editor
Put the SendToHTTP into one line without line wrap, save it
Goto http://<your ip>/upload and save the textfile to your device
Re: Issue in Rules and sendhttp
Posted: 13 Apr 2019, 18:49
by thegoldeneagleCT
That's the thing, I am not putting in the line wrap (new line). It is getting added, actually a few,. I think it is the length.
I tried the file upload but no luck
Anyone have experience with this?
Thanks.
Re: Issue in Rules and sendtohttp
Posted: 13 Apr 2019, 19:36
by ThomasB
I entered your text on a couple different ESPEasy versions and did not experience the rule mangling that you see. I did not test the rule, I only confirmed that it could be successfully saved and remain intact.
What ESPEasy release version are you using? What browser are you using? Perhaps one of these things is involved in your issue.
- Thomas
Re: Issue in Rules and sendtohttp
Posted: 13 Apr 2019, 19:41
by thegoldeneagleCT
R120. Chrome. Good point on the browser. I'll try a different one when I get home.
Just curious can you post up your sendtohttp?
Thanks
Re: Issue in Rules and sendtohttp
Posted: 13 Apr 2019, 20:04
by ThomasB
Tried Chrome, works fine. R120 is quite old and I don't have an installation with it anymore. Try a recent Mega release -- that should solve the problem.
- Thomas
Re: Issue in Rules and sendtohttp
Posted: 13 Apr 2019, 21:29
by schnurzel59
obviously the "-" in "upnp-org" is a problem. I have replaced it for testing by the ASCII character in percentage representation "%2D". I do not know if that works, because I do not have a vera controller.
Then the string is not shared at this point.
SendToHTTP 192.168.3.109,3480,/data_request?id=variableset&DeviceNum=64&serviceId=urn:upnp%2Dorg:serviceId:TemperatureSensor1&Variable=CurrentTemperature&Value=[LRmedia#Temperature]
Re: Issue in Rules and sendtohttp
Posted: 14 Apr 2019, 03:43
by thegoldeneagleCT
Ok thanks everyone for the help, I uploaded the latest ESP easy 2.0, and it looks like works great, I thought the mega build was more beta than it was, since there really was no documentation on it on the main site. Looks like it is now publishing to my vera. will upload more info once i have more, right now it is bare wires and only 1 sensor working
Re: Issue in Rules and sendtohttp
Posted: 14 Apr 2019, 07:45
by ThomasB
Glad to hear you sorted it out. Mega isn't perfect, but has more functionality than the legacy R120 release.
- Thomas
Re: Issue in Rules and sendtohttp
Posted: 23 May 2019, 22:55
by thegoldeneagleCT
So i got this working and wanted to make a follow up post. I decided to use Domoticz vs sending the data to vera since it is much easier. Here are some pictures of the unit in various states of build, i decided to use screw down terminals since i found that was the easiest was to get both devices connected to the same i2c pins
- IMG_20190514_163910264.jpg (392.04 KiB) Viewed 6076 times
Here is the hole for the temp sensor to get external data
- IMG_20190514_164258640.jpg (338.5 KiB) Viewed 6076 times
Here it is fired up, it is not showing temp data but my son wanted me to type something!, temp data was in the web Gui
- IMG_20190515_194549837.jpg (1.08 MiB) Viewed 6076 times
here it is all buttoned up next to my bed (sorry i couldn't get a better picture)
1st row is IP and signal strength
2nd row Time and Date
3rd row temp and humidity
4th row sun rise and sunset
- IMG_20190516_183040955.jpg (450.01 KiB) Viewed 6076 times
and here is the data in Domoticz (the temp on the top is my outside temp from my weather app)
- Screenshot_20190516-183246.png (109.32 KiB) Viewed 6076 times
I have a few of these but most don't have the Oled display, i figured 1 -2 will have the Oled display, most are hidden away but wanted to play with it.
Thanks to those that helped me
anyone have any thoughts or suggestions?, FYI the hobby box is this one
https://www.amazon.com/gp/product/B075N ... UTF8&psc=1
One thing i would like is the font to be a bit bigger, but the framed version of the Oled didn't work well, i would want it to rotate between the lines that get displayed. but definitely happy with how it came out
Re: Issue in Rules and sendtohttp
Posted: 24 May 2019, 00:36
by ThomasB
Thanks for sharing build photos of your project. Provides inspiration to all those new ESPEasy makers out there.
One thing i would like is the font to be a bit bigger, but the framed version of the Oled didn't work well
I recommend using the Nextion display. It supports full color, high res graphics, and touch entry. Cost is under $20 for the 2.4" model.
The ESPEasy plugin is explained here:
https://www.letscontrolit.com/wiki/inde ... le=Nextion
The plugin allows you to develop your project without a physical display (use Nextion IDE virtual display instead). So you can try it out before making the purchase.
- Thomas
Re: Issue in Rules and sendtohttp
Posted: 24 May 2019, 03:20
by thegoldeneagleCT
Thanks Thomas,
That display would be pretty cool for a central screen, i was thinking of a way to use a little bigger font on the screen that i have, i saw some posts about a way to use a scroll but not sure if that is available with ESP easy mega and that display. here is the display i have
https://www.amazon.com/gp/product/B07B8 ... UTF8&psc=1
Thanks again