ghatikar Posted May 10, 2017 Posted May 10, 2017 I thought I would post here before going to EMONCMS forums as they have no experience with ICC Has somebody tried their hand on the prebuilt image of EMONCMS/EMONHUB. - https://github.com/openenergymonitor/emonpi/wiki/emonSD-pre-built-SD-card-Download-&-Change-Log I tried twice with fresh images . Everything seems to be working fine except ICC does not create any inputs . The report on ICC says posted OK . ICC also posts to EMONCMS.org fine and also to EMONCMS on ICC for Pi Sd image . My guess is EMONHUB node definitions require modifications - https://github.com/openenergymonitor/emonhub/blob/emon-pi/configuration.md sometimes I see No errors in Error LOG under /var/log/.... The advantage of Emonhub is that your local EMONCMS can post to Emoncms.org or multiple Emoncms thus duplicating the database and Emoncms.org can be made public while keeping your local Emoncms private . Also the prebuild SD card is optimised for EMONCMS with additional services like MQTT, OPEHAB etc. I am sure I am missing some step to get it working . If It starts working then separate image for ICC for Pi is not needed as the ICC users can just use the prebuilt SD image from EMONCMS Quote
PaulF007 Posted May 10, 2017 Posted May 10, 2017 Hello @ghatikar I assume that your emonpi is running and that you have created an account. The best place to start is the API help page that you will in find in the inputs tab. Then look for this : http://YOURIPADRESS/emoncms/input/post.json?node=1&fulljson={power1:100,power2:200,power3:300} Click on it and see if you get a ok in your browser. Then check if the values is in the inputs tab. If so then everything is running well within emon and you should check your reader settings. remember that for the pi you must add your ip/emoncms/input..... The emon.org site only work on ip/input. The emonpi image runs quite well so you should not have any issues with regards to posting to it. Paul Quote
ghatikar Posted May 10, 2017 Author Posted May 10, 2017 Thanks @PaulF007 I Already did it . The Emoncms correctly shows up the inputs . If It helps I can send you screenshots . I have also informed Maine About it . Frankly I am stumped . I even tried to change the inputs to Integer , long itger , Bytes etc. in EMonhub config Unfortunately Two many input field to configure if I want to individually set them. Interestingly I efforts to install Emonhub on ICCPi Image did not work as the directory structures are different and I could not acess the SQL database I will try over this weekend to install EMONCMS and EMONHUN on a fresh Jessie install Meanwhile If somebody is advetures they can try the same stup. The SD image can be easily run just by swapping SD card and changing API/Server Key in ICC Regards Anil ps. may be I will request Maine to set two separate postings in ICC one in local and one to emoncms.org . or will it slow down ICC Quote
PaulF007 Posted May 11, 2017 Posted May 11, 2017 @ghatikar If I understand you , you have the ICC -pi image that has emon installed on it. Then you installed emonhub "on top off" that? Emon it self should work out of the box my guess would be when you installed emonhub you have changed the permissions on the installation but with customisations it is near impossible to find a bug unless you know what you have changed. From what I have heard the ICC image works out of the box so there must be something then wrong with the installation of emonhub. Quote
ghatikar Posted May 12, 2017 Author Posted May 12, 2017 Hello @PaulF007 The ICC Pi works for EmonCMS - It does not have EMONHUB. I could not get the EMONHUB to install - So no sync with EMONCMS.ORG The standard SD image from EMONCMS.org for EMONSD( EMONPI) has EMONCMS+EMONHUB + other things. - For this image manual JSON calls works ICC does not post anything and neither ICC reports an error nor EMONCMS The Third option is to manually install EMONCMS and EMONHUB on a Fresh Jessi+Pixel which I will try over next few days to see whats stops ICC posting - So the idea is First Only EMONCMS- Check ICC works- Then EMON HUB- Check ICC works Then OPENHAB- Check ICC works If all works NIRVANA otherwise we start troubleshooting from the stage it fails Thanks Anil p.s. I am interested in OPENHAB as It will allow me to control more than 30 Various IOt things like bulbs and pump and airconditioners individually in my house based on SOC and time of Day. e.g I have Philips huelights , Xiaomi lights, Ambicliamte and tado for AC';s and Grudnfos Xala water pump booster with Smarthings sensors and controllers attached My home internet cannot open ports as the business plan is too costly on fibre optic so I am interested in EMONCMS.org and local EMONCMS because it allows me to aggregate the data from 3 inverters and the currentcost sensors measuring grid on remaining phases and major loads Quote
ghatikar Posted May 12, 2017 Author Posted May 12, 2017 Just now, ghatikar said: Hello @PaulF007 The Third option is to manually install EMONCMS and EMONHUB on a Fresh Jessi+Pixel ( just finished installing ) - First Only EMONCMS- Check ICC works- - **DOES not work Manual json call works - see input created in screenshot - But now I found this entry in logs multiple times in sync with when ICC is working - ERROR|input_controller.php|Format error, json value is not numeric As per this link( https://community.openenergymonitor.org/t/format-error/600/7) it is not big error as the LOG is only generated for zero values. Which means EMONCMS is receiving data just now showing it . stumped at this point @Manie what is the exact syntax of json ICC uses ? I will try entering that manually in browser to see the result Quote
ghatikar Posted May 12, 2017 Author Posted May 12, 2017 I think I may have found the problem. It was mentioned in the readme file of emoncms 9 ( note to self- Read the readme always !!) ---------------------------------------------------------------------- 4. Emoncms.org API Reference The following API references apply to emoncms.org they differ slightly to the API available on EmonPI/EmonBase installs, the API refrence for which can be found from the inputs and feed pages when logged in locally. Input API reference Feed API reference ---------------------------------------------------------------------------------------------------- for example I compared the help files on website ( emoncms.org) and the local Pi installation ( emoncms 9) for Emoncms.org i- http://emoncms.org/input/post?json={power:200}&apikey=xxxxxxxxxxxxxxx for local EMONCMS 9 --- http://192.168.0.74/emoncms/input/post.json?node=1&json={power:200}&apikey=xxxxxxxxxxxxx for bulk data emoncms.org - http://emoncms.org/input/bulk?data=[[0,16,1137],[2,17,1437,3164],[4,19,1412,3077] Local EMONCMS 9 - http://192.168.0.74/emoncms/input/bulk.json?data=[[0,16,1137],[2,17,1437,3164],[4,19,1412,3077]] Interestingly when I used the modified version of json call on local pi it still created entry but no node see screenshot Quote
Sidewinder Posted July 26, 2017 Posted July 26, 2017 Hi Anil, To post to a Node of your choice, you should modify your json command: Before: Local EMONCMS 9 - http://192.168.0.74/emoncms/input/bulk.json?data=[[0,16,1137],[2,17,1437,3164],[4,19,1412,3077]] After: http://your ip/emoncms/input/post.json?node=2&json={power:200}&apikey=your api key This should post the value 200 to virtual node "power" in Node 2. Change your commands to suit your environment. PS, this and other examples comes from the Input page API Help link, top right corner (i.e. open our EmonCMS, then click on Setup, then Inputs, then Input API Help) I assume you have solve your problem by now, but this may help other users. I use this successfully to post my Geyser Temperature using a DS18B20 probe connected to a ESP8266 to EmonCMS. Quote
PaulF007 Posted July 26, 2017 Posted July 26, 2017 You actually now have one more option that you could use and that is MQTT . I am not sure what firmware you have on the ESP8266 but most of them have the option of sending data via MQTT. That will also give you a lot more options should you want to build up you IOT later. Just check on the Github page how to enable mqtt support for emon , it is for the Pi version but if you have the Linux version you will need to change a few of the commands but its not too difficult. I noticed the other day that they are looking into implementing HTML inject where you could then control a switch of sorts, But speaking of DIYing it will be well worth your time having a look at node red there is very little that you can not do with it and it make out a big part of my system. (I do most of my calculations within node red and then send it to Emon) Quote
ghatikar Posted July 26, 2017 Author Posted July 26, 2017 Thanks Paul. I am using node redalready to collect from my venusgx . The above problem was sorted by modifying the way icc posts data Now I am looking for a good dashboard to post data from both icc/axpert and victron/Venus. May be the way you suggested is the right way. Node red collectes and posts to emoncms. Emoncms runs on my local Synology has making the entire process in-house. Quote
PaulF007 Posted July 26, 2017 Posted July 26, 2017 Now a days I use Emon for data collection and analysis. For while I used to open some prts on my router so that I could connect to emon but due to security risks I stopped that completely. Few things that I have tried so far is , using the Emon node to collect data from my local Emon and repost to Emon.org , I still do that with some of the data the I want to see off line. I also used a Online MQTT server that I posted the emon values to and would subscribe with MQTT dash on android. It had the added benefit that I could send some commands to my switches but the servers sometimes were not that lekker. There is also Imperihome ON android that has quite a nice dash interface but as it would need port forward I dumped that idea as well , for now. The best solution I found sofar is to use Opehab2 , it has its own online site where you can connect to it via a API to your sitemap and seems to be quite stable. You even get a notification if your server goes offline. There is the added benefit that you can also view the data through a browser or on your phone. and all the data can be sent via MQTT. ( By now you should realise that I am a BIG fan of MQTT ) So for my money I would say use openhab for remote view and emon local to analyze your data. Quote
ghatikar Posted July 26, 2017 Author Posted July 26, 2017 @PaulF007 Thanks . Specially OPENHAB looks interesting as my Synology DS216+ is listed as compatible - Even I am against opening my network especially with around 50 network devices working - Anything can go wrong Plus my broadband provider also makes it too expensive to have a public Ip ( i am behind a double NAT) Can you give me link to EmonNode ( or is it same as Node red for emoncms ) I even got the ICC modified by Maine to have different nodes and double emoncms as I could not find an easy way to post to Emoncms.org and emoncms at the same time ( it's a shame they should build it in packae itself) Quote
PaulF007 Posted July 26, 2017 Posted July 26, 2017 @ghatikar in Node red go to the menu , manage palate and on the install tab search for emoncms. You will find a in and out node where you just need to add the ip address and you API write code. From there on you can post to the .org site as well as receive data from there as well. Just remember when you post to the emon node first "compile" your data in a function in the following format : var dat = msg.payload ; // Single temp value to emon (or if it is a single only msg.payload = "Inside Temp:" + msg.payload ; ) msg.payload = "Inside Temp:" + dat ; (for multiple values use "Inside Temp:" + dat + " ,Inside Temp:"+ dat2) return msg; Easy enough if you know the correct syntax .. Regards Paul Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.