Hallo,
beschäftige mich gerade mit der Abfrage eines Ladecontrollers per Modbus TCP und bekomme es irgendwie nicht hin.
Folgendes habe ich bisher definiert:
define PhoenixContact ModbusAttr 180 30 192.168.0.33:502 TCP
attr PhoenixContact userattr obj-h318-reading obj-i100-reading stateFormat verbose
attr PhoenixContact obj-h318-reading IPAddr4
attr PhoenixContact obj-i100-reading PhoenixStatus
attr PhoenixContact room Ladecontroller
attr PhoenixContact stateFormat {sprintf("IPAddr4: %d", ReadingsVal($name,"IPAddr4",0))}
attr PhoenixContact verbose 0
Wenn ich bei verbose=5 ins logfile sehe erscheint folgendes:
2015.11.01 10:30:45 5: PhoenixContact: UpdateGetSetList full object list: h318 i100
2015.11.01 10:30:45 5: PhoenixContact: UpdateSetList: setList=
2015.11.01 10:30:45 5: PhoenixContact: UpdateSetList: getList=
2015.11.01 10:31:11 5: PhoenixContact: GetUpdate called
2015.11.01 10:31:11 5: PhoenixContact: GetUpdate objects from attributes: h318 i100
2015.11.01 10:31:11 5: PhoenixContact: GetUpdate full object list: h318 i100
2015.11.01 10:31:11 5: PhoenixContact: GetUpdate check h318 => IPAddr4, poll = 0, last = 0
2015.11.01 10:31:11 5: PhoenixContact: GetUpdate check i100 => PhoenixStatus, poll = 0, last = 0
2015.11.01 10:31:11 5: PhoenixContact: GetUpdate tries to combine read commands
2015.11.01 10:31:41 5: PhoenixContact: GetUpdate called
2015.11.01 10:31:41 5: PhoenixContact: GetUpdate objects from attributes: h318 i100
2015.11.01 10:31:41 5: PhoenixContact: GetUpdate full object list: h318 i100
2015.11.01 10:31:41 5: PhoenixContact: GetUpdate check h318 => IPAddr4, poll = 0, last = 0
2015.11.01 10:31:41 5: PhoenixContact: GetUpdate check i100 => PhoenixStatus, poll = 0, last = 0
2015.11.01 10:31:41 5: PhoenixContact: GetUpdate tries to combine read commands
2015.11.01 10:32:11 5: PhoenixContact: GetUpdate called
2015.11.01 10:32:11 5: PhoenixContact: GetUpdate objects from attributes: h318 i100
2015.11.01 10:32:11 5: PhoenixContact: GetUpdate full object list: h318 i100
2015.11.01 10:32:11 5: PhoenixContact: GetUpdate check h318 => IPAddr4, poll = 0, last = 0
2015.11.01 10:32:11 5: PhoenixContact: GetUpdate check i100 => PhoenixStatus, poll = 0, last = 0
2015.11.01 10:32:11 5: PhoenixContact: GetUpdate tries to combine read commands
Aber irgendwie erhalte ich keine Werte, wahrscheinlich mache ich etwas grundlegend falsch oder woran könnte es liegen?
Fehlt noch irgendetwas?
Gruß
René
Keiner eine Idee oder Hinweis?
define LNGARAZ Modbus /dev/ttyS0@9600,8,N,1
define QUIDO0 ModbusAttr 49 60
attr QUIDO0 IODev LNGARAZ
attr QUIDO0 room Garaz
Without IODev cannot read any values