Android APP to read and write to Lan Relay over SNMP for learning purposes (200 lines of code) -- 2
€8-30 EUR
Zamknięte
Opublikowano ponad 7 lat temu
€8-30 EUR
Płatne przy odbiorze
There should be a field for IP and PORT of the device, probably there should be something like CONNECT.
App would read from the device 6 temperatures and display them as on the picture. (SNMPGET)
App would also read state of 5 relay switches, ON or OFF. The buttons will switch the relay to the chosen position ON or OFF.
Readings should be taken every second.
SNMP:
temperature number 1: snmpget -v 2c -c public [login to view URL] iso.3.6.1.4.1.[login to view URL] (answer is integer in form x 10, -2.1 degrees is displayed like -21)
2 5.2.0
3 5.3.0
4 5.4.0
5 5.5.0
6 5.6.0
relay num 1: snmpget -v 2c -c public 9x.170.235.236 iso.3.6.1.4.1.[login to view URL] (answer is integer, number 1 means OFF, number 0 means ON)
2 3.2.0
3 3.3.0
4 3.4.0
5 3.5.0
to switch relay num 1 ON: snmpset -v 2c -c private 9x.170.235.236 iso.3.6.1.4.1.[login to view URL] i 0
to switch relay num 1 OFF: snmpset -v 2c -c private 9x.170.235.236 iso.3.6.1.4.1.[login to view URL] i 1
and so on.
This is for testing and learning purposes, App does not have to be perfect. I have tried to write in Android Studio using snmp lib, but it is over my current skills. I couldnt get it working from tutorials, because it needed Async task and so on. I believe some 200 to 300 lines of code should do it.