emonbase newbee

Helo

 

Im new in this area. trying to learn and understand this.

So far i got my emontx working i think. i loaded the firmware on it and it seems to work.

 

for the emonbase ive build a nanonde with rf12b.

But when i trying to load it with nanoderf_2ct i just get this error:

nanodeRF_2ct.cpp: In function 'void ethernet_send_url(char*, char*, char*)':
EtherShieldsimpleClient:357: error: invalid conversion from 'void (*)(uint8_t, uint16_t)' to 'void (*)(uint8_t, uint16_t, uint16_t)'
EtherShieldsimpleClient:357: error: initializing argument 4 of 'void EtherShield::ES_client_browse_url(prog_char*, char*, prog_char*, void (*)(uint8_t, uint16_t, uint16_t))'
 

any help would be great as im not understand this.

 

glyn.hudson's picture

Re: emonbase newbee

I think the first thing to check is that you are using the latest EtherShield library: https://github.com/thiseldo/EtherShield

The next thing to check is that your have downloaded both files from: https://github.com/glynhudson/NanodeRF/tree/master/nanodeRF_2ct and have both of them in the same directory and that the directory is called nanodeRF_2CT. 

Let me know if this doesnt fix the problem.

What version orf Arduino IDE ar you using?  

roedfjel's picture

Re: emonbase newbee

 hello glyn.

i use version Arduino 0022.
i have copy the EtherShield, RF12 and Ports to the libraries dir.
Then i open arduino and then i see that both files is open.
tested this on a win xp and ubuntu installation.'
but still the same problem.
 
roedfjel's picture

Re: emonbase newbee

 

it seems to be a problem in the some of the lines in the EtherShieldsimpleClient.pde 

//------------------------------------------------------------------------------------------------
// Send
//------------------------------------------------------------------------------------------------

void ethernet_send(char * apiurl,char * host,char * apikey,char * putget,char * string)
{
//es.ES_client_browse_url(PSTR("/api/22274.csv"),"20.0,30.0", domainname, &browserresult_callback);
es.ES_client_http_post(PSTR(""),PSTR("www.dev.openenergymonitor.org"),NULL,PSTR("GET "),NULL, &browserresult_callback);
}

void ethernet_send_url(char * hoststr, char * urlbuf,char * urlbuf_varpart)
{
data_recieved = 0;
es.ES_client_browse_url(urlbuf,urlbuf_varpart,hoststr,&browserresult_callback);
}

 If i change this lines with // before line   es.ES_client_browse_url(urlbuf,urlbuf_varpart,hoststr,&browserresult_callback);
i can compile and upload it to the nanode.

I can after uploaded sketch see that the red led is blinking evry 10sec. but i can not get the nanode to communicate with the emoncms. i get power etc in the serial monitor. but im still a newbee and litle bad in debuging.

Glyn can you explaine me what this code do?

//------------------------------------------------------------------------------------------------
// Send
//------------------------------------------------------------------------------------------------

void ethernet_send(char * apiurl,char * host,char * apikey,char * putget,char * string)
{
//es.ES_client_browse_url(PSTR("/api/22274.csv"),"20.0,30.0", domainname, &browserresult_callback);
es.ES_client_http_post(PSTR(""),PSTR("www.dev.openenergymonitor.org"),NULL,PSTR("GET "),NULL, &browserresult_callback);
}

void ethernet_send_url(char * hoststr, char * urlbuf,char * urlbuf_varpart)
{
data_recieved = 0;
//es.ES_client_browse_url(urlbuf,urlbuf_varpart,hoststr,&browserresult_callback);
}
 

 

The error i get is for this code "  es.ES_client_browse_url(urlbuf,urlbuf_varpart,hoststr,&browserresult_callback); "

and this is the error message
nanodeRF_2ct.cpp: In function 'void ethernet_send_url(char*, char*, char*)':
EtherShieldsimpleClient:357: error: invalid conversion from 'void (*)(uint8_t, uint16_t)' to 'void (*)(uint8_t, uint16_t, uint16_t)'
EtherShieldsimpleClient:357: error: initializing argument 4 of 'void EtherShield::ES_client_browse_url(prog_char*, char*, prog_char*, void (*)(uint8_t, uint16_t, uint16_t))'
 

i have ports, rf12 and EtherSheild in libaries.
 

if i try other sketch for nanode from other projects it goes on it without any problem and working

I hope someone can give some tips/hints for how to get this to work. becouse this oem is a great peace of work.

roedfjel's picture

Re: emonbase newbee

 oki. i found out what the problem was. the code on github for nanoderf did not work with the newest version of EtherSheild lib. so i got help on irc #nanode and got an older version of EtherShield and compile was ok.

 

but when i debug in arduino serial monitor i get this:

Emonbase:NanodeRF ctonly

Node: 30 Freq: 433Mhz Network group: 210

Posting to 192.168.1.1 

My IP: 192.168.1.135

Netmask: 255.255.255.0

DNS IP: 192.168.1.1

GW IP: 192.168.1.1

{RFfail:1,POSTfail01:1}sent

{RFfail:0,ct1:30,ct2:37,ct3:0,battery_v:3044,POSTfail01:2}sent

{RFfail:0,ct1:28,ct2:38,ct3:0,battery_v:3044,POSTfail01:3}sent

 

but still my emoncms cant recive any info from emonbase/emontx.

Anyone has any tips on how to debug this og tell me whats wrong.

is there any logs in emoncms that can be checked?

 

 

tattobeck's picture

Re: emonbase newbee

Obviously thiseldo has altered his Ethershield-library and now it is incompatible to the emonbase code examples.

I downloaded the newest library from github:

Updated for Arduino 1.0 RC1

but as

NanodeRF_2ct.cpp: In function 'void ethernet_send_url(char*, char*, char*)':
EtherShieldsimpleClient:357: error: invalid conversion from 'void (*)(uint8_t, uint16_t)' to 'void (*)(uint8_t, uint16_t, uint16_t)'
EtherShieldsimpleClient:357: error: initializing argument 4 of 'void EtherShield::ES_client_browse_url(prog_char*, char*, prog_char*, void (*)(uint8_t, uint16_t, uint16_t))'

Whilst searching I read the following on the github repository history:

https://github.com/thiseldo/EtherShield/commit/85cddf86a5364f1e32256d22f34bc6e1857465c3

might this be the "root of evil" ?

;)

Robert

tattobeck's picture

Re: emonbase newbee

can you post a link to the older ethershield library that works?

glyn.hudson's picture

Re: emonbase newbee

Hello, all,

Thanks for flagging this up. It seems the the latest version of the etherShield library does not work with our current emonBase code. I will look into the problem (I think it's to do with compatibility between Arduino 1.0 Beta and Arduino 22), in the meantime follow the link below to download e version of the EtherShield library that I know works with the emonBase code

 http://www.openenergymonitor.org/emon/sites/default/files/old_EtherShield_4th Sep_works_emonBase.zip

Thank you for your patience.

Glyn. 

 

tattobeck's picture

Re: emonbase newbee

Hey Glyn,

Thanks for the fast answer!

 

hehe   ;)

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.