Hi
Would it be possible to send the battery voltage on a V2 in the payload as well? Any ideas on how to do this?
Regards
Archived Forum |
|
Battery voltage from emonTX nodeSubmitted by esawyja on Thu, 04/12/2014 - 10:29Hi Would it be possible to send the battery voltage on a V2 in the payload as well? Any ideas on how to do this? Regards » |
Re: Battery voltage from emonTX node
You can use the readVcc funciton in emonlib to read the supply voltage then add it as an payload onto the RF packet: https://github.com/openenergymonitor/EmonLib/blob/master/EmonLib.cpp#L227
See this Building Block topic for how the JeeLib RF payload RFM12B works: http://openenergymonitor.org/emon/buildingblocks/rfm12b2
Re: Battery voltage from emonTX node
Thanks Glyn
Re: Battery voltage from emonTX node
Hi Glyn,
I did the readVcc and I can see the batt voltage being printed on the serial of the TX node, but on the Base node I receive 0, I've added the variable to the TX packet as follow
typedef struct { int power1, power2, power3, Vrms, T1, batv; } PayloadTX; // neat way of packaging data for RF comms
PayloadTX emontx;
Do I need to add it somewhere else, like on the receiving node?
This is what I get on the Base node
Data sent: /api/post.json?apikey=xxxxx&node=20&csv=2593
Data sent: /api/post.json?apikey=xxxx&node=10&csv=128,0,0,25494,2387,0
Data sent: /api/post.json?apikey=xxxx&node=20&csv=2593
Data sent: /api/post.json?apikey=xxxx&node=10&csv=135,0,0,25513,2387,0
Another problem that I have is that emoncms sometimes reply with ok, if I post from a browser, I get ok every time, the base node is on the same subnet, I get DHCP and DNS ok, but sometimes, about 80% of the time, I don't get OK, it seems to vary from hour to hour as well, any ideas?
[webClient]
DHCP status: 1
IP: x.x.x.x
GW: x.x.x.x
DNS: 8.8.8.8
DNS status: 1
SRV: 80.243.190.58
Data sent: /api/post.json?apikey=xxxxx&json={rf_fail:1}
Data sent: /api/post.json?apikey=xxxxx&node=20&csv=2600
Data sent: /api/post.json?apikey=xxxxx&node=10&csv=126,0,0,25509,2387,0
Time request sent
Data sent: /api/post.json?apikey=xxxxx&node=20&csv=2600
Data sent: /api/post.json?apikey=xxxxx&node=10&csv=127,0,0,25425,2387,0
Thanks for all the good work, brilliant system
Re: Battery voltage from emonTX node
Yes you also need the same packet structure on the receiving node
Re: Battery voltage from emonTX node
Problem is I cannot seem to find where this is done in the Nanode_RF_multinode sketch, could you give me some indication please?
Re: Battery voltage from emonTX node
The guide also says "NanodeRF_multinode The multinode firmware is the most flexible firmware for posting data up to emoncms, it relays data from up to the 30 nodes that the rfm12 library implementation can handle up to emoncms. You dont need to re-program the firmware each time you add a new node or variables on a particular node. It constructs a CSV format string to be sent to emoncms."
Not sure what I'm doing wrong?