[quote=“abhinavkhandka, post:6, topic:195043”]Hi
I tried updating this file however still no go. some of the logs, its giving me status as configure ip address. I tried both with ip address and ip:port
06 02/18/17 12:24:46.116 Device_Variable::m_szValue_set device: 68 service: urn:micasaverde-com:serviceId:SecuritySensor1 variable: Armed was: 0 now: 1 #hooks: 0 upnp: 0 skip: 0 v:0x9001a0/NONE duplicate:0 <0x75c2a520>
06 02/18/17 12:34:05.298 Device_Variable::m_szValue_set device: 68 service: urn:rboer-com:serviceId:UpsSensor variable: UPSName was: apc now: ups1 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x7480e520>
06 02/18/17 12:34:10.245 Device_Variable::m_szValue_set device: 68 service: urn:rboer-com:serviceId:UpsSensor variable: SSLProtocol was: tlsv1 now: any #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x74a2a520>
02/18/17 12:35:31.849 Device_Variable::m_szValue_set device: 68 service: urn:rboer-com:serviceId:UpsSensor variable: UPSName was: ups1 now: apc #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x75c2a520>
148735487908 02/18/17 12:36:25.533 JobHandler_LuaUPnP::HandleActionRequest device: 68 service: urn:micasaverde-com:serviceId:SecuritySensor1 action: SetArmed <0x74a2a520>
06 02/18/17 12:36:25.535 Device_Variable::m_szValue_set device: 68 service: urn:micasaverde-com:serviceId:SecuritySensor1 variable: Armed was: 1 now: 0 #hooks: 0 upnp: 0 skip: 0 v:0x9001a0/NONE duplicate:0 <0x74a2a520>
06 02/18/17 12:38:13.405 Device_Variable::m_szValue_set device: 68 service: urn:rboer-com:serviceId:UpsSensor variable: UPSName was: apc now: apc #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x75c2a520>
06 02/18/17 12:40:13.780 Device_Variable::m_szValue_set device: 68 service: urn:rboer-com:serviceId:UpsSensor variable: SSLProtocol was: any now: anysslv3 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x7460e520>
06 02/18/17 12:40:47.205 Device_Variable::m_szValue_set device: 68 service: urn:rboer-com:serviceId:UpsSensor variable: SSLProtocol was: anysslv3 now: sslv3 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x75c2a520>
06 02/18/17 12:44:46.683 Device_Variable::m_szValue_set device: 68 service: urn:rboer-com:serviceId:UpsSensor variable: Status was: Configure IP Address. now: Configure IP Address. #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x75c2a520>[/quote]
[quote=“reneboer, post:7, topic:195043”]Hi Abhinav,
Looking at the log there is some extra text in the SSLProtocol field. When you enter the value, can you check the option for “switch to input type text” that shows underneath and make sure it indeed just reads any, tlsv1, or sslv3?
Also make sure the UPS server IP address is properly filled in in the ip field on the Params tab. The log should not include that Configure IP Address in the Status variable.
Cheers Rene[/quote]
I’m not sure if you’re still supporting this, but I found an oversight in the code that will cause this not to work with a traditional NUT setup.
I setup a Raspberry PI to monitor my UPS and used NUT. I named it “networkups” and for some reason the plugin wasn’t working even when setting that. Here is why:
It queries for the variables by sending the configured UPS name correctly on line 123 and finds the BEGIN LIST VAR on 125
sock:send('LIST VAR '..[b]upsName[/b]..'\n')
local ret, _, _ = sock:receive()
if ret == 'BEGIN LIST VAR '..[b]upsName[/b] then
It loops through the variables and matches like so on line 132:
var, val = ret:match('VAR [b]ups[/b] ([%w%.]+) "(.+)"')
Notice that it’s hard coded for looping for “ups” instead of using the variable upsName. My variables return like this:
BEGIN LIST VAR networkups
VAR [b]networkups[/b] battery.charge "100"
VAR networkups battery.charge.low "10"
VAR networkups battery.charge.warning "50"
...
My guess is that your NAS just named it UPS and this was your code before you built the plugin to handle other names.
If the author doesn’t update this, you can simply change the name of your UPS in ups.conf (NUT) to “ups” and it should work. I didn’t have to change any settings in NUT with SSL, by default that is not setup and luup can reach out to it.