• 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
#11
Bitte then it would be necessary to load 2 hardwaremodules at the Same time, the itgw433 and gpio or raspyrfm. Is this possible?
 
Reply
#12
If it isn't we should make it possible. However, if you are going to develop one, let's make it in Lua immediatly.
 
Reply
#13
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?
 
Reply
#14
Lua is probably the most easy language there is around. Just check what i already did in it.
 
Reply
#15
I have a working prototype in c:

https://github.com/Phunkafizer/pilight/t.../hwitgw433

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
Code:
itgw433Init(void);
function. I have no idea how to read a value from here.
 
Reply
#16
What do you want to achieve logically?
 
Reply
#17
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.
 
Reply
#18
I know, but don't try to fix it on your side. The new lua hardware logic doesn't have that limitation anymore.
 
Reply
#19
On which branch could I try to implement and testrun a lua hardware module? Does this already work for staging?
 
Reply
#20
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.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  Issue send actions over Socket API in AdHoc network ggtrts 10 588 03-13-2019, 06:32 AM
Last Post: curlymo
  pilight-send and pilight-daemon DieterK 0 499 06-20-2018, 12:44 AM
Last Post: DieterK
  Switching ceiling fan with pilight-send -p raw gadget 4 2,562 01-12-2016, 07:39 PM
Last Post: eunger
  Send Mail as API Action Cipher 1 1,376 07-25-2015, 07:00 PM
Last Post: curlymo
  send-repeat Tommybear1979 7 3,938 06-18-2015, 08:04 AM
Last Post: wo_rasp
  Use pilight to send data between RPis Korrupt 3 2,343 06-01-2015, 10:40 PM
Last Post: curlymo
  Web GUI working, pilight-send not for elro_he sensorback 4 3,343 02-05-2015, 10:32 PM
Last Post: sensorback
Question pilight-send or pilight-control --> update config.json terrar 3 3,115 10-23-2014, 07:52 PM
Last Post: curlymo
  API: send raw code to daemon Leehta 6 4,453 03-11-2014, 11:29 PM
Last Post: curlymo
  pilight-send no longer for remote services? koffie 1 1,759 01-08-2014, 10:16 AM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)