CurrentCost EnviR energy monitor

Hi parkerc,

Your capture looks normal. The entries are transmitted roughly every two hours, in batches of four. They are what provides the data that the plugin puts into the bar graphs.

The LuaUPnP log entry may be a side-effect of the real cause, but it won’t be the real cause itself.

Do some testing for me:

Can you use telnet to the ser2net port and see the serial output? Looks like yes, which means that the Vera isn’t connecting any more. If Vera is connected then the telnet attempt should say Port Already In Use.

Run netstat -n on both Vera and the Pi and look for a row or rows mentioning the port number or IP address of the other machine. Post those lines here.

Selectively restart things (ser2net or LuaUPnP) until things start to work again.

Check the amount of current that your Pi’s power supply can deliver. Serial-to-USB adapters draw a lot in order to produce the 12 volts that RS232 wants. It may be borderline and sometimes failing. A powered USB hub might help.

Hi futzle

It’s amazing what a good night sleep can do, I came downstairs this morning and it seems to be working now ???

Sadly netstat -n seems to return a different view/report when i run it on the Pi compared to Vera but I can see on Vera the following (Vera - Pi)

tcp        0      0 192.168.1.111:44709     192.168.1.77:3333       ESTABLISHED

I could not see the port listed on the Pi, but then again the iPad SSH program I am using allows the screen to run off the top so it loses the first reported ports.

Either way, it seems to have returned to normal (for now) sadly the Pi falls off the network every couple of weeks, requiring me to do a reboot, so there is a good chance I may see this again.

Thanks again futzle.

Don’t feel bad; I get the same every now and again with my Mac mini running Ubuntu. In most cases it’s sufficient to restart ser2net, but once I had to physically power it down for it to recover.

This is just one of those things that comes with using USB Serial. USB Serial isn’t nearly as reliable as RS-232. (And for when RS-232 isn’t robust enough, there’s RS-485…)

[quote=“parkerc, post:202, topic:168489”]Hi futzle

It’s amazing what a good night sleep can do, I came downstairs this morning and it seems to be working now ???

Sadly netstat -n seems to return a different view/report when i run it on the Pi compared to Vera but I can see on Vera the following (Vera - Pi)

tcp        0      0 192.168.1.111:44709     192.168.1.77:3333       ESTABLISHED

I could not see the port listed on the Pi, but then again the iPad SSH program I am using allows the screen to run off the top so it loses the first reported ports.

Either way, it seems to have returned to normal (for now) sadly the Pi falls off the network every couple of weeks, requiring me to do a reboot, so there is a good chance I may see this again.

Thanks again futzle.[/quote]

It is also a known issue that the usb bus has issues when using serial adapters (e.g. ftdi). This would cause the pi to loose network connection, the pi would still be active, but the ethernet (part of the usb bus) would hang and would need a reboot. This is due to buggy usb drivers. I have this very issue with one of my pi’s and my weather station. The pi would run for days or even weeks with out issue and than freeze. It turns out that a temporary fix would be to set the usb bus to USB 1.0 speed (dwc_otg.speed=1). By doing this, my pi has not hung on me yet and my weather station is still cranking data to the database. So you would add the following “dwc_otg.speed=1” to the end of the file /boot/cmdline.txt.

  • Garrett

Thanks guys,

Do you/futzle see any issues with running the Pi’s USB bus down at 1.0 speeds for the Current Cost plugin?

FYI - I’m not using a powered hub with my Pi, but I do have plans to use the other USB port on the Pi to control a TV or HDMI matrix.

Is powering from the port a potential issue/area of concern too?

USB 1 Full Speed is 12 Mbps. The EnviR outputs at 0.0576 Mbps. Doubt it’s a problem.

Is powering from the port a potential issue/area of concern too?

Underpowering of USB devices is a known problem with the Raspberry Pi. Here is one of the more detailed explanations.

Hi

OK all done (I hope). thanks again garrett for the above, lets see how it plays out as the Pi crashed again today, so I’m hoping it’ll allow me to stay up a bit onger.

Is there a way I check if Vera has the USB ports correctly set to 1?

@garretwp

Since changing that value the Pi has become even more unstable, lasting 10s of minutes, maybe a hour or more tops then it falls off the network and stops sharing data with Vera. :frowning:

I was going to change it back to see if that helps, but it tells me (via WINSCP) i do not have permission to change the file back (weird) ? - Any ideas ?

Sadly the Pi continues to fall off the network and becomes unresponsive almost hourly. Even after wipes and reloads.

I guess my only option is to attach it directly via a USB hub.

Chris

What distro are you using? I’m running a Pi with Debian Wheezy for my Envir and it’s been running for months without a single restart.

Hi Alan

I’m using the latest Wheezy too, I even changed a setting @garrettwp suggested, but no joy, infant it made it worse. My EnviR has gone into the hub now and so far so good (except it’s now hidden away, where as before the Pi allowed me to place it anywhere I had a network port.

I might try the Pi again with a powered hub to see if that helps. (Assuming the USB is the cause)

My Envir is plugged directly into Pi, with the signal teed off to supply the CurrentCost Netbridge too. No USB hub. The Pi is then plugged into a 4-way Ethernet switch which is in turn connected to the LAN via an ethernet-over-mains-wiring plug.

It’s really odd that you’re having so many issues with basically the same setup as mine. :confused:

A long while back, futzle mentioned the possibility of interfacing the EnviR with a WIZnet WIZ110SR (RS232 to Ethernet gateway). Has anyone successfully tried this?

My understanding is that the output voltage from the EnviR is 3v, so is not directly compatible with RS232 5v. However, I read on another forum about someone soldering wire wrap wire directly to the TTL pins of the WIZ110SR’s MAX232. Would doing this make it work with the EnviR? I’ve searched the Internet but can’t find any working examples of this. Thanks.

You’d need an RS-232 level converter. RS-232 is a 12 V signal, though it can work with a bit less. It’s not signal-compatible with 5 V TTL.

@futzle. Many thanks. I’ll look into getting an RS-232 level converter.

I just got the new CurrentCost GasSmart transmitter for the Envir, and installed it today. Anyone else got one yet?

I’m guessing the plug-in would need some tweaking to cater for this…

[quote=“racarter”]I just got the new CurrentCost GasSmart […]
I’m guessing the plug-in would need some tweaking to cater for this…[/quote]

Post some sample XML and I will see what I can do. We don’t have a standardized gas device or service so I may have to cannibalize prior art by bfromdruten.

Hi @racater,

I’ve been tempted to buy one of these too, (Current Cost - Reducing your energy bills so you can live a greener life!) how’s it working out for you? Although I’m a little scared to see real time how much gas we’re using. :slight_smile:

@futzle - how can I get at the xml? Happy to post it if I can get at it. :slight_smile:

@parkerc - easy to install, but read zero for ages. Didn’t think it was working, but now it’s reading 120W or so. No idea how that converts to gas usage yet! You can enter meter details onto the CurrentCost website, apparently, and it will convert to gas usage, but for this you have to pay an annual subscription.

Thanks @racarter

I think the meter I have does a pulse every x cubic meters of Gas (or something like that) so maybe there’s a way for us to work it out. And then if @futzle can work her magic and add a feature to her plugin it’ll be cool to have a virtual instance of our meters on our Vera dashboard.