[Nut-upsdev] driver for IVT SCD solar controller ?

Arjen de Korte nut+devel at de-korte.org
Thu Jul 30 18:43:19 UTC 2009


Citeren Rainer Fuegenstein <rfu op kaneda.iguw.tuwien.ac.at>:

> OK; get to compile the latest source.
>
> 1st execution:
>
> ./ivtscd -DDDD -a ivtscd
> Network UPS Tools - IVT Solar Controller driver 0.01 (2.4.1-1890)
> Warning: This is an experimental driver.
> Some features may not function correctly.
>
>    0.000000     debug level is '4'
>    0.010793     send: F
>    0.368295     read:
>    0.368388       \_: (42 bytes) => 00 52 3a 31 32 2c 32 30 3b 2d 20  
> 33 2c 37 3b 31 38 3b
>    0.368454      31 32 2c 30 31 3b 31 32 2c 36 32 3b 2d 20 36 2c 33  
> 3b 20 30 2c 31 3b 0a
>    0.368532     Parsed -1 parameters from reply
>    0.368568     IVT Solar Controller not detected
>
> yes, there is a null byte in the first column.

That's really odd.

> 2nd execution:
> ./ivtscd -DDDD -a ivtscd
> Network UPS Tools - IVT Solar Controller driver 0.01 (2.4.1-1890)
> Warning: This is an experimental driver.
> Some features may not function correctly.
>
>    0.000000     debug level is '4'
>    0.001474     send: F
>    0.379862     read: R:12,20;- 3,7;18;12,01;12,62;- 6,3; 0,1;
>    0.380440       \_: (41 bytes) => 52 3a 31 32 2c 32 30 3b 2d 20 33  
> 2c 37 3b 31 38 3b 31
>    0.380958      32 2c 30 31 3b 31 32 2c 36 32 3b 2d 20 36 2c 33 3b  
> 20 30 2c 31 3b 0a
>    0.381542     Parsed 7 parameters from reply
>    0.381919     send: F
>    0.387831     read:
>    0.388049       \_: (1 bytes) => 0a
>    1.387808     read: timeout
>
> Fatal error: unable to create listener socket
>
> bind /var/state/ups/ivtscd-ivtscd failed: Permission denied
>
>    1.389871     Exiting.
>
> the permission denied is because ivtscd is running as standard user
> (for now), that'll not be a problem later.

Please fix the permissions problem first, either by running this as  
root (should be OK for the time being) or by allowing whatever user  
this is running as permission to the /var/state/ups directory. I would  
really like to know what happens if you keep this running for a while.

> 3rd execution:
>
> ./ivtscd -DDDD -a ivtscd
> Network UPS Tools - IVT Solar Controller driver 0.01 (2.4.1-1890)
> Warning: This is an experimental driver.
> Some features may not function correctly.
>
>    0.000000     debug level is '4'
>    0.002048     send: F
>    0.360609     read: R:12,18;- 3,7;18;12,01;12,62;- 6,3; 0,1;
>    0.361179       \_: (41 bytes) => 52 3a 31 32 2c 31 38 3b 2d 20 33  
> 2c 37 3b 31 38 3b 31
>    0.361820      32 2c 30 31 3b 31 32 2c 36 32 3b 2d 20 36 2c 33 3b  
> 20 30 2c 31 3b 0a
>    0.362379     Parsed 7 parameters from reply
>    0.362951     send: F
>    0.368582     read:
>    0.368985       \_: (1 bytes) => 0a
>    1.368575     read: timeout
>
> Fatal error: unable to create listener socket
>
> bind /var/state/ups/ivtscd-ivtscd failed: Permission denied
>
>    1.369243     Exiting.
>
> second read doesn't get any data ?

It could be that we're beating the SCD to death by doing a query twice  
right after another. This should be resolved once the driver has  
started up and it polls once every 2 seconds. I added a small delay to  
prevent this. It could also be that it is echoing the '\n' we send in  
the 'F' command. Maybe this isn't needed?

> *** today I moved the whole installation to a different building and
> since then the SDC displays a load of about -3.x up to -5.x A as soon
> as the PC is connected to it via RS232. as soon as I unplug the RS232
> cable, figures go down to about -0.7A as it is supposed to be ...

You're sure this isn't some kind of ground loop? If this is a mains  
connected PC, double check the protective earth. It wouldn't be the  
first time that a device goes berserk because it can't handle the 50  
Hz current that is flowing in the green/yellow wire connection. Try  
connecting a laptop (no wall adapter attached) to rule this out.

> this means that there must be something wrong with the SCD and I need
> to figure out what ...

It could also be a ground loop problem.

Best regards, Arjen
-- 
Please keep list traffic on the list




More information about the Nut-upsdev mailing list