Commit Graph

214 Commits

Author SHA1 Message Date
f591621614 Replaces Master-Slave with Client-Server
Expunging all occurrences of inappropriate language of the query and
response paradigm of PLC communications. We are familiar with the Modbus
terminology and fully support this change.
https://www.modbus.org/docs/Client-ServerPR-07-2020-final.docx.pdf
2023-02-07 09:54:03 +01:00
affa12712d Add default files for installation or packaging. 2023-02-06 16:44:47 +01:00
76349cf811 Reorder package to src-layout, switch to GPLv2 license.
Move package to src directory and update project base files for build
process.
This project change the LICENSE from GPLv3 to GPLv2 after approval of
all contributors:
https://github.com/kjkoster
2023-02-06 16:41:00 +01:00
f5dc026fbc Support wordorder for revpi-commander 2022-12-16 15:31:40 +01:00
69d4391ecd Some additional MQTT updates 2022-07-01 13:25:22 +02:00
c35f372e41 Merge pull request #10 from kjkoster/master
MQTT feature request (with code)
2022-06-29 10:26:00 +02:00
Kees Jan Koster
fa19105b85 Add ability to write I/O that has slashes in the names. Those look good on MQTT. 2022-06-15 23:46:55 +02:00
2931600910 New release 0.9.8 2022-05-11 06:08:29 +02:00
1146fccfe6 Object scan in MQTT server uses wrong name source, ignoring export flag
The object scan to find IOs on core devices uses the `__slot__` attribute, which include very private objects. That objects are not accessible by `getattr` - Now we are using `dir()`.
Missing objects from parent classes.
Ignored the export flag from piCtory.

closing #9
2022-05-10 11:10:03 +02:00
a5ceb7b369 New release 0.9.7 2022-04-21 15:57:24 +02:00
581c0736be Improve log information about plc program exit like termed/killed/exit code 2022-04-02 21:47:32 +02:00
cbfd69d852 Code cleanup 2022-04-02 21:45:47 +02:00
b7f4004abb secure_installation will only reload settings, if daemon is running
close #3
2022-04-02 20:58:19 +02:00
a47fae5b7a Bugfix: Missing core. IOs in MQTT on RevPi FLAT devices
Change the function to find direct core IOs on all actual and upcoming devices.
To set a MQTT output (bool) the special value true/false as payload is now case-insensitive.
2022-03-13 09:04:23 +01:00
63d8d73d1a Bugfix: Write MQTT values without enabled send_on_event
Since RevPiModIO2 2.5.6 we have to use the `.writeprocimg()` function to write IO values with enabled `shared_procimg`.

