Hi Simon,
Thanks for your feedback! And to answer your questions...
Neat idea, a couple of errors - wget
http://pastebin.com/1Et4n8VP - pastes the html code, I have tried wget
http://pastebin.com/raw.php?i=1Et4n8VP - this gets the code without the html, but when I try to execute the .sh file, I get:
Code: Select all
pi@raspberrypi ~/domoticz/scripts/bash $ ./smappee.sh
-bash: ./test.sh: /bin/bash^M: bad interpreter: No such file or directory
So some code mangling must have happened.
In the end, I copy and pasted the code ok.
I'll remove the wget statement from the instructions and just tell people to copy paste in a new file.
Line 42 of your bash script refers to $Path_JQ when it should be $JQ.
Changed that in 2015-AUG-10 version
The code relies on being able to get the consumption every 5 minutes, if this fails, then the code runs, doesn't write anything to Domoticz and that 5 minutes consumption is lost. There needs to be a loop which basically starts from time of last upload and goes forward 5 minutes until current time retrieving the consumption for each 5 minutes and then uploads the cumulative energy usage.
Also updated in the 2015-AUG-10 version, I had the same problem. Now it runs ok(-ish, API is still not able to get me reliable data, so the data I get is a bit older than 5 min, or does not update when no valid data is retrieved).
I couldn't write to /var/log even as sudo, not sure why?
Not sure why either. Does the /var/log / folder exist?
I have struggled to get Smappee to identify my devices, iron, kettle, hob, microwave and water pump are all identified as the same device. Have you managed to identify individual devices?
I have, although not very easily as some devices (especially the ones that do not have a fixed power usage such as pc's television, micro waves (different power settings)) show up as multiple different devices with sometimes nearly the same usage. I bought a
Fibaro Wall-Plug so i can get a bit more insight in the power usage of some stuff, match it with Smappee and assign the unnamed devices there to the right one. Plug in in a couple of days, and then move to the next device.