Thank you very much for the shared files.
I would like to ask you if these files are working for you because i have a different case, I’m using the serial gateway between my pc and arduino gateway and i modified the items because i saw you use mqtt replacing this:
Number Node_garage1 "Current Energy [%d W]" (Power_Chart) { mqtt="<[mysensor:MyMQTT/22/0/V_WATT:state:default]" }
with this:
Number Node_garage1 "Current Energy [%d W]" (Power_Chart) { serial="COM4@115200" }
and this:
Number CumulativeEnergyConsumption "total energy [%.2f kWh]" { mqtt=">[mysensor:MyMQTT/55/0/info:state:*:default]" }
with this:
Number CumulativeEnergyConsumption "total energy [%.2f kWh]" { serial="COM4@115200" }
For the gateway i’m using this sketch from MySensors forum [Serial gateway communication][1]
The connection made on the breadboard are like this [OpenEnergyMonitor][2] except that i have connected only the CT sensor without the transformer.
On local host i can load the sitemap but it is not displayin any value for the watts, kwh or anything.
In the same time in the node point serial monitor of my arduino mega i get this:
send: 22-22-0-0 s=0,c=1,t=17,pt=2,l=2,st=ok:2768
and its refreshing with different values like 2580, 2580, 2721 even the sensor is connected or not on the live wire or if i turn on/off my lamp.
Did you make any calibration for your CT sensor? how many volts do you have on the wall socket? I have 220V.
I dont know where to check or what to check! Could you please help me?
Thanks a lot for all the help you gave me.
UPDATE: you were right about the connection, they were wrong and so i was getting that strange value. Actually the pin of the CT was connected in the wrong Arduino pin.
Now with some small modifications i read on the serial monitor 42 watts (i think!) and if i turn off the lamp i get 17! if you dont connect the CT sensor to the alive wire what do you read on serial monitor for the watts?
[1]: http://forum.mysensors.org/topic/655/serial-gateway-connection-to-openhab/2
[2]: http://openenergymonitor.org/emon/buildingblocks/how-to-build-an-arduino-energy-monitor?page=7