close #6
2022-03-13 08:33:07 +01:00
395574810f Reset of piControl via ioctl
The reset of piControl was made with a call of `piControlReset` or `piTest`.
2021-09-09 11:47:15 +02:00
d8191959c5 The MQTT system sends byte IOs as real byte to the broker
Most IOs are `bool()` or `int()`. In some cases users replaced some IO values
as raw bytes. The MQTT system now also sends these as raw bytes.
2021-09-09 09:16:48 +02:00
3fe69b54cc Parameter for shutdown timeout in seconds for plc program (default is and was 5 seconds) 2021-02-27 15:05:09 +01:00
e4ced5539e New release 0.9.6 2021-01-31 19:32:05 +01:00
f2984ce2b4 Prepare for new shared_procimg behavior 2021-01-31 12:55:46 +01:00
97884d1b75 Merge remote-tracking branch 'origin/master' 0.9.5 2021-01-14 19:17:28 +01:00
86d6f294a5 New release 2021-01-14 19:17:02 +01:00
a6d794c78e Bugfix - Do not remove empty plcworkdir on xml_plcdelete_file function 2020-12-28 23:11:38 +01:00
acd61bc2df Bugfix in upload function 2020-12-28 21:55:13 +01:00
a07fa2e333 Set configured owner of files and directories after plc program upload
If 'plcworkdir_set_uid' is set to 1, all uploaded files and new created
directories in plc work dir will set to configured owner and group.
2020-11-27 09:33:15 +01:00
1b7c4cddc4 Fix closing connected RevPiSlaveDev on program exit.
RevPiSlaveDev are daemon threads and we have to .join() after calling .stop()
to let the thread finish its work of disconnect and write default values to
process image.
2020-11-21 10:51:32 +01:00
c393b9fb05 Fix problem with extended unix user groups
PLC program got only uid and gid, but not the other group ids of user.
Set gid to work directory, too.
Set uid and gid to uploaded files.
2020-11-04 23:18:52 +01:00
7b242865e4 XML-RPC performance, RevPi Flat soft watchdog bit
XML-RPC handle multiple request in main loop
XML-RPC log system send max 1M of data
XML-RPC set handler timeout to 2 seconds
Add support for RevPi Flat last bit of RevPiLED word for soft watchdog
2020-10-11 11:35:35 +02:00
b24ea9fcb3 New XML functions for RevPiCommander 2020-09-24 18:32:41 +02:00
Sven Sager
20939a49ec Create FUNDING.yml 2020-08-13 20:38:20 +02:00
735786144e XML-RPC is managed by main thread 2020-07-25 17:03:12 +02:00
8f0249673a Call functions with watchdogs.py.
Call psstop after "reset driver"
2020-07-25 13:26:33 +02:00
7f00725036 Set always localhost to ACL with revpipyload_secure_installation 2020-06-27 12:56:57 +02:00
0162692e51 New release 0.9.2 2020-06-24 21:05:53 +02:00
22ac2c96de New default values for revpipyload.conf
Process image will set to ZERO on error in your control program,
user pi and your control program can write to work directory /var/lib/revpipyload,
XML-RPC server for RevPiPyControl is bind to localhost.
Use revpipyload_secure_installation to quick setup the access via RevPiPyControl from local network
Max logfile size is 1M before rotate
2020-06-24 17:13:51 +02:00
6aa6985567 Added assistant program revpipyload_secure_installation to setup access via RevPiPyControl
This program will activate/deactivate XML-RPC,
bind it to localhost or your network adapter,
install ACL lists, which you can modify via RevPiPyControl
2020-06-24 17:08:16 +02:00
3943552382 New release 0.9.1 2020-06-23 13:16:13 +02:00
6c32e81b9f Bug fix to reload created piCtory configuration, while daemon is running 2020-06-23 12:04:59 +02:00
e7c6899101 Bugfix on missing piCtory config, cleanup 0.9.0 2020-05-16 11:55:14 +02:00
724d785a12 Return PLC program exitcode on crash, Watchdog in MQTT for all Cores, no debug-message on internal revpimodio 2020-05-03 13:39:16 +02:00
a40b39eb22 Bugfix on watchdogs.py, remove type hints because of wheezy and jessie
SoftwareWatchdog did not restart after daemon reload and switching from 0 to >=1 value
ResetDriver trigger will not always return True if not_implemented is True
2020-05-02 19:45:05 +02:00
beb073893b Bugfix RtLevel, software watchdog for PLC Program
RtLevel was not set on restart plc program after crash
Software watchdog will restart plc program, if it does not toggle core.wd
in the configured time. It is the same bit and function as on connect
device to trigger hardware watchdog (bit 7 in RevPiLED).
2020-05-01 22:59:10 +02:00
d77fea0b48 "Reset Driver" of piCtory can now restart your plc program
You can set reset_driver_action in revpipyload.conf to 0, 1, 2
0=do nothing
1=Restart PLC program only if piCtory config was changed
2=Always restart PLC program after pressing "Reset Driver" (default)
(will not work on old wheezy)

close #1
2020-04-30 22:11:23 +02:00
13d42acd67 Use new RevPiModIO features 2020-04-13 10:03:17 +02:00
7c646e9770 Fix compile error on older Python3 versions 2020-04-13 09:19:17 +02:00
5099f255d6 Cleanup and new version number 0.8.5 2020-04-12 08:35:39 +02:00
86aed08870 Change plc-watchdog value in .conf and xml-rpc 2020-03-18 09:46:15 +01:00
7f1cd2a58e Insert watchdog for netcmd-loop, put unpack values directly to variables
The watchdog will force a disconnect, if the runtime of the netcmd-cylce is longer than __deadtime
Default value of watchdog is True
Split unpacked values of netcmd directly to cmd, position, length and blob
2020-03-17 19:39:20 +01:00
602daee3ea Use struct module for net commands, send files with length, replace SD with WD
The struct module is more efficient than int.from_bytes.
piCtory and ReplaceIO file length in the first 4 bytes of transmission
Replaced SD with WD cmd, which will write one request, no buffer
2020-03-08 20:57:56 +01:00
b5dd561aa3 Implement bytebuffer and length check to picontrolserver.py
Compatible to RevPiModIO <= 2.4.2
2020-03-08 14:58:38 +01:00