• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Send pulsestream via API
Bitte then it would be necessary to load 2 hardwaremodules at the Same time, the itgw433 and gpio or raspyrfm. Is this possible?
If it isn't we should make it possible. However, if you are going to develop one, let's make it in Lua immediatly.
Quote:If it isn't we should make it possible.

Can you do that?

My lua knowledge is at zero; is it easy to translate it when a runninig c version is available?
Lua is probably the most easy language there is around. Just check what i already did in it.
I have a working prototype in c:


It should not be difficult to implement also the other way around, i. e. using a hardware ITGW-433 as sender in pilight.

However I have the problem to read the hardware's settings from the config already in the
function. I have no idea how to read a value from here.
What do you want to achieve logically?
This hardwaremodule (and also the raspyrfm) can be different hwtypes depending if their configuration. E. g. hwtype for the raspyrfm will be RF433 when you configure the frequency to 433 MHz and RF868 when configuring to 868 MHz.
The itgw pilight module can be "server", which is the way of my prototype. But later it could be extended for "client" mode, which means controlling a real ITGW433. In "server" mode, the hwtype needs to be NONE or so, for "client" mode RF433.
When pilight starts it seems to check not having 2 hardware modules with the same hwtype, but this check is done before calling the HwInit of the module, but after the init function.
Sorry, bit hard to explain, hope it is reasonable.
I know, but don't try to fix it on your side. The new lua hardware logic doesn't have that limitation anymore.
On which branch could I try to implement and testrun a lua hardware module? Does this already work for staging?
The unittest can go into the latest master, a working staging implementation is due for tomorrow. At least if all goes as planned.

Do keep in mind that not all needed lua interfaces are done yet, but this is a good starting point for improving the existing interfaces and adding new ones.

Possibly Related Threads...
Thread Author Replies Views Last Post
  Bug: double free or corruption in pilight-send blackzombie 12 1,330 10-07-2019, 08:15 PM
Last Post: blackzombie
  Issue send actions over Socket API in AdHoc network ggtrts 10 1,748 03-13-2019, 06:32 AM
Last Post: curlymo
  pilight-send and pilight-daemon DieterK 0 889 06-20-2018, 12:44 AM
Last Post: DieterK
  Switching ceiling fan with pilight-send -p raw gadget 4 3,266 01-12-2016, 07:39 PM
Last Post: eunger
  Send Mail as API Action Cipher 1 1,728 07-25-2015, 07:00 PM
Last Post: curlymo
  send-repeat Tommybear1979 7 4,851 06-18-2015, 08:04 AM
Last Post: wo_rasp
  Use pilight to send data between RPis Korrupt 3 2,831 06-01-2015, 10:40 PM
Last Post: curlymo
  Web GUI working, pilight-send not for elro_he sensorback 4 3,980 02-05-2015, 10:32 PM
Last Post: sensorback
Question pilight-send or pilight-control --> update config.json terrar 3 3,749 10-23-2014, 07:52 PM
Last Post: curlymo
  API: send raw code to daemon Leehta 6 5,087 03-11-2014, 11:29 PM
Last Post: curlymo

Forum Jump:

Browsing: 1 Guest(s)