• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
TRIGGERcmd
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  1. Home
  2. Sébastien Pineau
  3. Posts
  • Profile
  • Following 0
  • Followers 0
  • Topics 1
  • Posts 4
  • Best 0
  • Controversial 0
  • Groups 0

Posts made by Sébastien Pineau

  • RE: Installation error on Raspberry PI 3

    They are Phoenix 433 Plug, chinese cheap, the one sold with a remote control ABCD. They are quite old now, can't find them online. You can scan the code send by the remote and repeat it with a 433MHz receiver/emitter or use this piece of code I found some time ago:

    import time
    import sys
    import RPi.GPIO as GPIO
    from DHT11_06_DC import read_temp
    a_on =  '1111111111111010101011101'
    a_off = '1111111111111010101010111'
    b_on =  '1111111111101110101011101'
    b_off = '1111111111101110101010111'
    c_on =  '1111111111101011101011101'
    c_off = '1111111111101011101010111'
    d_on =  '1111111111101010111011101'
    d_off = '1111111111101010111010111'
    r_on =  '1010101010111'
    r_off = '1010101011101'
    short_delay =    0.00045
    long_delay =     0.00090
    extended_delay = 0.0096
    NUM_ATTEMPTS = 10
    TRANSMIT_PIN = 16
    def transmit_code(code):
    	'''Transmit a chosen code string using the GPIO transmitter'''
    	GPIO.setmode(GPIO.BCM)
    	GPIO.setup(TRANSMIT_PIN, GPIO.OUT)
    	for t in range(NUM_ATTEMPTS):
    		for i in code:
    			if i == '1':
    				GPIO.output(TRANSMIT_PIN, 1)
    				time.sleep(short_delay)
    				GPIO.output(TRANSMIT_PIN, 0)
    				time.sleep(long_delay)
    			elif i == '0':
    				GPIO.output(TRANSMIT_PIN, 1)
    				time.sleep(long_delay)
    				GPIO.output(TRANSMIT_PIN, 0)
    				time.sleep(short_delay)
    			else:
    				continue
    		GPIO.output(TRANSMIT_PIN, 0)
    		time.sleep(extended_delay)
    	GPIO.cleanup()
    def main():
    	while True:
    		
    		tmp=50#read_temp(50)
    		print(tmp,end='')
    		if tmp>=40:
    			exec('transmit_code(r_on)')
    			print (' on',end='')
    		time.sleep(5)
    		if tmp> 41:   
    			exec('transmit_code(r_off)')
    			print (' off',end='')
    		print (':')
    		time.sleep(5)            
    if __name__=='__main__':
    	main()
    
    posted in Raspberry Pi
    S
    Sébastien Pineau
    Jul 25, 2021, 10:15 PM
  • RE: Installation error on Raspberry PI 3

    And node -v gave me v16.5.0

    posted in Raspberry Pi
    S
    Sébastien Pineau
    Jul 25, 2021, 9:42 PM
  • RE: Installation error on Raspberry PI 3

    Hi Russ,
    Thank you for your fast reply.
    Actually, it now work fine, I tried several of your proposals and other about nvm, but I'm unfortunately unable to say which one finally solved the issue. I made further testing with commands from my ok google to control my house appliances and cheap 443Mhz plugs and it look great. Thank you.

    posted in Raspberry Pi
    S
    Sébastien Pineau
    Jul 25, 2021, 9:40 PM
  • Installation error on Raspberry PI 3

    Hi,

    I receive an error when installing triggercmd. Something related to node_modules.
    I tried several hints provided, removed, put back, changed npm, still operation not allowed.

    root@raspberrypi:~# dpkg -i triggercmdagent_1.0.1_all.deb
    (Lecture de la base de données... 146201 fichiers et répertoires déjà installés.)
    Préparation du dépaquetage de triggercmdagent_1.0.1_all.deb ...
    Dépaquetage de triggercmdagent (1.0.1) sur (1.0.1) ...
    Paramétrage de triggercmdagent (1.0.1) ...
    Directory 'node_modules' exists. Running 'npm rebuild'
    /var/lib/dpkg/info/triggercmdagent.postinst : ligne 71 : 4776 Instruction non permise npm rebuild --production
    dpkg: erreur de traitement du paquet triggercmdagent (--install) :
    le sous-processus script post-installation installé a retourné une erreur de sortie d'état 132
    Des erreurs ont été rencontrées pendant l'exécution :
    triggercmdagent

    Sorry for the french installation, hope this is not the problem.
    The system has a lot of running modules used to control home automation, so i cannot go from scratch.

    posted in Raspberry Pi
    S
    Sébastien Pineau
    Jul 24, 2021, 10:04 PM