ESPeasy and IDX on JSON string
Moderators: grovkillen, Stuntteam, TD-er
ESPeasy and IDX on JSON string
dear all,
I would like add a IDX number (used to link with Domoticz) on ESPeasy JSON string, in particulary in the "sensors" position.
I saw that the JSON string are handled on webserver.ino at "void handle_json()" routine.
for example....
"Sensors":[
{
"TaskValues": [
{"ValueNumber":1,
"Name":"Analog",
"NrDecimals":2,
"Value":9.00
}],
"TaskNumber":1,
"TaskEnabled":"true",
"TaskInterval":1,
"Type":"Analog input - internal",
"TaskName":"ADC 1",
"IDX":"8"
},
It possible that someone add this facility on ESP version?
Eventually can someone help me to do?
thank you!
ricc
I would like add a IDX number (used to link with Domoticz) on ESPeasy JSON string, in particulary in the "sensors" position.
I saw that the JSON string are handled on webserver.ino at "void handle_json()" routine.
for example....
"Sensors":[
{
"TaskValues": [
{"ValueNumber":1,
"Name":"Analog",
"NrDecimals":2,
"Value":9.00
}],
"TaskNumber":1,
"TaskEnabled":"true",
"TaskInterval":1,
"Type":"Analog input - internal",
"TaskName":"ADC 1",
"IDX":"8"
},
It possible that someone add this facility on ESP version?
Eventually can someone help me to do?
thank you!
ricc
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: ESPeasy and IDX on JSON string
Sounds like a good idea. Please open a issue on GitHub.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: ESPeasy and IDX on JSON string
I never do it... I have to register on GitHub and after? Can you help me?
thank you in advance
ricc
thank you in advance
ricc
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: ESPeasy and IDX on JSON string
It's good for you so you can track the implementation and also lobby the request. So register on GitHub and issue the request.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: ESPeasy and IDX on JSON string
One could have multiple IDX values per task.
Should I add "IDX1" ... "IDX3"?
And what if it is not set? Leave it or add it with value 0?
Should I add "IDX1" ... "IDX3"?
And what if it is not set? Leave it or add it with value 0?
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: ESPeasy and IDX on JSON string
You should not add a suffix number to the JSON path. Do what we did with sensors.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: ESPeasy and IDX on JSON string
What did we do with the sensors?grovkillen wrote: ↑14 May 2018, 22:17 You should not add a suffix number to the JSON path. Do what we did with sensors.
And does this mean "DNS 1" is also not a good idea?
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: ESPeasy and IDX on JSON string
It's not parsable in that sense that we could have a dynamic number of JSON objects. I guess DNS 1 and 2 is pretty static compared to number of values and IDX. So not static values/IDX should never have static names.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: ESPeasy and IDX on JSON string
I put the request on GitHub
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: ESPeasy and IDX on JSON string
Great! Thanks!
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: ESPeasy and IDX on JSON string
sorry... what is DNS 1?... what you mean?TD-er wrote: ↑15 May 2018, 00:03What did we do with the sensors?grovkillen wrote: ↑14 May 2018, 22:17 You should not add a suffix number to the JSON path. Do what we did with sensors.
And does this mean "DNS 1" is also not a good idea?
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: ESPeasy and IDX on JSON string
He was talking to me
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: ESPeasy and IDX on JSON string
dear all,
I'm trying to install and test the version with implemented JSON "IDX".
I have a problem to compile the new version.
In particolulary I use Arduino IDE arduino-1.6.12.
Till now (up to ESPEasy_mega-20180516.zip) I have all time compiled and programme ESP using the method described on this link (https://www.letscontrolit.com/wiki/inde ... are_Upload).
Today I'm trying to compile ESPEasy_mega-20180517 - 18 and 19 but, I have all times error, like show below:
/opt/arduino-1.6.12P230/portable/sketchbook/ESPEasy_mega-0517/WebServer.ino: In function 'void WebServerInit()':
WebServer:407: error: no matching function for call to 'ESP8266WebServer::on(const __FlashStringHelper*, void (&)())'
WebServer.on(F("/"), handle_root);
^
I saw "old" webser.ino and in particular:
void WebServerInit()
{
// Prepare webserver pages
WebServer.on("/", handle_root);
....
and "new" webser.ino
void WebServerInit()
{
// Prepare webserver pages
WebServer.on(F("/"), handle_root);
...
Can someone help me to understand where is the problem?
thank you in advance!
ricc
I'm trying to install and test the version with implemented JSON "IDX".
I have a problem to compile the new version.
In particolulary I use Arduino IDE arduino-1.6.12.
Till now (up to ESPEasy_mega-20180516.zip) I have all time compiled and programme ESP using the method described on this link (https://www.letscontrolit.com/wiki/inde ... are_Upload).
Today I'm trying to compile ESPEasy_mega-20180517 - 18 and 19 but, I have all times error, like show below:
/opt/arduino-1.6.12P230/portable/sketchbook/ESPEasy_mega-0517/WebServer.ino: In function 'void WebServerInit()':
WebServer:407: error: no matching function for call to 'ESP8266WebServer::on(const __FlashStringHelper*, void (&)())'
WebServer.on(F("/"), handle_root);
^
I saw "old" webser.ino and in particular:
void WebServerInit()
{
// Prepare webserver pages
WebServer.on("/", handle_root);
....
and "new" webser.ino
void WebServerInit()
{
// Prepare webserver pages
WebServer.on(F("/"), handle_root);
...
Can someone help me to understand where is the problem?
thank you in advance!
ricc
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: ESPeasy and IDX on JSON string
We use PlatformIO as the official IDE so I cannot really help you. Sorry!
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: ESPeasy and IDX on JSON string
ciao!
I will try to install PlatformIO.
I saw 2 different things... PlatformIO IDE for Atom and PlatformIO IDE for VSCode.
I use linux... what you suggest me to use?
thank you
ricc
I will try to install PlatformIO.
I saw 2 different things... PlatformIO IDE for Atom and PlatformIO IDE for VSCode.
I use linux... what you suggest me to use?
thank you
ricc
Re: ESPeasy and IDX on JSON string
I use PlatformIO with Atom.
Just curious, what's the reason to build your own version?
Just curious, what's the reason to build your own version?
Re: ESPeasy and IDX on JSON string
ciao,
but ...
first of all becouse I started to use the link where letcontrolit show how compile and program flash by using Arduino IDE.
Second becouse we need some small changes to adapt ESPEasy for our laboratory
I don't understand why with Arduino IDE doesn't compile more... i can't find error... mmmm
thank you again!
ricc
but ...
first of all becouse I started to use the link where letcontrolit show how compile and program flash by using Arduino IDE.
Second becouse we need some small changes to adapt ESPEasy for our laboratory
I don't understand why with Arduino IDE doesn't compile more... i can't find error... mmmm
thank you again!
ricc
Re: ESPeasy and IDX on JSON string
dear all,
1)
I found the problem, we can still to compile and download the ESPEasy with arduino IDE (arduino-1.6.12), but we have to update the 8266 library, from original one to 2.4.1. With this we can do the same things explainded on main site (https://www.letscontrolit.com/wiki/inde ... are_Upload)
2)
I saw yours code to add IDX on JSON string... but I can't see IDX on JSON page... I can saw just this
"Sensors":[
{
"TaskValues": [
{"ValueNumber":1,
"Name":"Analog",
"NrDecimals":2,
"Value":7.00
}],
"TaskNumber":1,
"TaskEnabled":"true",
"TaskInterval":1,
"Type":"Analog input - internal",
"TaskName":"ADC 1"
},
In your code there is a variable to on/off this... (show Data Acquisition) what I have to do to activate the IDX implementation ?
3)
Still I saw the error on third IDX code: missing field to put the number thank you a lot
ricc
1)
I found the problem, we can still to compile and download the ESPEasy with arduino IDE (arduino-1.6.12), but we have to update the 8266 library, from original one to 2.4.1. With this we can do the same things explainded on main site (https://www.letscontrolit.com/wiki/inde ... are_Upload)
2)
I saw yours code to add IDX on JSON string... but I can't see IDX on JSON page... I can saw just this
"Sensors":[
{
"TaskValues": [
{"ValueNumber":1,
"Name":"Analog",
"NrDecimals":2,
"Value":7.00
}],
"TaskNumber":1,
"TaskEnabled":"true",
"TaskInterval":1,
"Type":"Analog input - internal",
"TaskName":"ADC 1"
},
In your code there is a variable to on/off this... (show Data Acquisition) what I have to do to activate the IDX implementation ?
3)
Still I saw the error on third IDX code: missing field to put the number thank you a lot
ricc
Who is online
Users browsing this forum: No registered users and 19 guests